
/*** VSCodeEDU preview fix ***/
html {
    background-color: var(--bg-color-dark-mode);
}

/* Add viewport meta tag reminder - add this to your HTML head:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
*/

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    font-size: 16px;
    color: var(--text-color);
    font-family: "Montserrat", sans-serif;
    margin: 0;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Text */
h1, h2, h3 {
    color: aliceblue;
    font-family: "Bebas Neue", sans-serif;
}

p {
    color: aliceblue;
    font-family: "Montserrat", sans-serif;
}

button:hover {
    color: var(--accent-color-green);
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

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

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

.navbar ul li {
    margin: 0 20px;
}

.navbar ul li a {
    display: block;
    text-decoration: none;
    color: white;
}

.navbar ul li a:hover {
    color: var(--accent-color-green);
}

#navbar-img {
    margin-left: 50px;
    margin-right: 50px;
    width: 80px;
}

/* Header */
.header-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-image: url('img/header_background.png');
    background-size: cover;
    background-position: center;
    width: 100%;
    padding: 150px 20px;
    text-align: center;
    min-height: 55vh; /* Takes up 80% of viewport height */
}

.header-container > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-logo {
    height: 350px;
    max-width: 700px;
    width: auto;
    margin-bottom: 30px;
}

#header-button {
    background-color: var(--accent-color-gray);
    color: var(--accent-color-celeste);
    border: none;
    padding: 15px 25px;
    border-radius: 15px;
    margin: 0 auto;
    cursor: pointer;
    font-family: "Bebas Neue", sans-serif;
    width: 200px;
    height: 50px;
    letter-spacing: 0.5px;
    font-size: 16px;
}

#header-button:hover {
    color: var(--accent-color-green);
}

/* About Section */
#about {
    background-color: black;
    padding: 60px 40px;
}

.about-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.about-title-container {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    margin: 0 40px;
}

.about-title1 {
    margin: 0;
    font-family: "Bebas Neue", sans-serif;
    font-size: 100px;

}

.about-title2 {
    margin: 0;
    font-family: "Bebas Neue", sans-serif;
    font-size: 100px;
    color: white;
    line-height: 0.8;
    text-align: right;
}

.about-txt {
    flex: 1;
    font-family: "Montserrat", sans-serif;
    font-size: 16px;
    color: white;
    line-height: 1.6;
    margin: 0;
    text-align: justify;
    max-width: 500px;
}

/* Carousel Section */
#carousel-container {
    background-color: var(--accent-color-celeste);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#car-items {
    display: flex;
    justify-content: space-between;
    gap: 50px;
    color: #0b0a0a;
    margin: 40px 0;
    list-style-type: none;
    font-family: "Bebas Neue", sans-serif;
    font-size: 50px;
    font-weight: lighter;
    padding: 0;
}

/* Next Training Section */
#next-trainings-container {
    background-image: url('img/background_proximo_entreno.png');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    padding: 80px 20px 50px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    color: white;
}

.next-trainings-title {
    margin: 40px 0;
    font-family: "Bebas Neue", sans-serif;
    font-size: 120px;
    text-transform: uppercase;
    font-weight: 400;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    text-align: center;
}

.countdown-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    margin-bottom: 60px;
    width: 100%;
    flex-wrap: wrap;
}

.countdown-display {
    display: flex;
    gap: 20px;
    font-family: "Bebas Neue", sans-serif;
}

.countdown-unit {
    background-color: var(--accent-color-green);
    padding: 30px 25px;
    border-radius: 12px;
    text-align: center;
    min-width: 120px;
}

.countdown-number {
    font-size: 130px;
    color: black;
    display: block;
    line-height: 1;
    font-weight: bold;
}

.countdown-label {
    font-size: 16px;
    color: black;
    text-transform: uppercase;
    margin-top: 8px;
}

#calendar-button {
    background-color: #54eaf9;
    color: black;
    border: none;
    padding: 20px 35px;
    border-radius: 30px;
    font-family: "Bebas Neue", sans-serif;
    font-size: 18px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

#calendar-button:hover {
    background-color: #28eb76;
    color: #0b0a0a;
    transform: translateY(-2px);
}

.event-details {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 80px;
    margin-top: 40px;
    width: 100%;
    max-width: 1200px;
}

.map-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.map-preview {
    width: 450px;
    height: 300px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Montserrat", sans-serif;
    color: #666;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}



.event-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 40px;
}

