/* =============================== */
/*  SKELETON SHIMMER               */
/* =============================== */
@keyframes lavisa-shimmer {
    from { background-position: -200% 0; }
    to   { background-position:  200% 0; }
}

.lv-skeleton {
    display: block;
    border-radius: 4px;
    background: linear-gradient(90deg, #e8e8e8 25%, #f0f0f0 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: lavisa-shimmer 1.4s ease-in-out infinite;
    color: transparent !important;
    pointer-events: none;
    min-height: 1em;
}


/* =============================== */
/*  HOME: CONTENEDOR GENERAL       */
/* =============================== */
.page-content {
    width: 100%;
    margin: 0 auto;
    padding: calc(var(--spacing-unit) * 4) 0;
}

.home-api-status {
    width: min(90%, 760px);
    margin: 0 auto;
    padding: 22px 26px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 12px;
    background: #ffffff;
    color: #4b5563;
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* INTRODUCTION */
.introduction {
    padding: clamp(28px, 3.5vw, 52px) 0;
    background-color: #ffffff;
}

.introduction__container {
    width: min(90%, 1200px);
    margin: 0 auto;
}

.introduction__title {
    font-size: clamp(2rem, 3.2vw, 2.75rem);
    line-height: 1.18;
    font-weight: 400;
    color: #202020;
    margin: 0 0 clamp(18px, 1.8vw, 28px);
    overflow-wrap: anywhere;
}

.introduction__cta {
    display: inline-block;
    padding: 14px 36px;
    max-width: 100%;
    border-radius: 999px;
    background-color: var(--color-primary);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    white-space: normal;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.introduction__cta:hover,
.introduction__cta:focus-visible {
    background-color: #9c2438;
    transform: translateY(-1px);
}
/* INTRODUCTION */

/* HERO */
.hero {
    --hero-slide-max-height: 748px;
    position: relative;
    padding: calc(var(--spacing-unit) * 2) 0 calc(var(--spacing-unit) * 4);
    background-color: #ffffff;
}

.hero__viewport {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    /* Reserva el espacio del slide antes de que llegue vía JS (getHomeHero()),
       para evitar el salto de layout (CLS) que provoca que "Representaciones"
       y el resto de las secciones se recorran hacia abajo cuando el hero
       pasa de altura 0 a su altura real. La proporción replica la fórmula
       del slide: ancho_slide = 83% del viewport, alto_slide = ancho_slide * 9/16
       => alto_viewport ≈ ancho_viewport / 2.14, con el mismo tope de altura
       que ya usa .hero__slide (--hero-slide-max-height). */
    aspect-ratio: 2.14 / 1;
    max-height: var(--hero-slide-max-height);
}

.hero__slider {
    display: flex;
    gap: clamp(16px, 4vw, 32px);
    transform: translateX(0);
    transition: transform 0.5s ease;
}

.hero__slide {
    position: relative;
    flex: 0 0 min(83%, calc(var(--hero-slide-max-height) * 16 / 9));
    width: min(83%, calc(var(--hero-slide-max-height) * 16 / 9));
    aspect-ratio: 16 / 9;
    max-height: var(--hero-slide-max-height);
    border-radius: 32px;
    overflow: hidden;
    opacity: 0.4;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero__slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(12, 15, 20, 0.12) 0%, rgba(12, 15, 20, 0.28) 100%),
        rgba(12, 15, 20, 0.14);
}

.hero__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.9) contrast(1.03);
}

.hero__slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero__indicators {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.hero__indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(32, 32, 32, 0.25);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.hero__indicator.is-active {
    background-color: var(--color-primary);
    transform: scale(1.15);
}

.hero__indicator:focus-visible {
    outline: 2px solid rgba(32, 32, 32, 0.6);
    outline-offset: 2px;
}

/* CEO MESSAGE */
.ceo-message {
    padding: calc(var(--spacing-unit) * 5) 0;
    background-color: #ffffff;
}

.ceo-message__inner {
    width: min(90%, 1200px);
    margin: 0 auto;
}

.ceo-message__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: clamp(32px, 6vw, 64px);
    padding: clamp(24px, 4vw, 48px);
    background-color: #f5f5f5;
    border-radius: 24px;
    align-items: center;
}

