/* ==== CSS COMPLETO PARA AREAS Y AREAS2 ==== */

/* CONTENEDOR PRINCIPAL */
#areas {
    background: #fff;
    color: #00BFFF;
    padding: 5% 0;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    background-attachment: scroll !important;
}

/* ==== NUEVOS ESTILOS PARA SECCIÓN S-D (COMO SOFTWARE-CONTABLE) ==== */
.s-d {
    padding: 90px 0 0px;
}

/* Asegurar que ambas secciones s-d tengan el mismo estilo */
.s-d:first-of-type {
    background-color: rgb(236 245 255);
    padding: 90px 0 230px;
}

.s-d:last-of-type {
    background-color: rgb(236 245 255);
    padding: 90px 0 230px;
}

.s-d h1, .s-d h3, .s-d h4 {
    font-size: 70px;
    font-weight: 900;
    text-align: center;
    color: #000;
    margin: 0 auto;
    width: 100%;
}

.s-d h1 {
    margin-bottom: 70px;
    font-size: 40px;
    font-weight: 900;
}

.s-d h4 {
    margin-top: 100px;
    font-size: 40px;
}

.d-grid {
    width: 90%;
    display: flex;
    margin: 70px auto 100px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.d-grid div {
    width: 22%;
    min-width: 200px;
    margin: 0 10px;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 50px 30px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
}

/* Asegurar que ambas secciones s-d tengan el mismo estilo de grid */
.s-d .d-grid {
    width: 90%;
    display: flex;
    margin: 70px auto 100px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.s-d .d-grid div {
    width: 22%;
    min-width: 200px;
    margin: 0 10px;
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 50px 30px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
}

.d-grid div:hover,
.s-d .d-grid div:hover {
    transform: translateY(-5px);
}

.d-grid img,
.s-d .d-grid img {
    display: block;
    width: 120px;
    margin: 0 auto;
}

.d-grid h4,
.s-d .d-grid h4 {
    font-size: 22px;
    text-align: center;
    margin: 20px 0 0;
    color: #000;
}

.d-grid p,
.s-d .d-grid p {
    position: absolute;
    left: 100%;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 124 255);
    padding: 30px;
    color: #fff;
    text-align: center;
    transition: 1s all ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.d-grid p > span,
.s-d .d-grid p > span {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 10px;
}

.d-grid div:hover > p,
.s-d .d-grid div:hover > p {
    left: 0;
}

/* RESPONSIVE PARA S-D */
@media screen and (max-width: 1366px) {
    .s-d {
        padding: 75px 0px;
    }
    
    .s-d h1, .s-d h3, .s-d h4 {
        font-size: 30px;
    }
    
    .d-grid div,
    .s-d .d-grid div {
        margin: 0 5px;
        padding: 40px 20px;
    }
    
    .d-grid img,
    .s-d .d-grid img {
        width: 95px;
        margin: 15px auto 0;
    }
    
    .d-grid h4,
    .s-d .d-grid h4 {
        font-size: 18px;
    }
    
    .d-grid p,
    .s-d .d-grid p {
        padding: 10px 20px;
        font-size: 10px;
    }
}

@media screen and (max-width: 1024px) {
    .s-d {
        padding: 55px 0 0px;
    }
    
    .s-d h1, .s-d h3, .s-d h4 {
        font-size:30px;
    }
    
    .d-grid,
    .s-d .d-grid {
        width: 98%;
    }
    
    .d-grid div,
    .s-d .d-grid div {
        padding: 45px 20px;
        width: 22%;
        min-width: 180px;
    }
    
    .d-grid img,
    .s-d .d-grid img {
        width: 90px;
    }
    
    .d-grid h4,
    .s-d .d-grid h4 {
        font-size: 16px;
    }
    
    .d-grid p,
    .s-d .d-grid p {
        padding: 10px;
        font-size: 12px;
    }
}

@media screen and (max-width: 768px) {
    .s-d h1, .s-d h3, .s-d h4 {
        font-size: 30px;
    }
    
    .d-grid,
    .s-d .d-grid {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .d-grid div,
    .s-d .d-grid div {
        margin: 0;
        width: 22%;
        min-width: 150px;
    }
    
    .d-grid img,
    .s-d .d-grid img {
        width: 110px;
    }
    
    .d-grid h4,
    .s-d .d-grid h4 {
        font-size: 20px;
    }
    
    .d-grid p,
    .s-d .d-grid p {
        font-size: 14px;
    }
}

@media screen and (max-width: 600px) {
    .d-grid div,
    .s-d .d-grid div {
        width: 45%;
        min-width: 140px;
    }
}

@media screen and (max-width: 415px) {
    .d-grid div,
    .s-d .d-grid div {
        width: 90%;
        min-width: 140px;
    }
}


/* GRID ANTI-SALTOS PARA AMBAS SECCIONES */
#areas .grid {
    contain: paint;
    overflow: hidden;
}

#areas .grid.reveal-ready {
    contain: layout style paint;
}

/* TÍTULOS */
#areas > .grid > h2 {
    color: #000 !important;
    text-align: center;
    width: 100%;
    font-size: 50px;
    margin: 0 0 50px;
}

