/* ========================================
   MAIN.CSS - Muyovozi High School
   Header, Sidebar, Footer, Common Styles
   ======================================== */

/* ===== RESET & ROOT VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3B9DB3;
    --primary-dark: #2d7c8f;
    --primary-light: #8bc5d6;
    --accent-color: #ffc107;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-sm: 0 5px 15px rgba(0,0,0,0.08);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    color: var(--dark-color);
    line-height: 1.6;
    padding-top: 140px;
    transition: padding-top 0.3s ease;
}

body.sidebar-open {
    overflow: hidden;
}

/* ===== MAIN HEADER ===== */
.main-header {
    background: linear-gradient(145deg, #d4e0ec 0%, #b6cddf 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.main-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    position: relative;
}

/* Logos */
.shield-logo, .logo-img {
    width: 80px;
    height: 80px;
    border-radius: 19%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    border: 3px solid var(--accent-color);
    box-shadow: 0 5px 15px rgba(59, 157, 179, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}

.shield-logo img, .logo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* School Title */
.school-title {
    flex: 1;
    text-align: center;
}

.school-main-name {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.2;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    display: block;
}

.school-motto {
    font-size: 14px;
    color: var(--accent-color);
    font-style: italic;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Mobile Toggle Button */
.mobile-nav-toggle {
    display: none;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    font-size: 22px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(59, 157, 179, 0.3);
    z-index: 1002;
}

/* ===== DESKTOP NAVIGATION ===== */
.desktop-nav {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 0;
    position: fixed;
    top: 101px;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu > li > a {
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-menu > li > a:hover,
.nav-menu > li.active > a {
    border-bottom-color: var(--accent-color);
    background: rgba(255,255,255,0.1);
}

/* Dropdown Menu */
.dropdown-menu-custom {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: white;
    min-width: 250px;
    box-shadow: var(--shadow);
    border-radius: 0 0 15px 15px;
    padding: 10px 0;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-top: 4px solid var(--accent-color);
    z-index: 1000;
}

.nav-menu > li:hover .dropdown-menu-custom {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu-custom a {
    color: var(--dark-color);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 13px;
    white-space: nowrap;
}

.dropdown-menu-custom a:hover {
    background: rgba(59, 157, 179, 0.1);
    padding-left: 25px;
}

.dropdown-menu-custom a i {
    width: 20px;
    color: var(--primary-color);
}

/* ===== MOBILE SIDEBAR ===== */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: var(--white);
    z-index: 2000;
    overflow-y: auto;
    transition: left 0.3s ease;
    box-shadow: 5px 0 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-sidebar-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 25px 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 3px solid var(--accent-color);
}

.mobile-sidebar-logo {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--accent-color);
}

.mobile-sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-sidebar-title .school-name {
    font-size: 16px;
    font-weight: 700;
    display: block;
    line-height: 1.3;
}

.mobile-sidebar-title .school-motto-side {
    font-size: 11px;
    font-style: italic;
    opacity: 0.9;
}

.mobile-sidebar-content {
    flex: 1;
    padding: 15px 0;
    background: #f8f9fa;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.mobile-nav-link,
.mobile-dropdown-trigger {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 12px;
    font-size: 14px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.mobile-nav-link i,
.mobile-dropdown-trigger i:first-child {
    width: 22px;
    color: var(--primary-color);
    font-size: 16px;
}

.mobile-nav-link.active,
.mobile-dropdown-trigger.active {
    background: rgba(59, 157, 179, 0.1);
    border-left: 3px solid var(--accent-color);
}

.mobile-nav-link:hover,
.mobile-dropdown-trigger:hover {
    background: rgba(59, 157, 179, 0.05);
}

.dropdown-icon {
    margin-left: auto;
    transition: transform 0.2s ease;
    color: var(--primary-color);
    font-size: 12px;
}

.mobile-dropdown-trigger[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    display: none;
    background: white;
    padding: 8px 0;
}

.mobile-dropdown-menu.show {
    display: block;
}

.mobile-dropdown-link {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 50px;
    color: var(--dark-color);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
    gap: 10px;
}

.mobile-dropdown-link i {
    width: 18px;
    color: var(--primary-color);
    font-size: 13px;
}

.mobile-dropdown-link:hover,
.mobile-dropdown-link.active {
    background: rgba(59, 157, 179, 0.08);
    padding-left: 55px;
}

/* Sidebar Footer */
.mobile-sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: 20px;
    background: white;
}

.sidebar-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--dark-color);
    font-size: 12px;
}

.sidebar-contact-item i {
    width: 20px;
    color: var(--primary-color);
}

.sidebar-social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    justify-content: center;
}

.social-link {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none;
    backdrop-filter: blur(2px);
}

.mobile-overlay.active {
    display: block;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    body {
        padding-top: 80px;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .mobile-nav-toggle {
        display: flex;
    }
    
    .school-main-name {
        font-size: 22px;
    }
    
    .school-motto {
        font-size: 12px;
    }
    
    .shield-logo, .logo-img {
        width: 55px;
        height: 55px;
        font-size: 26px;
    }
    
    .mobile-sidebar {
        display: flex;
    }
}

@media (max-width: 768px) {
    .school-main-name {
        font-size: 18px;
    }
    
    .shield-logo, .logo-img {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    .school-motto {
        display: none;
    }
    
    .school-main-name {
        font-size: 16px;
    }
    
    .shield-logo, .logo-img {
        width: 40px;
        height: 40px;
    }
    
    .mobile-sidebar {
        width: 280px;
        left: -280px;
    }
    
    .mobile-sidebar-header {
        padding: 20px 15px;
    }
    
    .mobile-sidebar-logo {
        width: 45px;
        height: 45px;
    }
}

/* ===== FOOTER (Basic) ===== */
.main-footer {
    background: linear-gradient(135deg, var(--dark-color), #1a2a3a);
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.main-footer a {
    color: #aaa;
    text-decoration: none;
}

.main-footer a:hover {
    color: var(--accent-color);
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}