/* CSS Reset and Base Styles */
:root {
    --primary: #2ecc71;
    --secondary: #3498db;
    --accent: #e74c3c;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

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

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(46, 204, 113, 0.3);
}

.btn-secondary {
    background: var(--secondary);
}

.btn-secondary:hover {
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60%;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.section-padding {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

/* Header/Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    padding: 10px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    position: relative;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

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

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Home Section */
.home {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://img.freepik.com/premium-vector/marathon-running-people-jogging-athletes-group-sprinting-men-women-isolated-vector-illustration-marathon-racing-competition_229548-1839.jpg') no-repeat center center/cover;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.home-content {
    max-width: 800px;
    padding: 0 20px;
    z-index: 1;
}

.home h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    color: #fff;
}

.home p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: #137179;
    font-size: 2rem;
}



@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-20px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}
.main-title {
  font-size: 3.5rem;   /* Bigger for main heading */
  font-weight: 800;
  text-transform: uppercase;
  color: #222;         /* You can adjust color */
}

/* .sub-title {
  font-size: 1.5rem;   
  font-weight: 500;
  color: #1c1b1b;        
  margin-top: -10px; 
} */

.sub-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: #1c1b1b;
  margin-top: -10px;
  position: relative; /* This is needed for the underline to work */
  padding-bottom: 5px; /* Adds space between the text and the line */
  display: inline-block; /* Ensures the line is only as wide as the text */
}

/* This new block creates the green underline */
.sub-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #51bdef; /* Using the green from your subheading */
}

.event-date-home {
    font-size: 7rem;
    color: #efefe9;
    margin: 30px 0 30px 0;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-shadow: 0 2px 8px rgba(44, 62, 80, 0.25);
}

.home-subheading {
    font-size: 2rem;
    color: #08c43d;
    font-weight: 600;
    margin: 10px 0 18px 0;
    text-align: center;
    letter-spacing: 0.5px;
    font-style: italic;
    font-family: 'Lora', serif;
}
.countdown-timer {
    font-size: 2rem;
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    margin: 10px 0 0 0;
    text-shadow: 0 2px 8px rgba(44, 62, 80, 0.25);
    letter-spacing: 1px;
}

.countdown-timer-box {
    display: flex;
    gap: 24px; /* Responsive gap */
    position: relative;
    padding: 24px 40px;
    border-radius: 20px;
    background: var(--container-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 32px var(--shadow-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* * ==============================================
 * ANIMATED GRADIENT BORDER
 * ==============================================
 * This creates the subtle, moving border effect.
 */
.countdown-timer-box::before {
    content: '';
    position: absolute;
    inset: -1px; /* Sits just outside the container to form the border */
    z-index: -1;
    background: linear-gradient(120deg, 
        var(--border-gradient-start), 
        var(--border-gradient-end), 
        var(--border-gradient-start));
    background-size: 200% 200%;
    border-radius: 20px; /* Must match parent's border-radius */
    animation: borderMove 8s linear infinite;
    transition: opacity 0.3s;
}

@keyframes borderMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* * ==============================================
 * HOVER EFFECTS
 * ==============================================
 */
.countdown-timer-box:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 16px 48px var(--shadow-color);
}

/* * ==============================================
 * INDIVIDUAL TIME UNIT STYLING (Days, Hours, etc.)
 * ==============================================
 */
.time-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* * ==============================================
 * NUMBER BOX STYLING
 * ==============================================
 * Contains the actual countdown number (e.g., "08")
 */
.countdown-number {
    font-size: clamp(2rem, 8vw, 3.5rem); /* Responsive font size */
    font-weight: 700;
    color: var(--text-color);
    background: var(--number-bg);
    border-radius: 12px;
    padding: 12px 20px;
    min-width: 80px; /* Ensures consistent width */
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    perspective: 500px;
}

.countdown-number:hover {
    background: var(--number-bg-hover);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Subtle shine effect on hover */
.countdown-number::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255,255,255,0.15) 0%,
        rgba(255,255,255,0) 50%
    );
    transform: rotate(45deg);
    transition: transform 0.5s ease-out;
    opacity: 0;
}

.countdown-number:hover::after {
    transform: rotate(45deg) translate(20%, 20%);
    opacity: 1;
}

/* * ==============================================
 * LABEL STYLING ("Days", "Hours", etc.)
 * ==============================================
 */
