@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* --- VARIABLES DE COLOR --- */
:root {
    --primary-color: #5aa3ff; /* Un azul más brillante para destacar en fondos oscuros */
    --secondary-color: #9fa8da; /* Un lavanda suave para elementos secundarios */
    --accent-color: #00e676; /* Un verde neón para acentos y disponibilidad */
    --selected-color: #ffab40; /* Un naranja ámbar para selecciones */
    --background-light: #02051d; /* Fondo principal oscuro */
    --background-card: #040824; /* Fondo para tarjetas y secciones */
    --text-dark: #e0e0e0; /* Texto principal claro */
    --text-light: #b0bec5; /* Texto secundario y sutil */
    --border-color: #37474f; /* Borde oscuro pero visible */
    --shadow-light: rgba(0, 0, 0, 0.2); /* Sombra más sutil para modo oscuro */
    --shadow-medium: rgba(0, 0, 0, 0.4); /* Sombra más pronunciada */
}
/* --- ESTILOS GENERALES --- */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-light);
    color: #e0e0e0;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 960px;
    margin: 30px auto;
    background: var(--background-card);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-light);
}

.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container img {
    max-width: 250px;
    height: auto;
}

h2 {
    color: #e0e0e0; /* Changed from --primary-color to --text-dark */
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 1.8em;
    font-weight: 700;
}

#step-1-product h2 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 30px;
}

/* --- ESTILOS PARA EL INDICADOR DE PASOS --- */
.step-indicator {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
    padding: 10px 0;
}

.step-indicator::before {
    content: '';
    position: absolute;
    width: calc(100% - 60px); /* Adjust width to account for step item size */
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    transition: transform 0.3s ease;
}

.step-item.active .step-number {
    background-color: var(--primary-color);
    color: black;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.step-item.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--background-light);
    border: 2px solid #b0bec5;
    color: #b0bec5;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.9em;
    color: var(--text-light) !important;
    text-align: center;
    transition: color 0.3s ease;
}

/* --- ESTILOS PARA LOS PASOS DEL FORMULARIO --- */
.step {
    display: none; /* Oculta todos los pasos por defecto */
    animation: fadeIn 0.5s ease-out;
}

.step.active {
    display: block; /* Muestra solo el paso activo */
}

.split-step-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.left-column {
}

.right-column {
    border: 1px solid red;
}

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

/* --- ESTILOS PARA PRODUCTOS --- */
.product-selection {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 30px;
    justify-content: center;
    margin-top: 20px;
}

.product-card {
    background-color: var(--background-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 25px;
    flex: 1;
    min-width: 280px;
    max-width: 31%; /* Para 3 columnas */
    box-shadow: 0 4px 15px var(--shadow-light);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

.product-card h3 {
    color: var(--primary-color); /* Changed to primary-color for blue */
    margin-top: 0;
    font-size: 1.6em;
    font-weight: 600;
    margin-bottom: 5px; /* Reduced margin for less space */
}

.product-card p {
    font-size: 0.95em;
    color: #b0bec5;
    flex-grow: 1;
    margin-bottom: 20px;
}

.product-card select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
    color: #e0e0e0;
    background-color: var(--background-light);
    appearance: none; /* Remove default arrow */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2300a8ff%22%20d%3D%22M287%2C197.3L159.1%2C69.3c-3.1-3.1-8.2-3.1-11.3%2C0L5.3%2C197.3c-3.1%2C3.1-3.1%2C8.2%2C0%2C11.3l19.6%2C19.6c3.1%2C3.1%2C8.2%2C3.1%2C11.3%2C0l116.6-116.6c3.1-3.1%2C8.2-3.1%2C11.3%2C0l116.6%2C116.6c3.1%2C3.1%2C8.2%2C3.1%2C11.3%2C0l19.6-19.6C290.1%2C205.5%2C290.1%2C200.4%2C287%2C197.3z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
}

/* --- ESTILOS PARA BOTONES --- */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    margin-top: 15px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #000000;
    box-shadow: 0 4px 10px var(--shadow-light);
}

.btn-primary:hover {
    background-color: #024ea0;
    box-shadow: 0 6px 15px var(--shadow-medium);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #000000;
    box-shadow: 0 4px 10px var(--shadow-light);
}

.btn-secondary:hover {
    background-color: #828a91;
    box-shadow: 0 6px 15px var(--shadow-medium);
    transform: translateY(-2px);
}

