/* Estilos propios de la vista inicio/index.php */

/* ===== Fallback para las publicaciones embebidas de LinkedIn ===== */
/* Se muestra cuando el iframe no carga (Firefox con protección de */
/* rastreo estricta, antivirus/bloqueadores, error de conexión...). */
.li-embed {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}
.li-embed__iframe {
    display: block;
    width: 100%;
    border: 1px solid #e2e6ee;
    border-radius: 8px;
    background: #fff;
}
.li-embed__fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 320px;
    padding: 28px 24px;
    border: 1px solid #e2e6ee;
    border-radius: 8px;
    background: #f7f9fc;
    box-sizing: border-box;
}
.li-embed__fallback-inner {
    max-width: 340px;
    text-align: center;
}
.li-embed__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 700;
    color: #0a66c2;
}
.li-embed__brand svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    fill: #0a66c2;
}
.li-embed__text {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #122348;
}
.li-embed__text-destacado {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 700;
    color: #0f5a8d;
}
.li-embed__btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 4px;
    background: #0f5a8d;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s ease;
}
.li-embed__btn:hover,
.li-embed__btn:focus {
    background: #122348;
    color: #fff !important;
    text-decoration: none;
}
@media (max-width: 767px) {
    .li-embed__fallback { min-height: 260px; }
}

/* ===== Animación de aparición al hacer scroll (secciones Executive Search, etc.) ===== */
.es-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 4s ease, transform 4s ease;
}
.es-reveal.es-visible {
    opacity: 1;
    transform: translateY(0);
}
.es-reveal.es-delay-1 { transition-delay: 1s; }
.es-reveal.es-delay-2 { transition-delay: 2s; }
@media (max-width: 767px) {
    .es-reveal { transition-duration: .6s; }
    .es-reveal.es-delay-1 { transition-delay: .15s; }
    .es-reveal.es-delay-2 { transition-delay: .3s; }
}

/* =========================================================================
   Sectores en los que trabajamos — índice editorial
   Lenguaje visual: consultoría / executive search premium. Sin tarjetas,
   sin iconos grandes, sin gradientes llamativos. Tipografía como
   protagonista (Lora serif para cifras/títulos, Geist para el cuerpo,
   ya cargadas ambas en header.php), líneas finas como único ornamento.
   ========================================================================= */

.sectores-editorial {
    padding: 90px 0;
}

.sectores-editorial-head {
    margin-bottom: 56px;
}

.sectores-editorial-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: #940A36;
    font-size: 14px;
    font-style: italic;
    letter-spacing: 0.04em;
}

.sectores-editorial-titulo {
    margin: 0;
    max-width: 640px;
    color: #122348;
    font-family: 'Lora', serif;
    font-weight: 600;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.sectores-editorial-body {
    display: grid;
    grid-template-columns: minmax(0, 460px) 1fr;
    gap: 0 72px;
    align-items: start;
}

/* --- Índice numerado --- */

.sectores-index {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(18, 35, 72, 0.12);
}

.sector-row {
    border-bottom: 1px solid rgba(18, 35, 72, 0.12);
}

.sector-row-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 17px 4px;
    background: none;
    border: 0;
    border-left: 2px solid transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .3s ease, background-color .3s ease, padding-left .3s ease;
}

.sector-row-number {
    width: 44px;
    flex-shrink: 0;
    color: rgba(18, 35, 72, 0.35);
    font-family: 'Lora', serif;
    font-size: 15px;
    font-style: italic;
    transition: color .3s ease;
}

.sector-row-name {
    flex: 1;
    color: #122348;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color .3s ease, transform .3s ease;
}

.sector-row-arrow {
    flex-shrink: 0;
    color: #940A36;
    font-size: 16px;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity .3s ease, transform .3s ease;
}

.sector-row-trigger:hover,
.sector-row-trigger:focus-visible,
.sector-row-trigger.is-active {
    padding-left: 16px;
    background-color: rgba(148, 10, 54, 0.035);
    border-left-color: #940A36;
}

.sector-row-trigger:hover .sector-row-number,
.sector-row-trigger:focus-visible .sector-row-number,
.sector-row-trigger.is-active .sector-row-number {
    color: #940A36;
}

.sector-row-trigger:hover .sector-row-name,
.sector-row-trigger:focus-visible .sector-row-name,
.sector-row-trigger.is-active .sector-row-name {
    color: #0f5a8d;
    transform: translateX(4px);
}

.sector-row-trigger:hover .sector-row-arrow,
.sector-row-trigger:focus-visible .sector-row-arrow,
.sector-row-trigger.is-active .sector-row-arrow {
    opacity: 1;
    transform: translateX(0);
}

.sector-row-trigger:focus-visible {
    outline: none;
}

/* --- Panel de lectura (descripción del sector activo) --- */

.sectores-detalle {
    position: sticky;
    top: 120px;
    padding: 8px 0 8px 0;
    transition: opacity .18s ease;
}

.sectores-detalle.is-updating {
    opacity: 0;
}

.sectores-detalle-numero {
    display: block;
    margin-bottom: 18px;
    color: rgba(18, 35, 72, 0.08);
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 120px;
    line-height: 1;
    user-select: none;
}

.sectores-detalle-eyebrow {
    margin: 0 0 8px;
    color: #940A36;
    font-size: 13px;
    font-style: italic;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sectores-detalle-nombre {
    margin: 0 0 18px;
    color: #122348;
    font-family: 'Lora', serif;
    font-weight: 600;
    font-size: 30px;
}

.sectores-detalle-texto {
    max-width: 46ch;
    margin: 0;
    color: #3a4a63;
    font-size: 17px;
    line-height: 1.7;
}

/* Barra de progreso: única señal del auto-avance, se detiene y desaparece
   en cuanto el usuario interactúa (ver .sectores-detalle.is-paused). */
.sectores-detalle-progress {
    width: 140px;
    height: 2px;
    margin-top: 32px;
    background: rgba(18, 35, 72, 0.1);
    overflow: hidden;
    transition: opacity .4s ease;
}

.sectores-detalle-progress span {
    display: block;
    width: 0%;
    height: 100%;
    background: #940A36;
}

.sectores-detalle-progress span.is-animating {
    animation: sectores-progress var(--sectores-progress-dur, 5000ms) linear forwards;
}

.sectores-detalle.is-paused .sectores-detalle-progress {
    opacity: 0;
}

@keyframes sectores-progress {
    from { width: 0%; }
    to { width: 100%; }
}

@media (max-width: 991px) {
    .sectores-editorial {
        padding: 64px 0;
    }
    .sectores-editorial-body {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .sectores-detalle {
        position: static;
        padding: 28px 24px;
        background: rgba(18, 35, 72, 0.02);
        border-left: 2px solid #940A36;
    }
    .sectores-detalle-numero {
        font-size: 72px;
        margin-bottom: 10px;
    }
    .sectores-detalle-nombre {
        font-size: 24px;
    }
    .sectores-detalle-texto {
        max-width: none;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .sector-row-trigger {
        padding: 14px 2px;
    }
    .sector-row-number {
        width: 34px;
        font-size: 13px;
    }
    .sector-row-name {
        font-size: 17px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sector-row-trigger,
    .sector-row-number,
    .sector-row-name,
    .sector-row-arrow,
    .sectores-detalle {
        transition: none;
    }
    .sectores-detalle-progress {
        display: none;
    }
}
