/* ==========================================================================
   About — Quem Somos (Section III)
   ========================================================================== */

.about {
    padding: var(--section-pad-xl) 0;
    background-color: var(--color-white);
    overflow: hidden;
}

.about__inner {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
}

@media (min-width: 769px) {
    .about__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }
}

/* ===== Coluna de texto ===== */

.about__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap-card);
    position: relative;
    z-index: 3;
}

.about__label {
    display: flex;
    align-items: center;
    gap: clamp(10px, 0.63vw, 12px);
    font-family: var(--font-text);
    font-weight: 400;
    font-size: var(--fs-label);
    line-height: 1.7;
    letter-spacing: -0.01em;
    color: #252B37;
}

.about__line {
    display: inline-block;
    width: var(--line-width);
    height: 0;
    border-top: 1px solid var(--color-primary);
    flex-shrink: 0;
}

.about__title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-section-lg);
    line-height: 1.19;
    color: #252B37;
}

.about__description {
    display: flex;
    flex-direction: column;
    gap: var(--gap-content);
}

.about__description p {
    font-family: var(--font-text);
    font-weight: 400;
    font-size: var(--fs-body);
    line-height: 1.7;
    letter-spacing: -0.01em;
    color: #414651;
}

/* Features — 2 linhas de 3 itens */
.about__features {
    display: flex;
    flex-direction: column;
    gap: var(--gap-content);
}

.about__features-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--gap-content);
}

.about__feature {
    display: flex;
    align-items: flex-start;
    gap: clamp(10px, 0.63vw, 12px);
    padding: 4px 0;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--fs-body);
    line-height: 1.5;
    color: #252B37;
}

.about__feature svg {
    flex-shrink: 0;
}

/* CTA */
.about__cta-wrapper {
    padding: clamp(6px, 0.42vw, 8px);
    align-self: flex-start;
    width: fit-content;
    border-radius: 16px;
    border: 1px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(302.1deg, rgba(21, 94, 239, 0.39) 24.57%, rgba(21, 94, 239, 0) 70.33%) border-box;
}

.about__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: fit-content;
    height: var(--cta-height);
    gap: clamp(10px, 0.63vw, 12px);
    padding: var(--cta-pad-y) var(--cta-pad-x);
    background: #1F3A5F;
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: var(--cta-font);
    line-height: 1.33;
    border-radius: 12px;
    transition: background var(--transition-fast);
}

.about__cta:hover {
    background: #2a4f7a;
}

.about__cta svg {
    width: var(--cta-icon);
    height: var(--cta-icon);
}

/* Estado "em breve" — desativa o CTA quando a página ainda não existe */
.about__cta-wrapper--soon {
    cursor: not-allowed;
}

.about__cta--soon,
.about__cta--soon:hover {
    opacity: 0.55;
    background: var(--color-dark);
    pointer-events: none;
}

/* ===== Mosaico ===== */

.about__mosaic {
    /* Largura reduzida ~22% no desktop (era 41vw / max 560px) para a altura do
       mosaico cair na mesma proporção e a seção caber em ~70% da tela.
       O mínimo (280px) é mantido; no mobile a largura é 90% por regra própria. */
    width: clamp(280px, 32vw, 436px);
    max-width: 436px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    isolation: isolate;
}

@media (min-width: 769px) {
    .about__mosaic {
        justify-self: end;
    }
}

/* Watermark pattern atrás do mosaico */
.about__watermark {
    position: absolute;
    top: 0;
    right: 0;
    width: 750px;
    height: 1500px;
    transform: translate(50%, -12%) rotate(175deg);
    pointer-events: none;
    user-select: none;
    z-index: 0;
    background-image: url('../images/watermark-a.svg');
    background-size: 750px 750px;
    background-repeat: repeat;
    opacity: 0.75;
}

/* Grid de fotos — posicionamento absoluto conforme Figma */
.about__photos {
    position: relative;
    width: 100%;
    /* Proporção: altura das fotos = 351px no Figma, largura total = 514px */
    aspect-ratio: 514 / 351;
    z-index: 2;
}

.about__photo {
    position: absolute;
    overflow: hidden;
    border-radius: 8px;
    background: #E8E8E8;
}

