/* ==========================================================================
   LAYOUT 2: MODERN EMERALD ACADEMIC PORTAL THEME
   ========================================================================== */

:root {
    --theme-primary: #064E3B;
    /* Deep Forest Emerald */
    --theme-emerald-light: #047857;
    /* Rich Emerald Green */
    --theme-accent: #10B981;
    /* Bright Emerald */
    --theme-gold: #F59E0B;
    /* Amber Gold */
    --theme-bg: #F8FAFC;
    /* Clean Light Background */
    --theme-card-bg: #FFFFFF;
    --theme-text: #0F172A;
    /* High Contrast Dark Slate */
    --theme-subtext: #475569;
    --theme-border: #E2E8F0;
    --theme-heading-font: 'Plus Jakarta Sans', sans-serif;
}

body.layout2-body {
    font-family: var(--theme-heading-font);
    background: #FFFFFF;
    color: var(--theme-text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    padding-bottom: 70px;
}

@media (min-width: 992px) {
    body.layout2-body {
        padding-bottom: 0;
    }
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

.l2-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Wrapper */
.l2-header-wrapper {
    width: 100%;
    background: #FFFFFF;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* --- L2 Topbar --- */
.l2-topbar {
    background: #064E3B;
    color: #FFFFFF;
    font-size: 13px;
    padding: 8px 0;
}

.l2-topbar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.l2-top-contacts {
    display: flex;
    align-items: center;
    gap: 15px;
}

.l2-top-contacts a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 500;
}

.l2-top-contacts a:hover {
    color: #6EE7B7;
}

.l2-sep {
    opacity: 0.4;
}

.l2-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.l2-pill-btn {
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF !important;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease;
}

.l2-pill-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.l2-erp-gold-btn {
    background: #F59E0B;
    color: #0F172A !important;
    padding: 5px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.4);
    transition: transform 0.2s ease;
}

.l2-erp-gold-btn:hover {
    transform: translateY(-1px);
    background: #D97706;
}

/* --- Brand Bar --- */
.l2-brand-bar {
    background: #FFFFFF;
    padding: 16px 0;
    border-bottom: 1px solid #E2E8F0;
}

.l2-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.l2-logo-img {
    height: 54px;
    width: auto;
    object-fit: contain;
}

.l2-logo-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: #064E3B;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.l2-title {
    font-size: 24px;
    font-weight: 800;
    color: #064E3B;
    line-height: 1.1;
    letter-spacing: 0.5px;
    margin: 0;
    text-transform: uppercase;
}

.l2-tagline {
    font-size: 13px;
    font-weight: 600;
    color: #047857;
    margin: 3px 0 0 0;
    font-style: italic;
}

.l2-subtitle {
    font-size: 13px;
    color: #64748B;
    margin: 2px 0 0 0;
    font-weight: 600;
}

/* --- Navbar --- */
.l2-navbar {
    background: #064E3B;
}

.l2-nav-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.l2-nav-links {
    display: flex;
    align-items: center;
}

.l2-nav-item {
    padding: 14px 20px;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.l2-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #6EE7B7;
}

.l2-nav-item.active {
    background: #F59E0B;
    color: #0F172A !important;
    font-weight: 800;
}

.l2-dropdown {
    position: relative;
}

.l2-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #FFFFFF;
    border-radius: 0 0 10px 10px;
    min-width: 220px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 100;
    padding: 8px 0;
    border-top: 3px solid #064E3B;
}

.l2-dropdown:hover .l2-dropdown-menu {
    display: flex;
}

.l2-dropdown-menu a {
    padding: 10px 18px;
    color: #334155;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.l2-dropdown-menu a:hover {
    background: #ECFDF5;
    color: #047857;
    padding-left: 22px;
}

.l2-menu-toggle {
    display: none;
    background: transparent;
    color: #FFFFFF;
    border: none;
    font-size: 22px;
    padding: 10px;
    cursor: pointer;
}

/* Mobile responsive navigation */
@media (max-width: 991px) {
    .l2-topbar-flex {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .l2-menu-toggle {
        display: block;
    }

    .l2-nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #064E3B;
    }

    .l2-nav-links.show-mobile {
        display: flex;
    }

    .l2-dropdown-menu {
        position: static;
        box-shadow: none;
        background: #043E2F;
    }

    .l2-dropdown-menu a {
        color: #E2E8F0;
    }
}