.event-date-time {
    font-family: "Bebas Neue", sans-serif;
    font-size: 200px;
    color: white;
    line-height: 0.80;
    margin: 0;
    font-weight: bold;
    border-right: 4px solid white;
    padding-right: 40px;
}

.event-location {
    font-family: "Bebas Neue", sans-serif;
    font-size: 100px;
    color: white;
    line-height: 0.80;
    margin: 0;
    font-weight: bold;
}

.map-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    justify-content: center;
}

.other-button {
    background-color: #494949;
    color: #54eaf9;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-family: "Bebas Neue", sans-serif;
    width: 180px;
    height: 45px;
    font-size: 16px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.other-button:hover {
    background-color: #54eaf9;
    color: #494949;
    transform: translateY(-2px);
}

/* Gallery Section */
#gallery-container {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 50px 20px;
}

.gallery-text {
    color: var(--accent-color-celeste);
    font-family: "Bebas Neue", sans-serif;
    text-transform: uppercase;
    font-size: 75px;
    font-weight: 400;
    margin-bottom: 40px;
}

.gallery-car-container {
    display: flex;
    align-items: center;
    overflow: hidden;
    flex-direction: row;
}

#gallery-viewport {
    overflow: hidden;
    width: 1200px;
    max-width: 100%;
}

/* Fix for gallery track improvements */
#gallery-track {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 50px;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    width: auto;
}

#gallery-page {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    width: 1200px;
    height: 590px;
    flex-shrink: 0;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.gallery-item {
    height: 285px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
   transition: transform 0.3s ease;
    transform: scale(1.05);
}

#prev, #next {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
}

#prev img, #next img {
    width: 50px;
    height: 50px;
    transition: transform 0.3s ease;
    filter: brightness(0) invert(1);
}

#prev:hover, #next:hover {
    transform: scale(1.1);
    filter: brightness(0) invert(43%) sepia(96%) saturate(1352%) hue-rotate(87deg) brightness(119%) contrast(119%);
}

.pagination-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.pagination-dot.active {
    background-color: #54eaf9;
}

.pagination-dot:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

/* Sponsors */
#sponsors-container {
    display: flex;
    align-items: center;
    flex-direction: column;
    margin-bottom: 50px;
    padding: 50px 20px;
}

.sponsors-background {
    display: flex;
    background-color: var(--accent-color-gray);
    border-radius: 50px;
    padding: 80px 60px;
    width: 100%;
    max-width: 1000px;
    justify-content: center;
    align-items: center;
}

.sponsors-text {
    color: var(--accent-color-celeste);
    font-family: "Bebas Neue", sans-serif;
    text-transform: uppercase;
    font-size: 75px;
    font-weight: 400;
    margin-bottom: 20px;
}

.sponsors-grid {
    display: flex;
    list-style: none;
    flex-direction: row;
    justify-content: space-around;
    margin: 0;
    padding: 0;
    gap: 80px;
    align-items: center;
    flex-wrap: wrap;
}

.sponsor-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 275px;
    height: 100px;
    transition: all 0.3s ease;
}

.sponsor-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 275px;
    max-height: 100px;
}

.sponsor-item:hover {
    transform: scale(1.05);
}

/* Contact Section */
#rsvp {
    background-color: black;
    padding: 60px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1600px;
    width: 100%;
    gap: 120px;
}

.form-section {
    flex: 1;
    max-width: 600px;
}

.contact-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 120px;
    color: white;
    text-transform: uppercase;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-input, .message-textarea {
    background-color: white;
    border: none;
    padding: 18px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
}

.form-input.error {
    border: 2px solid #e63946;
    background-color: #f8bbd0;
    color: #721c24;
}

.message-textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background-color: #494949;
    color: #54eaf9;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #54eaf9;
    color: #494949;
    transform: translateY(-2px);
}

.image-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.runner-image {
    width: 700px;
    height: 700px;
    object-fit: cover;
    position: relative;
    z-index: 2;
    max-width: 100%;
}

/* Footer */
.footer {
    background-color: #494949;
    width: 100%;
    padding: 20px 0;
}

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

.footer-right {
    display: flex;
    align-items: center;
}

.social-media {
    width: 40px;
    margin: 0 5px;
}

.social-media:hover {
    filter: brightness(0.8) invert(1);
}

#footer-img {
    width: 100px;
    margin-right: 30px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-container {
    padding: 50px;
    width: 55%;
    max-width: 600px;
    background-color: rgb(13, 13, 13);
    color: white;
    text-align: center;
    font-size: 1rem;
    font-family: monospace;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
}

