/* ============================================================
   Shared Components Stylesheet (Navbar & Footer)
   ============================================================ */

/* ═══ NAVBAR ═══ */
.navbar {
    background: white;
    color: var(--dark);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    box-shadow: var(--shadow);
    border-bottom: none;
    transition: all 0.3s ease;
}

body.home-page .navbar:not(.scrolled) {
    background: transparent;
    box-shadow: none;
}

.navbar.scrolled {
    background: white;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 100%;
    margin: 0;
    padding: 15px 2% 15px 5%; /* 5% left for logo, 2% right for hamburger menu */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: bold;
}

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

.school-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.school-info h1 {
    font-size: 14px;
    color: var(--primary);
    margin: 0;
    font-weight: bold;
    line-height: 1.2;
}

.school-details {
    font-size: 8px;
    color: var(--gray);
    margin: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Animated Menu styles */
.menu-trigger {
    position: relative;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 101;
}

.menu-trigger .bars {
    display: flex;
    width: 25px;
    height: 30px;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 10;
}

.menu-trigger .bars > span {
    width: 3px;
    height: 25px;
    background: var(--primary);
    transition: all 0.4s ease;
    transform-origin: center;
}

/* X Animation on active */
.menu-trigger.active .bars > span:nth-of-type(1) {
    transform: translateX(11px) rotate(45deg);
}

.menu-trigger.active .bars > span:nth-of-type(2) {
    opacity: 0;
}

.menu-trigger.active .bars > span:nth-of-type(3) {
    transform: translateX(-11px) rotate(-45deg);
}

.menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-100%);
    transition: all 0.8s cubic-bezier(0.785, 0.135, 0.15, 0.86);
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
    z-index: 5;
}

.menu-trigger.active .menu {
    transform: translateY(0);
}

.menu > ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.menu > ul > li {
    color: #2b2b2b;
    font-size: 2.2rem;
    cursor: pointer;
    padding: 10px 0;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.menu > ul > li > p {
    margin: 0;
    transform: translateY(calc(100% + 10px));
    transition: transform 0.4s ease;
}

.menu-trigger.active .menu > ul > li:nth-of-type(1) > p { transition: transform 0.6s cubic-bezier(0.785,0.135,0.15,0.86) 0.1s; transform: translateY(0); }
.menu-trigger.active .menu > ul > li:nth-of-type(2) > p { transition: transform 0.6s cubic-bezier(0.785,0.135,0.15,0.86) 0.2s; transform: translateY(0); }
.menu-trigger.active .menu > ul > li:nth-of-type(3) > p { transition: transform 0.6s cubic-bezier(0.785,0.135,0.15,0.86) 0.3s; transform: translateY(0); }
.menu-trigger.active .menu > ul > li:nth-of-type(4) > p { transition: transform 0.6s cubic-bezier(0.785,0.135,0.15,0.86) 0.4s; transform: translateY(0); }

/* ═══ INFORMATION SUBMENU ═══ */
.has-submenu {
    position: relative;
}

.info-toggle::after {
    content: ' ▾';
    font-size: 0.7em;
    display: inline-block;
}

.info-toggle.open::after {
    content: ' ▴';
}

.submenu-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease, margin 0.4s ease;
    margin-top: 0;
}

.submenu-list.open {
    max-height: 200px;
    opacity: 1;
    margin-top: 10px;
}

.submenu-list a {
    text-decoration: none;
    color: #555;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 6px 0;
    transition: color 0.3s ease;
}

.submenu-list a:hover {
    color: #800000;
}

/* Responsive Navbar */
@media (max-width: 768px) {
    .navbar, body.home-page .navbar:not(.scrolled) {
        background: white !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    }
}

@media (max-width: 480px) {
    .nav-logo h1 {
        font-size: 18px;
    }

    .submenu-list a {
        font-size: 0.95rem;
    }
}

/* ═══ FOOTER ═══ */
.footer {
    background: var(--primary);
    color: white;
    padding-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding: 0 20px 40px;
}

.footer-section h4 {
    font-size: 18px;
    color: var(--warning);
    margin-bottom: 15px;
    font-family: inherit;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    font-size: 14px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
}

.footer-section a:hover {
    color: var(--warning);
}

.footer-bottom {
    background: var(--primary-dark);
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .footer-bottom {
        padding-bottom: 80px; /* Accounts for fixed social bar */
    }
}

@media (max-width: 480px) {
    .footer-content {
        gap: 25px;
    }
}