/* Footer Styling */
.l2-footer {
    background: #042A1D;
    color: #FFFFFF;
    padding: 30px 0 0 0;
    position: relative;
    border-top: 4px solid #047857;
}

.l2-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
}

.l2-socials {
    display: flex;
    align-items: center;
    gap: 10px;
}

.l2-socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.l2-socials a:hover {
    background: #10B981;
    transform: translateY(-2px);
}

.l2-footer-copy {
    font-size: 13.5px;
    color: #CBD5E1;
    text-align: center;
}

.l2-btn-outline-gold {
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid #F59E0B;
    color: #F59E0B;
    padding: 8px 22px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.l2-btn-outline-gold:hover {
    background: #F59E0B;
    color: #0F172A;
}

.l2-footer-silhouette {
    width: 100%;
    margin-top: 15px;
    line-height: 0;
    background: #021E14;
}

.l2-footer-silhouette svg {
    opacity: 0.35;
}

/* --- Hero Banners --- */
.web-page-banner,
.web-hero-section:not(.has-slider) {
    background: linear-gradient(135deg, #064E3B 0%, #047857 100%) !important;
    color: white !important;
    padding: 50px 0 !important;
}

.web-hero-section.has-slider {
    background: #0F172A !important;
    padding: 0 !important;
}

.web-hero-title,
.web-page-title {
    color: white !important;
}

.web-hero-sub {
    color: #E2E8F0 !important;
}

/* --- Content Cards & Component Clean Overrides --- */
.web-card,
.web-feature-card,
.web-msg-card,
.web-form-card,
.web-teacher-card,
.web-notice-card,
.web-c-card,
.web-map-box,
.web-desk-content,
.web-profile-card,
.web-custom-page-box,
.web-info-card {
    background: #FFFFFF !important;
    color: #0F172A !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
}

.web-card:hover,
.web-feature-card:hover,
.web-notice-card:hover {
    border-color: #047857 !important;
    box-shadow: 0 10px 25px rgba(4, 120, 87, 0.12) !important;
}

.web-section-title,
.web-section-header h2,
.web-notice-title a,
.web-teacher-name,
.web-group-heading,
.web-card h3,
.web-msg-name {
    color: #0F172A !important;
}

.web-group-heading {
    border-bottom: 2px solid #047857 !important;
    color: #047857 !important;
}

.web-section-sub,
.web-section-header p,
.web-msg-body,
.web-notice-desc,
.web-teacher-meta,
.web-card p {
    color: #475569 !important;
}

/* --- Mobile Dock L2 --- */
.l2-mobile-dock {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #042A1D;
    border-top: 2px solid #047857;
    z-index: 2000;
}

@media (max-width: 991px) {
    .l2-mobile-dock {
        display: flex;
        justify-content: space-around;
        padding: 8px 0;
    }
}

.l2-dock-item {
    color: #94A3B8;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
}

.l2-dock-item i {
    font-size: 18px;
    margin-bottom: 2px;
}

.l2-dock-item.active {
    color: #10B981;
}

/* --- Layout 2 Mobile Overrides --- */
@media (max-width: 768px) {

    /* Show top bar cleanly on mobile with wrapping */
    .l2-topbar {
        display: block !important;
        text-align: center;
    }

    .l2-topbar-flex {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 5px 0;
    }

    .l2-top-contacts,
    .l2-top-actions {
        justify-content: center !important;
        flex-wrap: wrap !important;
        width: 100%;
        gap: 10px !important;
    }

    /* Improve Logo & Brand spacing on mobile */
    .l2-brand {
        max-width: calc(100% - 50px);
    }

    .l2-brand-flex {
        justify-content: flex-start !important;
    }

    .l2-logo-img {
        height: 44px !important;
    }

    .l2-title {
        font-size: 20px !important;
        line-height: 1.2 !important;
    }

    .l2-tagline {
        font-size: 11px !important;
        white-space: normal !important;
    }

    .l2-menu-toggle {
        margin-left: auto;
    }
}