/* =====================================================
   IBN-E-SENA TTC — RESPONSIVE HEADER CSS
===================================================== */
html {                      
    scroll-behavior: smooth;
}                           

/* 1. GLOBAL STYLES */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* old root */
:root {
    --blue: #285b40;        /* Emerald Green */
    --green: #087f5b;       /* Deep Teal Green */
    --gold: #a47a22;        /* Metallic Gold */
    --gold-light: #e8cb7a;  /* Soft Gold */
    --text: #17352d;
    --white: #ffffff;
    --light-green: #f5f9f6; /* Soft Tint */
    --border: #e2ebe5;
}
/* new root*/
:root {
    --hdr-deep: #17352d;
    --hdr-primary: #285b40;
    --hdr-teal: #087f5b;
    --hdr-gold: #a47a22;
    --hdr-gold-light: #e8cb7a;
    --hdr-cream: #f5f9f6;
    --hdr-border: rgba(40, 91, 64, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #17352d;
    background-color: #ffffff;
    overflow-x: hidden;
}
/***
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    overflow-x: hidden;
}
***/
a {
    text-decoration: none;
}
/* =========================================
   1. TOP ANNOUNCEMENT BAR
========================================= */
.topbar {
    width: 100%;
    background: linear-gradient(90deg, var(--hdr-deep) 0%, var(--hdr-primary) 55%, var(--hdr-deep) 100%);
    color: #ffffff;
    border-bottom: 1px solid rgba(232, 203, 122, 0.28);
}

.topbar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 9px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-welcome {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: rgba(255, 255, 255, 0.94);
}

.topbar-welcome i {
    color: var(--hdr-gold-light);
    font-size: 0.88rem;
}

.social-links {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.social-links a {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
    background: var(--hdr-gold-light);
    color: var(--hdr-deep);
    transform: translateY(-1px);
}

/* 2. ANNOUNCEMENT BAR */
/***.topbar {
    width: 100%;
    min-height: 40px;
    background: linear-gradient(90deg, #17352d 0%, var(--blue) 50%, #17352d 100%);
    color: var(--white);
    border-bottom: 1px solid rgba(232, 203, 122, 0.3);
}

.topbar-inner {
    min-height: 36px;
    padding: 9px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.topbar-inner p {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
}

.social-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    font-size: 13px;
    font-weight: bold;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
    background: var(--gold-light);
    color: #17352d;
    transform: translateY(-1px);
}***/
/* =========================================
   2. CONTACT INFORMATION STRIP
========================================= */
.contact-strip {
    max-width: 1320px;
    margin: 0 auto;
    padding: 16px 28px 26px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    gap: 14px;
    background: #ffffff;
}

.contact-item {
    min-width: 0;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.contact-item:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 16%;
    height: 68%;
    width: 1px;
    border-right: 1.5px dashed rgba(40, 91, 64, 0.22);
}

.contact-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--hdr-cream);
    border: 1px solid rgba(40, 91, 64, 0.16);
    color: var(--hdr-gold);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-copy span {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hdr-primary);
}

.contact-copy strong,
.contact-copy a {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--hdr-deep);
    text-decoration: none;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.contact-copy a:hover {
    color: var(--hdr-teal);
}

/*** 3. CONTACT INFORMATION *
.contact-strip {
    min-height: 80px;
    padding: 15px 4%;
    display: grid;
    grid-template-columns: 1fr 1.15fr 1.25fr 1.65fr;
    align-items: center;
    gap: 12px;
    background: var(--white);
}

.contact-item {
    min-width: 0;
    min-height: 30px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border-right: 2px dashed rgba(40, 91, 64, 0.25);
}

.contact-item:first-child {
    padding-left: 0;
}

.contact-item:last-child {
    padding-right: 0;
    border-right: none;
}

.contact-icon {
    flex-shrink: 0;
    color: var(--blue);
    font-size: 34px;
    font-weight: bold;
    line-height: 1;
}

.phone-icon,
.clock-icon,
.envelope-icon {
    font-size: 32px;
}

.pin-icon {
    position: relative;
    width: 26px;
    height: 26px;
    margin-right: 4px;
    background: var(--blue);
    border-radius: 50% 50% 50% 0;
    font-size: 0;
    transform: rotate(-45deg);
}

.pin-icon::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 9px;
    width: 10px;
    height: 10px;
    background: var(--white);
    border-radius: 50%;
}

.contact-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-copy span {
    color: var(--gold);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
}

.contact-copy strong,
.contact-copy > a {
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.contact-copy > a:hover {
    color: var(--blue);
}***/

