/* ==========================================
   ACADEMICLAB THEME — LAYOUT CSS v2.1
   Full-width unified header, modern mobile nav,
   complete responsive system.
   ========================================== */

:root {
    --header-slate-h:  44px;
    --nav-mobile-bg:   #a50d26;
    --transition-nav:  0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   1. GLOBAL PAGE SHELL
   ============================================================ */

html, body { margin: 0; padding: 0; width: 100%; overflow-x: hidden; }

#container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

#page.hfeed {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

#main.wrapper {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    box-sizing: border-box;
}

.elementor-page #main.wrapper { padding: 0; max-width: 100%; }

/* Kill any width constraints from WordPress defaults */
#page, body .site, body #page, .hfeed {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

button, input, textarea, .header-image,
.site-content article, .widget-area .widget {
    border-radius: 0 !important;
}

/* ============================================================
   2. SITE HEADER WRAPPER
   ============================================================ */

.site-header {
    width: 100%;
    position: relative;
    z-index: 500;
}

/* ============================================================
   3. SLATE UTILITY BAR — full bleed, no max-width cap
   ============================================================ */

.uh-slate-bar {
    background-color: var(--uh-slate);
    width: 100%;
    box-sizing: border-box;
}

.uh-slate-inner {
    width: 100%;
    padding: 0 2.5rem;
    height: var(--header-slate-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.uh-slate-inner img {
    height: 20px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.uh-slate-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Search pill */
.uh-search-pill {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border-radius: 20px !important;
    padding: 3px 10px 3px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: background 0.25s, border-color 0.25s;
}
.uh-search-pill:focus-within {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.3);
}
.uh-search-pill input[type="search"] {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-family: var(--font-body) !important;
    font-size: 0.82rem !important;
    padding: 4px 0 !important;
    width: 120px;
    outline: none !important;
    box-shadow: none !important;
}
.uh-search-pill input::placeholder { color: rgba(255,255,255,0.5) !important; }
.uh-search-pill button {
    background: transparent !important;
    border: none !important;
    color: rgba(255,255,255,0.65) !important;
    cursor: pointer !important;
    padding: 0 0 0 8px !important;
    font-size: 0.85rem !important;
    outline: none !important;
    transition: color 0.2s !important;
    box-shadow: none !important;
}
.uh-search-pill button:hover { color: var(--uh-gold) !important; }

/* Utility links */
.uh-slate-links { display: flex; gap: 1rem; align-items: center; }
.uh-slate-links a {
    color: rgba(255,255,255,0.7);
    font-family: var(--font-body);
    font-size: 0.78rem;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}
.uh-slate-links a:hover { color: var(--uh-gold) !important; }
.slate-divider { width: 1px; height: 12px; background: rgba(255,255,255,0.2); }

/* ============================================================
   4. RED HERO HEADER — full bleed
   ============================================================ */

.uh-red-hero {
    background-color: var(--uh-red);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.uh-red-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -55deg, transparent, transparent 14px,
        rgba(0,0,0,0.025) 14px, rgba(0,0,0,0.025) 28px
    );
    pointer-events: none;
    z-index: 0;
}

.uh-red-inner {
    width: 100%;
    padding: 1.75rem 2.5rem 0;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.uh-red-branding { flex: 1; min-width: 0; }

.uh-red-hero h1 {
    font-family: var(--font-display) !important;
    color: #fff !important;
    font-size: clamp(1.6rem, 3.2vw, 2.8rem) !important;
    text-transform: uppercase;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    margin: 0 !important;
    line-height: 1.05;
}
.uh-red-hero h1 a { color: inherit; text-decoration: none; }

.uh-red-hero h2 {
    font-family: var(--font-body) !important;
    color: rgba(255,255,255,0.8) !important;
    font-size: clamp(0.72rem, 1.4vw, 0.95rem) !important;
    font-weight: 400 !important;
    margin: 4px 0 0 0 !important;
    letter-spacing: 0.2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Optional decorative badge on the right of the red bar */
.uh-red-right { flex-shrink: 0; }

.uh-coog-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 6px 14px;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.65);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: var(--font-display);
}
.uh-coog-badge i { color: var(--uh-gold); }

/* ============================================================
   5. DESKTOP NAV BAR — sits at the bottom of the red hero
   ============================================================ */

.uh-nav-bar {
    width: 100%;
    margin-top: 1.25rem;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.uh-nav-inner {
    width: 100%;
    padding: 0 2.5rem;
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
}

.academic-nav {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.academic-nav a {
    font-family: var(--font-body);
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    position: relative;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.academic-nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 3px;
    background: var(--uh-gold);
    transition: width 0.25s ease;
}

.academic-nav a:hover { color: #fff; background: rgba(0,0,0,0.1); }
.academic-nav a:hover::after,
.academic-nav a.active-link::after { width: 100%; }
.academic-nav a.active-link { color: #fff; background: rgba(0,0,0,0.15); font-weight: 600; }

/* ============================================================
   6. MOBILE HAMBURGER BUTTON — hidden on desktop
   ============================================================ */

.mobile-menu-toggle {
    display: none;
    background: rgba(0,0,0,0.15) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    cursor: pointer;
    box-shadow: none !important;
    align-items: center;
    gap: 8px;
    color: #fff !important;
    font-family: var(--font-body);
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background 0.2s !important;
    flex-shrink: 0;
}
.mobile-menu-toggle:hover { background: rgba(0,0,0,0.25) !important; }

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 18px;
    flex-shrink: 0;
}
.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px !important;
    transition: transform 0.3s, opacity 0.3s;
    transform-origin: center;
}
.mobile-menu-toggle.is-open .hamburger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-menu-toggle.is-open .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-menu-toggle.is-open .hamburger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   7. MOBILE NAV DRAWER — slides down below the header
   ============================================================ */

.mobile-nav-drawer {
    width: 100%;
    background: var(--nav-mobile-bg);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    z-index: 400;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-nav);
    box-sizing: border-box;
}

.mobile-nav-drawer.is-open { max-height: 700px; }

.mobile-nav-inner { padding: 0.5rem 0 1rem; }

.mobile-nav-inner a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 2rem;
    color: rgba(255,255,255,0.85);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background 0.2s, color 0.2s, padding-left 0.25s;
}
.mobile-nav-inner a::after {
    content: '›';
    color: var(--uh-gold);
    font-size: 1.3rem;
    line-height: 1;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.2s, transform 0.2s;
}
.mobile-nav-inner a:hover,
.mobile-nav-inner a.active-link {
    background: rgba(0,0,0,0.15);
    color: #fff;
    padding-left: 2.5rem;
}
.mobile-nav-inner a:hover::after,
.mobile-nav-inner a.active-link::after { opacity: 1; transform: translateX(0); }
.mobile-nav-inner a.active-link {
    border-left: 4px solid var(--uh-gold);
    font-weight: 700;
}
.mobile-nav-inner a:last-child { border-bottom: none; }

/* Mobile search inside drawer */
.mobile-nav-search {
    margin: 0.75rem 2rem 0;
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.12);
    overflow: hidden;
}
.mobile-nav-search input[type="search"] {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    font-family: var(--font-body) !important;
    font-size: 0.9rem !important;
    padding: 10px 14px !important;
    outline: none !important;
    box-shadow: none !important;
}
.mobile-nav-search input::placeholder { color: rgba(255,255,255,0.4) !important; }
.mobile-nav-search button {
    background: rgba(255,255,255,0.1) !important;
    border: none !important;
    border-left: 1px solid rgba(255,255,255,0.12) !important;
    color: rgba(255,255,255,0.65) !important;
    padding: 10px 14px !important;
    cursor: pointer;
    font-size: 0.85rem !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: background 0.2s, color 0.2s !important;
}
.mobile-nav-search button:hover { background: rgba(255,255,255,0.2) !important; color: var(--uh-gold) !important; }

