/* Root Variables - Matching BWIS Logo Colors */
:root {
    --primary-color: #1e3a8a;
    --primary-hover: #1e40af;
    --secondary-color: #2563eb;
    --accent-color: #dc2626;
    --accent-hover: #b91c1c;
    --royal-blue: #1e3a8a;
    --royal-blue-light: #3b82f6;
    --british-red: #dc2626;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --bg-light: #f8fafc;
    --bg-blue-light: #eff6ff;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px 0 rgba(30, 58, 138, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(30, 58, 138, 0.15), 0 2px 4px -1px rgba(30, 58, 138, 0.1);
    --shadow-lg: 0 10px 25px -3px rgba(30, 58, 138, 0.2), 0 4px 6px -2px rgba(30, 58, 138, 0.1);
    --shadow-xl: 0 20px 40px -5px rgba(30, 58, 138, 0.25);
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        "Instrument Sans",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1e3a8a 0%, #dc2626 100%);
    border-radius: 10px;
    border: 2px solid #f1f5f9;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb 0%, #ef4444 100%);
    border-color: #cbd5e1;
    box-shadow: 0 0 10px rgba(30, 58, 138, 0.5);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #1e40af 0%, #b91c1c 100%);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #1e3a8a #f1f5f9;
}

/* Page content starts from top since header is transparent */
main,
.page-content,
.content-wrapper {
    padding-top: 0;
    margin-top: 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header Styles */
.header-main {
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.header-main.scrolled {
    background: linear-gradient(135deg, #2d1b4e 0%, #1e3a8a 50%, #2d1b4e 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    position: relative;
    width: 100%;
}

.logo-section {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.02);
}

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

.school-name {
    font-family: 'Brush Script MT', cursive;
    font-size: 1.5rem;
    font-weight: 400;
    color: white;
    font-style: italic;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* Navigation Styles */
.main-nav {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1.25rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.813rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
    text-transform: uppercase;
    border: 1px solid transparent;
    transform: skewX(-15deg);
    border-radius: 2px;
}

.nav-link > * {
    transform: skewX(15deg);
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background-color: rgba(30, 58, 138, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

.dropdown-icon {
    transition: transform 0.3s ease;
}

.nav-item.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: rgba(30, 58, 138, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.25rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    list-style: none;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    z-index: 100;
}

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

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 0.625rem 1.25rem;
    color: white;
    text-decoration: none;
    font-size: 0.813rem;
    font-weight: 400;
    transition: var(--transition);
    position: relative;
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
    background-color: rgba(220, 38, 38, 0.8);
    border-left-color: white;
    padding-left: 1.5rem;
}

/* Header Actions */
.header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--british-red);
    color: white;
    border: 1px solid white;
    font-weight: 500;
    font-size: 0.813rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 1px solid white;
    font-weight: 500;
    font-size: 0.813rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-outline:hover {
    background-color: white;
    color: var(--royal-blue);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

/* Footer Responsive */
@media (max-width: 768px) {
    .footer-logo-img {
        height: 80px;
    }
    
    .footer-social {
        gap: 1rem;
    }
    
    .social-icon {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1rem;
    }
    
    .footer-nav {
        gap: 1.5rem;
    }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .school-name {
        font-size: 1.25rem;
    }
    
    .nav-link {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
    
    .header-actions {
        margin-left: 1rem;
    }
}

@media (max-width: 768px) {
    .header-main {
        background: rgba(30, 58, 138, 0.95);
        backdrop-filter: blur(10px);
    }
    
    .logo-img {
        height: 50px;
    }
    
    .school-name {
        font-size: 1.1rem;
    }
    
    .nav-list {
        gap: 0.25rem;
    }
    
    .nav-link {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
    
    .dropdown-menu {
        min-width: 180px;
    }
    
    .header-actions {
        margin-left: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .school-name {
        display: none;
    }
    
    .logo-img {
        height: 45px;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 0.375rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 1.5rem;
    height: 2px;
    background-color: white;
    transition: var(--transition);
}

/* Footer Styles */
.footer-main {
    background-color: #f8f9fa;
    color: var(--text-dark);
    padding: 3rem 0 1rem;
    margin-top: 0 !important;
    border-top: 1px solid #e5e7eb;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo-section {
    display: flex;
    justify-content: center;
}

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

.footer-social {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: #1e3a8a;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.125rem;
}

.social-icon:hover {
    background-color: #2563eb;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.footer-nav {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #1e3a8a;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #dc2626;
    transition: width 0.3s ease;
}

.footer-nav a:hover {
    color: #dc2626;
}

.footer-nav a:hover::after {
    width: 100%;
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    color: #6b7280;
    font-size: 0.813rem;
}

.footer-bottom p {
    margin: 0.25rem 0;
}

.footer-credit {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--white);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        padding: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }

    .main-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-item {
        border-bottom: 1px solid var(--border-color);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 1rem;
        border-radius: 0;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border-color);
        border-radius: 0;
        margin-top: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-item.dropdown.active .dropdown-menu {
        max-height: 500px;
    }

    .dropdown-menu a {
        padding: 0.875rem 1.5rem;
        background-color: var(--bg-light);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .header-actions {
        margin-right: 1rem;
    }
}

@media (max-width: 768px) {
    .header-wrapper {
        padding: 0.75rem 0;
    }

    .logo-img {
        height: 40px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .header-actions .btn {
        padding: 0.5rem 0.75rem;
    }
}

/* Main Content Spacing */
main {
    min-height: 0;
}
