/* ==========================================================================
   CATÁLOGO DE SERVICIOS (One-Page Index)
   ========================================================================== */
.catalog-page-wrapper {
    padding: calc(var(--header-height) + 4rem) 0 6rem 0;
    background-color: #ffffff;
}

.catalog-page-wrapper .container-constrained {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
}

.catalog-header {
    text-align: left;
    margin-bottom: 5rem;
}

.catalog-main-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -1.5px;
    margin-bottom: 2rem;
}

.catalog-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.pill-btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    color: #000b29;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pill-btn:hover, .pill-btn:active {
    background-color: #000b29;
    color: #ffffff;
    border-color: #000b29;
}

/* Layout del Bloque (Imagen Ref) */
.catalog-service-block {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 4rem;
    padding: 5rem 0;
    border-top: 1px solid #eaeaea;
}

.block-title {
    font-size: 2rem;
    font-weight: 500;
    margin: 0;
    letter-spacing: -0.5px;
}

.block-intro {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 2rem;
    max-width: 900px;
}

/* Galería Fluida Matemática */
.block-gallery {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.block-gallery[data-count="1"] { grid-template-columns: 1fr; }
.block-gallery[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
.block-gallery[data-count="3"] { grid-template-columns: repeat(3, 1fr); }

.gallery-img-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.gallery-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.block-desc {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 3rem;
    max-width: 900px;
}

/* Acordeón */
.block-accordion {
    border-top: 1px solid #eaeaea;
    margin-bottom: 3rem;
    max-width: 900px;
}

.acc-item {
    border-bottom: 1px solid #eaeaea;
}

.acc-header {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1.5rem 0;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
}

.acc-icon {
    font-size: 1.2rem;
    font-weight: 400;
}

.acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.acc-body p {
    padding-bottom: 1.5rem;
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Botón Ver Más */
.btn-pill-outline {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    border: 1px solid #000b29;
    border-radius: 30px;
    color: #000b29;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-pill-outline:hover {
    background: #000b29;
    color: #ffffff;
}

@media (max-width: 992px) {
    .catalog-service-block {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 4rem 0;
    }
}

@media (max-width: 768px) {
    .block-gallery[data-count="2"],
    .block-gallery[data-count="3"] {
        grid-template-columns: 1fr;
    }
    .gallery-img-wrapper { aspect-ratio: 16 / 9; }
}

/* ==========================================================================
   SINGLE SERVICE (DETALLE INDIVIDUAL)
   ========================================================================== */
.service-hero-clean {
    padding: calc(var(--header-height) + 5rem) 0 4rem 0;
    background-color: var(--color-white);
}

.service-hero-clean .container-constrained {
    max-width: 1200px;
    width: 90%; /* Respiro lateral */
    margin: 0 auto;
}

.service-massive-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 600;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
    color: var(--color-black);
    line-height: 1.1;
}

.service-hero-desc {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 800px;
    line-height: 1.6;
    margin: 0;
}

.service-bleed-image {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    margin-bottom: 5rem;
}

.service-bleed-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-body-section {
    padding-bottom: 6rem;
}

.service-body-section .container-constrained {
    max-width: 1200px;
    width: 90%; /* Respiro lateral */
    margin: 0 auto;
}

.service-body-grid,
.service-main-content {
    display: block;
    max-width: 900px;
    margin: 0 auto;
}

/* ==========================================================================
   RESTAURACIÓN DE ESTILOS GUTENBERG (.entry-content)
   ========================================================================== */
.entry-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
}
.entry-content p {
    margin-bottom: 1.8rem;
}
.entry-content ul {
    list-style-type: disc;
    margin-left: 2rem;
    margin-bottom: 2rem;
}
.entry-content ol {
    list-style-type: decimal;
    margin-left: 2rem;
    margin-bottom: 2rem;
}
.entry-content li {
    margin-bottom: 0.8rem;
    padding-left: 0.5rem;
}
.entry-content h2, .entry-content h3, .entry-content h4 {
    margin-top: 3rem;
    margin-bottom: 1.2rem;
    color: var(--color-black);
    font-weight: 600;
}
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2.5rem 0;
    transition: transform 0.3s ease;
}
.entry-content img:hover {
    transform: scale(1.01);
}

/* ==========================================================================
   LIGHTBOX NATIVO
   ========================================================================== */
.dhema-lightbox-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,11,41,0.95);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.dhema-lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.dhema-lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.dhema-lightbox-close {
    position: absolute;
    top: 20px; right: 30px;
    color: #fff;
    font-size: 45px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}
.dhema-lightbox-close:hover {
    color: #ccc;
}

/* Sidebar Sticky */
.sticky-index {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

.index-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 1.5rem;
}

.index-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.index-list a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-black);
}

/* Características Dinámicas */
.service-features-elegant {
    margin-top: 5rem;
    padding-top: 4rem;
    border-top: 1px solid var(--color-border);
}

.features-heading {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
}

.feature-elegant-item {
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

.feature-elegant-item:last-child {
    border-bottom: none;
}

/* CTA Final Dark Navy - CORREGIDO */
.service-dark-cta {
    background-color: #000b29; /* Azul marino profundo */
    padding: 8rem 0;
    text-align: center;
}

.service-dark-cta .container-constrained {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
}

.cta-dark-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.cta-dark-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    color: #ffffff; /* Blanco absoluto */
    margin: 0;
    letter-spacing: -1px;
    line-height: 1.2;
    max-width: 850px;
}

/* Estilo del botón para que no salga negro */
.service-dark-cta .btn-outline-white {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    border: 1px solid #ffffff;
    border-radius: 40px;
    color: #ffffff; /* Texto blanco */
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: transparent;
}

.service-dark-cta .btn-outline-white:hover {
    background-color: #ffffff;
    color: #000b29; /* Texto azul al pasar el mouse */
}

/* ==========================================================================
   RESPONSIVO COMPLETO (Tablet y Móvil)
   ========================================================================== */
@media (max-width: 992px) {
    .service-overlap-card {
        flex-direction: column;
        justify-content: center;
        padding: 4rem 0; 
        min-height: auto;
    }

    .service-bg-image {
        position: relative;
        width: 100%;
        height: 350px;
    }

    .service-content-card {
        width: 100%;
        padding: 3rem 1.5rem;
        box-shadow: none;
    }

    .service-body-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .sticky-index {
        position: relative;
        top: 0;
        padding-bottom: 2rem;
        border-bottom: 1px solid var(--color-border);
    }

    .feature-elegant-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .service-overlap-card {
        padding: 2rem 0; 
        margin-bottom: 3rem;
    }

    .service-hero-clean { padding: calc(var(--header-height) + 2rem) 0 3rem 0; }
    .service-bleed-image { height: 40vh; min-height: 250px; margin-bottom: 3rem; }
    .service-features-elegant { margin-top: 3rem; padding-top: 3rem; }
    .service-dark-cta { padding: 4rem 0; }
}