/* ============================================================
   CARROLLTON CLASS OF 1971 WEBSITE
   Main Stylesheet
   ============================================================ */

* {
    box-sizing: border-box;
}


/* ------------------------------------------------------------
   PAGE
   ------------------------------------------------------------ */

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f4f6;
    color: #222;
    line-height: 1.5;
}


/* ------------------------------------------------------------
   HEADER
   ------------------------------------------------------------ */

header {
    background: #1f2937;
    color: white;
    padding: 20px;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;
}

header h1 {
    margin: 0;
    font-size: 28px;
}

header p {
    margin: 5px 0 0;
    color: #d1d5db;
}


/* ------------------------------------------------------------
   NAVIGATION
   ------------------------------------------------------------ */

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;

    padding: 9px 12px;

    border-radius: 6px;
}

nav a:hover {
    background: #374151;
}


/* ------------------------------------------------------------
   MAIN CONTENT
   ------------------------------------------------------------ */

main {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

h1 {
    margin-top: 0;
}

h2 {
    margin-top: 0;
}

h3 {
    margin-bottom: 8px;
}

.subtitle {
    color: #666;
}


/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */

footer {
    text-align: center;
    padding: 35px 20px;
    color: #666;
}


/* ------------------------------------------------------------
   FLASH MESSAGES
   ------------------------------------------------------------ */

.flash {
    background: #fff3cd;
    border: 1px solid #ffe69c;
    color: #664d03;

    padding: 12px 15px;

    margin-bottom: 20px;

    border-radius: 6px;
}


/* ------------------------------------------------------------
   GENERAL CARDS
   ------------------------------------------------------------ */

.form-card,
.profile-card {
    background: white;

    padding: 25px;

    margin: 20px 0;

    border-radius: 10px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}


/* ------------------------------------------------------------
   FORMS
   ------------------------------------------------------------ */

.form-card label {
    display: block;

    font-weight: bold;

    margin-top: 15px;
    margin-bottom: 6px;
}

.form-card input,
.form-card textarea {
    width: 100%;

    padding: 11px;

    border: 1px solid #ccc;

    border-radius: 5px;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 16px;

    background: white;
}

.form-card input:focus,
.form-card textarea:focus {
    outline: none;

    border-color: #2563eb;

    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}


/* ------------------------------------------------------------
   CHECKBOXES
   ------------------------------------------------------------ */

.checkbox-label {
    font-weight: normal !important;

    display: flex !important;

    align-items: center;

    gap: 8px;
}

.checkbox-label input {
    width: auto !important;

    margin: 0;
}


/* ------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------ */

button,
.button {
    display: inline-block;

    background: #2563eb;

    color: white;

    border: none;

    padding: 10px 16px;

    border-radius: 6px;

    text-decoration: none;

    cursor: pointer;

    font-size: 15px;

    margin-top: 15px;
}

button:hover,
.button:hover {
    background: #1d4ed8;
}


/* ------------------------------------------------------------
   CLASS DIRECTORY
   ------------------------------------------------------------ */

.directory-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(240px, 1fr));

    gap: 20px;

    margin-top: 25px;
}


/* ------------------------------------------------------------
   CLASSMATE DIRECTORY CARD
   ------------------------------------------------------------ */

.classmate-card {
    display: block;

    text-decoration: none;

    color: inherit;

    background: white;

    border: 1px solid #ddd;

    border-radius: 12px;

    overflow: hidden;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.classmate-card:hover {
    color: inherit;

    text-decoration: none;

    transform: translateY(-3px);

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.15);
}


/* ------------------------------------------------------------
   CLASSMATE PHOTO
   ------------------------------------------------------------ */

.classmate-photo {
    width: 100%;

    height: 220px;

    background: #eeeeee;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;
}

.classmate-photo img {
    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;
}


/* ------------------------------------------------------------
   PROFILE PHOTO PLACEHOLDER
   ------------------------------------------------------------ */

.profile-placeholder {
    width: 110px;

    height: 110px;

    border-radius: 50%;

    background: #777;

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 48px;

    font-weight: bold;
}


/* ------------------------------------------------------------
   CLASSMATE INFORMATION
   ------------------------------------------------------------ */

.classmate-info {
    padding: 16px;
}

.classmate-info h2 {
    margin: 0 0 8px 0;

    font-size: 21px;

    color: #222;
}

.former-name {
    color: #666;

    font-size: 14px;

    margin-bottom: 6px;
}

.location {
    color: #555;

    font-size: 14px;
}


/* ------------------------------------------------------------
   DIRECTORY PAGE HEADER
   ------------------------------------------------------------ */

.page-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    margin-bottom: 10px;
}

.page-header h1 {
    margin-bottom: 4px;
}

.muted {
    color: #777;
}


/* ------------------------------------------------------------
   EMPTY DIRECTORY
   ------------------------------------------------------------ */

.empty-state {
    text-align: center;

    padding: 50px 20px;

    background: #f5f5f5;

    border-radius: 12px;

    margin-top: 25px;
}

.empty-state h2 {
    margin-bottom: 10px;
}


/* ------------------------------------------------------------
   ORIGINAL DIRECTORY CARD SUPPORT
   ------------------------------------------------------------ */

.directory-card {
    background: white;

    padding: 20px;

    border-radius: 10px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

    min-height: 180px;
}

.directory-card h2 {
    margin-top: 0;

    margin-bottom: 12px;
}

.directory-card p {
    margin: 8px 0;
}