.btn-validate-code {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background-color: var(--secondary-color);
    color: #000000;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.btn-validate-code:hover {
    background-color: #828a91;
}

/* --- ESTILOS PARA FORMULARIO DE DATOS Y PAGO --- */
#booking-form input[type="text"],
#booking-form input[type="email"],
#booking-form input[type="tel"],
#booking-form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95em;
    color: #e0e0e0;
    background-color: var(--background-light);
}

#booking-form select {
    appearance: none; /* Remove default arrow */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2300a8ff%22%20d%3D%22M287%2C197.3L159.1%2C69.3c-3.1-3.1-8.2-3.1-11.3%2C0L5.3%2C197.3c-3.1%2C3.1-3.1%2C8.2%2C0%2C11.3l19.6%2C19.6c3.1%2C3.1%2C8.2%2C3.1%2C11.3%2C0l116.6-116.6c3.1-3.1%2C8.2-3.1%2C11.3%2C0l116.6%2C116.6c3.1%2C3.1%2C8.2%2C3.1%2C11.3%2C0l19.6-19.6C290.1%2C205.5%2C290.1%2C200.4%2C287%2C197.3z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
}

.required-input-container {
    position: relative;
    margin-bottom: 20px;
}
.required-input-container input,
.required-input-container select {
    padding-right: 40px; /* Space for the asterisk */
}
.required-indicator {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff5252; /* Rojo para requerido */
    font-weight: bold;
    font-size: 1.2em;
}

.code-section {
    margin-top: 25px;
    padding: 20px;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    background-color: var(--background-card);
}
.code-wrapper {
    display: flex;
    align-items: flex-start; /* Align to top for multi-line messages */
    gap: 10px;
    margin-bottom: 15px;
}
.code-wrapper input {
    flex-grow: 1; /* Allow input to take available space */
    margin-bottom: 0; /* Override default margin */
}
.validation-message {
    font-size: 0.85em;
    white-space: normal; /* Allow text to wrap */
    flex-shrink: 1;
    flex-basis: 120px; /* Suggest a base width */
    line-height: 1.4; /* Improve readability */
    text-align: left;
}
.final-step-container {
    display: flex;
    flex-direction: column; /* Stack summary and price vertically */
    gap: 30px;
}
.summary-container, .price-container {
    flex: 1;
    min-width: 300px;
}
.summary {
    margin-bottom: 2em;
    padding: 1.8em;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--background-light);
    box-shadow: 0 2px 10px var(--shadow-light);
}
.summary h3 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.8em;
    color: var(--primary-color);
    font-size: 1.4em;
}
.summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.summary li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}
.summary li:last-child {
    border-bottom: none;
}
.summary li strong {
    color: #e0e0e0;
}
.summary li span {
    color: #b0bec5;
}

.price-summary {
    margin-bottom: 2em;
    padding: 1.8em;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--background-light);
    box-shadow: 0 2px 10px var(--shadow-light);
}

.price-summary p {
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
    font-size: 1.1em;
}
.price-summary strong {
    font-size: 1.4em;
    color: var(--primary-color);
}

/* --- ESTILOS PARA EL PASO 2 (CALENDARIO Y DETALLES) --- */
.calendar-group-container {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 25px;
    margin-top: 25px;
    align-items: flex-start; /* Align items to the start to prevent calendar stretching */
    justify-content: center; /* Center the calendar horizontally */
}
.calendar-column {
    flex: 1; /* Calendar takes equal space */
    min-width: 240px; /* Keep a reasonable min-width */
    max-width: 450px; /* Increased maximum width for a slightly larger calendar */
}

#calendar {
    max-width: 100%; /* Ensure calendar doesn't overflow */
    height: auto; /* Allow height to adjust */
}

/* --- ESTILOS PARA FULLCALENDAR --- */
.fc .fc-toolbar-title {
    font-size: 1em; /* Smaller title */
    font-weight: 600;
    color: #e0e0e0;
    text-transform: capitalize; /* Capitalize the first letter of the month */
}
.fc .fc-button-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    padding: 8px 10px; /* Smaller padding for buttons */
    border-radius: 8px; /* More rounded buttons */
    font-size: 0.85em; /* Smaller font size for buttons */
}
.fc .fc-button-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}
.fc .fc-button-group {
    box-shadow: 0 2px 8px var(--shadow-light); /* More pronounced shadow */
    border-radius: 10px; /* More rounded group */
}