/* 4. MAIN HEADER */
.main-header {
    position: relative;
    z-index: 100;
}

/* Desktop navigation bar */
.navigation-bar {
    position: relative;
    width: calc(100% - 32px);
    min-height: 62px;
    margin: 0 auto;
    padding: 0 4%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #17352d 0%, var(--blue) 55%, #17352d 100%);
    border: 1.5px solid rgba(232, 203, 122, 0.45);
    border-radius: 55px;
    box-shadow: 0 10px 24px rgba(23, 53, 45, 0.16);
}

.mobile-brand {
    display: none;
}

/* Desktop menu: Equal width columns */
.nav-list {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr) 140px repeat(3, 1fr);
    align-items: center;
    list-style: none;
    padding: 0 20px;
}

.nav-list > li {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-list > li:nth-child(4) {
    margin-left: 80px;
    grid-column: 5;
}

.nav-list > li > a,
.nav-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--white);
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-list > li > a:hover,
.nav-dropdown:hover {
    color: var(--gold-light);
    background: rgba(255, 255, 255, 0.08);
}

.nav-list > li > a.active {
    color: #17352d;
    background: linear-gradient(135deg, #f3d586 0%, #c9a64e 100%);
}

/* 5. CENTERED LOGO (Locked securely in the middle) */
.center-logo {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    width: 148px;
    height: 148px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 2.5px solid var(--gold);
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
    transform: translate(-50%, -50%);
}

.center-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* 7. HAMBURGER & BACKDROP — HIDDEN ON DESKTOP */
.menu-toggle,
.nav-backdrop {
    display: none;
}

/* 8. SMALLER DESKTOP SCREENS */
@media (max-width: 1450px) {
    .contact-strip {
        grid-template-columns: 1fr 1fr;
        gap: 12px 25px;
        padding: 18px 4%;
    }

    .contact-item {
        justify-content: flex-start;
        border-right: none;
        padding: 10px;
    }

    .navigation-bar {
        padding: 0 3%;
    }

    .nav-list {
        gap: 10px;
    }

    .nav-list > li > a,
    .nav-dropdown {
        padding: 9px 12px;
        font-size: 15px;
    }

    .center-logo {
        width: 122px;
        height: 122px;
    }

    .nav-list > li:nth-child(4) {
        margin-left: 55px;
    }
}

/* Contact information: one horizontal row on wide desktop */
@media (min-width: 901px) {
    .contact-strip {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        align-items: center;
        gap: 8px;
        width: 100%;
    }

    .contact-item {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        padding: 8px;
        gap: 10px;
        border-right: none;
    }

    .contact-copy {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .contact-copy strong,
    .contact-copy a {
        font-size: 13px;
        line-height: 1.4;
    }
}

/* 9. TABLET AND MOBILE DRAWER (<= 900px) */
@media (max-width: 900px) {
    .topbar,
    .contact-strip {
        display: none !important;
    }

    .main-header {
        width: 100%;
        margin: 0;
        padding: 0;
        background: var(--white);
    }

    .navigation-bar {
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        height: 66px;
        min-height: 66px;
        margin: 0;
        padding: 8px 16px;
        background: var(--white);
        border: none;
        border-bottom: 2px solid rgba(164, 122, 34, 0.35);
        border-radius: 0;
        box-shadow: 0 3px 12px rgba(23, 53, 45, 0.08);
    }

    .navigation-bar > .center-logo {
        display: none !important;
    }

    .menu-toggle {
        position: relative;
        z-index: 1002;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 10px;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border: 1.5px solid rgba(40, 91, 64, 0.25);
        border-radius: 8px;
        background: var(--light-green);
        cursor: pointer;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 2.5px;
        background: var(--blue);
        border-radius: 3px;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .menu-toggle.is-open span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
    }

    .menu-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.is-open span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
    }

    /* mobile side logo reponsiveness*/
    .mobile-brand {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        overflow: hidden;
        padding-left: 4px;
    }

    .mobile-brand img {
        width: 42px;
        height: 42px;
        object-fit: contain;
        display: block;
        transform: scale(1.24);
        transform-origin: center center;
    }

    .mobile-brand span {
        font-size: 15px;
        font-weight: 700;
        color: var(--blue);
        white-space: nowrap;
    }

/* Slide-in Drawer (Senior UI/UX Polish) */
    .nav-list {
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        width: 50% !important;
        max-width: 320px;
        min-width: 250px;
        height: 100vh;
        height: 100dvh;
        padding: 114px 16px 22px;
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 6px;
        overflow-y: auto;
        background: linear-gradient(180deg, #17352d 0%, #285b40 100%);
        border-left: 2px solid rgba(232, 203, 122, 0.45);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.28);
        transform: translateX(106%);
        visibility: hidden;
        pointer-events: none;
        z-index: 1001;
        transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.32s ease;
    }

    .nav-list.show {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .nav-list::before {
        content: "";
        position: absolute;
        top: 18px;
        left: 50%;
        width: 82px;
        height: 82px;
        padding: 6px;
        border-radius: 50%;
        background: #ffffff url("../images/logo.png") center / contain no-repeat;
        border: 2px solid var(--gold-light);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
        transform: translateX(-50%);
    }




    .nav-list::after {
            content: "Ibn-E-Sena TTC • Karak";
            margin-top: auto;
            padding-top: 14px;
            border-top: 1px solid rgba(232, 203, 122, 0.22);
            text-align: center;
            font-size: 11.5px;
            font-weight: 600;
            letter-spacing: 0.4px;
            color: rgba(232, 203, 122, 0.78);
            pointer-events: none;
        }

    .nav-list > li:not(.active):not(:hover) > a::after {
        content: "\203A";
        margin-left: auto;
        font-size: 18px;
        line-height: 1;
        color: rgba(232, 203, 122, 0.55);
        transition: transform 0.2s ease, color 0.2s ease;
    }

    .nav-list > li > a:hover::after {
        transform: translateX(3px);
        color: var(--gold-light);
    }

    .nav-list > li > a.active::after { 
        content: none; 
    }



    .nav-list > li,
    .nav-list > li:nth-child(4),
    .nav-list > li:nth-child(5) {
        display: flex;
        justify-content: stretch;
        width: 100%;
        margin: 0;
        flex-shrink: 0;
    }

    .nav-list > li > a {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        width: 100%;
        min-height: 38px;
        padding: 7px 14px;
        color: rgba(255, 255, 255, 0.94);
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 8px;
        font-size: 14.5px;
        font-weight: 700;
        letter-spacing: 0.2px;
        text-align: left;
        white-space: normal;
        transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    }

    .nav-list > li > a:hover,
    .nav-list > li > a:focus-visible {
        color: var(--gold-light);
        background: rgba(255, 255, 255, 0.14);
        border-color: rgba(232, 203, 122, 0.35);
        transform: translateX(-2px);
        outline: none;
    }

    .nav-list > li > a.active {
        color: #17352d;
        background: linear-gradient(135deg, #f3d586 0%, #c9a64e 100%);
        border-color: #f3d586;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    }

    /* Slide-in Drawer  (old) *
    .nav-list {
        position: fixed;
        top: 0;
        right: 0;
        left: auto;
        width: 50% !important;
        max-width: 320px;
        min-width: 250px;
        height: 100vh;
        height: 100dvh;
        padding: 125px 18px 25px;
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 6px;
        overflow-y: auto;
        background: var(--white);
        box-shadow: -6px 0 22px rgba(0, 0, 0, 0.16);
        transform: translateX(105%);
        visibility: hidden;
        pointer-events: none;
        z-index: 1001;
        transition: transform 0.3s ease, visibility 0.3s ease;
    }

    .nav-list.show {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .nav-list::before {
        content: "";
        position: absolute;
        top: 20px;
        left: 50%;
        width: 85px;
        height: 85px;
        transform: translateX(-50%);
        background: url("../images/logo.png") center / contain no-repeat;
    }

    .nav-list > li,
    .nav-list > li:nth-child(4),
    .nav-list > li:nth-child(5) {
        display: flex;
        justify-content: stretch;
        width: 100%;
        margin: 0;
        flex-shrink: 0;
    }

    .nav-list > li > a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 44px;
        padding: 10px 14px;
        color: var(--blue);
        background: var(--white);
        border-radius: 8px;
        font-size: 15px;
        font-weight: 700;
        text-align: center;
        white-space: normal;
        transition: color 0.2s ease, background-color 0.2s ease;
    }

    .nav-list > li > a:hover,
    .nav-list > li > a:focus-visible {
        color: var(--green);
        background: var(--light-green);
        outline: none;
    }

    .nav-list > li > a.active {
        color: #17352d;
        background: linear-gradient(135deg, #f3d586 0%, #c9a64e 100%);
    }

    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 999;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    .nav-backdrop.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }*/
}

/* 10. SMALL PHONES */
@media (max-width: 520px) {
    .nav-list {
        width: 75% !important;
        min-width: 0;
        max-width: 300px;
        padding: 120px 14px 22px;
    }

    .nav-list > li > a {
        padding: 10px 12px;
        font-size: 14px;
    }
}