/* ------------------------------------------------------------
   PROFILE
   ------------------------------------------------------------ */

.profile-card h2 {
    margin-top: 0;
}

.profile-card h3 {
    margin-top: 25px;
}

.privacy-note {
    color: #777;

    font-size: 14px;

    margin-top: 10px;
}


/* ------------------------------------------------------------
   CLASSMATE PROFILE PAGE
   ------------------------------------------------------------ */

.profile-page-header {
    margin-bottom: 20px;
}

.classmate-profile {
    max-width: 850px;

    margin: 0 auto 25px auto;
}


/* ------------------------------------------------------------
   LARGE PROFILE PHOTO
   ------------------------------------------------------------ */

.profile-photo-section {
    text-align: center;

    margin-bottom: 25px;
}

.profile-photo-large {
    width: 220px;

    height: 220px;

    object-fit: cover;

    border-radius: 50%;

    border: 5px solid #e5e7eb;

    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.15);
}

.profile-photo-placeholder {
    width: 220px;

    height: 220px;

    margin: 0 auto;

    border-radius: 50%;

    background: #777;

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 90px;

    font-weight: bold;

    border: 5px solid #e5e7eb;
}


/* ------------------------------------------------------------
   PROFILE INFORMATION
   ------------------------------------------------------------ */

.profile-information {
    max-width: 650px;

    margin: 0 auto;
}

.profile-field {
    padding: 14px 0;

    border-bottom: 1px solid #e5e7eb;
}

.profile-label {
    display: block;

    font-size: 13px;

    font-weight: bold;

    color: #777;

    margin-bottom: 4px;

    text-transform: uppercase;

    letter-spacing: 0.4px;
}

.profile-value {
    display: block;

    font-size: 17px;

    color: #222;
}

.profile-value a {
    color: #2563eb;

    text-decoration: none;
}

.profile-value a:hover {
    text-decoration: underline;
}


/* ------------------------------------------------------------
   ABOUT CLASSMATE
   ------------------------------------------------------------ */

.profile-about {
    margin-top: 25px;

    padding-top: 5px;
}

.profile-about h3 {
    margin-bottom: 10px;
}

.profile-about p {
    white-space: pre-wrap;

    line-height: 1.7;
}


/* ------------------------------------------------------------
   PROFILE ACTIONS
   ------------------------------------------------------------ */

.profile-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;

    margin-top: 30px;

    padding-top: 20px;

    border-top: 1px solid #e5e7eb;
}

.profile-actions .button {
    margin-top: 0;
}


/* ------------------------------------------------------------
   POSTS
   ------------------------------------------------------------ */

.post-date {
    color: #777;

    font-size: 13px;

    margin-top: -8px;
}

.profile-card > p {
    white-space: pre-wrap;
}


/* ------------------------------------------------------------
   COMMENTS
   ------------------------------------------------------------ */

.comments {
    margin-top: 20px;

    padding-left: 20px;

    border-left: 3px solid #ddd;
}

.comment {
    margin-bottom: 15px;

    padding-bottom: 10px;

    border-bottom: 1px solid #eee;
}

.comment:last-child {
    border-bottom: none;
}

.comment p {
    margin: 5px 0;
}

.comment-date {
    color: #777;

    font-size: 12px;

    margin-left: 8px;
}


/* ------------------------------------------------------------
   COMMENT FORM
   ------------------------------------------------------------ */

.profile-card form {
    margin-top: 15px;
}

.profile-card form input[type="text"] {
    width: 75%;

    padding: 10px;

    border: 1px solid #ccc;

    border-radius: 5px;

    font-size: 15px;
}

.profile-card form input[type="text"]:focus {
    outline: none;

    border-color: #2563eb;
}


/* ------------------------------------------------------------
   LINKS
   ------------------------------------------------------------ */

a {
    color: #2563eb;
}

a:hover {
    color: #1d4ed8;
}


/* ------------------------------------------------------------
   MOBILE PHONE DISPLAY
   ------------------------------------------------------------ */

@media (max-width: 700px) {

    header {
        padding: 15px;
    }

    .header-inner {
        flex-direction: column;

        align-items: flex-start;
    }

    header h1 {
        font-size: 23px;
    }

    nav {
        width: 100%;

        gap: 5px;
    }

    nav a {
        background: #374151;

        padding: 8px 10px;

        font-size: 14px;
    }

    main {
        margin-top: 20px;

        padding: 0 12px;
    }

    .form-card,
    .profile-card {
        padding: 18px;
    }

    .directory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    .classmate-photo {
        height: 170px;
    }

    .classmate-info {
        padding: 10px;
    }

    .classmate-info h2 {
        font-size: 17px;
    }

    .profile-card form input[type="text"] {
        width: 100%;
    }

    button,
    .button {
        padding: 10px 14px;
    }

    /* Mobile classmate profile */

    .classmate-profile {
        padding: 18px;
    }

    .profile-photo-large,
    .profile-photo-placeholder {
        width: 170px;

        height: 170px;
    }

    .profile-photo-placeholder {
        font-size: 70px;
    }

    .profile-actions {
        flex-direction: column;
    }

    .profile-actions .button {
        width: 100%;

        text-align: center;
    }

}


/* ------------------------------------------------------------
   VERY SMALL PHONES
   ------------------------------------------------------------ */

@media (max-width: 400px) {

    .directory-grid {
        grid-template-columns: 1fr;
    }

    .classmate-photo {
        height: 210px;
    }

}