#modal-img {
    width: 80px;
    margin: 20px auto;
}

/* Color Variables */
:root {
    --bg-color: black;
    --text-color: #231942;
    --accent-color-light: #393636;
    --accent-color-medium: #684fb5;
    --accent-color-dark: #0b0a0a;
    --accent-color-darkest: #231942;
    --accent-color-green: #00ff66;
    --accent-color-darkGreen: #25a357;
    --accent-color-gray: #494949;
    --accent-color-celeste: #54eaf9;
    --error-color: #f8bbd0;
    --error-color-border: #e63946;
}



/* ============ MEDIA QUERIES ============ */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .about-container,
    .event-details {
        max-width: 1400px;
    }
}

/* Desktop/Laptop (992px to 1199px) */
@media (max-width: 1199px) {
    .next-trainings-title {
        font-size: 100px;
    }
    
    .event-date-time {
        font-size: 150px;
    }
    
    .event-location {
        font-size: 80px;
    }
    
    .map-preview {
        width: 400px;
        height: 250px;
    }
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) {
    .about-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .about-img {
        width: 280px;
        height: 280px;
    }
    
    .about-title1,
    .about-title2 {
        font-size: 80px;
        text-align: center;
    }
    
    .about-txt {
        text-align: center;
        max-width: 100%;
        font-size: 15px;
    }
    
    .event-details {
        flex-direction: column;
        gap: 40px;
        margin-top: 40px;
        width: 100%;
        max-width: 1200px;
        align-items: center;
        justify-content: center;
    }
    
    .map-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .event-info {
        flex-direction: column;
        text-align: center;
        gap: 40px;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .event-date-time {
        border-right: none;
        border-bottom: 4px solid white;
        padding-right: 0;
        padding-bottom: 30px;
        margin-bottom: 20px;
        font-size: 120px;
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .event-location {
        padding-top: 30px;
        margin-top: 20px;
        font-size: 70px;
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .sponsors-grid {
        gap: 40px;
    }
    
    .sponsor-item {
        width: 200px;
        height: 80px;
    }
}

/* Mobile Large (481px to 767px) */
@media (max-width: 767px) {
    /* Navbar */
    .navbar {
        flex-direction: column;
        padding: 15px;
        background-color: rgba(0, 0, 0, 0.9);
    }
    
    .navbar ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        margin: 15px 0;
    }
    
    .navbar ul li {
        margin: 5px 10px;
    }
    
    .navbar ul li a {
        font-size: 14px;
        padding: 8px 12px;
        border-radius: 5px;
        background-color: rgba(84, 234, 249, 0.1);
    }
    
    #navbar-img {
        width: 60px;
        margin: 10px;
    }
    
    /* Header */
    .header-container {
        padding: 50px 15px;
    }
    
    .header-logo {
        height: 200px;
        max-width: 350px;
    }
    
    #header-button {
        width: 180px;
        height: 45px;
        font-size: 14px;
    }
    
    /* About */
    .about-img {
        width: 240px;
        height: 240px;
    }
    
    .about-title1,
    .about-title2 {
        font-size: 60px;
    }
    
    .about-txt {
        font-size: 14px;
        padding: 0 20px;
    }
    
    /* Carousel */
    #car-items {
        flex-direction: column;
        text-align: center;
        font-size: 30px;
        gap: 15px;
        margin: 20px 0;
    }
    
    /* Countdown */
    #next-trainings-container {
        padding: 40px 15px;
    }
    
    .next-trainings-title {
        font-size: 60px;
        margin: 20px 0 30px;
    }
    
    .countdown-container {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 40px;
    }
    
    .countdown-display {
        gap: 15px;
        justify-content: center;
    }
    
    .countdown-unit {
        min-width: 80px;
        padding: 20px 15px;
    }
    
    .countdown-number {
        font-size: 48px;
    }
    
    .countdown-label {
        font-size: 12px;
    }
    
    #calendar-button {
        width: 250px;
        padding: 15px 25px;
        font-size: 14px;
    }
    
    .map-preview {
        width: 90%;
        max-width: 350px;
        height: 200px;
        margin: 0 auto;
    }
    
    .event-date-time {
        font-size: 80px;
        padding-bottom: 25px;
        margin-bottom: 15px;
    }
    
    .event-location {
        font-size: 50px;
        padding-top: 25px;
        margin-top: 15px;
    }
    
    .map-buttons {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .other-button {
        width: 200px;
        margin: 0 auto;
    }
    
    /* Gallery */
    .gallery-text {
        font-size: 50px;
    }
    
    .gallery-car-container {
        flex-direction: column;
        gap: 20px;
    }
    
    #gallery-viewport {
        width: 350px;
        max-width: 350px;
        order: 1;
        overflow: hidden;
    }
    
    #gallery-page {
        width: 350px;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 10px;
        height: 620px;
    }
    
    .gallery-item {
        height: 150px;
    }
    
    #prev, #next {
        order: 2;
    }
    
    /* Sponsors */
    .sponsors-text {
        font-size: 50px;
    }
    
    .sponsors-background {
        padding: 40px 20px;
        border-radius: 25px;
    }
    
    .sponsors-grid {
        flex-direction: column;
        gap: 30px;
    }
    
    .sponsor-item {
        width: 150px;
        height: 60px;
    }
    
    /* Contact */
    .contact-container {
        flex-direction: column;
        gap: 40px;
        padding: 0 20px;
    }
    
    .form-section {
        max-width: 100%;
    }
    
    .contact-title {
        font-size: 60px;
        text-align: center;
    }
    
    .runner-image {
        width: 350px;
        height: 350px;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 20px;
        padding: 0 20px;
        text-align: center;
    }
    
    /* Modal */
    .modal-container {
        width: 90%;
        padding: 30px;
    }
}

