:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --accent-color: #ec4899;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background animated circles */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.15), transparent 25%);
}

/* Glass Navbar */
.glass-navbar {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.logo i {
    color: #10b981;
    font-size: 1.8rem;
}
.logo span {
    background: linear-gradient(135deg, #f8fafc, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.desktop-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.desktop-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-2px);
}

/* Main Container */
.container {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Hero */
.hero-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    margin-top: 2rem;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.gradient-text {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Glass Panel / Cards */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
}

.booking-card {
    flex: 1;
    min-width: 350px;
    max-width: 500px;
    transform: translateY(0);
    transition: transform 0.4s ease;
}
.booking-card:hover {
    transform: translateY(-5px);
}

.booking-card h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Styles */
.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.row {
    display: flex;
    gap: 1rem;
    width: 100%;
}
.row .input-group {
    flex: 1;
    min-width: 0;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

input, select {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Chrome autofill fix for dark mode */
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #1e293b inset !important;
    -webkit-text-fill-color: white !important;
}

.service-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.05);
}

.service-info h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}
.service-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.service-price {
    font-size: 1.2rem;
    color: var(--accent-color);
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-primary i {
    transition: transform 0.3s;
}
.btn-primary:hover i {
    transform: translateX(4px);
}

/* Footer */
.glass-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
    background: var(--glass-bg);
}

/* =========================================
   NUEVAS CLASES UTILITARIAS RESPONSIVAS (Fase 22)
   ========================================= */

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    background: rgba(0,0,0,0.1);
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px; /* Evita que las columnas se aplasten */
}

.table-container th, .table-container td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.responsive-modal {
    width: 95%;
    max-width: 500px;
    padding: 2rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 990px) {
    .glass-navbar {
        flex-direction: column;
        gap: 1.2rem;
        padding: 1rem;
        text-align: center;
    }
    .logo {
        justify-content: center;
    }
    .desktop-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }
    .desktop-nav a {
        margin: 0;
        font-size: 0.9rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.05);
        padding: 0.6rem 1rem;
    }
}

@media (max-width: 768px) {
    /* Layout Global */
    .container {
        padding: 1rem;
        margin-top: 0.5rem;
    }
    
    /* Tipografía Dinámica */
    .gradient-text {
        font-size: 2.2rem;
    }
    h2, .glass-panel h2 {
        font-size: 1.3rem !important;
    }
    h3, .glass-panel h3 {
        font-size: 1.1rem !important;
    }
    
    /* Formularios y Grillas */
    .row {
        flex-direction: column;
        gap: 0;
    }
    .input-group {
        margin-bottom: 1rem;
    }
    
    /* Paneles de Cristal */
    .glass-panel {
        padding: 1.2rem;
        border-radius: 15px;
    }
    
    /* Hero e Interfaces Especiales */
    .hero-section {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    .booking-card {
        width: 100%;
        min-width: 100%;
    }
    
    /* Ajustes Utilidades (Fase 22) */
    .flex-between {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    /* Arreglo de botones y controles en línea */
    button[style*="width: auto"] {
        width: 100% !important;
    }
    
    /* Modales en móviles */
    .responsive-modal {
        padding: 1.5rem;
        width: 100%;
        border-radius: 15px;
    }
    
    /* Botones y Acciones */
    .btn-primary {
        font-size: 0.95rem;
        padding: 0.8rem;
    }
}

@media (max-width: 480px) {
    .gradient-text {
        font-size: 1.8rem;
    }
    /* Contenedores de QR y Mapas compactos */
    div[style*="width: 400px; height: 400px;"] {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1/1;
    }
    img[id="pdf-qr-image"], img[id="qrImage"] {
        width: 100% !important;
        height: auto !important;
    }
}
