* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

:root {
    --historia-accent: #e60000;
    --historia-text: #f2f2f2;
    --historia-surface-border: rgba(255, 255, 255, 0.1);
    --historia-shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.38);
    --historia-shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.5);
}

body {
    overflow-y: auto !important;
    scroll-snap-type: none !important;
}

html, body {
    background: linear-gradient(135deg, #4d0000 0%, #1a0000 50%, #000000 100%);
}

.historia {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 150vh;
    margin-top: 0;
    padding: 100px 60px 80px 80px;
    background: linear-gradient(135deg, #4d0000 0%, #1a0000 50%, #000000 100%);
    position: relative;
    text-rendering: optimizeLegibility;
}

.historia::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(900px 500px at 10% 12%, rgba(255, 0, 0, 0.14), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.historia > * {
    position: relative;
    z-index: 1;
}

.historia p {
    margin-bottom: 20px;
}

.historia p:last-child {
    margin-bottom: 0;
}

.historia-text {
    max-width: 600px;
    padding-right: 60px;
    margin-top: -50px;
}

.historia-subtitle {
    font-size: clamp(30px, 4.2vw, 48px);
    font-weight: 900;
    text-transform: lowercase;
    margin-bottom: 20px;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #ff0000 0%, #cc0000 25%, #000000 50%, #cc0000 75%, #ff0000 100%);
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientMove 3s ease infinite;
    line-height: 1.1;
    text-shadow: 0 0 16px rgba(230, 0, 0, 0.28);
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.historia-title {
    font-size: clamp(16px, 1.9vw, 21px);
    color: #d9d9d9;
    font-weight: 600;
    margin-bottom: 30px;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.historia-paragraph {
    font-size: clamp(13px, 1.4vw, 16px);
    color: var(--historia-text);
    line-height: 1.8;
    margin-bottom: 20px;
}

.historia-subtitle,
.historia-title,
.historia-paragraph,
.photos-paragraph,
.section-paragraph {
    transition: transform 0.22s ease;
    transform-origin: left center;
}

.historia-subtitle:hover,
.historia-title:hover,
.historia-paragraph:hover,
.photos-paragraph:hover,
.section-paragraph:hover {
    transform: scale(1.03);
}

/* CONTEÚDO INFERIOR COM FOTOS E TEXTO */
.historia-content-bottom {
    display: flex;
    width: 100%;
    margin-top: clamp(190px, 20vw, 280px);
    gap: 40px;
    align-items: flex-start;
}

.photos-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex: 1;
    max-width: 800px;
}

.photo-item {
    position: relative;
    width: 50%;
    height: 500px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--historia-shadow-soft);
    border: 1px solid var(--historia-surface-border);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.photo-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--historia-shadow-hover);
    border-color: rgba(230, 0, 0, 0.35);
}

.photos-text {
    flex: 1;
    max-width: 600px;
}

.photos-title {
    font-size: clamp(22px, 2.7vw, 32px);
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.2;
}

.photos-paragraph {
    font-size: clamp(13px, 1.4vw, 16px);
    color: var(--historia-text);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* GRID DE 5 FOTOS */
.photos-grid {
    width: 100%;
    margin-top: 150px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.grid-row {
    display: flex;
    gap: 50px;
    justify-content: center;
}

.grid-photo {
    position: relative;
    width: 300px;
    height: 350px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--historia-shadow-soft);
    border: 1px solid var(--historia-surface-border);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.grid-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.22) 100%);
    pointer-events: none;
}

.grid-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-photo:hover img {
    transform: scale(1.05);
}

.grid-photo:hover {
    transform: translateY(-4px);
    box-shadow: var(--historia-shadow-hover);
    border-color: rgba(230, 0, 0, 0.35);
}

.photos-grid-large .grid-photo {
    width: 430px;
    height: 520px;
}

/* SEÇÃO COM TEXTO E FOTO NA DIREITA */
.text-photo-section {
    display: flex;
    width: 100%;
    margin-top: 150px;
    gap: 60px;
    align-items: center;
}

.text-content {
    flex: 1;
    max-width: 700px;
}

.section-paragraph {
    font-size: clamp(13px, 1.4vw, 16px);
    color: var(--historia-text);
    line-height: 1.8;
    text-align: justify;
}

.side-photo {
    position: relative;
    width: 500px;
    height: 600px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--historia-shadow-soft);
    border: 1px solid var(--historia-surface-border);
    flex-shrink: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.side-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.24) 100%);
    pointer-events: none;
}

.side-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.side-photo:hover img {
    transform: scale(1.05);
}