.ceo-message__quote {
    display: grid;
    gap: 24px;
}

.ceo-message__text {
    margin: 0;
    font-size: clamp(1.25rem, 2.4vw, 1.75rem);
    line-height: 1.4;
    color: #333333;
    font-weight: 300;
    font-style: italic;
}

.ceo-message__author {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #c85a5a;
}

.ceo-message__image {
    width: min(100%, 360px);
    justify-self: center;
}

.ceo-message__image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
}

/* VALUES */
.values {
    padding: 80px 0;
    background: #ffffff;
}

.values-container {
    width: min(90%, 1200px);
    margin: 0 auto;
}

.values-accordion {
    display: grid;
    gap: 20px;
}

.accordion-item {
    border-radius: 20px;
    background: #f5f5f5;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.accordion-item.is-active {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px 48px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
}

.values .section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: rgba(32, 32, 32, 0.08);
    font-size: 36px;
    font-weight: 600;
    color: var(--color-primary);
}

.values .section-title {
    margin: 0;
    font-size: 36px;
    font-weight: 300;
    color: #333333;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-content__inner {
    padding: 0 48px 36px;
    display: grid;
    gap: 20px;
}

.value-item {
    display: grid;
    gap: 8px;
}

.value-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
}

.value-description,
.mission-text,
.vision-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #666666;
    font-weight: 300;
}

/* HISTORY */
.history {
    padding: 80px 0;
    background: #ffffff;
}

.history-container {
    width: min(90%, 1200px);
    margin: 0 auto;
}

.history-title {
    font-size: clamp(2.5rem, 4vw, 3rem);
    color: #333333;
    font-weight: 300;
    text-align: center;
    margin: 0 0 80px 0;
}

/* REPRESENTATIONS */
.representations {
    --representations-item-width: 220px;
    --representations-gap: 24px;
    padding: 32px 0 80px;
    background: #ffffff;
    overflow: hidden;
}

.representations__container {
    width: min(90%, 1200px);
    margin: 0 auto 32px;
}

.representations__container .history-title {
    margin-bottom: 0;
}

.representations__marquee {
    width: 100%;
    overflow: hidden;
}

.representations__track {
    display: flex;
    align-items: center;
    gap: var(--representations-gap);
    width: max-content;
    padding: 0 24px;
    animation: representations-scroll 36s linear infinite;
}

.representations__item {
    flex: 0 0 auto;
    width: var(--representations-item-width);
    aspect-ratio: 16 / 9;
}

.representations__item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 0;
}

@keyframes representations-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-1 * ((var(--representations-item-width) * 12) + (var(--representations-gap) * 12))));
    }
}

.timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(32px, 5vw, 48px);
}

.timeline-line {
    position: absolute;
    top: 110px;
    left: clamp(60px, 12vw, 120px);
    right: clamp(60px, 12vw, 120px);
    height: 2px;
    background: #c85a5a;
    z-index: 1;
}

.timeline-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.timeline-image {
    position: relative;
    width: clamp(180px, 16vw, 220px);
    height: clamp(180px, 16vw, 220px);
    margin-bottom: 30px;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #c85a5a;
}

.timeline-icon {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 56px;
    height: 56px;
    background: #ffffff;
    border-radius: 50%;
    border: 2px solid #c85a5a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-icon img {
    width: 32px;
    height: 32px;
}

.timeline-content {
    max-width: 260px;
    display: grid;
    gap: 12px;
}

.timeline-year {
    margin: 0;
    font-size: 32px;
    color: #c85a5a;
    font-weight: 600;
}

.timeline-subtitle {
    margin: 0;
    font-size: 18px;
    color: #333333;
    font-weight: 400;
    line-height: 1.3;
}

.timeline-description {
    margin: 0;
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
    font-weight: 300;
}

/* SOCIAL */
.social {
    padding: 80px 0;
    background: #ffffff;
}

.social-container {
    width: min(90%, 1200px);
    margin: 0 auto;
}

