/* =========================================================
   FIRST OXFORD SCHOOL
   STAFF MEMBERS PAGE
   CLEAN STAFF CSS
   ========================================================= */


/* =========================================================
   GLOBAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    padding: 0;

    font-family: "Poppins", sans-serif;

    background-color: #f5f7fb;

    color: #222;

    overflow-x: hidden;
}


h3 {
    text-align: center;
}

img {
    max-width: 100%;
}


/* =========================================================
   NAVBAR
   ========================================================= */

.navbar {
    position: sticky;

    top: 0;

    z-index: 1000;

    width: 100%;

    min-height: 90px;

    padding: 10px 40px;

    background-color: rgb(241, 239, 97);

    display: grid;

    grid-template-columns:
        1fr 130px 1fr;

    align-items: center;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-right {
        width: auto;

        margin-left: auto;

        display: flex;

        align-items: center;
    }

    .nav-right a {
        display: none;
    }

    .menu-toggle {
        display: block !important;

        font-size: 28px;

        color: black;

        cursor: pointer;

        z-index: 1002;
    }


/* =========================================================
   MOBILE MENU / LEFT SIDE
   ========================================================= */

.nav-left {
    display: flex;

    align-items: center;

    justify-content: flex-start;

    gap: 25px;

    width: 100%;
}


.nav-left a {
    position: relative;

    color: black;

    text-decoration: none;

    font-size: 16px;

    font-weight: 500;

    white-space: nowrap;
}


/* Hover line */

.nav-left a::after {
    content: "";

    position: absolute;

    left: 0;

    bottom: -5px;

    width: 0;

    height: 2px;

    background-color: white;

    transition: width 0.3s ease;
}


.nav-left a:hover::after {
    width: 100%;
}


/* =========================================================
   LOGO
   ========================================================= */

.nav-logo {
    width: 130px;

    height: 80px;

    display: flex;

    align-items: center;

    justify-content: center;

    position: relative;

    z-index: 1001;
}


.nav-logo img {
    width: 110px;

    height: 75px;

    object-fit: contain;

    display: block;
}


/* =========================================================
   NAV RIGHT / HAMBURGER
   ========================================================= */

.nav-right {
    width: 100%;

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 25px;
}


.menu-toggle {
    display: none;

    font-size: 28px;

    color: black;

    cursor: pointer;

    z-index: 1002;
}


/* =========================================================
   STAFF PAGE HEADER
   ========================================================= */

.section1 {
    width: 100%;

    max-width: 1200px;

    margin: 0 auto;

    padding: 40px 20px;
}


/* =========================================================
   MAIN HEADER
   ========================================================= */

header {
    text-align: center;

    margin-bottom: 35px;
}


header h1 {
    margin: 0;

    font-size: 38px;

    font-weight: 700;

    color: #222;
}


header p {
    margin-top: 10px;

    font-size: 17px;

    color: #666;
}


/* =========================================================
   SEARCH SECTION
   ========================================================= */

.hero {
    width: 100%;

    min-height: 160px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 30px 20px;

    background:
        linear-gradient(
            rgba(14, 138, 176, 0.08),
            rgba(14, 138, 176, 0.08)
        );

    border-radius: 15px;

    box-sizing: border-box;
}


/* Search box */

.search-box {
    width: 100%;

    max-width: 650px;

    position: relative;
}


.search-box input {
    width: 100%;

    padding: 17px 22px;

    border: 1px solid #d7dce2;

    border-radius: 10px;

    outline: none;

    background-color: white;

    font-family: "Poppins", sans-serif;

    font-size: 15px;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.06);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.search-box input:focus {
    border-color: #0e8ab0;

    box-shadow:
        0 0 0 3px rgba(14, 138, 176, 0.1);
}


/* =========================================================
   STAFF DIRECTORY
   ========================================================= */

#gallery-container {
    width: 100%;
    max-width: 1200px;
    margin: 35px auto;
    padding: 0 20px;

    display: flex;
    flex-direction: column;
    gap: 40px;

    box-sizing: border-box;
}


/* =========================================================
   STAFF CARD
   ========================================================= */

