/* ==========================================================================
   Good News School of Hope - Mobile-First Layout Stylesheet
   ========================================================================== */

/* 1. Top Utility Bar (Desktop 768px+) */
.top-bar {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.775rem;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

@media (min-width: 768px) {
    .top-bar {
        display: block;
    }
}

.top-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-bar-items {
    display: flex;
    align-items: center;
    gap: 18px;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.775rem;
}

.top-bar-icon {
    flex-shrink: 0;
    opacity: 0.85;
}

.top-bar-item a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    transition: color 0.15s ease;
}

.top-bar-item a:hover {
    color: var(--color-accent);
}

.top-bar-socials {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    transition: all 0.2s ease;
    text-decoration: none;
}

.top-bar-social-link:hover {
    background: var(--color-accent);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.top-bar-portals {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.top-bar-portal-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 175, 55, 0.15);
    color: var(--color-accent) !important;
    padding: 3px 12px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.75rem;
    border: 1px solid rgba(212, 175, 55, 0.35);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.top-bar-portal-link:hover {
    background: var(--color-accent);
    color: var(--color-primary-dark) !important;
    border-color: var(--color-accent);
}

.top-bar-sms-link {
    background: var(--color-accent);
    color: var(--color-primary-dark) !important;
    border: 1px solid var(--color-accent);
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.top-bar-sms-link:hover {
    background: #FFFFFF;
    color: var(--color-primary-dark) !important;
    border-color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.top-bar-admin-link {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF !important;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.top-bar-admin-link:hover {
    background: rgba(255, 255, 255, 0.24);
    color: #FFFFFF !important;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* 2. Urgent Announcement Top Banner */
.announcement-bar {
    background: linear-gradient(90deg, #C8102E 0%, #9E0B22 100%);
    color: #FFFFFF;
    font-size: var(--text-xs);
    font-weight: 500;
    padding: 8px var(--space-md);
    position: relative;
    z-index: 100;
}

.announcement-content {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    flex-wrap: wrap;
}

.announcement-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
}

.announcement-link {
    color: #FFFFFF;
    text-decoration: underline;
    font-weight: 700;
}

.announcement-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
}
.announcement-close:hover { opacity: 1; }

/* 3. Main Header & Navbar */
.site-header {
    background-color: #FFFFFF;
    border-bottom: 1px solid rgba(15, 44, 89, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.25s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(15, 44, 89, 0.08);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0;
    padding-bottom: 0;
    min-height: 66px;
    gap: 12px;
}

/* ---- Brand Identity ---- */
.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
    padding: 6px 0;
}

.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: clamp(0.85rem, 2.5vw, 1.05rem);
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.15;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand-motto {
    font-size: 0.625rem;
    font-weight: 700;
    color: var(--color-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    margin-top: 2px;
}

/* ---- Desktop Navigation (1024px+) ---- */
.desktop-nav {
    display: none;
}

@media (min-width: 1024px) {
    .desktop-nav {
        display: flex;
        align-items: center;
        gap: 6px;
        flex: 1;
        justify-content: flex-end;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-primary);
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap !important;
    position: relative;
    text-decoration: none;
}

.nav-chevron {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
    flex-shrink: 0;
}

.nav-item:hover .nav-chevron {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--color-secondary);
}

/* Active / Hover bottom underline indicator */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2.5px;
    background-color: var(--color-secondary);
    border-radius: 2px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--color-secondary);
    background-color: rgba(200, 16, 46, 0.04);
}

.nav-link.active {
    color: var(--color-secondary);
    font-weight: 700;
}

.nav-link.active::after,
.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Larger screens: slightly more generous spacing */
@media (min-width: 1240px) {
    .nav-link {
        padding: 9px 12px;
        font-size: 0.875rem;
    }
    .desktop-nav {
        gap: 8px;
    }
}

/* ---- Desktop CTA Apply Button ---- */
.btn-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    font-size: 0.8125rem;
    font-weight: 700;
    border-radius: 8px;
    background: linear-gradient(135deg, #C8102E 0%, #A30D25 100%);
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(200, 16, 46, 0.25);
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
    margin-left: 6px;
    min-height: 36px;
}

.btn-nav-cta:hover {
    background: linear-gradient(135deg, #A30D25 0%, #800A1D 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.35);
    color: #FFFFFF;
}

@media (min-width: 1240px) {
    .btn-nav-cta {
        padding: 8px 22px;
        font-size: 0.85rem;
    }
}

/* ---- Dropdown Menus ---- */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 240px;
    background: #FFFFFF;
    border: 1px solid rgba(15, 44, 89, 0.08);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(15, 44, 89, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s ease;
    z-index: 1010;
    list-style: none;
    margin: 0;
}

/* Gradient top accent line */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    border-radius: 0 0 3px 3px;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-link {
    display: flex;
    align-items: center;
    padding: 9px 18px;
    font-size: 0.835rem;
    font-weight: 500;
    color: #1E293B;
    transition: all 0.15s ease;
    text-decoration: none;
    border-left: 2px solid transparent;
}

.nav-dropdown-link:hover {
    background-color: rgba(200, 16, 46, 0.05);
    color: var(--color-secondary);
    border-left-color: var(--color-secondary);
    padding-left: 22px;
    font-weight: 600;
}

/* ---- Header Mobile Actions (Call + Hamburger) ---- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-mobile-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: var(--color-bg-subtle);
    color: var(--color-primary);
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-mobile-call:hover {
    background: var(--color-primary);
    color: #FFFFFF;
    border-color: var(--color-primary);
}

.btn-hamburger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--color-primary);
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s ease;
}

.btn-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #FFFFFF;
    border-radius: 2px;
    transition: all 0.25s ease;
}

.btn-hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.btn-hamburger.active span:nth-child(2) {
    opacity: 0;
}
.btn-hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 1024px) {
    .btn-hamburger, .btn-mobile-call {
        display: none !important;
    }
    .header-actions {
        display: none;
    }
}

/* 4. Touch-Optimized Off-Canvas Mobile Drawer */
.mobile-drawer-overlay {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(15, 44, 89, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 85%;
    max-width: 360px;
    background-color: #FFFFFF;
    z-index: 2001;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

.mobile-drawer-overlay.active .mobile-drawer {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--color-primary-dark);
    color: #FFFFFF;
}

.drawer-brand-title {
    display: block;
    font-size: 1rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #FFFFFF;
}

.drawer-brand-motto {
    font-size: 0.65rem;
    color: var(--color-accent);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.drawer-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #FFFFFF;
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.drawer-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.drawer-menu {
    list-style: none;
    margin: 0 0 16px 0;
    padding: 0;
}

.drawer-link-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
}

.drawer-link {
    display: flex;
    align-items: center;
    padding: 10px 8px;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    border-bottom: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.15s ease;
}

.drawer-link-parent {
    border-bottom: none !important;
    flex: 1;
}

.drawer-link:hover, .drawer-link.active {
    color: var(--color-secondary);
    background-color: var(--color-bg-subtle);
}

.drawer-submenu-toggle {
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary);
    cursor: pointer;
    margin-right: 4px;
    transition: all 0.15s ease;
}

.drawer-submenu-toggle:hover {
    background: var(--color-primary);
    color: #FFFFFF;
}

.drawer-submenu {
    list-style: none;
    padding: 4px 0 4px 10px;
    margin: 0 0 6px 0;
    display: none;
    background: var(--color-bg-subtle);
    border-radius: 6px;
}

.drawer-submenu.open {
    display: block;
}

.drawer-submenu-link {
    display: block;
    padding: 6px 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.15s ease;
}

.drawer-submenu-link:hover {
    color: var(--color-secondary);
}

.drawer-cta-group {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
}

.drawer-sms-btn {
    background: var(--color-accent);
    color: var(--color-primary-dark) !important;
    font-weight: 700;
    border: 1px solid var(--color-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.drawer-sms-btn:hover {
    background: #FFFFFF;
    color: var(--color-primary-dark) !important;
    border-color: #FFFFFF;
}

.drawer-footer {
    padding: 12px 14px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
}

.drawer-contact-info {
    font-size: 0.725rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

/* 5. Sticky Mobile Bottom Quick-Action Bar (< 768px) */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
    z-index: 999;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 4px 2px 6px;
}

@media (min-width: 768px) {
    .mobile-bottom-bar {
        display: none !important;
    }
}

.bottom-bar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 0.675rem;
    font-weight: 600;
    text-decoration: none;
    padding: 3px 0;
    border-radius: var(--radius-sm);
    min-height: 44px;
}

.bottom-bar-btn svg {
    width: 18px;
    height: 18px;
}

.bottom-bar-btn:active {
    background-color: var(--color-bg-subtle);
}

.bottom-bar-btn.active, .bottom-bar-btn:hover {
    color: var(--color-primary);
}

.bottom-bar-btn.highlight {
    color: var(--color-secondary);
}

.bottom-bar-btn.whatsapp {
    color: #25D366;
}

/* 6. Universal Footer (Refined & Compact) */
.site-footer {
    background-color: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding-top: var(--space-lg);
    border-top: 3.5px solid var(--color-accent);
}

.footer-brand-title {
    color: #FFFFFF;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    font-weight: 800;
}

.footer-motto {
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.6875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.footer-widget-title {
    color: #FFFFFF;
    font-size: 0.925rem;
    margin-bottom: 12px;
    position: relative;
    padding-bottom: 6px;
    font-weight: 700;
}

.footer-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background-color: var(--color-accent);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--color-accent);
    transform: translateX(3px);
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.footer-contact-icon {
    color: var(--color-accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-bottom {
    margin-top: var(--space-lg);
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.725rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

@media (min-width: 768px) {
    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}