.countdown-label {
    margin-top: 20px;
    font-size: clamp(0.75rem, 3vw, 1rem); /* Responsive font size */
    color: var(--label-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.time-segment:hover .countdown-label {
    color: var(--text-color);
}

/* * ==============================================
 * ANIMATIONS
 * ==============================================
 */

/* Flip animation for when a number changes */
@keyframes flip-down {
    0% {
        transform-origin: top;
        transform: rotateX(0deg);
        opacity: 1;
    }
    50% {
        transform: rotateX(-90deg);
        opacity: 0.5;
    }
    100% {
        transform-origin: top;
        transform: rotateX(0deg);
        opacity: 1;
    }
}

.flip {
    animation: flip-down 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

/* Media query for smaller screens */
@media (max-width: 600px) {
    .countdown-timer-box {
        gap: 20px;
        padding: 20px;
        flex-direction: row; /* Keep horizontal layout */
        flex-wrap: wrap; /* Allow wrapping if needed */
        justify-content: center;
    }
    .time-segment {
        flex-direction: column; /* Keep vertical alignment within each segment */
        align-items: center;
        text-align: center;
        min-width: auto;
    }
    .countdown-number {
        min-width: 50px;
        padding: 6px 10px;
        font-size: clamp(1rem, 4vw, 1.8rem); /* Smaller but responsive */
    }
    .countdown-label {
        margin-top: 8px;
        margin-left: 0;
        font-size: clamp(0.6rem, 2.5vw, 0.8rem); /* Smaller label font */
    }
}
/* --- Option 3 (Modified): Asymmetrical with Underline --- */

/* This is the main container for the side-by-side layout */
.hero-title-split {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    margin-top: 4rem;
}



/* About Section */
.about {
    background: var(--light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 20px;
    align-items: center;
}

.about-text {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.marathon-animation {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 100%;
}

.marathon-animation img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomInOut 8s ease-in-out infinite;
}

@keyframes zoomInOut {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.marathon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(46, 204, 113, 0.3), rgba(52, 152, 219, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.marathon-animation:hover .marathon-overlay {
    opacity: 1;
}

/* History Section */
.history {
    background: white;
}



.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* Always 2 columns */
    gap: 25px;
    margin-top: 50px;
    width: 100%;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    aspect-ratio: 16/9;
    width: 100%; /* Ensure full width of grid cell */
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }
}
.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item video {
    object-fit: cover;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.1);
}

/* Video Section */
.video-section {
    background: var(--light);
}

.video-container {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
}

.close-lightbox {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* Updates Section */
.updates {
    background: var(--light);
}

.event-details {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 50px auto 0;
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.detail-item i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: 20px;
    width: 40px;
    text-align: center;
}

.detail-item h3 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 5px;
}

.register-btn {
    text-align: center;
    margin-top: 40px;
}

/* Contact Section */
.contact {
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.contact-card {
    background: var(--light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark);
}

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

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-5px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .home {
        background-attachment: scroll;
    }

    .about-content {
        grid-template-columns: 1fr;
    }
    
    .marathon-animation {
        width: 100%;
        height: 300px;
    }

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

    .gallery-item {
        min-height: 180px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 0;
    }

    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transition: var(--transition);
    }

    .nav-links.active {
        left: 0;
    }

    .hamburger {
        display: block;
    }

    .home h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-padding {
        padding: 70px 0;
    }

    .event-details {
        padding: 30px 20px;
    }

    .marathon-animation {
        height: 250px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .gallery-item {
        min-height: 150px;
    }

    .countdown-timer-box {
        gap: 12px;
        padding: 15px 20px;
        max-width: 98vw;
    }
    .countdown-number {
        font-size: clamp(1.2rem, 5vw, 2rem);
        padding: 8px 12px;
        min-width: 60px;
    }
    .countdown-label {
        font-size: clamp(0.65rem, 2.5vw, 0.85rem);
    }
}

@media (max-width: 480px) {
    .home h1 {
        font-size: 2rem;
    }

    .home p {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 25px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .marathon-animation {
        height: 200px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gallery-item {
        min-height: 120px;
    }

    .container {
        width: 95%;
        padding: 0 10px;
    }

    .countdown-timer-box {
        gap: 8px;
        padding: 10px 15px;
        flex-wrap: wrap;
    }
    .countdown-number {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
        padding: 6px 8px;
        min-width: 45px;
    }
    .countdown-label {
        font-size: clamp(0.55rem, 2vw, 0.7rem);
        margin-top: 6px;
    }
}

@media (max-width: 360px) {
    .marathon-animation {
        height: 180px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .gallery-item {
        min-height: 100px;
    }
}