/* ===== 1. VARIABLES Y RESET ===== */
:root {
    --color-white: #FFFFFF;
    --color-dark: #41454D;
    --color-gray-light: #D9D9D3;
    --color-gray-warm: #BCBAAC;
    --color-accent: #AE7D00;
    --font-family-primary: 'Brutal Type', sans-serif;
}

body {
    counter-reset: seccion-count;
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--color-white);
    color: var(--color-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== 2. HERO PRINCIPAL ===== */
.hero-auditoria {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(rgba(30, 33, 38, 0.6), rgba(30, 33, 38, 0.6)),
                url(/img/ds&a/banner_servicios.JPG) no-repeat center center/cover;
}

.hero-auditoria h2 {
    color: var(--color-white);
    font-family: 'Brutal type';
    letter-spacing: 1px;
    font-weight: 500;
    font-size: 50px;
}

@media (max-width: 768px) {
    .hero-auditoria {
        background-image: linear-gradient(rgba(30, 33, 38, 0.7), rgba(30, 33, 38, 0.7)), 
                          url("../img/ds&a/banner_servicios2.JPG") !important;
    }

    .hero-auditoria h2{
        font-size: 2.2rem;
    }
}

/* ===== 3. SECCIONES DE SERVICIOS ===== */
.servicios-section {
    padding: 120px 40px;
    background: var(--color-white);
    display: flex;
    justify-content: center;
    counter-increment: seccion-count;
    border-bottom: 1px solid #f0f0f0;
}

.servicios-section:nth-child(even) {
    background-color: #f8f8f6;
}

.servicios-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 60px;
}

.servicios-section:nth-child(even) .servicios-content {
    flex-direction: row-reverse;
    text-align: justify;
}

/* Cabeceras y Títulos */
.servicios-img-col { flex: 0 0 45%; }

.servicios-header h2 {
    font-size: 38px;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--color-dark);
    line-height: 1.1;
    padding-left: 20px;
    margin-bottom: 20px;
}

.servicios-header h2::before {
    content: counter(seccion-count, decimal-leading-zero) ".";
    display: block;
    font-size: 40px;
    color: var(--color-accent);
    margin-bottom: 5px;
}

.servicios-header p {
    padding-left: 20px;
    font-size: 22px;
    font-weight: 400;
    color: #99978a;
    line-height: 1.4;
}

/* Listados y Barras */
.servicios-list { flex: 0 0 50%; }
.servicios-list ul { list-style: none; padding: 0; }
.servicio-item { margin-bottom: 25px; }
.servicio-item a {
    text-decoration: none;
    color: var(--color-dark);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}

.servicio-bar {
    height: 4px;
    background: var(--color-gray-warm);
    margin-top: 8px;
    position: relative;
    border-radius: 2px;
}

.servicio-bar::after {
    content: "";
    position: absolute;
    height: 100%;
    background: var(--color-dark);
    left: 0;
    border-radius: 2px;
}

.w-90::after { width: 90%; }
.w-85::after { width: 85%; }
.w-70::after { width: 70%; }
.w-60::after { width: 60%; }
.w-50::after { width: 50%; }

/* ===== 4. BANNERS PARALLAX (SEPARADORES) ===== */
.parallax-banner {
    width: 100%;
    height: 250px; 
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.parallax-banner::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

/* Imágenes específicas para cada separador */
.banner-sep-1 { background-image: url('../img/ds&a/parallax3_cambio_servicios.jpg'); }
.banner-sep-2 { background-image: url('../img/ds&a/parallax2_servicios.JPG'); }
.banner-sep-3 { background-image: url('../img/ds&a/parallax3_servicios.JPG'); }
.banner-sep-4 { background-image: url('../img/ds&a/parallax4_servicios.JPG'); }
.banner-sep-5 { background-image: url('../img/ds&a/parallax5_servicios.JPG'); }

/* ===== 5. FOOTER ===== */
.footer-wrapper {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 60px 20px 20px;
    text-align: justify;
}

/* ===== 6. RESPONSIVE ===== */
@media (max-width: 900px) {
    .servicios-section { padding: 60px 24px; }
    
    .servicios-content, 
    .servicios-section:nth-child(even) .servicios-content {
        flex-direction: column !important;
        gap: 40px;
        text-align: justify;
    }

    .servicios-img-col, .servicios-list {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .servicios-header h2 {
        font-size: 2.2rem;
        text-align: left;
    }

    .servicios-header h2, .servicios-header p {
        padding-left: 0px;
    } 

    /* 1. Quitamos los banners de imagen que separan */
    .parallax-banner {
        display: none !important; 
    }

    /* 2. Creamos la línea de conexión entre secciones */
    .servicios-section {
        position: relative;
        padding: 70px 40px;
        background-color: var(--color-white);
    }

    .servicios-section:nth-child(even) {
        background-color: var(--color-white); 
    }

    .servicios-section::after {
        content: "";
        position: absolute;
        left: 44px; 
        bottom: -40px;
        width: 1px;
        height: 70px;
        background-color: #AE7D00;
        z-index: 1;
    }

    .servicios-section:last-of-type::after {
        display: none;
    }

    .servicios-section {
        border-top: none !important;
        border-bottom: none !important;
        outline: none !important;
    }

    .servicios-section hr, 
    .separator, 
    .line-divider {
        display: none !important;
    }

    .servicios-header {
        border-bottom: none !important;
    }
}

/* ============================================================
   RESPONSIVE SERVICIOS (900px a 450px)
   ============================================================ */
@media (max-width: 900px) {
    /* Ajuste de sección para dar margen lateral */
    .servicios-section { 
        padding: 60px 30px !important; 
    }
    
    .servicios-content {
        flex-direction: column !important;
        gap: 30px;
        width: 100% !important; 
        max-width: 100%;
    }

    /* Forzamos que ambas columnas ocupen todo el ancho */
    .servicios-img-col, 
    .servicios-list {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Justificación de los textos */
    .servicios-header h2 {
        font-size: 2.2rem !important;
        text-align: left; 
        padding-left: 0;
    }

    .servicios-header p {
        padding-left: 0 !important;
        text-align: justify !important; 
        text-justify: inter-word;
        font-size: 18px !important;
        line-height: 1.5;
        /*hyphens: auto; */
    }

    /* Listado de servicios y barras */
    .servicios-list ul {
        width: 100%;
    }

    .servicio-item {
        width: 100% !important; 
        margin-bottom: 35px;
    }

    .servicio-item a {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    /* Asegurar que las barras completen el ancho de la pantalla */
    .servicio-bar {
        width: 100% !important; 
        height: 3px !important; 
    }

    .servicios-content, 
    .servicios-section:nth-child(even) .servicios-content {
        flex-direction: column !important;
        gap: 40px;
        text-align: justify;
    }
}

/* ============================================================
        RESPONSIVE 768px a 900px
   ============================================================ */
@media screen and (min-width: 768px) and (max-width: 900px) {
    
    .servicios-header {
        display: block !important;
        width: 100% !important;
        text-align: justify !important;
    }

    .servicios-header p {
        display: block !important;
        width: 100% !important;
        text-align: justify !important;
        text-justify: inter-word !important;
        text-align-last: left; 
        font-size: 19px !important;
        line-height: 1.6 !important;
        padding: 0 !important;
        margin-top: 15px !important;
    }

    .servicios-img-col {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}