/* ===========================================
   Obediente AL — Estilos v4 (BLINDADO)
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ===========================================
   RED DE SEGURIDAD: imágenes nunca desbordan
   =========================================== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ----- Variables ----- */
:root {
    --bg-base: #060912;
    --bg-surface: #0f1729;
    --bg-elevated: #1a2238;
    --border: #2a3654;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent: #67e8f9;
    --accent-2: #38bdf8;
    --accent-glow: rgba(103, 232, 249, 0.25);
    --gradient-bg: radial-gradient(ellipse at top, #16213e 0%, #060912 60%);
    --gradient-accent: linear-gradient(135deg, #67e8f9 0%, #38bdf8 100%);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(103, 232, 249, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    /* Color base SÓLIDO oscuro - red de seguridad */
    background-color: #060912;
    /* Gradientes encima */
    background-image:
        radial-gradient(ellipse at top, rgba(22, 33, 62, 0.6) 0%, transparent 60%),
        radial-gradient(circle at 1px 1px, rgba(103,232,249,0.05) 1px, transparent 0);
    background-size: 100% 100%, 32px 32px;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ----- Layout ----- */
.container {
    width: 90%;
    max-width: 1150px;
    margin: 0 auto;
}

main { flex: 1; }

/* ----- Texto en gradiente ----- */
.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--accent);
}

/* ----- Header ----- */
header {
    background-color: rgba(6, 9, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo::before {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--gradient-accent);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent-glow);
    animation: pulse 2s ease-in-out infinite;
}

.logo span {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 24px;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

nav a:hover { color: var(--accent); }

nav a::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width 0.25s;
    border-radius: 2px;
}

nav a:hover::after { width: 100%; }

/* ----- Badge/Eyebrow ----- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(103, 232, 249, 0.1);
    color: var(--accent);
    border: 1px solid rgba(103, 232, 249, 0.3);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
}

.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

/* ===========================================
   HERO con imagen TAMAÑO LIMITADO ESTRICTO
   =========================================== */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    padding: 70px 0 50px;
    animation: fadeUp 0.7s ease-out;
}

.texto { width: 55%; }

.texto h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 56px;
    line-height: 1.05;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
    font-weight: 700;
}

.texto p.descripcion {
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 17px;
}

.texto .lista { margin-bottom: 24px; }

.texto .lista p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.texto .lista p::before {
    content: "✓";
    color: var(--accent);
    font-weight: bold;
    background: rgba(103, 232, 249, 0.12);
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 12px;
    border: 1px solid rgba(103, 232, 249, 0.3);
}

