/* ============================================
   RESET E CONFIGURAÇÕES GERAIS
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-red: #D52B1E;
    --color-white: #FFFFFF;
    --color-black: #1E1E1E;
    --color-gray: #f5f5f5;
    --color-dark-gray: #333333;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--color-black);
    background-color: var(--color-white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 50px;
    color: var(--color-black);
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--color-red);
    border-radius: 2px;
}

/* ============================================
   HEADER / MENU FIXO
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-medium);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-red);
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--color-black);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-red);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--color-red);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--color-red);
}

.nav-link.active::after {
    width: 100%;
}

.btn-nav {
    background: var(--color-red);
    color: var(--color-white);
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.btn-nav:hover {
    background: #b02318;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-black);
    transition: var(--transition);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(213, 43, 30, 0.9), rgba(30, 30, 30, 0.7));
    z-index: 1;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-white);
    padding: 40px 20px;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 20px;
    color: #ffd700;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

.btn-hero {
    display: inline-block;
    background: var(--color-white);
    color: var(--color-red);
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
    background: #ffd700;
    color: var(--color-black);
}

/* ============================================
   SEÇÃO: INTRODUÇÃO
   ============================================ */

.intro {
    background: var(--color-gray);
}

.intro-content {
    max-width: 800px;
    margin: 0 auto;
}

.intro-text {
    font-size: 1.2rem;
    line-height: 1.8;
    text-align: center;
    color: var(--color-dark-gray);
}

.intro-text strong {
    color: var(--color-red);
    font-weight: 600;
}

/* ============================================
   SEÇÃO: LINHA DO TEMPO
   ============================================ */

.timeline {
    background: var(--color-white);
}

.timeline-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 40px 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--color-red);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-year {
    width: 120px;
    height: 120px;
    background: var(--color-red);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    box-shadow: var(--shadow-medium);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.timeline-content {
    width: calc(50% - 80px);
    background: var(--color-gray);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.timeline-content h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    color: var(--color-red);
    margin-bottom: 10px;
}

.timeline-content p {
    color: var(--color-dark-gray);
    line-height: 1.7;
}

/* ============================================
   SEÇÃO: ESTATÍSTICAS
   ============================================ */

.stats {
    background: var(--color-white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-card {
    background: linear-gradient(135deg, var(--color-red), #b02318);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    color: var(--color-white);
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--color-white);
    line-height: 1;
}

.stat-label {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-white);
}

.stat-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-top: 10px;
}

/* ============================================
   SEÇÃO: CONQUISTAS
   ============================================ */

.achievements {
    background: var(--color-gray);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.achievement-card {
    background: var(--color-white);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.achievement-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.achievement-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.achievement-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    color: var(--color-red);
    margin-bottom: 15px;
}

.achievement-card p {
    color: var(--color-dark-gray);
    line-height: 1.7;
}

/* ============================================
   SEÇÃO: GALERIA
   ============================================ */

.gallery {
    background: var(--color-white);
    min-height: 400px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 300px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-light);
    cursor: pointer;
    transition: var(--transition);
    opacity: 1 !important;
    visibility: visible !important;
    display: block;
}

.gallery-item.fade-in {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-heavy);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    display: block;
    opacity: 1;
    visibility: visible;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Primeira imagem alinhada ao topo */
.gallery-first img {
    object-position: top;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--color-white);
    padding: 20px;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay span {
    font-weight: 600;
    font-size: 1.1rem;
}

/* ============================================
   SEÇÃO: LEGADO
   ============================================ */

.legacy {
    background: linear-gradient(135deg, var(--color-red), #b02318);
    color: var(--color-white);
}

.legacy-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.legacy .section-title {
    color: var(--color-white);
}

.legacy .section-title::after {
    background: var(--color-white);
}

.legacy-text {
    font-size: 1.2rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.95);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--color-black);
    color: var(--color-white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--color-red);
}

.footer-section p {
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--color-red);
    text-decoration: underline;
}

.footer-section a {
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--color-red) !important;
}

/* ============================================
   LIGHTBOX MODAL
   ============================================ */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: var(--color-white);
    margin-top: 20px;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 500;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lightbox-close {
    top: 30px;
    right: 30px;
}

.lightbox-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* ============================================
   BOTÃO VOLTAR AO TOPO
   ============================================ */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-red);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-medium);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #b02318;
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

/* ============================================
   ANIMAÇÕES
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Se o JavaScript não carregar, os elementos permanecem visíveis */
/* Se o JavaScript carregar, ele adiciona a classe 'pre-animate' para esconder temporariamente */
.fade-in.pre-animate {
    opacity: 0;
    transform: translateY(30px);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 968px) {
    .nav-list {
        position: fixed;
        top: 80px;
        right: -100%;
        flex-direction: column;
        background: var(--color-white);
        width: 250px;
        height: calc(100vh - 80px);
        padding: 30px;
        box-shadow: var(--shadow-heavy);
        transition: var(--transition);
        gap: 20px;
        align-items: flex-start;
    }

    .nav-list.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

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

    .timeline-container::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: row !important;
        padding-left: 80px;
    }

    .timeline-year {
        position: absolute;
        left: 0;
        width: 60px;
        height: 60px;
        font-size: 0.7rem;
    }

    .timeline-content {
        width: 100%;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

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

    .intro-text,
    .legacy-text {
        font-size: 1rem;
    }

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

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

    .stat-number {
        font-size: 3rem;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
    }

    .btn-nav {
        display: none;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        top: 20px;
        right: 20px;
    }
}