.social-subtitle {
    font-size: 14px;
    color: #999999;
    font-weight: 400;
    margin: 0 0 12px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.social-title {
    font-size: clamp(2.5rem, 4vw, 3rem);
    color: #333333;
    font-weight: 300;
    margin: 0 0 60px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.projects-grid > .home-api-status,
.timeline > .home-api-status,
.sectors__content > .home-api-status {
    grid-column: 1 / -1;
}

.project-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    padding: 40px 25px 25px;
}

.project-name {
    margin: 0;
    color: #ffffff;
    font-size: 24px;
    font-weight: 400;
}

.social-footer {
    text-align: center;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #999999;
    font-size: 16px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.view-all-link:hover,
.view-all-link:focus-visible {
    color: #c85a5a;
}

/* SECTORS */
.sectors {
    padding: 80px 0;
    background: #ffffff;
}

.sectors__inner {
    width: min(90%, 1200px);
    margin: 0 auto;
    display: grid;
    gap: 48px;
}

.sectors__header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: flex-end;
}

.sectors__subtitle {
    margin: 0 0 12px 0;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #999999;
    font-weight: 400;
}

.sectors__title {
    margin: 0;
    font-size: clamp(2.5rem, 4vw, 3rem);
    color: #333333;
    font-weight: 300;
}

.sectors__description-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #333333;
    font-weight: 500;
}

.sectors__description-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #666666;
    font-weight: 300;
}


.sectors__content {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(32px, 5vw, 48px);
    align-items: start;
}

.sectors__current {
    grid-column: 1 / -1;
    display: grid;
    gap: 12px;
    padding: 0 0 24px 0;
}

.sectors__left {
    display: grid;
    gap: 32px;
}

.sectors__label {
    margin: 0;
    font-size: 12px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: rgba(32, 32, 32, 0.45);
}

.sectors__current-name {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    color: #202020;
    font-weight: 600;
}

.sectors__current-description {
    margin: 0;
    font-size: 16px;
    color: #666666;
    line-height: 1.6;
    font-weight: 300;
}

.sectors__list {
    display: grid;
    gap: 18px;
}

.sectors__list-title {
    margin: 0;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #999999;
    font-weight: 500;
}