.side-photo:hover {
    transform: translateY(-4px);
    box-shadow: var(--historia-shadow-hover);
    border-color: rgba(230, 0, 0, 0.35);
}

.zoomable-image {
    cursor: zoom-in;
}

.zoomable-video {
    cursor: zoom-in;
}

.zoomable-image:focus-visible {
    outline: 2px solid rgba(230, 0, 0, 0.9);
    outline-offset: 3px;
}

.zoomable-video:focus-visible {
    outline: 2px solid rgba(230, 0, 0, 0.9);
    outline-offset: 3px;
}

.image-zoom-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 3000;
    padding: 24px;
}

.image-zoom-overlay.active {
    opacity: 1;
    visibility: visible;
}

.image-zoom-content {
    max-width: min(1200px, 88vw);
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.55);
}

.video-zoom-content {
    display: none;
    max-width: min(1200px, 88vw);
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 14px 45px rgba(0, 0, 0, 0.55);
    background: #000;
}

.image-zoom-content,
.video-zoom-content {
    display: none;
}

.image-zoom-content.active,
.video-zoom-content.active {
    display: block;
}

body.zoom-open {
    overflow: hidden !important;
}

/* LADO ESQUERDO */
.left {
    display: none;
}

.left-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
    background-image: url('../sobre-foto/historia-foto.jpg');
}

.left-image.active {
    opacity: 1;
}

.left-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    opacity: 1;
    transition: opacity 0.5s ease;
    z-index: 1;
    pointer-events: none;
}

.historia-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.historia-content h1 {
    font-size: clamp(36px, 8vw, 64px);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 2px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 1;
}
/* VIDEO SECTION */
.video-section {
    position: absolute;
    top: 100px;
    right: 40px;
    width: 800px;
    height: 500px;
    overflow: hidden;
    background: #000;
    z-index: 10;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.video-volume-btn {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12;
    backdrop-filter: blur(4px);
    transition: all 0.25s ease;
}

.video-audio-controls {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 12;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
}

.video-volume-range {
    width: 120px;
    accent-color: #e60000;
    cursor: pointer;
}

.video-volume-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(230, 0, 0, 0.9), rgba(255, 85, 85, 0.85));
}

.video-volume-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(230, 0, 0, 0.85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.video-volume-range::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(230, 0, 0, 0.9), rgba(255, 85, 85, 0.85));
}

.video-volume-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(230, 0, 0, 0.85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.video-volume-range:focus-visible {
    outline: 2px solid rgba(230, 0, 0, 0.9);
    outline-offset: 2px;
}

.video-volume-btn:hover {
    background: rgba(230, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.45);
    transform: scale(1.06);
}

.video-volume-btn:focus-visible {
    outline: 2px solid rgba(230, 0, 0, 0.9);
    outline-offset: 2px;
}

.video-section video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    image-rendering: auto;
    image-rendering: high-quality;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    will-change: transform;
}
/* LADO DIREITO */
.right {
    display: none;
}

.content {
    max-width: 550px;
    width: 100%;
}

.content p {
    font-size: clamp(14px, 2vw, 20px);
    line-height: 1.8;
    margin-bottom: clamp(20px, 3vw, 40px);
    color: #e0e0e0;
}

/* DOTS LATERAIS */
.dots {
    display: none;
}

/* Footer */
.footer {
    display: block;
    margin-top: 80px;
}

.dots span {
    width: 8px;
    height: 8px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
}