/* Mobile Small (320px to 480px) */
@media (max-width: 480px) {
    /* Header */
    .header-logo {
        height: 150px;
        max-width: 280px;
    }
    
    #header-button {
        width: 160px;
        height: 40px;
        font-size: 12px;
    }
    
    /* About */
    .about-img {
        width: 200px;
        height: 200px;
    }
    
    .about-title1,
    .about-title2 {
        font-size: 45px;
    }
    
    .about-txt {
        font-size: 13px;
        padding: 0 15px;
    }
    
    /* Carousel */
    #car-items {
        font-size: 24px;
        gap: 10px;
    }
    
    /* Countdown */
    .next-trainings-title {
        font-size: 45px;
    }
    
    .countdown-number {
        font-size: 36px;
    }
    
    .countdown-unit {
        min-width: 70px;
        padding: 15px 10px;
    }
    
    #calendar-button {
        width: 220px;
        font-size: 12px;
    }
    
    .map-preview {
        width: 90%;
        max-width: 350px;
        height: 200px;
        margin: 0 auto;
    }
    
    .event-date-time {
        font-size: 60px;
        padding-bottom: 20px;
        margin-bottom: 15px;
    }
    
    .event-location {
        font-size: 40px;
        padding-top: 20px;
        margin-top: 15px;
    }
    
    .map-buttons {
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .other-button {
        width: 200px;
        margin: 0 auto;
    }
    
    /* Gallery */
    .gallery-text {
        font-size: 40px;
    }
    
    #gallery-viewport {
        width: 300px;
        max-width: 300px;
        overflow: hidden;
    }
    
    #gallery-track {
        gap: 0; /* Remove gap on mobile for better fit */
    }
    
    #gallery-page {
        width: 300px;
        height: 520px;
    }
    
    .gallery-item {
        width: 100%;
        height: 120px;
        object-fit: cover;
        border-radius: 5px;
    }
    
    /* Sponsors */
    .sponsors-text {
        font-size: 40px;
    }
    
    /* Contact */
    .contact-title {
        font-size: 45px;
    }
    
    .runner-image {
        width: 280px;
        height: 280px;
    }
    
    .form-input, .message-textarea {
        padding: 15px 20px;
        font-size: 14px;
    }
}

/* Extra Small Mobile (below 320px) */
@media (max-width: 319px) {
    .next-trainings-title {
        font-size: 35px;
    }
    
    .countdown-number {
        font-size: 28px;
    }
    
    .about-title1,
    .about-title2 {
        font-size: 35px;
    }
    
    .map-preview {
        width: 95%;
        max-width: 280px;
        height: 180px;
        margin: 0 auto;
    }
    
    .event-date-time {
        font-size: 45px;
        padding-bottom: 15px;
        margin-bottom: 10px;
    }
    
    .event-location {
        font-size: 30px;
        padding-top: 15px;
        margin-top: 10px;
    }
    
    .map-buttons {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    .other-button {
        width: 180px;
        font-size: 14px;
        margin: 0 auto;
    }
}

