/* ==========================================================================
   B DENTAL - SERVICIOS (ESTILOS ESPECÍFICOS)
   ========================================================================== */

/* ==========================================================================
   0. REGLAS GLOBALES
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

/* ==========================================================================
   1. HEADER DE PÁGINA
   ========================================================================== */
.servicios-header {
    text-align: center;
    padding: 3rem 2rem 2rem;
    background: var(--blanco);
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.servicios-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 50%;
    background: #ffffff;
    padding: 15px;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: block;
}

.servicios-header h1 {
    font-size: 2.5rem;
    color: var(--gris-oscuro);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.servicios-header .subtitle {
    color: var(--gris-medio);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.btn-retorno-servicios {
    margin-bottom: 2rem;
    text-align: left;
}

/* ==========================================================================
   2. SECCIÓN DE TRATAMIENTOS
   ========================================================================== */
.tratamientos-section {
    background: var(--blanco);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.tratamientos-section h2 {
    font-size: 1.8rem;
    color: var(--gris-oscuro);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--rosa);
    padding-bottom: 0.5rem;
}

.section-intro {
    color: var(--gris-medio);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 800px;
}

/* ==========================================================================
   3. TARJETAS DETALLADAS DE SERVICIOS
   ========================================================================== */
.servicios-grid-detallados {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-top: 2rem;
}

.servicio-detallado {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    background: var(--blanco);
    border: 1px solid var(--gris-claro);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    scroll-margin-top: 100px; /* Compensa el header fijo al hacer scroll */
}

.servicio-detallado:hover {
    box-shadow: 0 8px 25px rgba(212, 165, 165, 0.2);
    border-color: var(--rosa);
    transform: translateY(-3px);
}

/*  Resaltar servicio seleccionado desde el index */
.servicio-detallado:target {
    border: 3px solid var(--rosa);
    box-shadow: 0 8px 30px rgba(212, 165, 165, 0.4);
    animation: highlightService 2.5s ease;
}

@keyframes highlightService {
    0% { background: var(--nude); transform: scale(1.02); }
    50% { background: var(--nude); transform: scale(1.02); }
    100% { background: var(--blanco); transform: scale(1); }
}

/* Alternar orden imagen/texto */
.servicio-detallado.invertido {
    direction: rtl;
}

.servicio-detallado.invertido > * {
    direction: ltr;
}

.servicio-imagen-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.servicio-img-detallada {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.servicio-detallado:hover .servicio-img-detallada {
    transform: scale(1.05);
}

.servicio-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--rosa);
    color: var(--gris-oscuro);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.servicio-contenido {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.servicio-contenido h3 {
    font-size: 1.6rem;
    color: var(--gris-oscuro);
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.servicio-subtitulo {
    color: var(--rosa);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    font-style: italic;
}

.servicio-detalle {
    color: var(--gris-medio);
    line-height: 1.7;
    font-size: 0.95rem;
    margin: 0 0 1.5rem 0;
}

.servicio-beneficios {
    margin-bottom: 1.5rem;
}

.servicio-beneficios h4 {
    color: var(--gris-oscuro);
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
}

.servicio-beneficios ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.servicio-beneficios li {
    color: var(--gris-medio);
    font-size: 0.9rem;
    padding-left: 1.5rem;
    position: relative;
}

.servicio-beneficios li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--verde-ok);
    font-weight: bold;
}

.servicio-info-extra {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.info-duracion, .info-precio {
    background: var(--gris-claro);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gris-oscuro);
}

.info-precio {
    background: var(--nude);
    color: var(--gris-oscuro);
}

.btn-agendar-servicio {
    align-self: flex-start;
    margin-top: 0.5rem;
}

/* ==========================================================================
   4. SECCIÓN DE CONSULTA
   ========================================================================== */
.consulta-section {
    background: linear-gradient(135deg, var(--nude) 0%, var(--blanco) 100%);
    text-align: center;
    padding: 3rem 2rem;
}

.consulta-section h2 {
    font-size: 1.8rem;
    color: var(--gris-oscuro);
    margin-bottom: 1rem;
    border-bottom: none;
}

.consulta-texto {
    color: var(--gris-medio);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.consulta-botones {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   5. DISEÑO RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .servicio-detallado,
    .servicio-detallado.invertido {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    
    .servicio-imagen-wrapper {
        min-height: 220px;
    }
    
    .servicio-beneficios ul {
        grid-template-columns: 1fr;
    }
    
    .servicios-header h1 {
        font-size: 2rem;
    }
    
    .servicios-logo {
        width: 100px;
        height: 100px;
    }
    
    .servicio-contenido {
        padding: 1.5rem;
    }
    
    .servicio-contenido h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .servicio-info-extra {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .consulta-botones {
        flex-direction: column;
    }
    
    .consulta-botones .btn {
        width: 100%;
    }
}