.gallery-item {
    width: 100%;

    background-color: white;

    border-radius: 15px;

    overflow: hidden;

    box-shadow:
        0 6px 22px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.gallery-item:hover {
    transform:
        translateY(-5px);

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.12);
}


.gallery-item img {
    width: 100%;

    height: 280px;

    object-fit: cover;

    display: block;
}


.gallery-item p {
    margin: 0;

    padding: 17px;

    text-align: center;

    font-size: 15px;

    color: #444;

    line-height: 1.5;
}


/* =========================================================
   LOADING / EMPTY STATE
   ========================================================= */

#gallery-container:empty::before {
    content: "Loading staff members...";

    display: block;

    grid-column: 1 / -1;

    text-align: center;

    padding: 50px 20px;

    color: #777;

    font-size: 15px;
}


/* =========================================================
   FOOTER
   ========================================================= */

    .fos-footer {
        background: #1a1a2e;
        color: #cfd2dc;
        font-family: 'Poppins', sans-serif;
        padding: 60px 30px 0;
    }
 
    .fos-footer a {
        color: #cfd2dc;
        text-decoration: none;
        transition: color 0.2s;
    }
 
    .fos-footer a:hover {
        color: rgb(241, 239, 97);
    }
 
    .fos-footer-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 40px;
        max-width: 1200px;
        margin: 0 auto;
        padding-bottom: 40px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
 
    /* ---- Column 1: About + Social ---- */
 
    .fos-footer-about {
        flex: 1 1 280px;
        max-width: 340px;
    }
 
    .fos-footer-about h3 {
        color: white;
        font-size: 16px;
        margin: 0 0 14px;
    }
 
    .fos-footer-social {
        display: flex;
        gap: 12px;
        margin-bottom: 22px;
        flex-wrap: wrap;
    }
 
    .fos-footer-social a {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255,255,255,0.08);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
    }
 
    .fos-footer-social a:hover {
        background: rgb(241, 239, 97);
        color: #1a1a2e;
    }
 
    .fos-footer-about p {
        font-size: 13px;
        line-height: 1.7;
        color: #a9adba;
        margin: 0 0 12px;
    }
 
    /* ---- Columns 2-4: Link groups ---- */
 
    .fos-footer-links {
        flex: 1 1 180px;
    }
 
    .fos-footer-links h4 {
        color: white;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin: 0 0 18px;
    }
 
    .fos-footer-links ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }
 
    .fos-footer-links li {
        margin-bottom: 12px;
        font-size: 13px;
    }
 
    /* ---- Bottom bar ---- */
 
    .fos-footer-bottom {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        font-size: 12px;
        color: #8f93a1;
    }
 
    .fos-footer-bottom a {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #8f93a1;
    }
 
    .fos-footer-bottom a:hover {
        color: rgb(241, 239, 97);
    }
 
    @media (max-width: 600px) {
 
        .fos-footer {
            padding: 40px 20px 0;
        }
 
        .fos-footer-bottom {
            justify-content: center;
            text-align: center;
        }
 
    }
 


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .navbar {
        padding:
            10px 25px;

        grid-template-columns:
            1fr 110px 1fr;
    }


    .nav-left {
        gap: 15px;
    }


    .nav-left a {
        font-size: 14px;
    }


    .nav-logo {
        width: 110px;
    }


    .nav-logo img {
        width: 95px;

        height: 70px;
    }


    #gallery-container {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


/* =========================================================
   MOBILE NAVBAR
   ========================================================= */

