.energia-perfil-page {
    --energia-perfil-ink: #0b1423;
    --energia-perfil-muted: #5f6b7a;
    --energia-perfil-orange: #ff8500;
    padding-block: clamp(64px, 5vw, 80px) clamp(74px, 6vw, 96px);
    color: var(--energia-perfil-ink);
    background:
        radial-gradient(circle at 92% 8%, rgba(255, 133, 0, 0.07), transparent 24%),
        #f4f6f8;
}

.energia-perfil-shell {
    width: min(100% - 48px, 1400px);
    margin-inline: auto;
}

.energia-perfil-section-head {
    max-width: 900px;
    margin-bottom: clamp(26px, 2.5vw, 34px);
}

.energia-perfil-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--energia-perfil-orange);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.energia-perfil-eyebrow::before {
    width: 42px;
    height: 2px;
    background: currentColor;
    content: "";
}

.energia-perfil-section-head h1 {
    max-width: 20ch;
    margin: 17px 0 14px;
    color: var(--energia-perfil-ink);
    font-size: clamp(38px, 4.1vw, 62px);
    font-weight: 900;
    line-height: 1.03;
    letter-spacing: -0.035em;
}

.energia-perfil-section-head p {
    max-width: 780px;
    margin: 0;
    color: var(--energia-perfil-muted);
    font-size: clamp(16px, 1.3vw, 19px);
    line-height: 1.6;
}

.energia-perfil-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    color: #1f2b3a;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.energia-perfil-back:hover,
.energia-perfil-back:focus-visible {
    color: var(--energia-perfil-orange);
}

.energia-perfil-gallery {
    position: relative;
}

.energia-perfil-gallery__layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    opacity: 1;
    transition: opacity 180ms ease, transform 180ms ease;
}

.energia-perfil-gallery__layout.is-rendering {
    opacity: 0.35;
    transform: translateX(3px);
}

.energia-perfil-gallery__layout[data-count="1"] {
    grid-template-columns: minmax(0, 1040px);
    justify-content: center;
    aspect-ratio: auto;
}

.energia-perfil-gallery__main,
.energia-perfil-gallery__thumb-media {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(14, 30, 49, 0.14);
    border-radius: 3px;
    background: #fff;
}

.energia-perfil-gallery__main {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

.energia-perfil-gallery__layout[data-count="1"] .energia-perfil-gallery__main {
    aspect-ratio: 16 / 9;
}

.energia-perfil-gallery__thumbs {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 10px;
    contain: size;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.energia-perfil-gallery__layout[data-count="2"] .energia-perfil-gallery__thumbs {
    display: block;
}

.energia-perfil-gallery__layout[data-count="2"] .energia-perfil-gallery__thumb {
    width: 100%;
    height: calc(50% - 5px);
}

.energia-perfil-gallery__thumb {
    position: relative;
    min-width: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
}

.energia-perfil-gallery__thumb::before {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(3, 8, 13, 0);
    content: "";
    transition: background 160ms ease;
    pointer-events: none;
}

.energia-perfil-gallery__thumb:hover::before {
    background: rgba(3, 8, 13, 0.13);
}

.energia-perfil-gallery__thumb.is-video::after {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.86);
    border-radius: 50%;
    color: #fff;
    background: rgba(3, 8, 13, 0.68);
    content: "▶";
    font-size: 15px;
    line-height: 1;
    pointer-events: none;
}

.energia-perfil-gallery__thumb-media {
    display: block;
    width: 100%;
    height: 100%;
}

.energia-perfil-gallery__main img,
.energia-perfil-gallery__main video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #fff;
}

.energia-perfil-gallery__thumb img,
.energia-perfil-gallery__thumb video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #fff;
}

.energia-perfil-gallery__thumb video {
    pointer-events: none;
}

.energia-perfil-gallery__controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-height: 46px;
    margin-top: 14px;
}

.energia-perfil-gallery__status {
    display: inline-flex;
    min-height: 34px;
    padding-inline: 13px;
    align-items: center;
    border: 1px solid rgba(13, 30, 50, 0.12);
    border-radius: 3px;
    color: #526071;
    background: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.1em;
}

.energia-perfil-gallery__next {
    display: grid;
    width: 46px;
    height: 46px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 133, 0, 0.82);
    border-radius: 3px;
    color: #ff9a2e;
    background: #07111d;
    box-shadow: 0 8px 20px rgba(7, 17, 29, 0.16);
    cursor: pointer;
}

.energia-perfil-gallery__next[hidden] {
    display: none;
}

.energia-perfil-gallery__next span {
    font-size: 27px;
    line-height: 1;
}

.energia-perfil-gallery__next:hover {
    color: #fff;
    background: #ff8500;
}

.energia-perfil-gallery__thumb:hover,
.energia-perfil-gallery__thumb:focus-visible,
.energia-perfil-gallery__next:focus-visible,
.energia-perfil-back:focus-visible {
    outline: 2px solid var(--energia-perfil-orange);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .energia-perfil-page {
        padding-block: 48px 72px;
    }

    .energia-perfil-shell {
        width: min(100% - 32px, 760px);
    }

    .energia-perfil-gallery__layout,
    .energia-perfil-gallery__layout[data-count="1"] {
        grid-template-columns: minmax(0, 1fr);
        aspect-ratio: auto;
    }

    .energia-perfil-gallery__main {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .energia-perfil-gallery__thumbs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        contain: none;
        height: auto;
        overflow: visible;
    }

    .energia-perfil-gallery__layout[data-count="2"] .energia-perfil-gallery__thumbs {
        display: grid;
        grid-template-columns: minmax(0, calc(50% - 5px));
        justify-content: center;
    }

    .energia-perfil-gallery__layout[data-count="2"] .energia-perfil-gallery__thumb {
        width: 100%;
        height: auto;
    }

    .energia-perfil-gallery__thumb-media {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 520px) {
    .energia-perfil-page {
        padding-block: 38px 62px;
    }

    .energia-perfil-shell {
        width: min(100% - 24px, 480px);
    }

    .energia-perfil-section-head {
        margin-bottom: 26px;
    }

    .energia-perfil-section-head h1 {
        margin-top: 14px;
        font-size: clamp(32px, 9vw, 40px);
    }

    .energia-perfil-section-head p {
        font-size: 15px;
        line-height: 1.55;
    }

    .energia-perfil-gallery__layout,
    .energia-perfil-gallery__thumbs {
        gap: 7px;
    }

    .energia-perfil-gallery__controls {
        margin-top: 11px;
    }

    .energia-perfil-gallery__next {
        width: 44px;
        height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .energia-perfil-gallery__layout,
    .energia-perfil-gallery__thumb::before {
        transition: none;
    }
}
