/* CORREÇÃO DO SCROLL LATERAL - SOLUÇÃO DEFINITIVA */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

/* Garante que todos os elementos respeitem os limites da tela */
.container, .section-container, .nav-container, .hero, .projects-grid, .upcoming-grid {
    max-width: 100%;
    overflow-x: hidden;
}

/* Remove qualquer margem ou padding que possa causar scroll horizontal */
* {
    box-sizing: border-box;
}


/* Estilos Gerais */
:root {
    --primary-color: #c9a66b;
    --secondary-color: #ffffff;
    --dark-bg: #000000;
    --darker-bg: #0a0a0a;
    --light-text: #f5f5f5;
    --dark-text: #333;
    --gray-text: #aaa;
    --gold-light: #d8b87c;
    --gold-dark: #b5955d;
    --section-padding: 80px 0;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Playfair Display', serif; /* Texto principal */
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.dark-theme {
    background-color: var(--dark-bg);
    color: var(--light-text);
}

a {
    text-decoration: none;
    color: var(--light-text);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.container, .section-container, .nav-container {
    overflow-x: hidden;
}

.section {
    padding: 100px 0;
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    font-family: 'Cinzel', serif;
    color: white;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    margin-top: 20px;
}

.cta-button:hover {
    background: var(--gold-light);
    color: #000000;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(201, 166, 107, 0.3);
}

/* Menu Principal Simplificado */
.main-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    font-size: 3rem; /* Reduzi de 3rem para 2rem */
    font-weight: 600;
    color: white;
    font-family: 'Alumni Sans Pinstripe', sans-serif;
    display: flex; /* Organiza logo e texto em linha */
    align-items: center; /* Centraliza verticalmente */
    gap: 10px; /* Espaço entre a logo e o texto */
}

.logo-img {
    height: 1em; /* Altura igual à do texto (2rem) */
    width: auto; /* Largura proporcional */
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
}

.nav-menu li {
    margin-left: 30px;
    position: relative;
}

.nav-menu a {
    color: white;
    font-weight: 500;
    font-size: 2rem;
    font-family: 'Alumni Sans Pinstripe', sans-serif;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* Estilo do Hamburguer */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    z-index: 1000;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

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

.hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.2rem;
    text-align: center;
    animation: fadeInOut 2s infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Seção de Projetos */
.projects-section {
    background-color: var(--darker-bg);
}

.featured-project {
    margin-bottom: 60px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.project-description {
    margin: 20px 0;
    font-size: 1.1rem;
    line-height: 1.7;
    font-family: 'Playfair Display', serif;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.project-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    color: var(--primary-color);      /* Dourado */
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(201, 166, 107, 0.1); /* Sombra dourada suave */
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
    transform: scale(1.1) rotate(1deg); /* Leve rotação e zoom */
    filter: brightness(1.1) contrast(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    transition: transform 0.5s ease, filter 0.5s ease;
    color: var(--primary-color);      /* Dourado */
}

.project-card:hover .project-overlay {
    opacity: 1;
    transform: scale(1.1) rotate(1deg); /* Leve rotação e zoom */
    filter: brightness(1.1) contrast(1.1);
}

.view-project {
    padding: 10px 20px;
    background: var(none);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}

.view-project:hover{
    color: var(--primary-color);      /* Dourado */
}

.view-all {
    display: inline-block;
    color: var(--gold-light);
    margin-top: 30px;
    font-family: 'Cinzel', serif;
    font-weight: 600;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

/* Seção de Próximos Projetos */
.upcoming-section {
    background: #0a0a0a;
}

.upcoming-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.upcoming-card {
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}


.upcoming-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.upcoming-image {
    height: 200px;
    overflow: hidden;
}

.upcoming-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.upcoming-image a {
    display: block;
    height: 100%;
    transition: all 0.3s ease;
}

.upcoming-image a:hover {
    opacity: 0.9;
}

.upcoming-card:hover .upcoming-image a {
    transform: scale(1.02);
}

.upcoming-description {
    font-family: 'Playfair Display', serif;
    line-height: 1.7;
}

.upcoming-description a {
    font-weight: 600;
    transition: all 0.3s ease;
}

.upcoming-description a:hover {
    color: #ffffff !important;
}

.upcoming-card:hover .upcoming-image img {
    transform: scale(1.05);
}

.upcoming-content {
    padding: 25px;
}

.upcoming-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #fff;
}

.upcoming-date {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 15px;
}

.upcoming-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Seção Sobre Nós */
.about-section {
    background-color: var(--dark-bg);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-family: 'Playfair Display', serif;
    line-height: 1.7;
}

.about-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Seção de Contato */
.contact-section {
    background-color: var(--darker-bg);
}

.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-info p {
    font-family: 'Playfair Display', serif;
    line-height: 1.7;
}

.contact-details {
    margin: 30px 0;
}

.contact-details p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-details i {
    margin-right: 10px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-3px);
}

.contact-form {
    flex: 1;
    gap: 1rem;
    padding: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light-text);
    font-family: inherit;
}

.contact-form textarea {
    height: 150px;
    resize: none;
}

.contact-form button {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
}

.contact-form button:hover {
    background: var(--gold-light);
}

/* Rodapé */
footer {
  background: #000000;
  color: #fff;
  text-align: center;
  padding: 1rem;
  margin-top: auto;
}

/* Responsividade */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .about-content,
    .contact-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .about-image,
    .about-text,
    .contact-info,
    .contact-form {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 0.25rem;
        right: -100%;
        width: 50%;
        line-height: 0.25rem;
        padding: 1rem;
        flex-direction: column;
        align-items: end;
        justify-content: center;
        transition: var(--transition);
        font-size: 1.5rem;
    }
    
    .nav-menu.active {
        right: 30px;
        line-height: 2.5rem;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .upcoming-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .cta-button {
        padding: 10px 20px;
    }
    
    .video-container {
        margin: 20px 0;
    }
    
    .header-logo img {
        height: 40px;
    }
    
    .nav-menu {
        width: 80%;
        height: 50vh;
    }
    
    .text-3d {
        text-shadow: 
            1px 1px 0px rgba(255, 77, 77, 0.3),
            2px 2px 0px rgba(255, 77, 77, 0.2);
    }
}

/* Garante que containers não vazem */
.container, .section-container {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

/* Correção para imagens */
img {
    max-width: 100%;
    height: auto;
}


/* Estilos específicos para páginas de projeto */

.project-hero {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.project-hero-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 0 20px;
}

.project-hero-content h1 {
    font-size: 5rem;
    margin-bottom: 1rem;
    font-family: 'Alumni Sans Pinstripe', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.project-subtitle {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 300;
}

.project-description-section {
    padding: 80px 0;
    background-color: var(--darker-bg);
}

.project-description-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.project-video-section {
    padding: 80px 0;
    background-color: var(--dark-bg);
}

.project-specs-section {
    padding: 80px 0;
    background-color: var(--darker-bg);
}

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

.spec-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 8px;
    transition: var(--transition);
}

.spec-item:hover {
    background: rgba(201, 166, 107, 0.05);       /* Fundo dourado muito suave */
    border: 1px solid rgba(201, 166, 107, 0.3);  /* Borda dourada sutil */
}

.spec-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.project-gallery-section {
    padding: 80px 0;
    background-color: var(--dark-bg);
}

.gallery-carousel {
    width: 100%;
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-slide {
    display: flex;
    width: 100%;
    height: 500px; /* Altura fixa para todas as imagens */
    transition: transform 0.5s ease;
}

.carousel-slide img {
    min-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.5s ease;
}


.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 10px;
}

.carousel-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dots .dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* Responsividade */
@media (max-width: 768px) {
    .project-hero-content h1 {
        font-size: 3rem;
    }
    
    .project-subtitle {
        font-size: 1.2rem;
    }
    
    .specs-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .carousel-slide img {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .project-hero-content h1 {
        font-size: 2.2rem;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== */
/* POP-UP LIBERTADORES - SEM SCROLL LATERAL */
/* ==================== */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw; /* Usa viewport width para garantir que não ultrapasse */
    height: 100vh; /* Usa viewport height */
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    padding: 15px;
    box-sizing: border-box;
    overflow: hidden; /* Garante que nada dentro do overlay cause scroll */
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.libertadores-popup {
    width: 100%;
    max-width: min(800px, 90vw); /* Não passa de 800px nem de 90% da tela */
    max-height: min(600px, 80vh); /* Limites de altura */
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border: 2px solid #c9a66b;
    border-radius: 12px;
    overflow: auto; /* Scroll apenas interno */
    position: relative;
    box-shadow: 0 10px 40px rgba(201, 166, 107, 0.2);
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.popup-overlay.active .libertadores-popup {
    transform: scale(1);
}

/* Resto do CSS do pop-up mantido igual */
.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(201, 166, 107, 0.2);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: rgba(201, 166, 107, 0.4);
    transform: rotate(90deg);
}

.popup-close i {
    color: #c9a66b;
    font-size: 18px;
}

.popup-content {
    display: flex;
    flex-direction: column;
}

.popup-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
    max-width: 100%; /* Garante que não ultrapasse */
}

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

.popup-text {
    padding: 20px;
    text-align: center;
    max-width: 100%; /* Garante que não ultrapasse */
}

.popup-title {
    font-family: 'Cinzel', serif;
    color: #c9a66b;
    font-size: clamp(1.5rem, 5vw, 2.2rem); /* Tamanho responsivo */
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
    max-width: 100%; /* Garante que não ultrapasse */
    overflow-wrap: break-word; /* Quebra palavras longas */
}

.popup-subtitle {
    font-family: 'Playfair Display', serif;
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-style: italic;
    line-height: 1.3;
}

.popup-description {
    font-family: 'Playfair Display', serif;
    color: #e0e0e0;
    line-height: 1.5;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.popup-cta {
    display: inline-block;
    padding: 12px 25px;
    background: #c9a66b;
    color: #000;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid #c9a66b;
    font-size: 0.9rem;
}

.popup-cta:hover {
    background: transparent;
    color: #c9a66b;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(201, 166, 107, 0.3);
}

.popup-footer {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    text-align: center;
    font-family: 'Playfair Display', serif;
    color: #aaa;
    font-size: 0.8rem;
}

/* ÚNICA media query realmente necessária */
@media (min-width: 768px) {
    .popup-content {
        flex-direction: row;
    }
    
    .popup-image {
        height: 300px;
        width: 45%;
    }
    
    .popup-text {
        width: 55%;
        text-align: left;
        padding: 30px;
    }
    
    .popup-title {
        font-size: 2.2rem;
    }
}

/* Apenas ajustes de texto para mobile muito pequeno */
@media (max-width: 480px) {
    .popup-title {
        font-size: 1.5rem;
    }
    
    .popup-text {
        padding: 15px;
    }
}