
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'EB Garamond', sans-serif;
}

.topbar-container {
    z-index: 1000;
    width: 100%;
    background: #222;
    color: white;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.5);
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.logo img {
    max-width: 85px;
    height: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links a img {
    height: 30px;
    width: auto;
    filter: grayscale(100%) contrast(200%);
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f4f4f4;
    padding-top: 120px;
    position: relative;
}

.content {
    width: 80%;
    max-width: 900px;
}

.about-text {
    font-size: 1em;
    line-height: 1.6;
    text-align: left;
    max-width: none;        /* removes width restriction */
    margin: 0;              /* removes horizontal centering */
    padding: 10px 0;        /* tighten up side spacing */
    color: #333;
}

.about-logo {
    display: block;
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 20px auto;
}

.registry-search {
    margin-bottom: 20px;
}

#profile-container img {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

#profile-container h1 {
    text-align: center;
    margin-bottom: 1rem;
}

.featured-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 30px auto;
    padding: 20px;
    background: white;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

.featured-header {
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 15px;
}

.prisoners-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.prisoner-card {
    background: #222;
    color: white;
    border-radius: 10px;
    width: calc((100% - 40px) / 3);
    max-width: 280px;
    padding: 15px;
    text-align: center;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.prisoner-card a.full-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.prisoner-card:hover {
    transform: scale(1.05);
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 780px) {
    .prisoners-grid {
        flex-direction: column;
        align-items: center;
    }

    .prisoner-card {
        width: 100%;
        max-width: 280px;
    }
}

.prisoner-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.prisoner-name {
    font-size: 1.4em;
    font-weight: bold;
    margin: 10px 0;
}

.prisoner-bio {
    font-size: 0.9em;
    margin-bottom: 15px;
}

.profile-link {
    text-decoration: none;
    color: #ffcc00;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(255, 204, 0, 0.2);
    border-radius: 5px;
    position: relative;
    z-index: 2;
}

.read-more {
    font-style: italic;
    font-size: 0.9em;
    color: #555;
    text-decoration: none;
}
.read-more:hover {
    text-decoration: underline;
}

/* --- Grid Navigation --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    margin-bottom: 50px;
}

.grid-item {
    position: relative;
    height: 150px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    transition: transform 0.3s ease;
}

.grid-item:hover {
    transform: scale(1.05);
}

.grid-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.grid-item a {
    position: relative;
    z-index: 2;
    text-decoration: none;
    color: white;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

.grid-item:nth-child(1) { background-image: url('prisonerregistry.jpg'); }
.grid-item:nth-child(2) { background-image: url('prisonersupport.bmp'); }
.grid-item:nth-child(3) { background-image: url('dispatchtransparent.jpg'); }
.grid-item:nth-child(4) { background-image: url('newlogobwbkgdtransparent.png'); }

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: repeat(1, 1fr);
    }
}

.sliced-button-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 40px auto;
    max-width: 900px;
}

.sliced-button {
    display: block;
    width: 300px;
    height: 768px;
    background-image: url('support_buttons_resized.png');
    background-size: 900px 768px;
    background-repeat: no-repeat;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.sliced-button:hover {
    transform: scale(1.02);
}

.sliced-button.write  { background-position: left top; }
.sliced-button.proxy  { background-position: center top; }
.sliced-button.find   { background-position: right top; }

@media (max-width: 960px) {
    .sliced-button {
        width: 100%;
        max-width: 300px;
        height: auto;
        aspect-ratio: 300 / 768;
        background-size: cover;
    }
}

/* --- Support Page Grid Buttons --- */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin: 30px 0;
}

.support-item {
    position: relative;
    height: 150px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.support-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.support-item a {
    position: relative;
    z-index: 2;
    font-size: 1.3em;
    font-weight: bold;
    color: white;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 15px;
    border-radius: 5px;
    text-align: center;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.logo-caption {
    margin-top: 5px;
    font-family: 'EB Garamond', serif;
    font-size: 0.85em;
    text-align: center;
    color: white;
}

.logo-caption span {
    font-style: italic;
}

/* --- about page --- */

.featured-container.about-page {
  text-align: left;
}

.about-page .about-text {
  text-align: left;
}

.logo a {
    display: block;
    line-height: 0;
}

/* --- dispatch page --- */

.dispatch-list {
    text-align: left;
}

.dispatch-list ul {
    padding-left: 20px; /* gives space for bullets */
    list-style-position: outside;
}

.dispatch-list li {
    margin-bottom: 5px;
}

.dispatch-list a {
    text-align: left;
    display: inline-block; /* keeps links from auto-centering */
}

