/* ==================== Global Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #d946a6;
    --secondary-color: #ec4899;
    --accent-color: #f472b6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --gray-color: #6b7280;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fff;
}

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

/* ==================== Navigation ==================== */
.navbar {
    --navbar-height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: var(--navbar-height);
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 100%;
}

.nav-brand h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.nav-logo {
    height: calc(var(--navbar-height) * 0.5);
    width: auto;
}

.nav-partner-logo {
    height: calc(var(--navbar-height) * 0.5);
    width: auto;
}

.nav-title {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.nav-brand .tagline {
    margin-top: -0.5rem;
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.95;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    opacity: 0.8;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: white;
    transition: width 0.3s ease;
}

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

.signup-btn {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border: 2px solid white;
}

.signup-btn:hover {
    background-color: white;
    color: var(--primary-color);
}

/* ==================== Hero Section ==================== */
.hero {
    background-image: linear-gradient(rgba(128, 0, 128, 0.4), rgba(0, 0, 0, 0.4)), url('img/runners-silhouette.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position-x: center;
    background-position-y: 30%;
    background-attachment: fixed;
    color: white;
    padding: 100px 20px;
    text-align: center;
    margin-bottom: 5px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 70, 166, 0.3);
}

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

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

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

.btn-submit {
    width: 100%;
    margin-top: 1rem;
}

/* ==================== About Section ==================== */
.about {
    padding: 80px 20px;
    background-color: var(--light-color);
    margin-bottom: 0;
}

.about h2,
.event-info h2,
.cta h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.about-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.about-card p {
    color: var(--gray-color);
    line-height: 1.8;
}

.about-sponsor-carousel {
    margin-top: 2.5rem;
    text-align: center;
}

.about-sponsor-carousel h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

.sponsor-carousel {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 1rem;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.carousel-item {
    flex: 0 0 220px;
    display: flex;
    min-height: 170px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0;
    animation: fadeIn 0.6s forwards;
    position: relative;
}

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

.carousel-name {
    font-size: 0.9rem;
    text-align: center;
    position: absolute;
    max-width: 100%;
    bottom: 0;
}

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

@media (max-width: 900px) {
    .carousel-item {
        flex: 0 0 180px;
        height: 100px;
    }
}

@media (max-width: 680px) {
    .about-sponsor-carousel {
        margin-top: 1.5rem;
    }

    .carousel-track {
        gap: 0.85rem;
    }

    .carousel-item {
        flex: 0 0 140px;
        height: 90px;
        padding: 0.75rem;
    }
}

/* ==================== Event Info Section ==================== */
.event-info {
    padding: 80px 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-item {
    background: linear-gradient(135deg, rgba(217, 70, 166, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    text-align: center;
}

.info-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.info-item p {
    color: var(--gray-color);
}

/* ==================== CTA Section ==================== */
.cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.cta h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== Footer ==================== */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

.footer p {
    margin: 0.5rem 0;
}

.footer p:last-child {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ==================== Signup Section ==================== */
.signup-section {
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(217, 70, 166, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
    min-height: calc(100vh - 200px);
}

.signup-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.signup-container h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.form-subtitle {
    text-align: center;
    color: var(--gray-color);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* ==================== Form Styles ==================== */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.form-row .form-group {
    gap: 0.5rem;
}

label {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(217, 70, 166, 0.1);
}

input[type="text"].error,
input[type="email"].error,
input[type="tel"].error,
input[type="number"].error,
select.error {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.05);
}

.waiver-container {
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    padding: 0.5rem;
    max-height: 200px;
    width: 100%;
    overflow-y: auto;
}

.checkbox-waiver {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Checkbox styles */
.checkbox {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label {
    margin: 0;
    font-weight: 500;
    flex: 1;
}

/* Error message styles */
.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    min-height: 1.2rem;
}

.error-message:empty {
    display: none;
}

/* Success message */
.success-message {
    background-color: #d1fae5;
    border: 2px solid #10b981;
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    animation: slideIn 0.3s ease;
}

.success-message h3 {
    color: #059669;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.success-message p {
    color: #047857;
    margin-bottom: 1rem;
}

/* ==================== Animations ==================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .nav-brand {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        flex: 0 0 100%;
    }

    .nav-menu {
        flex-direction: row;
        gap: 1rem;
        font-size: 0.9rem;
        width: 100%;
        align-items: center;
        justify-content: center;
        flex: 0 0 100%;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        padding: 0.5rem 0;
        border-radius: var(--border-radius);
    }

    .nav-menu li {
        width: auto;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .about h2,
    .event-info h2,
    .cta h2 {
        font-size: 2rem;
    }

    .signup-container {
        padding: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 480px) {
    .nav-container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .nav-brand {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        flex: 0 0 100%;
    }

    .nav-brand h1 {
        font-size: 1.3rem;
    }

    .nav-menu {
        flex-direction: row;
        gap: 0.5rem;
        width: 100%;
        align-items: center;
        justify-content: center;
        flex: 0 0 100%;
        flex-wrap: wrap;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        padding: 0.5rem 0;
        border-radius: var(--border-radius);
    }

    .nav-menu li {
        width: auto;
        text-align: center;
    }

    .signup-btn {
        width: 100%;
        text-align: center;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .signup-container {
        padding: 1.5rem;
    }
}