/* ============================================================
   8. FOOTER
   ============================================================ */

.uh-official-footer { font-family: var(--font-body); margin-top: auto; width: 100%; }

.uh-footer-primary {
    background-color: var(--uh-red);
    color: #fff;
    padding: 4rem 2.5rem;
    width: 100%;
    box-sizing: border-box;
}

.uh-footer-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 3rem;
}

.uh-footer-brand h4 {
    font-family: var(--font-display);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 1.3rem;
    margin: 0 0 1rem;
}

.uh-contact-item {
    display: flex;
    align-items: flex-start;
    margin: 0.7rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.82);
}
.uh-contact-item i { color: var(--uh-gold); font-size: 1rem; margin-right: 10px; margin-top: 3px; width: 16px; text-align: center; flex-shrink: 0; }
.uh-contact-item a { color: rgba(255,255,255,0.82); text-decoration: none; transition: color 0.2s; }
.uh-contact-item a:hover { color: var(--uh-gold); }

.uh-footer-nav h4 { font-family: var(--font-display); color: var(--uh-gold); text-transform: uppercase; letter-spacing: 1.5px; font-size: 1.1rem; margin: 0 0 1.2rem; }
.uh-footer-nav ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.uh-footer-nav li { margin-bottom: 0.7rem; }
.uh-footer-nav a { color: rgba(255,255,255,0.78) !important; text-decoration: none !important; font-size: 0.9rem; display: inline-flex; align-items: center; transition: all 0.25s; }
.uh-footer-nav a i { color: var(--uh-gold); font-size: 0.72rem; margin-right: 8px; }
.uh-footer-nav a:hover { color: #fff !important; transform: translateX(5px); }

.uh-footer-secondary {
    background-color: var(--uh-slate);
    color: rgba(255,255,255,0.6);
    padding: 1.25rem 2.5rem;
    text-align: center;
    font-size: 0.8rem;
    width: 100%;
    box-sizing: border-box;
}
.uh-footer-secondary a { color: var(--uh-gold); text-decoration: none; }
.uh-footer-secondary a:hover { text-decoration: underline; }

/* ============================================================
   9. SKIP LINK
   ============================================================ */

.skip-link {
    position: absolute; top: -100px; left: 0; z-index: 999999;
    padding: 10px 16px; background: var(--uh-red); color: #fff;
    font-weight: 700; text-decoration: none; transition: top 0.2s;
    font-family: var(--font-body);
}
.skip-link:focus { top: 0; }

/* ============================================================
   10. ADMIN BAR OFFSET
   ============================================================ */

.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* ============================================================
   11. RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ── Large tablet ── */
@media screen and (max-width: 1100px) {
    .uh-slate-inner, .uh-red-inner, .uh-nav-inner { padding-left: 1.5rem; padding-right: 1.5rem; }
    .academic-nav a { padding: 0.85rem 0.75rem; font-size: 0.85rem; }
}

/* ── Switch to mobile nav at 900px ── */
@media screen and (max-width: 900px) {
    .uh-nav-bar { display: none; }
    .mobile-menu-toggle { display: flex; }

    .uh-red-inner {
        padding: 1.1rem 1.5rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .uh-red-hero h1 { font-size: clamp(1.3rem, 4.5vw, 1.8rem) !important; white-space: normal; }
    .uh-red-hero h2 { font-size: clamp(0.65rem, 2vw, 0.85rem) !important; white-space: normal; overflow: visible; }
    .uh-red-right { display: none; }

    /* Keep slate bar but hide search/links */
    .uh-slate-right { display: none !important; }
    .uh-slate-inner { padding: 0 1.5rem; }
    .uh-slate-inner img { height: 18px; }

    .uh-footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .uh-footer-primary { padding: 3rem 1.5rem; }
    .uh-footer-nav a:hover { transform: none; }
}

/* ── Mobile ── */
@media screen and (max-width: 600px) {
    .uh-slate-inner { padding: 0 1rem; height: 38px; }
    .uh-slate-inner img { height: 16px; }
    .uh-red-inner { padding: 0.9rem 1rem; }
    .uh-red-hero h1 { font-size: clamp(1.1rem, 5vw, 1.5rem) !important; }
    .uh-red-hero h2 { font-size: 0.65rem !important; }

    .mobile-nav-inner a { padding: 0.85rem 1.25rem; font-size: 0.95rem; }
    .mobile-nav-inner a:hover, .mobile-nav-inner a.active-link { padding-left: 1.75rem; }
    .mobile-nav-search { margin: 0.5rem 1.25rem 0; }

    #main.wrapper { padding: 2rem 1rem; }
    .uh-footer-primary { padding: 2.5rem 1rem; }
    .uh-footer-secondary { padding: 1rem; font-size: 0.73rem; }
}

/* ── Very small phones ── */
@media screen and (max-width: 380px) {
    .uh-red-hero h1 { font-size: 1rem !important; }
    .uh-red-hero h2 { display: none; }
    .mobile-menu-toggle { padding: 6px 9px !important; font-size: 0; }
    .mobile-menu-toggle .hamburger-icon { margin: 0; }
}