/* TÍTULOS H3 EN CARDS - SIN ESPACIO INFERIOR */
#areas .grid > div h3 {
    margin-bottom: 0 !important;
    margin-top: 10px !important;
}

/* CARDS ESTABLES PARA AMBAS SECCIONES */
#areas > .grid > div {
    width: 24%;
    border: 1px solid #00BFFF;
    border-radius: 30px;
    padding: 15px;
    position: relative;
    overflow: hidden;
    transition: transform 0.7s ease-in;
    transform: translateZ(0);
    contain: layout style;
}

/* PÁRRAFOS - OCULTOS INICIALMENTE PARA AMBAS SECCIONES */
#areas .grid > div p {
    color: #000 !important;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    margin-top: -5px !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    /* TRANSICIONES EXTREMADAMENTE LENTAS */
    transition: 
        max-height 15000ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 12000ms cubic-bezier(0.22, 1, 0.36, 1) 1000ms,
        padding-top 15000ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: max-height, opacity, padding;
    transform: translateZ(0);
}

/* PÁRRAFOS - VISIBLES PARA AMBAS SECCIONES */
#areas .grid > div p.is-visible {
    max-height: 400px !important;
    opacity: 1 !important;
    padding-top: 2px !important;
    transition: 
        max-height 15000ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 12000ms cubic-bezier(0.22, 1, 0.36, 1) 1000ms,
        padding-top 15000ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* BOTONES */
#areas > .btn-mas > .boton {
    background: #00BFFF;
    color: #fff;
    font-size: 25px;
    font-weight: 600;
    border-radius: 35px;
    margin-top: 5%;
    padding: 8px 35px 7px;
}

/* PÁRRAFOS COLOR BASE */
#areas > .grid > div > p {
    color: #000;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    #areas > .grid > div {
        width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    #areas > .grid > div {
        width: 100%;
        margin-bottom: 15px;
    }
}

/* VERSIÓN ULTRA-LENTA PARA AMBAS SECCIONES */
.ultra-slow #areas .grid > div p,
.ultra-slow #areas2 .grid > div p {
    transition: 
        max-height 25000ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 20000ms cubic-bezier(0.22, 1, 0.36, 1) 2000ms,
        padding-top 25000ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ultra-slow #areas .grid > div p.is-visible,
.ultra-slow #areas2 .grid > div p.is-visible {
    padding-top: 2px !important;
    transition: 
        max-height 25000ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 20000ms cubic-bezier(0.22, 1, 0.36, 1) 2000ms,
        padding-top 25000ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ACCESIBILIDAD PARA AMBAS SECCIONES */
@media (prefers-reduced-motion: reduce) {
    #areas .grid > div p,
    #areas .grid > div p.is-visible,
    #areas2 .grid > div p,
    #areas2 .grid > div p.is-visible {
        transition: none !important;
        max-height: 600px !important;
        opacity: 1 !important;
        padding-top: 15px !important;
    }
}