/* ──────────── ESTILOS GENERALES ──────────── */
:root {
    --primary-color: #ff007f;
    --primary-dark: #b30059;
    --background-dark: #0b0b0b;
    --text-light: #e0e0e0;
    --text-muted: #ccc;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: radial-gradient(circle at top left, #0b0b0b, #000);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* ──────────── NAVBAR ORIGINAL ──────────── */
.navbar {
    width: 100%;
    background: #69024f;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
    height: 56px;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.navbar .left, .navbar .right {
    font-size: 1.2rem;
    font-weight: 600;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
    padding: 8px 12px;
    border-radius: 4px;
}

.nav-link:hover, .nav-link:focus {
    opacity: 0.8;
    background: rgba(255,255,255,0.1);
    outline: none;
}

/* ──────────── CONTENEDOR ──────────── */
.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 32px;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(255,0,150,0.15);
}

/* ──────────── CARRUSEL MEJORADO ──────────── */
.hero-carousel {
    margin-bottom: 40px;
}

.carousel {
    position: relative;
    width: 100%;
    margin: 0 auto 24px auto;
}

.carousel-image {
    display: block;
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    transition: opacity 0.8s ease-in-out, transform 0.4s ease;
    box-shadow: 0 4px 18px rgba(255, 0, 150, 0.15);
}

.carousel-image:hover {
    transform: scale(1.02);
}

.carousel-caption {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 12px;
    min-height: 32px;
    font-style: italic;
}

.carousel-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    gap: 16px;
}

.carousel-btn {
    background: rgba(255, 0, 127, 0.2);
    color: #fff;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.carousel-btn:hover, .carousel-btn:focus {
    background: var(--primary-color);
    transform: scale(1.1);
    outline: none;
}

.carousel-indicators {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-grow: 1;
}

.indicator {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0;
}

.indicator.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.indicator:hover {
    background: var(--primary-color);
}

/* ──────────── SECCIONES ──────────── */
.video-section, .dejar-fumar-section, .recursos-ayuda {
    margin-bottom: 48px;
}

.video-section h2, .dejar-fumar-section h2, .recursos-ayuda h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.8rem;
}

/* ──────────── VIDEO ──────────── */
.section {
    margin-bottom: 32px;
}

.section video {
    display: block;
    max-width: 100%;
    margin: 0 auto 12px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.caption {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
}

/* ──────────── INTERACTIVO DEJAR FUMAR MEJORADO ──────────── */
.dejar-fumar-container {
    background-color: #111;
    color: white;
    text-align: center;
    padding: 40px 30px;
    margin: 40px auto;
    border-radius: 15px;
    max-width: 650px;
    box-shadow: 0 0 20px rgba(255, 0, 150, 0.25);
}

.pregunta-principal {
    font-size: 1.3rem;
    margin-bottom: 24px;
    font-weight: 600;
}

.botones-respuesta {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.btn-respuesta {
    background-color: var(--primary-dark);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    flex: 1;
    min-width: 180px;
    font-weight: 500;
}

.btn-respuesta:hover, .btn-respuesta:focus {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 127, 0.3);
    outline: none;
}

/* ──────────── TIPS MEJORADOS ──────────── */
.tip {
    background-color: rgba(255, 255, 255, 0.08);
    border-left: 5px solid var(--primary-color);
    margin-top: 24px;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    animation: slideIn 0.4s ease;
}

.tip-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.tip-icon {
    font-size: 1.5rem;
}

.tip-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.tip-list {
    margin: 16px 0;
    padding-left: 20px;
}

.tip-list li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.btn-cerrar-tip {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.btn-cerrar-tip:hover, .btn-cerrar-tip:focus {
    background: var(--primary-color);
    outline: none;
}

.oculto {
    display: none !important;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ──────────── RECURSOS DE AYUDA INTERACTIVOS ──────────── */
.recursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.recurso-card {
    background: #111;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid rgba(255, 0, 127, 0.1);
    cursor: pointer;
    border: none;
    color: inherit;
    font-family: inherit;
}

.recurso-card:hover, .recurso-card:focus {
    transform: translateY(-5px);
    border-color: rgba(255, 0, 127, 0.3);
    background: #1a1a1a;
    box-shadow: 0 8px 25px rgba(255, 0, 127, 0.2);
    outline: none;
}

.recurso-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.recurso-card h3 {
    color: var(--primary-color);
    margin: 12px 0;
    font-size: 1.2rem;
}

.recurso-card p {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.recurso-info {
    display: inline-block;
    background: rgba(255, 0, 127, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ──────────── MODAL CENTROS DE SALUD ──────────── */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #111;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    border: 1px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(255, 0, 127, 0.3);
    animation: modalSlideIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: #111;
    z-index: 1;
}

.modal-header h3 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.4rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.modal-close:hover, .modal-close:focus {
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.modal-body {
    padding: 24px;
}

.centro-lista {
    margin-bottom: 24px;
}

.centro-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 3px solid var(--primary-color);
}

.centro-item h4 {
    color: var(--primary-color);
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.centro-item p {
    color: var(--text-muted);
    margin: 0 0 8px 0;
    font-size: 0.95rem;
}

.centro-direccion {
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.btn-modal {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.btn-modal:hover, .btn-modal:focus {
    background: var(--primary-dark);
    transform: translateY(-1px);
    outline: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover, .btn-secondary:focus {
    background: rgba(255, 255, 255, 0.2);
}

/* ──────────── CONÓCEME ──────────── */
.about-section {
    text-align: center;
    color: #fff;
    line-height: 1.6;
    padding: 20px 0;
}

.about-section h2 {
    margin-bottom: 24px;
    color: var(--primary-color);
    font-size: 2rem;
}

.about-section p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ──────────── RESPONSIVE ──────────── */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 20px auto;
    }
    
    .navbar {
        padding: 0 16px;
    }
    
    .carousel-controls {
        flex-wrap: wrap;
    }
    
    .botones-respuesta {
        flex-direction: column;
    }
    
    .btn-respuesta {
        min-width: auto;
    }
    
    .recursos-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 20px;
        max-height: 85vh;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-header {
        padding: 16px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 16px;
        margin: 16px auto;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .dejar-fumar-container {
        padding: 24px 16px;
    }
    
    .tip {
        padding: 16px;
    }
    
    .navbar .left, .navbar .right {
        font-size: 1.1rem;
    }
    
    .modal-content {
        margin: 10px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .centro-item {
        padding: 12px;
    }
}

/* ──────────── FIX: asegurar que .oculto oculte el modal aun cuando .modal tiene display:flex ──────────── */
.modal.oculto {
    display: none !important;
}
/* (todo tu CSS original arriba, sin eliminar nada) */

/* ──────────── CONTENEDOR EMERGENTE PARA SUBTIPS ──────────── */
.emergente {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.emergente-content {
    background: #111;
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 30px 24px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 25px rgba(255, 0, 127, 0.4);
    text-align: center;
    color: var(--text-light);
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

#texto-emergente {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-top: 16px;
}

.cerrar-emergente {
    position: absolute;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s;
}

.cerrar-emergente:hover {
    color: var(--primary-color);
}

.tip-btn {
    display: block;
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 10px;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.95rem;
    text-align: left;
    transition: all 0.3s;
}

.tip-btn:hover, .tip-btn:focus {
    background: rgba(255,0,127,0.15);
    border-color: var(--primary-color);
    outline: none;
}