.hero-cta {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* IMAGEN DEL HERO: contenedor CON tamaño máximo blindado */
.imagen {
    width: 45% !important;
    max-width: 420px !important;
    height: 420px !important;
    text-align: center;
    position: relative;
    flex-shrink: 0;
}

.imagen::before {
    content: "";
    position: absolute;
    inset: -30px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
    z-index: 0;
    border-radius: 50%;
    animation: floatGlow 4s ease-in-out infinite;
    pointer-events: none;
}

.imagen img {
    width: 100% !important;
    height: 100% !important;
    max-width: 420px !important;
    max-height: 420px !important;
    object-fit: contain !important;
    border-radius: 16px !important;
    box-shadow: var(--shadow-glow);
    transition: transform 0.4s;
    position: relative;
    z-index: 1;
}

.imagen img:hover { transform: translateY(-6px) scale(1.02); }

/* ----- Stats bar ----- */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 24px 32px;
    background: linear-gradient(145deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin: 30px 0 60px;
}

.stat {
    text-align: center;
    border-right: 1px solid var(--border);
}

.stat:last-child { border-right: none; }

.stat-numero {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 700;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.stat-label {
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* ----- Botones ----- */
.boton {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-accent);
    color: #0a0f1f;
    text-decoration: none;
    padding: 13px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px var(--accent-glow);
    border: none;
    cursor: pointer;
}

.boton:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.boton-secundario {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    box-shadow: none;
}

.boton-secundario:hover {
    background: rgba(103, 232, 249, 0.08);
    box-shadow: 0 4px 14px rgba(103, 232, 249, 0.15);
}

/* ----- Secciones ----- */
section { margin: 70px 0; }

.titulo-seccion {
    font-family: 'Space Grotesk', sans-serif;
    text-align: center;
    font-size: 38px;
    margin-bottom: 12px;
    letter-spacing: -1px;
    font-weight: 700;
    line-height: 1.15;
}

.subtitulo-seccion {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 44px;
    font-size: 16px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.divisor {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 12px auto 36px;
    max-width: 200px;
}

.divisor::before, .divisor::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.divisor-punto {
    width: 8px;
    height: 8px;
    background: var(--gradient-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ===========================================
   GRID DE CARDS con imagen BLINDADA
   =========================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: linear-gradient(145deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    padding: 28px;
    border-radius: 14px;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s;
    transform-origin: left;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--accent-glow);
}

.card:hover::before { transform: scaleX(1); }

/* CARD-IMG-WRAPPER: tamaño FORZADO */
.card .card-img-wrapper {
    width: 100% !important;
    height: 200px !important;
    overflow: hidden !important;
    border-radius: 10px !important;
    margin-bottom: 18px !important;
    background: var(--bg-base);
    display: block;
}

.card .card-img-wrapper img {
    width: 100% !important;
    height: 100% !important;
    max-height: 200px !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.4s;
}

.card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    color: #0a0f1f;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 14px;
    font-family: 'Space Grotesk', sans-serif;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.card h3 {
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
}

.card p {
    color: var(--text-secondary);
    font-size: 14.5px;
    margin-bottom: 16px;
}

/* ----- Chips ----- */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 10px 0 16px;
}

.chip {
    background: rgba(103, 232, 249, 0.08);
    color: var(--accent);
    border: 1px solid rgba(103, 232, 249, 0.2);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

/* ----- Formularios ----- */
form {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

label {
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

input, select, textarea {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-base);
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.15);
}

textarea {
    resize: vertical;
    font-family: 'Inter', sans-serif;
}

button {
    padding: 13px;
    border: none;
    border-radius: 8px;
    background: var(--gradient-accent);
    color: #0a0f1f;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px var(--accent-glow);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

button:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ----- Tablas ----- */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

th, td {
    border-bottom: 1px solid var(--border);
    padding: 14px;
    text-align: left;
    font-size: 14px;
}

th {
    background: var(--bg-base);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    font-weight: 600;
}

tr:hover td { background: var(--bg-elevated); }
tr:last-child td { border-bottom: none; }

.estado {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.estado-nuevo {
    background: rgba(8, 145, 178, 0.2);
    color: #67e8f9;
    border: 1px solid rgba(103, 232, 249, 0.3);
}
.estado-proceso {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}
.estado-final {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(110, 231, 183, 0.3);
}

.acciones button {
    padding: 6px 12px;
    font-size: 12px;
    margin-right: 6px;
    box-shadow: none;
}

.btn-eliminar {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ----- Footer ----- */
footer {
    margin-top: 80px;
    padding: 40px 0 24px;
    background: var(--bg-base);
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

footer .footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

footer .logo {
    justify-content: center;
    font-size: 22px;
}

footer .footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

footer .footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

footer .footer-links a:hover { color: var(--accent); }

footer .copy {
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 20px;
    width: 100%;
    margin-top: 8px;
}

/* ----- Calendario ----- */
.calendario-wrapper {
    background: linear-gradient(145deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    max-width: 760px;
    margin: 0 auto;
    box-shadow: var(--shadow-card);
}

.calendario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendario-header h3 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-primary);
    text-transform: capitalize;
    font-size: 22px;
    font-weight: 600;
}

.calendario-header button {
    padding: 8px 14px;
    width: auto;
    font-size: 13px;
}

.calendario-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.dia-nombre {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 10px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dia {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.dia:hover:not(.dia-vacio):not(.dia-pasado):not(.dia-finde) {
    background: var(--accent);
    color: #0a0f1f;
    border-color: var(--accent);
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.dia-vacio { background: transparent; border: none; cursor: default; }

.dia-pasado, .dia-finde {
    color: #475569;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.2);
}

.dia-hoy { border-color: var(--accent); font-weight: 700; }

.dia-seleccionado {
    background: var(--accent) !important;
    color: #0a0f1f !important;
    font-weight: 700;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.horarios-wrapper {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.horarios-wrapper h4 {
    color: var(--accent);
    margin-bottom: 16px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 17px;
}

.horarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

.hora-btn {
    padding: 11px;
    background: var(--bg-base);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: none;
}

.hora-btn:hover:not(:disabled):not(.hora-seleccionada) {
    background: var(--bg-elevated);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.hora-seleccionada {
    background: var(--accent) !important;
    color: #0a0f1f !important;
    border-color: var(--accent) !important;
    font-weight: 700;
    box-shadow: 0 4px 14px var(--accent-glow) !important;
}

.hora-btn:disabled {
    background: rgba(0, 0, 0, 0.2);
    color: #475569;
    cursor: not-allowed;
    text-decoration: line-through;
    box-shadow: none;
    transform: none;
}

/* ----- Mensajes ----- */
.mensaje {
    padding: 14px 18px;
    border-radius: 10px;
    margin: 18px 0;
    text-align: center;
    font-weight: 500;
    animation: fadeUp 0.3s ease-out;
}

.mensaje-exito {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.mensaje-error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===========================================
   FEATURE-SECTION con imagen TAMAÑO FORZADO
   =========================================== */
.feature-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: linear-gradient(145deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid var(--border);
    margin: 60px 0;
    overflow: hidden;
}

.feature-section h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.feature-section p {
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.feature-section .feature-text {
    min-width: 0;
}

/* CONTENEDOR DE IMAGEN: tamaño FORZADO con !important */
.feature-img {
    width: 100% !important;
    height: 320px !important;
    max-height: 320px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    position: relative !important;
    background: var(--bg-base);
    border: 1px solid var(--border);
    display: block !important;
}

.feature-img::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.feature-img img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 320px !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.5s;
}

.feature-img:hover img { transform: scale(1.05); }

/* ----- Animaciones ----- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.15); }
}

@keyframes floatGlow {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* ----- Responsivo ----- */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 0;
        gap: 30px;
    }

    .texto { width: 100%; }
    .imagen {
        width: 100% !important;
        max-width: 320px !important;
        height: 320px !important;
    }
    .imagen img {
        max-width: 320px !important;
        max-height: 320px !important;
    }

    .texto .lista p { justify-content: center; }

    .nav-container {
        flex-direction: column;
        gap: 14px;
    }

    nav a { margin: 0 10px; }

    .texto h2 { font-size: 38px; }
    .titulo-seccion { font-size: 28px; }

    .feature-section {
        grid-template-columns: 1fr;
        padding: 28px;
        gap: 24px;
    }

    .feature-img {
        height: 240px !important;
        max-height: 240px !important;
    }
    .feature-img img {
        max-height: 240px !important;
    }

    .feature-section h3 { font-size: 26px; }

    .stats {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px;
    }

    .stat {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: 16px;
    }
    .stat:last-child { border-bottom: none; padding-bottom: 0; }

    table { font-size: 12px; }
    th, td { padding: 10px 8px; }

    .hero-cta { justify-content: center; }
}
