:root {
    --primary: #5d6a49;
    --primary-dark: #ffec8b;
    --secondary: #ffed00;
    --accent: #e74c3c;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --bg-gradient: linear-gradient(135deg, #0f3c25, #1a6d3f, #2c9e6a);
    --card-bg: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Colores para los estados */
    --color-disponible: rgba(46, 204, 113, 0.3);
    --color-reservado: rgba(231, 76, 60, 0.3);
    --color-fijo: rgba(241, 196, 15, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-gradient);
    color: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    max-width: 100vw; /* Prevenir desbordamiento horizontal */
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    overflow-x: hidden; /* Prevenir desbordamiento */
}

/* MODIFICACIÓN: Centrado completo del menú */
header {
    display: flex;
    flex-direction: column; 
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInDown 0.8s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.logo-img {
    height: 110px;
    width: auto;
    max-width: 100%;
}

.logo-text {
    font-size: 2.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(
        to right,
        #e40303 0%,
        #ff8c00 20%,
        #ffed00 40%,
        #008026 60%,
        #004dff 80%,
        #750787 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

/* MODIFICACIÓN 1: Centrado del menú */
nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 10px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

nav a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 30px;
    transition: var(--transition);
    position: relative;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 70%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
    animation: fadeIn 1s ease;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to right, #ffd700, #ffec8b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2s infinite;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 20px;
    border-radius: 10px;
    max-width: 800px;
    margin: 0 auto 20px;
    text-align: center;
}

/* Carrusel 3D - Correcciones para móviles */
.carousel-section {
    padding: 30px 0;
    margin-bottom: 40px;
    overflow: hidden;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
}

.carousel-container {
    perspective: 800px;
    height: 300px;
    margin: 0 auto 25px;
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.carousel {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s ease;
}

.carousel-item {
    position: absolute;
    width: 220px;
    height: 270px;
    left: 50%;
    top: 50%;
    margin-left: -110px;
    margin-top: -135px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    transition: transform 0.5s ease, opacity 0.5s ease;
    cursor: pointer;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.carousel-item:hover img {
    transform: scale(1.1);
}

.carousel-item .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.carousel-item:hover .caption {
    transform: translateY(0);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn {
    background: linear-gradient(to right, var(--secondary), var(--primary));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
}

.btn:active {
    transform: translateY(1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
}

/* Booking System - Correcciones para móviles */
.booking-system {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin: 40px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.8s ease;
    overflow-x: hidden;
}

.booking-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.court-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.court-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px 15px;
    color: var(--light);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
    flex-grow: 1;
    text-align: center;
    min-width: 120px;
}

.court-btn.active {
    background: var(--primary);
    border-color: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.calendar-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-nav-btn:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 5px;
}

.calendar::-webkit-scrollbar {
    display: none;
}

.calendar-header {
    text-align: center;
    padding: 10px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
}

.calendar-day {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    min-height: 80px;
    min-width: 40px;
    font-size: 0.85rem;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.calendar-day.past {
    opacity: 0.4;
    cursor: not-allowed;
}

.calendar-day.selected {
    background: var(--primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.day-number {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.availability {
    font-size: 0.7rem;
    margin-top: 3px;
    color: var(--secondary);
}

.slot {
    background: rgba(44, 158, 106, 0.2);
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 0.65rem;
    margin-top: 3px;
    display: block;
}

.slot.booked {
    background: rgba(231, 76, 60, 0.3);
}

/* Time Slots - Nuevos colores para estados */
.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.time-slot {
    background: var(--color-disponible);
    color: #fff;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    font-size: 0.85rem;
    border: none;
}

.time-slot:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}  

.time-slot.booked {
    background: var(--color-reservado);
    cursor: not-allowed;
}

.time-slot.fixed {
    background: var(--color-fijo);
    cursor: not-allowed;
}

.time-slot.selected {
    background: var(--primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.time-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--secondary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.time-slot:hover::before {
    transform: scaleX(1);
}

/* Booking Form */
.booking-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    animation: fadeIn 0.8s ease;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.1);
}

.btn-block {
    display: block;
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin: 50px 0;
}

.feature-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--secondary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--secondary);
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

/* Info Sections */
.info-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 25px;
    margin: 40px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.facility {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.facility:last-child {
    border-bottom: none;
}

.facility h3 {
    color: var(--secondary);
    margin-bottom: 12px;
    font-size: 1.3rem;
}

/* Confirmation Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--dark);
    border-radius: 15px;
    padding: 25px;
    max-width: 90%;
    width: 100%;
    text-align: center;
    position: relative;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.3rem;
    color: var(--light);
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.modal-icon {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.2);
    padding: 40px 0 15px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--secondary);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.footer-column ul li a:hover {
    color: var(--light);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.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);
    color: var(--light);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* Responsive para tablets */
@media (min-width: 576px) {
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .carousel-container {
        height: 350px;
    }
    
    .carousel-item {
        width: 250px;
        height: 300px;
        margin-left: -125px;
        margin-top: -150px;
    }
    
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive para escritorio */
@media (min-width: 768px) {
    .hero h2 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.3rem;
    }
    
    .carousel-container {
        height: 400px;
    }
    
    .carousel-item {
        width: 280px;
        height: 330px;
        margin-left: -140px;
        margin-top: -165px;
    }
    
    .features {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}