@media (max-width: 768px) {

    /* -----------------------------------------------------
       NAVBAR
       ----------------------------------------------------- */

    .navbar {

        width: 100%;

        height: 70px;

        min-height: 70px;

        padding: 5px 15px;

        display: flex;

        align-items: center;

        justify-content: space-between;

        position: sticky;

        top: 0;

        z-index: 1000;
    }


    /* -----------------------------------------------------
       MOBILE MENU
       ----------------------------------------------------- */

    .nav-left {

        position: absolute;

        top: 70px;

        left: 0;

        width: 100%;

        padding: 10px 0;

        display: flex;

        flex-direction: column;

        align-items: stretch;

        justify-content: flex-start;

        gap: 0;

        background-color:
            rgb(241, 239, 97);

        box-shadow:
            0 6px 15px rgba(0, 0, 0, 0.15);

        transform:
            translateY(-120%);

        transition:
            transform 0.3s ease;

        z-index: 999;
    }


    /* -----------------------------------------------------
       OPEN MENU
       ----------------------------------------------------- */

    .nav-left.active {

        transform:
            translateY(0);
    }


    /* -----------------------------------------------------
       MOBILE LINKS
       ----------------------------------------------------- */

    .nav-left a {

        display: block;

        width: 100%;

        padding: 14px 20px;

        text-align: center;

        font-size: 16px;

        color: black;

        white-space: nowrap;

        box-sizing: border-box;
    }


    .nav-left a::after {
        display: none;
    }


    .nav-left a:hover {

        background-color:
            rgba(255, 255, 255, 0.45);
    }


    /* -----------------------------------------------------
       CENTER LOGO
       ----------------------------------------------------- */

    .nav-logo {

        position: absolute;

        left: 50%;

        top: 50%;

        transform:
            translate(-50%, -50%);

        width: 100px;

        height: 60px;

        z-index: 1001;
    }


    .nav-logo img {

        width: 100px;

        height: 60px;

        object-fit: contain;
    }


    /* -----------------------------------------------------
       HAMBURGER
       ----------------------------------------------------- */

    .nav-right {

        width: auto;

        margin-left: auto;

        display: flex;

        align-items: center;

        justify-content: center;

        z-index: 1002;
    }


    .menu-toggle {

        display: block !important;

        font-size: 27px;

        color: black;

        cursor: pointer;
    }


    /* -----------------------------------------------------
       STAFF HEADER
       ----------------------------------------------------- */

    .section1 {

        padding:
            30px 15px;
    }


    header h1 {

        font-size: 30px;

        line-height: 1.2;
    }


    header p {

        font-size: 15px;

        line-height: 1.5;
    }


    /* -----------------------------------------------------
       SEARCH
       ----------------------------------------------------- */

    .hero {

        min-height: 140px;

        padding:
            25px 15px;
    }


    .search-box input {

        padding:
            14px 16px;

        font-size: 14px;
    }


    /* -----------------------------------------------------
       STAFF CARDS
       ----------------------------------------------------- */

    #gallery-container {

        width: 100%;

        margin:
            25px 0;

        padding:
            0 15px;

        grid-template-columns:
            1fr;

        gap: 20px;
    }


    .gallery-item img {

        height: 300px;
    }

}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 480px) {

    .navbar {

        height: 65px;

        min-height: 65px;

        padding:
            5px 12px;
    }


    .nav-left {

        top: 65px;
    }


    .nav-left a {

        padding:
            13px 15px;

        font-size: 15px;
    }


    .nav-logo {

        width: 90px;

        height: 55px;
    }


    .nav-logo img {

        width: 90px;

        height: 55px;
    }


    .menu-toggle {

        font-size: 25px;
    }


    .section1 {

        padding:
            25px 10px;
    }


    header h1 {

        font-size: 25px;
    }


    header p {

        font-size: 14px;
    }


    #gallery-container {

        padding:
            0 10px;
    }


    .gallery-item img {

        height: 250px;
    }


    .gallery-item p {

        font-size: 14px;

        padding: 14px;
    }

}

/* =========================================
   STAFF PHOTO FIX
   ========================================= */

.gallery-item img {
    width: 100%;
    height: 360px;
    object-fit: contain;
    object-position: center top;
    display: block;
    background-color: #ffffff;
    border-radius: 15px;
}

/* Mobile */
@media (max-width: 768px) {
    .gallery-item img {
        height: 360px;
        object-fit: contain;
        object-position: center top;
    }
}

@media (max-width: 480px) {
    .gallery-item img {
        height: 320px;
        object-fit: contain;
        object-position: center top;
    }
}

/* =========================================
   STAFF CATEGORY GRID LAYOUT
   ========================================= */

.staff-category {
    width: 100%;
    display: block;
}

.staff-category h2 {
    margin-bottom: 25px;
    text-align: center;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
    width: 100%;
}

/* Tablet */
@media (max-width: 1000px) {
    .staff-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 600px) {
    .staff-grid {
        grid-template-columns: 1fr;
    }
}