/* layout.css - Header, footer, navigation, and grid layouts */

/* Header Styles */
.header {
    background-color: var(--primary);
    position: relative;
    z-index: 100;
    padding: 15px 0;
    box-shadow: var(--shadow);
    height: 80px; /* Fixed height for consistency */
}

.nav-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
}

/* Updated Logo styling - using transform instead of negative positioning */
.logo {
    position: absolute;
    left: 20px;
    top: 0;
    z-index: 105; /* Higher than other elements */
    width: 220px; /* Fixed width */
    transform: translateY(-40px); /* Using transform instead of negative top */
}

.logo img {
    width: 100%;
    height: auto;
    max-height: 240px;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,0.2));
}

.logo img:hover {
    transform: scale(1.05);
}

/* Navigation links */
.nav-links {
    display: flex;
    gap: 20px;
    margin-right: 20px;
    padding-left: 240px; /* Make space for the logo */
}

.nav-links a {
    color: var(--white);
    font-weight: 600;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
}

/* Improved Mobile Menu - Fixed display issues */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    height: 24px;
    width: 30px;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 28px;
    z-index: 103;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--white);
    transition: all 0.3s ease;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--primary);
    padding: 20px;
    flex-direction: column;
    z-index: 102;
    box-shadow: var(--shadow);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    display: flex;
    transform: translateY(0);
}

.mobile-menu a {
    color: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--accent);
}

/* Hero Section - Updated to avoid logo overlap */
.hero {
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), url('../../images/homepage/hero-bg.JPG') top/cover no-repeat;
    color: var(--white);
    text-align: center;
    padding: 200px 20px 80px; /* Increased top padding */
    position: relative;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent);
    z-index: -1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    animation: fadeInDown 1.2s ease;
}

.hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 40px;
    animation: fadeInUp 1.2s ease;
}

/* Event Details Banner */
.event-details {
    background-color: var(--accent);
    color: var(--white);
    padding: 12px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
}

/* Countdown */
.countdown {
    background-color: var(--primary-dark);
    color: var(--white);
    text-align: center;
    padding: 15px;
    font-size: 1.3rem;
    font-weight: bold;
}

/* Quick Links Grid */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

/* Partners Section */
.partners {
    text-align: center;
    margin-bottom: 60px;
}

.partner-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap; /* Changed from wrap to nowrap to keep all logos on one line */
    gap: 40px;
    margin-top: 30px;
}

/* Partner Logos - Updated for fixed width instead of height */
.partner-logos img {
    width: 300px; /* Fixed width instead of height */
    height: auto; /* Height adjusts to maintain aspect ratio */
    opacity: 0.9;
    transition: opacity 0.3s;
    max-width: 100%; /* Ensures logo doesn't overflow container on small screens */
    background: white;
    padding: 10px;
    border-radius: 8px;
}

.partner-logos img:hover {
    opacity: 1;
    transform: scale(1.05); /* Slight enlargement on hover for interactive feel */
}

/* Footer */
.footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer a {
    color: var(--white);
}

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

/* Page Headers */
.page-header {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Media queries for responsive behavior */
@media (max-width: 768px) {
    /* Hide desktop navigation */
    .nav-links {
        display: none !important;
    }
    
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    /* Adjust logo for mobile */
    .logo {
        width: 180px;
        left: 0;
        transform: translateY(-30px);
    }
    
    .logo img {
        max-height: 200px;
    }
    
    /* Ensure hero doesn't start too high */
    .hero {
        padding-top: 220px;
    }
    
    /* Reduce partner logo width on medium screens to prevent overflow */
    .partner-logos img {
        width: 150px;
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .quick-links {
        grid-template-columns: 1fr;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .partner-logos {
        flex-direction: column;
        gap: 20px;
    }
    
    /* Reset logo width for mobile */
    .partner-logos img {
        width: 180px;
    }
    
    .section-heading {
        font-size: 1.6rem;
    }

    /* Make logo even smaller on very small screens */
    .logo {
        width: 140px;
        transform: translateY(-25px);
    }
    
    .logo img {
        max-height: 160px;
    }
    
    .hero {
        padding: 200px 20px 60px;
    }
}