/* =========================================
   Seção Nossa História
   ========================================= */

/* Variáveis locais para consistência */
:root {
    --color-dark-hist: #0c0407; 
    --color-gray-dark-hist: #4c4c4c; 
    --font-title-hist: 'Inter', sans-serif;
    --font-text-hist: 'Inter', sans-serif;
}

#nossa-historia {
    background-color: #ffffff;
    padding: 80px 0;
}

/* Títulos */
.aboutt-sub-title {
    font-family: var(--font-title-hist);
    color: var(--color-dark-hist);
    font-size: 25px;
    line-height: 110%;
    margin-bottom: 10px;
}

.about-title-wrap {
    text-align: left;
    margin-bottom: 60px;
}

.about-title {
    font-family: var(--font-title-hist);
    font-size: 48px;
    line-height: 110%;
    font-weight: 600;
    margin-bottom: 20px;
    color: rgba(12, 4, 7, 0.4);
}

.about-title-blacck {
    color: #9e9b9c;
    font-weight: 800;
}

.history-subtitle {
    font-family: var(--font-title-hist);
    font-size: 1.5rem;
    color: var(--color-dark-hist);
    font-weight: 500;
    margin-top: -42px;
    margin-bottom: 20px;
}

/* Texto estilo Jornal */
.history-text {
    font-family: 'Inter', sans-serif;
    color: var(--color-gray-dark-hist);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    text-align: justify; /* Justificado como jornal */
}
    .about-title {
        font-size: 26px;
        line-height: 120%;
    }
.history-text:last-child {
    margin-bottom: 0;
}

/* Botão Leia Mais */
.botao-leiamais-efeito {
    background-color: #000000;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
}

.botao-leiamais-efeito:hover {
    background-color: #808080;
}

/* Layout Grid */
.history-layout {
    display: flex;
    align-items: flex-start;
    gap: 60px;
}

.history-content {
    flex: 1.2;
    min-width: 300px;
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Galeria de Imagens */
.history-gallery {
    flex: 1;
    min-width: 300px;
    aspect-ratio: 4 / 3.5;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 15px;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transition-delay: 200ms;
}

/* Animação de Entrada */
.history-layout.is-visible .history-content,
.history-layout.is-visible .history-gallery {
    opacity: 1;
    transform: translateX(0);
}

.history-image-wrapper {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 4px solid white;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 100%;
    height: 100%;
}

.history-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Posicionamento das Imagens */
.history-image-wrapper.img-1 { grid-column: 1 / 5; grid-row: 1 / 5; z-index: 1; }
.history-image-wrapper.img-2 { grid-column: 3 / 6; grid-row: 4 / 6; z-index: 3; }
.history-image-wrapper.img-3 { grid-column: 1 / 3; grid-row: 4 / 6; z-index: 2; }

/* Hover Effects */
.history-gallery:hover .img-1 { transform: translate(-10px, -10px) rotate(-1deg); }
.history-gallery:hover .img-2 { transform: translate(10px, 10px) rotate(2deg); }
.history-gallery:hover .img-3 { transform: translate(-10px, 10px) rotate(1deg); }

/* Responsivo */
@media (max-width: 991px) {
    .history-layout { flex-direction: column; gap: 40px; }
    .history-gallery { display: flex; flex-direction: column; width: 100%; max-width: 500px; margin: 0 auto; gap: 20px; aspect-ratio: auto; }
    
    .history-image-wrapper { 
        height: 280px; 
        opacity: 0; 
        transform: translateY(30px); 
        transition: opacity 0.6s ease-out, transform 0.6s ease-out; 
    }
    
    .history-layout.is-visible .history-image-wrapper { opacity: 1; transform: translateY(0); }
    .history-layout.is-visible .history-image-wrapper:nth-of-type(1) { transition-delay: 200ms; }
    .history-layout.is-visible .history-image-wrapper:nth-of-type(2) { transition-delay: 350ms; }
    .history-layout.is-visible .history-image-wrapper:nth-of-type(3) { transition-delay: 500ms; }
}

@media (max-width: 767px) {
    .about-title { font-size: 30px; }
}