.dots span:hover {
    border-color: #ff0000;
    background: rgba(255, 0, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.dots span.active {
    background: #ff0000;
    border-color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
}

/* RESPONSIVIDADE */

/* Tablets em paisagem e desktops pequenos */
@media (max-width: 1024px) {
    .left, .right {
        padding: clamp(30px, 5vw, 60px);
    }
    
    .content p {
        font-size: clamp(14px, 1.8vw, 18px);
    }
}

/* Tablets em retrato */
@media (max-width: 768px) {
    .historia {
        flex-direction: column;
        height: auto;
        margin-top: 70px;
    }
    
    .left {
        width: 100%;
        height: 50vh;
        min-height: 350px;
        padding: 40px 30px;
        justify-content: center;
    }
    
    .left-image.active {
        opacity: 0.4;
    }
    
    .historia-content {
        width: 100%;
        text-align: center;
    }
    
    .historia-content h1 {
        font-size: 28px;
    }
    
    .right {
        width: 100%;
        height: auto;
        min-height: 50vh;
        padding: 40px 30px;
    }
    
    .dots {
        right: 20px;
        gap: 6px;
    }
    
    .dots span {
        width: 5px;
        height: 5px;
    }
}

/* Celulares */
@media (max-width: 480px) {
    .historia {
        margin-top: 60px;
    }
    
    .left {
        height: 45vh;
        min-height: 300px;
        padding: 30px 20px;
    }
    
    .historia-content h1 {
        font-size: 20px;
    }
    
    .right {
        padding: 30px 20px;
        min-height: 55vh;
    }
    
    .content p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 15px;
    }
    
    .dots {
        right: 15px;
        gap: 5px;
    }
    
    .dots span {
        width: 4px;
        height: 4px;
    }
}

/* Celulares extra pequenos */
@media (max-width: 390px) {
    .historia {
        margin-top: 60px;
    }
    
    .left {
        height: 42vh;
        min-height: 280px;
        padding: 25px 18px;
    }
    
    .historia-content h1 {
        font-size: 19px;
    }
    
    .right {
        padding: 25px 18px;
        min-height: 52vh;
    }
    
    .content p {
        font-size: 13.5px;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    
    .dots {
        right: 12px;
        gap: 4px;
    }
    
    .dots span {
        width: 4px;
        height: 4px;
    }
}

/* Celulares pequenos */
@media (max-width: 360px) {
    .left {
        height: 40vh;
        min-height: 250px;
        padding: 20px 15px;
    }
    
    .historia-content h1 {
        font-size: 18px;
    }
    
    .right {
        padding: 25px 15px;
    }
    
    .content p {
        font-size: 15px;
        line-height: 1.65;
    }
}

.historia-subtitle:focus-visible,
.historia-title:focus-visible,
.historia-paragraph:focus-visible,
.photos-paragraph:focus-visible,
.section-paragraph:focus-visible,
.video-volume-btn:focus-visible,
.video-volume-range:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 320px) {
    .historia {
        padding: 88px 10px 30px 10px;
    }

    .historia-subtitle {
        font-size: 22px;
        letter-spacing: 1px;
    }

    .historia-title {
        font-size: 15px;
    }

    .historia-paragraph,
    .photos-paragraph,
    .section-paragraph {
        font-size: 14px;
        line-height: 1.6;
    }

    .photo-item,
    .grid-photo,
    .side-photo {
        border-radius: 12px;
    }
}

/* Mobile otimizado para a página História */
@media (max-width: 768px) {
    .video-section {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        margin: 18px 0 26px;
        border-radius: 12px;
    }

    .video-section video {
        position: absolute;
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .video-audio-controls {
        right: 8px;
        bottom: 8px;
        gap: 8px;
        padding: 6px 8px;
    }

    .video-volume-btn {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .video-volume-range {
        width: 92px;
    }

    .historia {
        min-height: auto;
        padding: 88px 18px 34px;
    }

    .historia-text {
        max-width: 100%;
        padding-right: 0;
        margin-top: 0;
    }

    .historia-subtitle {
        font-size: clamp(24px, 7.5vw, 34px);
        letter-spacing: 1px;
    }

    .historia-title {
        font-size: 16px;
        margin-bottom: 18px;
    }

    .historia-paragraph,
    .photos-paragraph,
    .section-paragraph {
        font-size: 14px;
        line-height: 1.65;
    }

    .section-paragraph {
        text-align: left;
    }

    .historia-content-bottom,
    .text-photo-section {
        margin-top: 34px;
        gap: 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .photos-container,
    .text-content,
    .photos-text {
        max-width: 100%;
        width: 100%;
    }

    .photos-container {
        gap: 12px;
    }

    .photo-item {
        width: 100%;
        height: 250px;
        border-radius: 14px;
    }

    .photos-grid {
        margin-top: 34px;
        gap: 16px;
    }

    .grid-row {
        flex-direction: column;
        gap: 12px;
    }

    .grid-photo,
    .photos-grid-large .grid-photo {
        width: 100%;
        height: 220px;
        border-radius: 14px;
    }

    .side-photo {
        width: 100%;
        height: 280px;
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    .historia {
        padding: 84px 14px 28px;
    }

    .video-section {
        margin: 14px 0 20px;
        border-radius: 10px;
    }

    .video-audio-controls {
        right: 6px;
        bottom: 6px;
    }

    .video-volume-range {
        width: 76px;
    }

    .historia-subtitle {
        font-size: clamp(22px, 8.2vw, 28px);
    }

    .historia-title {
        font-size: 15px;
    }

    .historia-paragraph,
    .photos-paragraph,
    .section-paragraph {
        font-size: 13.5px;
        line-height: 1.58;
    }

    .photo-item,
    .grid-photo,
    .photos-grid-large .grid-photo {
        height: 205px;
    }

    .side-photo {
        height: 245px;
    }
}