.about__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Foto vertical esquerda — ocupa toda a altura */
.about__photo--tall {
    top: 0;
    left: 0;
    width: 36%; /* 185/514 */
    height: 100%; /* 351/351 */
}

/* Foto topo direita */
.about__photo--top {
    top: 0;
    left: 37.74%; /* 194/514 — gap de ~9px */
    right: 0;
    height: 42.45%; /* 149/351 */
    clip-path: polygon(
        0 0,
        calc(100% - 80px) 0,
        100% 65px,
        100% 100%,
        0 100%
    );
}

/* Foto meio direita */
.about__photo--mid {
    top: 45.01%; /* 158/351 */
    left: 37.74%;
    right: 0;
    bottom: 0;
}

/* Acentos decorativos */
.about__accent--orange {
    position: absolute;
    /* Entre a foto tall e a foto mid, verticalmente */
    left: 36%; /* alinhado com a borda direita da foto tall */
    top: 55%;
    width: 1.75%; /* 9/514 ≈ largura do gap */
    height: 35%;
    background: #ed8717;
    border-radius: 0;
    z-index: 1;
}

.about__accent--blue {
    display: block;
    width: 24%; /* 123/514 */
    height: 11px;
    background: #175eee;
    align-self: flex-end;
    margin-right: 10%;
    margin-top: -5px;
    position: relative;
    z-index: 1;
}

/* YouTube facade (click-to-play) */
.about__video {
    width: 100%;
    aspect-ratio: 514 / 289;
    overflow: hidden;
    background: #1a1a1a;
    position: relative;
    z-index: 1;
}

.about__video iframe {
    display: block;
    width: calc(100% + 1px);
    height: calc(100% + 1px);
    margin: -1px;
    border: none;
}

.about__video-facade {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
}

.about__video-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.about__video-facade:hover .about__video-thumb,
.about__video-facade:focus-visible .about__video-thumb {
    transform: scale(1.03);
}

.about__video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(56px, 3.54vw, 68px);
    height: clamp(40px, 2.5vw, 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.about__video-facade:hover .about__video-play,
.about__video-facade:focus-visible .about__video-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
}

.about__video-facade:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* ===== Responsivo ===== */

@media (max-width: 768px) {
    .about__inner {
        flex-direction: column;
        gap: 24px;
    }

    .about__content {
        display: contents;
    }

    .about__label { order: 1; align-self: flex-start; position: relative; z-index: 2; }
    .about__title { order: 2; align-self: flex-start; position: relative; z-index: 2; }
    .about__description { order: 3; align-self: flex-start; position: relative; z-index: 2; }
    .about__features { order: 4; align-self: flex-start; width: 100%; position: relative; z-index: 2; }
    .about__mosaic { order: 5; }
    .about__cta-wrapper { order: 6; position: relative; z-index: 2; }

    .about__features {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .about__features-row {
        display: contents;
    }

    .about__feature {
        white-space: normal;
    }

    .about__cta-wrapper {
        align-self: center;
    }

    .about__cta {
        padding: 16px 24px;
        height: auto;
    }

    .about__watermark {
        width: 400px;
        height: 800px;
        background-size: 400px 400px;
        transform: translate(30%, -10%) rotate(175deg);
    }

    .about__mosaic {
        width: 90%;
        margin: 0 auto;
    }

    .about__photo--top {
        clip-path: polygon(
            0 0,
            calc(100% - 20px) 0,
            100% 16px,
            100% 100%,
            0 100%
        );
    }
}

/* ==========================================================================
   Vídeo em popup (modal): abre ao clicar no facade do vídeo institucional
   ========================================================================== */

body.video-modal-open {
    overflow: hidden;
}

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 48px);
    animation: video-modal-fade 0.2s ease;
}

@keyframes video-modal-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.video-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 13, 18, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.video-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(1100px, 100%);
    /* Em telas baixas (landscape), limita a largura pela altura para o vídeo
       16:9 caber inteiro sem cortar. */
    max-width: calc((100vh - clamp(32px, 8vw, 96px)) * 16 / 9);
}

.video-modal__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.video-modal__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(19, 23, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--color-white);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.video-modal__close:hover {
    background: rgba(19, 23, 26, 0.9);
}

.video-modal__close:focus-visible {
    outline: 2px solid var(--color-white);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .video-modal {
        animation: none;
    }
}