/* Deshabilitar scroll en el calendario */
.fc-view-harness, .fc-scrollgrid {
    overflow: hidden !important;
}

/* Hacemos que la tabla del calendario separe sus celdas */
.fc .fc-scrollgrid-liquid {
    border-collapse: separate;
    border-spacing: 4px; /* Reduced space between squares for a more compact look */
}
.fc-daygrid-day-frame {
    aspect-ratio: 1 / 1;
    border-radius: 12px; /* More rounded corners for day cells */
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    position: relative; /* Establish positioning context for the day number */
    background-color: var(--background-light);
    border: 1px solid #b0bec5;
    cursor: pointer;
    padding: 3px;
}
.fc-daygrid-day-frame:hover {
    transform: translateY(-4px); /* Slightly more pronounced lift on hover */
    box-shadow: 0 8px 20px var(--shadow-medium); /* Stronger shadow on hover */
}
.fc-daygrid-day-number {
    font-size: 0.85em;
    font-weight: 600;
    color: #FFFFFF !important;
    padding: 0;
}
.fc-col-header-cell-cushion {
    color: var(--primary-color);
    font-weight: 700; /* Bolder day names */
    padding: 10px 0; /* Increased padding for day names */
    font-size: 0.85em; /* Smaller day names */
}

/* --- ESTILOS DE LOS DÍAS --- */

/* Día no disponible (pasado o deshabilitado) */
.fc-day-past .fc-daygrid-day-frame,
.fc-day-disabled .fc-daygrid-day-frame {
    background-color: var(--background-light) !important;
    border-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.5;
}
.fc-day-past .fc-daygrid-day-number,
.fc-day-disabled .fc-daygrid-day-number {
    color: var(--border-color);
}
.fc-day-past .fc-daygrid-day-frame:hover,
.fc-day-disabled .fc-daygrid-day-frame:hover {
    transform: none;
    box-shadow: none;
}

/* Día disponible */
.fc-day-available .fc-daygrid-day-frame {
    background-color: var(--accent-color); /* Changed to accent-color for green */
    border-color: var(--accent-color); /* Changed to accent-color for green */
}
.fc-day-available .fc-daygrid-day-number {
    color: var(--background-card) !important; /* Changed to background-card for contrast */
}
.fc-day-available .fc-daygrid-day-frame:hover {
     background-color: var(--accent-color) !important; /* Changed to accent-color for green */
     border-color: var(--accent-color) !important; /* Changed to accent-color for green */
}
.fc-day-available .fc-daygrid-day-frame:hover .fc-daygrid-day-number {
    color: var(--background-card) !important; /* Changed to background-card for contrast */
}

/* Día seleccionado */
.fc-day-selected .fc-daygrid-day-frame {
    background-color: var(--primary-color) !important; /* Changed to primary-color */
    border-color: var(--primary-color); /* Changed to primary-color */
    box-shadow: 0 0 0 3px rgba(90, 163, 255, 0.5); /* Anillo de selección más visible, using primary color's rgba */
    z-index: 20;
}
.fc-day-selected .fc-daygrid-day-number {
    color: var(--background-card) !important; /* Changed to background-card for contrast */
}

/* --- ESTILOS PARA LA LISTA DE HORARIOS --- */
#time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* Adjusted min-width */
    gap: 10px;
    margin-top: 20px;
}
.time-slot {
    background-color: var(--background-card);
    color: var(--accent-color);
    padding: 12px;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    font-size: 0.95em;
}
.time-slot:hover {
    background-color: var(--accent-color);
    color: var(--background-card);
    transform: translateY(-2px);
}
.time-slot.selected {
    background-color: var(--selected-color);
    color: black;
    border-color: var(--selected-color);
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
}
#loading-message, #availability-title {
    font-weight: 600;
    color: #FFFFFF !important;
    text-align: center;
    margin-top: 20px;
}

#time-slots p {
    color: #FFFFFF !important;
}