.sectors__buttons {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.sector-btn {
    width: 100%;
    padding: 12px 18px;
    border-radius: 16px;
    background: var(--color-bt-secundary);
    color: var(--color-text-secundary);
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sector-btn:hover,
.sector-btn:focus-visible {
    background: rgba(179, 47, 65, 0.12);
    color: #202020;
    transform: translateX(4px);
}

.sector-btn.is-active {
    background: var(--color-primary);
    color: #ffffff;
}

.sectors__right {
    position: relative;
}

.sectors__media {
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.sectors__media img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}
@media (max-width: 1024px) {
    .page-content {
        padding: calc(var(--spacing-unit) * 3) 0;
    }

    .hero {
        padding: calc(var(--spacing-unit) * 1.5) 0 calc(var(--spacing-unit) * 3);
    }

    .hero__slide {
        flex-basis: 88%;
    }

    .sectors__content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .ceo-message__content {
        grid-template-columns: minmax(0, 1fr) 300px;
        padding: clamp(24px, 5vw, 40px);
        border-radius: 20px;
    }

    .accordion-header {
        gap: clamp(12px, 3vw, 16px);
    }

    .timeline {
        gap: clamp(24px, 4vw, 36px);
    }

    .timeline-line {
        left: clamp(50px, 10vw, 80px);
        right: clamp(50px, 10vw, 80px);
    }

    .projects-grid {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .introduction {
        padding: 32px 0;
    }

    .introduction__container {
        width: calc(100vw - 48px);
        max-width: 620px;
    }

    .introduction__title {
        font-size: clamp(1.7rem, 4.5vw, 2.1rem);
        margin-bottom: 20px;
    }

    .introduction__cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: auto;
        text-align: center;
        padding: 14px 18px;
    }

    .hero__viewport {
        width: min(100% - 1.5rem, 700px);
    }

    .hero__slider {
        gap: 16px;
    }

    .hero__slide {
        flex-basis: 92%;
    }

    .ceo-message {
        padding: calc(var(--spacing-unit) * 4) 0;
    }

    .ceo-message__content {
        grid-template-columns: minmax(0, 1fr);
        text-align: center;
    }

    .ceo-message__image {
        width: min(100%, 320px);
    }

    .accordion-header {
        padding: 14px;
    }

    .accordion-content__inner {
        padding: 0 14px 14px;
    }

    .history {
        padding: 60px 0;
    }

    .representations {
        --representations-item-width: 180px;
        --representations-gap: 16px;
        padding: 12px 0 60px;
    }

    .representations__track {
        padding: 0 16px;
        animation-duration: 28s;
    }

    .history-container {
        width: min(94%, 700px);
    }

    .timeline {
        flex-direction: column;
        align-items: center;
        gap: 36px;
    }

    .timeline-line {
        display: none;
    }

    .timeline-item {
        width: 100%;
        max-width: 360px;
    }

    .social {
        padding: 60px 0;
    }

    .social-title {
        text-align: center;
        margin-bottom: 40px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .sectors__content {
        grid-template-columns: 1fr;
    }

    .sectors__current {
        text-align: center;
    }

    .sectors__buttons {
        grid-template-columns: 1fr;
    }

    .sectors__header {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .introduction__title {
        font-size: clamp(1.35rem, 6vw, 1.55rem);
        line-height: 1.28;
        max-width: calc(100vw - 48px);
        word-break: normal;
    }

    .introduction__cta {
        max-width: calc(100vw - 48px);
    }

    .ceo-message__content {
        padding: 24px;
    }

    .section-title {
        font-size: 1rem;
    }

    .timeline-item {
        max-width: 320px;
    }

    .project-name {
        font-size: 20px;
    }
}
.sectors__heading {
    margin: 0;
    font-size: clamp(2.5rem, 4vw, 3rem);
    font-weight: 300;
    color: #333333;
}

@media (min-width: 1025px) and (max-width: 1440px) and (max-height: 780px) {
    .page-content {
        padding: 32px 0;
    }

    .hero {
        --hero-slide-max-height: 460px;
    }

    .introduction {
        padding: 28px 0 24px;
    }

    .introduction__title {
        font-size: 1.5rem;
        line-height: 1.16;
        margin-bottom: 18px;
    }

    .hero {
        padding: 12px 0 32px;
    }

    .hero__slider {
        gap: 24px;
    }

    .hero__slide {
        border-radius: 24px;
    }

    .hero__indicators {
        margin-top: 16px;
    }

    .ceo-message,
    .values,
    .history,
    .social,
    .sectors {
        padding: 56px 0;
    }

    .ceo-message__content {
        gap: 36px;
        padding: 32px;
    }

    .ceo-message__text {
        font-size: 1.45rem;
        line-height: 1.35;
    }

    .ceo-message__image {
        width: min(100%, 320px);
    }

    .accordion-header {
        gap: 18px;
        padding: 24px 36px;
    }

    .accordion-content__inner {
        padding: 0 36px 28px;
    }

    .values .section-number {
        width: 54px;
        height: 54px;
        font-size: 30px;
    }

    .values .section-title {
        font-size: 30px;
    }

    .history-title,
    .social-title,
    .sectors__title,
    .sectors__heading {
        font-size: 2.45rem;
    }

    .history-title {
        margin-bottom: 48px;
    }

    .representations {
        --representations-item-width: 200px;
        --representations-gap: 20px;
        padding: 24px 0 56px;
    }

    .timeline {
        gap: 28px;
    }

    .timeline-line {
        top: 92px;
    }

    .timeline-image {
        width: 180px;
        height: 180px;
        margin-bottom: 24px;
    }

    .timeline-year {
        font-size: 28px;
    }

    .social-title {
        margin-bottom: 42px;
    }

    .projects-grid {
        gap: 24px;
    }

    .project-overlay {
        padding: 32px 22px 22px;
    }

    .project-name {
        font-size: 22px;
    }

    .sectors__inner {
        gap: 36px;
    }

    .sectors__header {
        gap: 32px;
    }

    .sectors__current-name {
        font-size: 2rem;
    }
}
