/* General Styles */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@700&family=Open+Sans:wght@400;600&display=swap');

:root {
    --primary-color: #003366; /* Deep Blue */
    --accent-color: #ff6600; /* Vibrant Orange */
    --text-dark: #333333;
    --text-light: #ffffff;
    --text-muted: #666666;
    --background-light: #f4f7f6;
    --background-white: #ffffff;
    --background-dark: #1a1a1a;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Let the main content grow to push footer down */
main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertical Center */
    align-items: center;     /* Horizontal Center */
    width: 100%;
    padding-top: 100px;      /* Header offset */
    padding-bottom: 50px;
    box-sizing: border-box;
}

#registration, section, .reg-container {
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
    color: var(--primary-color);
    margin-top: 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background: var(--background-white);
    color: var(--text-dark);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1001; /* Higher z-index */
    transition: all var(--transition-speed) ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-color);
    z-index: 1002;
    transition: transform 0.3s ease;
}

/* Change hamburger to X using Font Awesome character code */
.menu-toggle:checked ~ .menu-icon i::before {
    content: "\f00d"; /* Font Awesome 'times' icon */
    font-weight: 900;
}

header .logo {
    display: flex;
    align-items: center;
}

header .logo a {
    display: inline-block;
    height: 50px;
}

header .logo img {
    height: 100%;
    width: auto;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px;
}

/* Mobile Overlay Background */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

header nav ul li a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color var(--transition-speed) ease;
    position: relative;
}

header nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    bottom: -5px;
    left: 0;
    transition: width var(--transition-speed) ease;
}

header nav ul li a:hover {
    color: var(--accent-color);
}

header nav ul li a:hover::after {
    width: 100%;
}

/* Sticky Header */
body.scrolled header {
    padding: 10px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

body.scrolled header .logo img {
    height: 40px;
}

/* Banner */
#banner {
    position: relative;
    height: 100vh; /* Full viewport height */
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    background-color: var(--primary-color); /* Fallback */
    overflow: hidden;
}

.banner-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

#banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.85) 0%, rgba(0, 51, 102, 0.6) 100%);
    z-index: 1;
}

#banner .container {
    position: relative;
    z-index: 2;
}

#banner h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: fadeInDown 1s ease forwards;
}

#banner p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    font-weight: 400;
    opacity: 0.9;
    animation: fadeInUp 1s ease forwards 0.3s;
    opacity: 0; /* Initial state for animation */
}

.event-info-highlight {
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease forwards 0.45s;
    opacity: 0;
}

.free-notice {
    background-color: rgba(255, 102, 0, 0.2);
    border: 2px solid var(--accent-color);
    color: #fff;
    display: inline-block;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.deadline {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffeb3b;
    margin-top: 5px !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

#countdown {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: fadeIn 1s ease forwards 0.6s;
    opacity: 0; /* Initial state for animation */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.btn:hover {
    background-color: #e65c00;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.25);
}

/* Sections */
section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: var(--background-white);
}

section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 15px;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

section h2 i {
    margin-right: 10px;
    color: var(--accent-color);
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed) ease;
}

.about-image img:hover {
    transform: scale(1.02);
}

/* Cards (Schedule & Awards) */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--background-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    border-top: 4px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    border-top-color: var(--accent-color);
}

.card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Gallery */
#gallery {
    background-color: var(--background-dark);
    color: var(--text-light);
}

#gallery h2 {
    color: var(--text-light);
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform var(--transition-speed) ease, opacity var(--transition-speed) ease;
    opacity: 0.9;
}

.gallery-img:hover {
    transform: scale(1.03);
    opacity: 1;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    z-index: 10;
}

/* Testimonials */
.testimonial-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial {
    background: var(--background-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    text-align: center;
    position: relative;
}

.testimonial img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 3px solid var(--accent-color);
}

.testimonial p {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.testimonial h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
}

/* Contact Section */
.contact-container {
    display: flex;
    gap: 50px;
}

.contact-info, .contact-form {
    flex: 1;
}

.contact-info h3, .contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.contact-info ul {
    list-style: none;
    padding: 0;
}

.contact-info ul li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-muted);
}

.contact-info ul li i {
    margin-right: 15px;
    color: var(--accent-color);
    font-size: 1.2rem;
    width: 20px; /* Fixed width for alignment */
    text-align: center;
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    margin-top: 2rem;
}

.contact-form form {
    background: var(--background-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-speed) ease;
    box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
}

/* Footer */
footer {
    background-color: var(--background-dark);
    color: #aaaaaa;
    padding: 50px 0 20px;
    text-align: center;
    font-size: 0.9rem;
}

footer p {
    margin: 0.5rem 0;
}

footer a {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 10px;
    transition: color var(--transition-speed) ease;
}

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

/* Back to Top */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: var(--text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    z-index: 999;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .container {
        width: 95%;
    }
    
    #banner h1 {
        font-size: 2.8rem;
    }
    
    .about-content, .contact-container {
        flex-direction: column;
    }
    
    .about-image {
        margin-top: 2rem;
    }
    
    .contact-form {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .menu-icon {
        display: block;
        position: relative;
    }

    /* Keep icon fixed and on top when menu is open */
    .menu-toggle:checked ~ .menu-icon {
        position: fixed;
        right: 15px;
        top: 15px;
    }

    header nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--background-white);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s cubic-bezier(0.05, 0.74, 0.2, 0.99);
        padding: 80px 30px; 
        z-index: 1000;
        overflow-y: auto; /* Enable scrolling */
    }

    header nav ul {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    header nav ul li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    header nav ul li a {
        font-size: 1.1rem;
        display: block;
        width: 100%;
        padding: 12px 0;
    }

    .menu-toggle:checked ~ nav {
        right: 0;
    }

    .menu-toggle:checked ~ .menu-overlay {
        display: block;
    }

    section {
        padding: 60px 0;
    }
    
    section h2 {
        font-size: 2rem;
    }
}