label[data-translate-key="languagePrompt"],
p[data-translate-key="promoCodePrompt"],
#player-codes-container p {
    color: #FFFFFF !important;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .container {
        margin: 15px auto;
        padding: 20px;
    }
    h2 {
        font-size: 1.5em;
        margin-bottom: 20px; /* Slightly less margin */
    }
    .product-selection {
        gap: 15px; /* Reduce gap between product cards */
    }
    .product-card {
        max-width: 48%; /* Two columns on smaller screens */
        padding: 20px; /* Slightly less padding */
    }
    .product-card h3 {
        font-size: 1.4em; /* Smaller heading */
    }
    .product-card p {
        font-size: 0.9em; /* Smaller paragraph text */
    }
    .calendar-group-container, .final-step-container {
        flex-direction: column;
        gap: 20px; /* Reduce gap when stacking columns */
    }
    .step-3-grid {
        flex-direction: column !important;
    }
    .calendar-column, .group-details-column, .standard-details-column,
    .summary-container, .price-container {
        min-width: 100%;
        padding: 20px; /* Slightly less padding for detail columns */
    }
    .summary {
        padding: 1.5em; /* Slightly less padding for summary */
    }
    .summary h3 {
        font-size: 1.2em; /* Smaller summary heading */
    }
    .summary li {
        padding: 6px 0; /* Less padding for list items */
        font-size: 0.9em; /* Smaller list item text */
    }
    .price-summary p {
        font-size: 1em; /* Smaller price text */
    }
    .price-summary strong {
        font-size: 1.2em; /* Smaller final price */
    }
    .fc .fc-toolbar-title {
        font-size: 1.1em; /* Smaller calendar title */
    }
    .fc .fc-button-primary {
        padding: 8px 10px; /* Smaller calendar buttons */
        font-size: 0.9em;
    }
    .fc-daygrid-day-number {
        font-size: 0.9em; /* Smaller day numbers */
    }
    .fc-col-header-cell-cushion {
        font-size: 0.85em; /* Smaller day names */
    }
    #time-slots {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); /* Smaller time slots */
        gap: 8px;
    }
    .time-slot {
        padding: 10px; /* Smaller time slot padding */
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .product-card {
        max-width: 100%; /* Single column on very small screens */
    }
    .btn-primary, .btn-secondary {
        width: 100%;
        padding: 10px 15px;
    }
    .code-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .validation-message {
        flex-basis: auto;
        text-align: center;
        min-width: 0;
    }
    
    /* Further adjustments for very small screens */
    body {
        padding: 10px; /* Less overall padding */
    }
    .container {
        padding: 15px; /* Less container padding */
    }
    .logo-container img {
        max-width: 150px; /* Smaller logo */
    }
    h2 {
        font-size: 1.3em; /* Even smaller heading */
    }
    .product-card {
        padding: 15px; /* Even less product card padding */
    }
    .product-card h3 {
        font-size: 1.2em;
    }
    .product-card p {
        font-size: 0.85em;
    }
    #booking-form input, #booking-form select {
        padding: 10px; /* Smaller form input padding */
        font-size: 0.9em;
    }
    .required-indicator {
        right: 10px; /* Adjust asterisk position */
        font-size: 1em;
    }
    .code-section {
        padding: 15px; /* Smaller code section padding */
    }
    .code-wrapper input {
        padding: 10px;
        font-size: 0.9em;
    }
    .summary {
        padding: 1em; /* Even less summary padding */
    }
    .summary h3 {
        font-size: 1.1em;
    }
    .summary li {
        padding: 5px 0;
        font-size: 0.85em;
    }
    .price-summary p {
        font-size: 0.95em;
    }
    .price-summary strong {
        font-size: 1.1em;
    }
    .group-details-column, .standard-details-column {
        padding: 15px; /* Even less detail column padding */
    }
    .group-details-column h3, .standard-details-column h3 {
        font-size: 1.3em;
    }
    .group-details-column h4, .standard-details-column h4 {
        font-size: 1.1em;
    }
    .group-details-column h5, .standard-details-column h5 {
        font-size: 1em;
    }
    .group-details-column p, .standard-details-column p,
    .group-details-column li, .standard-details-column li {
        font-size: 0.85em;
    }
}

.group-details-column, .standard-details-column {
    display: none !important;
}

.step-3-grid {
    display: flex;
    gap: 30px;
}

.form-column {
    flex: 0 0 66%;
}

.summary-column {
    flex: 0 0 34%;
}

/* --- ESTILOS PARA EL MODAL DE TÉRMINOS Y CONDICIONES --- */
.terms-notice {
    font-size: 0.85em;
    color: #b0bec5;
    text-align: center;
    margin-top: 15px;
}

.terms-notice a {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: var(--background-card);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-medium);
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.9);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2em;
    color: #b0bec5;
    cursor: pointer;
    line-height: 1;
}

#terms-text-content {
    font-size: 0.9em;
    color: #b0bec5;
}