/* ===== RESET E CONFIGURAÇÕES GLOBAIS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-color: #ffffff;
    --text-color: #333;
    --bg-color: #ffffff;
    --border-radius: 10px;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== UTILITÁRIOS RESPONSIVOS ===== */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== NAVEGAÇÃO RESPONSIVA ===== */
.navbar {
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: bold;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    white-space: nowrap;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 5px;
    transition: var(--transition);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

#darkModeToggle {
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: var(--transition);
    padding: 0.375rem 0.75rem;
}

#darkModeToggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}

/* ===== HERO SECTION RESPONSIVA (HÍBRIDO) ===== */
.hero-section {
    background: url('imagens/Dji 0042 Gif.gif') center center/cover no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    padding: 0 15px;
    overflow: hidden;
}

/* DESKTOP: Posição responsiva à esquerda */
@media (min-width: 769px) {
    /* Container da caixa de texto */
    .hero-section .col-lg-6 {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 100vh;
        height: 100%;
        padding: 0 !important;
        margin: 0 !important;
        max-width: min(800px, 60vw) !important;
        width: min(800px, 60vw) !important;
        flex: none !important;
    }

    /* Fundo escuro suave que vai até o fundo do GIF */
    .hero-section::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(800px, 60vw);
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(1px);
        z-index: 1;
        pointer-events: none;
    }

    /* Container do texto dentro da black box */
    .hero-text-content {
        position: relative;
        max-width: min(550px, 45vw);
        width: min(550px, 45vw);
        padding: clamp(20px, 3vw, 40px);
        margin-left: clamp(30px, 4vw, 50px);
        padding-left: clamp(30px, 4vw, 50px);
        padding-right: clamp(20px, 3vw, 30px);
        background: transparent;
        text-align: left;
        z-index: 2;
        transform: translateX(0);
        overflow: hidden;
        word-wrap: break-word;
    }

    /* Título responsivo */
    .hero-text-content h1 {
        font-size: clamp(1.8rem, 3vw, 2.5rem);
        font-weight: bold;
        color: white;
        line-height: 1.1;
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
        margin-bottom: clamp(20px, 3vw, 30px);
        white-space: normal;
        word-wrap: break-word;
    }

    /* Parágrafos responsivos */
    .hero-text-content p {
        font-size: clamp(0.9rem, 1.5vw, 1.1rem);
        color: white;
        line-height: 1.4;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
        margin-bottom: clamp(15px, 2.5vw, 25px);
        word-wrap: break-word;
    }
}

/* Ajustes para telas muito grandes */
@media (min-width: 1400px) {
    .hero-section .col-lg-6 {
        max-width: min(800px, 60vw) !important;
        width: min(800px, 60vw) !important;
    }
    
    .hero-section::after {
        width: min(800px, 60vw);
    }
    
    .hero-text-content {
        margin-left: clamp(30px, 4vw, 50px);
        padding-left: clamp(30px, 4vw, 50px);
        padding-right: clamp(20px, 3vw, 30px);
        max-width: min(550px, 45vw);
        width: min(550px, 45vw);
        transform: translateX(0);
    }
    
    .hero-text-content h1 {
        font-size: clamp(1.8rem, 3vw, 2.5rem);
    }
    
    .hero-text-content p {
        font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    }
}

/* Ajustes para resoluções ultra altas (4K, 8K, etc.) */
@media (min-width: 1600px) {
    .hero-section .col-lg-6 {
        max-width: min(800px, 60vw) !important;
        width: min(800px, 60vw) !important;
    }
    
    .hero-section::after {
        width: min(800px, 60vw);
    }
    
    .hero-text-content {
        margin-left: clamp(30px, 4vw, 50px) !important;
        padding-left: clamp(30px, 4vw, 50px);
        padding-right: clamp(20px, 3vw, 30px);
        max-width: min(550px, 45vw) !important;
        width: min(550px, 45vw) !important;
        min-width: min(550px, 45vw) !important;
        transform: translateX(0) !important;
    }
    
    .hero-text-content h1 {
        font-size: clamp(1.8rem, 3vw, 2.5rem) !important;
    }
    
    .hero-text-content p {
        font-size: clamp(0.9rem, 1.5vw, 1.1rem) !important;
    }
}

/* Ajustes para resoluções extremamente altas (8K+) */
@media (min-width: 2560px) {
    .hero-section .col-lg-6 {
        max-width: min(800px, 60vw) !important;
        width: min(800px, 60vw) !important;
    }
    
    .hero-section::after {
        width: min(800px, 60vw) !important;
    }
    
    .hero-text-content {
        margin-left: clamp(30px, 4vw, 50px) !important;
        padding-left: clamp(30px, 4vw, 50px) !important;
        padding-right: clamp(20px, 3vw, 30px) !important;
        max-width: min(550px, 45vw) !important;
        width: min(550px, 45vw) !important;
        min-width: min(550px, 45vw) !important;
        transform: translateX(0) !important;
    }
    
    .hero-text-content h1 {
        font-size: clamp(1.8rem, 3vw, 2.5rem) !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .hero-text-content p {
        font-size: clamp(0.9rem, 1.5vw, 1.1rem) !important;
        line-height: 1.4 !important;
        word-wrap: break-word !important;
    }
}

/* Ajustes para telas médias */
@media (min-width: 769px) and (max-width: 1199px) {
    .hero-section .col-lg-6 {
        max-width: min(700px, 65vw) !important;
        width: min(700px, 65vw) !important;
    }
    
    .hero-section::after {
        width: min(700px, 65vw);
    }
    
    .hero-text-content {
        margin-left: clamp(20px, 3vw, 30px);
        padding-left: clamp(25px, 3.5vw, 40px);
        padding-right: clamp(20px, 3vw, 30px);
        max-width: min(500px, 50vw);
        width: min(500px, 50vw);
        transform: translateX(0);
    }
}

/* MOBILE: Versão responsiva centralizada */
@media (max-width: 768px) {
    /* Remover o fundo escuro lateral em mobile */
    .hero-section::after {
        display: none;
    }

    .hero-section .col-lg-6 {
        padding: clamp(20px, 5vw, 40px);
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .hero-text-content {
        background: rgba(0, 0, 0, 0.37) !important;
        padding: clamp(25px, 6vw, 45px);
        border-radius: var(--border-radius);
        backdrop-filter: blur(1px);
        -webkit-backdrop-filter: blur(1px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        max-width: 95%;
        width: 100%;
        position: relative;
        margin: 0 auto;
        text-align: center;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }

    .hero-text-content h1 {
        font-size: clamp(1.4rem, 4.5vw, 2.2rem);
        font-weight: bold;
        color: white;
        margin-bottom: clamp(15px, 4vw, 25px);
        line-height: 1.2;
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
        white-space: nowrap;
        text-align: center;
    }

    .hero-text-content p {
        font-size: clamp(0.81rem, 2.98vw, 1.02rem);
        color: white;
        margin-bottom: clamp(15px, 3vw, 20px);
        line-height: 1.4;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
        text-align: center;
    }
}

/* Ajustes para tablets em modo retrato */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
    .hero-section .col-lg-6 {
        max-width: min(600px, 75vw) !important;
        width: min(600px, 75vw) !important;
    }
    
    .hero-section::after {
        width: min(600px, 75vw);
    }
    
    .hero-text-content {
        margin-left: clamp(15px, 2.5vw, 25px);
        padding-left: clamp(20px, 3vw, 35px);
        padding-right: clamp(15px, 2.5vw, 25px);
        max-width: min(450px, 55vw);
        width: min(450px, 55vw);
        transform: translateX(0);
        overflow: hidden;
        word-wrap: break-word;
    }
    
    .hero-text-content h1 {
        font-size: clamp(1.5rem, 3.5vw, 2.1rem);
        white-space: normal;
        word-wrap: break-word;
    }
    
    .hero-text-content p {
        font-size: clamp(0.85rem, 1.8vw, 1.05rem);
        word-wrap: break-word;
    }
}

/* Ajustes para tablets em modo paisagem */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .hero-section .col-lg-6 {
        max-width: min(700px, 65vw) !important;
        width: min(700px, 65vw) !important;
    }
    
    .hero-section::after {
        width: min(700px, 65vw);
    }
    
    .hero-text-content {
        margin-left: clamp(20px, 3vw, 30px);
        padding-left: clamp(25px, 3.5vw, 40px);
        padding-right: clamp(20px, 3vw, 30px);
        max-width: min(500px, 50vw);
        width: min(500px, 50vw);
        transform: translateX(0);
        overflow: hidden;
        word-wrap: break-word;
    }
    
    .hero-text-content h1 {
        font-size: clamp(1.6rem, 2.8vw, 2.2rem);
        white-space: normal;
        word-wrap: break-word;
    }
    
    .hero-text-content p {
        font-size: clamp(0.9rem, 1.4vw, 1.05rem);
        word-wrap: break-word;
    }
}

/* Ajustes para tablets grandes (iPad Pro, etc.) */
@media (min-width: 1025px) and (max-width: 1366px) {
    .hero-section .col-lg-6 {
        max-width: min(750px, 58vw) !important;
        width: min(750px, 58vw) !important;
    }
    
    .hero-section::after {
        width: min(750px, 58vw);
    }
    
    .hero-text-content {
        margin-left: clamp(25px, 3.5vw, 45px);
        padding-left: clamp(30px, 4vw, 45px);
        padding-right: clamp(25px, 3.5vw, 35px);
        max-width: min(520px, 42vw);
        width: min(520px, 42vw);
        transform: translateX(0);
        overflow: hidden;
        word-wrap: break-word;
    }
    
    .hero-text-content h1 {
        font-size: clamp(1.7rem, 2.8vw, 2.3rem);
        white-space: normal;
        word-wrap: break-word;
    }
    
    .hero-text-content p {
        font-size: clamp(0.95rem, 1.4vw, 1.08rem);
        word-wrap: break-word;
    }
}

/* Ajustes para dispositivos pequenos em modo paisagem */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section .col-lg-6 {
        min-height: 100vh;
        padding: clamp(15px, 3vw, 25px);
    }
    
    .hero-text-content {
        max-width: 90%;
        padding: clamp(20px, 4vw, 35px);
        overflow: hidden;
        word-wrap: break-word;
    }
    
    .hero-text-content h1 {
        font-size: clamp(1.2rem, 3.2vw, 1.8rem);
        margin-bottom: clamp(10px, 2vw, 15px);
        white-space: normal;
        word-wrap: break-word;
    }
    
    .hero-text-content p {
        font-size: clamp(0.77rem, 2.13vw, 0.94rem);
        margin-bottom: clamp(10px, 2vw, 15px);
        word-wrap: break-word;
    }
}

/* Garantir que a caixa nunca saia da tela - Regra geral para todos os dispositivos desktop/tablet */
@media (min-width: 769px) {
    .hero-text-content {
        min-width: min(350px, 30vw);
        max-width: min(550px, 45vw);
        width: min(550px, 45vw);
        overflow: hidden;
        word-wrap: break-word;
        box-sizing: border-box;
    }
    
    /* Garantir que o container principal nunca ultrapasse a viewport */
    .hero-section .col-lg-6 {
        max-width: min(65vw, 800px) !important;
        width: min(65vw, 800px) !important;
        box-sizing: border-box;
    }
    
    .hero-section::after {
        width: min(65vw, 800px) !important;
    }
}

/* Regra específica para tablets - sobrescreve a regra geral quando necessário */
@media (min-width: 769px) and (max-width: 1366px) {
    .hero-text-content {
        min-width: min(300px, 25vw) !important;
        max-width: min(500px, 40vw) !important;
        width: min(500px, 40vw) !important;
    }
    
    .hero-section .col-lg-6 {
        max-width: min(70vw, 750px) !important;
        width: min(70vw, 750px) !important;
    }
    
    .hero-section::after {
        width: min(70vw, 750px) !important;
    }
}

/* Correção específica para iPads e tablets similares */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) 
  and (-webkit-min-device-pixel-ratio: 1) {
    
    .hero-section .col-lg-6 {
        max-width: min(75vw, 600px) !important;
        width: min(75vw, 600px) !important;
    }
    
    .hero-section::after {
        width: min(75vw, 600px) !important;
    }
    
    .hero-text-content {
        min-width: min(280px, 30vw) !important;
        max-width: min(450px, 45vw) !important;
        width: min(450px, 45vw) !important;
        margin-left: clamp(15px, 3vw, 30px) !important;
        padding-left: clamp(20px, 3.5vw, 35px) !important;
        padding-right: clamp(15px, 3vw, 25px) !important;
        overflow: hidden;
        word-wrap: break-word;
        box-sizing: border-box;
    }
    
    .hero-text-content h1 {
        font-size: clamp(1.4rem, 4vw, 2rem) !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .hero-text-content p {
        font-size: clamp(0.85rem, 2.2vw, 1rem) !important;
        word-wrap: break-word !important;
    }
}

/* Correção para tablets Retina (iPad Pro, etc.) */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) 
  and (-webkit-min-device-pixel-ratio: 2) {
    
    .hero-section .col-lg-6 {
        max-width: min(70vw, 550px) !important;
        width: min(70vw, 550px) !important;
    }
    
    .hero-section::after {
        width: min(70vw, 550px) !important;
    }
    
    .hero-text-content {
        min-width: min(250px, 25vw) !important;
        max-width: min(400px, 40vw) !important;
        width: min(400px, 40vw) !important;
        margin-left: clamp(12px, 2.5vw, 25px) !important;
        padding-left: clamp(18px, 3vw, 30px) !important;
        padding-right: clamp(12px, 2.5vw, 20px) !important;
        overflow: hidden;
        word-wrap: break-word;
        box-sizing: border-box;
    }
    
    .hero-text-content h1 {
        font-size: clamp(1.3rem, 3.5vw, 1.9rem) !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .hero-text-content p {
        font-size: clamp(0.8rem, 2vw, 0.95rem) !important;
        word-wrap: break-word !important;
    }
}

/* ===== SEÇÕES RESPONSIVAS ===== */
section {
    padding: clamp(40px, 8vw, 80px) 0;
}

.display-5 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: bold;
    margin-bottom: 1rem;
}

.lead {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.6;
}

/* ===== CARROSSEL RESPONSIVO ===== */
.carousel-item img,
.carousel-item video {
    width: 100%;
    height: clamp(250px, 50vw, 500px);
    object-fit: cover;
    border-radius: var(--border-radius);
}

.carousel-control-prev,
.carousel-control-next {
    width: clamp(30px, 8vw, 50px);
    opacity: 0.8;
    transition: var(--transition);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-indicators button {
    width: clamp(8px, 2vw, 12px);
    height: clamp(8px, 2vw, 12px);
    border-radius: 50%;
    margin: 0 clamp(2px, 1vw, 5px);
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--border-radius);
    padding: clamp(10px, 3vw, 20px);
}

/* ===== GALERIA RESPONSIVA ===== */
.gallery-thumb {
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--border-radius);
    overflow: hidden;
}

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

/* ===== VÍDEOS RESPONSIVOS ===== */
.video-container {
    margin-bottom: 2rem;
}

.video-item {
    transition: var(--transition);
    cursor: pointer;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.video-item:hover {
    transform: translateY(-3px);
    background-color: #495057 !important;
}

.video-thumbnail-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.play-overlay {
    transition: var(--transition);
}

.video-item:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
}

/* ===== FORMULÁRIO RESPONSIVO ===== */
.contact-form {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: clamp(20px, 5vw, 40px);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #dee2e6;
    padding: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 15px);
    transition: var(--transition);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn {
    transition: var(--transition);
    border-radius: var(--border-radius);
    padding: clamp(8px, 2vw, 12px) clamp(16px, 4vw, 24px);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ===== INFORMAÇÕES DE CONTATO RESPONSIVAS ===== */
.contact-info .contact-item {
    text-align: center;
    padding: clamp(15px, 4vw, 20px);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    transition: var(--transition);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.contact-info .contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.contact-info .contact-item i {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.contact-info .contact-item h5 {
    font-size: clamp(1rem, 3vw, 1.25rem);
    margin-bottom: 0.5rem;
}

.contact-info .contact-item p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    margin-bottom: 0;
}

.social-links .btn {
    transition: var(--transition);
    border-width: 2px;
}

.social-links .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* ===== MAPA RESPONSIVO ===== */
.ratio {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #424e5b;
}

/* ===== MODO ESCURO ===== */
.dark-mode {
    --text-color: #f1f1f1;
    --bg-color: #121212;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.dark-mode .bg-light {
    background-color: #1e1e1e !important;
}

.dark-mode .bg-primary {
    background-color: #0d6efd !important;
}

.dark-mode .bg-dark {
    background-color: #1a1a1a !important;
}

.dark-mode .text-dark {
    color: #f1f1f1 !important;
}

.dark-mode .contact-form {
    background-color: #1e1e1e;
    color: #f1f1f1;
}

.dark-mode .video-item {
    background-color: #2a2a2a !important;
}

.dark-mode .form-control {
    background-color: #2a2a2a;
    color: #f1f1f1;
    border-color: #444;
}


.dark-mode input,
.dark-mode textarea,
.dark-mode select {
    background-color: #2a2a2a;
    color: #ffffff;
    border: 1px solid #555;
}

.dark-mode input::placeholder,
.dark-mode textarea::placeholder {
    color: #cccccc;
}

.dark-mode .navbar-dark .navbar-nav .nav-link {
    color: #f1f1f1 !important;
}

.dark-mode .text-white {
    color: #f1f1f1 !important;
}

.dark-mode .btn-outline-light {
    color: #f1f1f1;
    border-color: #f1f1f1;
}

.dark-mode .btn-outline-light:hover {
    background-color: #f1f1f1;
    color: #121212;
}
/* Formulário de contato no modo escuro */
.dark-mode .contact-form {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
}

.dark-mode .contact-form .form-label {
    color: #ffffff !important;
    background-color: transparent !important;
}

.dark-mode .contact-form h4 {
    color: #ffffff !important;
    background-color: transparent !important;
}

.dark-mode .contact-form .form-control {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
    border-color: #444 !important;
}

.dark-mode .contact-form .form-control:focus {
    background-color: #333333 !important;
    border-color: #4dabf7 !important;
    color: #ffffff !important;
}

.dark-mode .contact-form .form-control::placeholder {
    color: #aaaaaa !important;
}

.dark-mode .bg-brown {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
}

.dark-mode .bg-brown .form-label,
.dark-mode .bg-brown h4 {
    color: #ffffff !important;
    background-color: transparent !important;
}

.dark-mode .bg-brown .form-control {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
    border-color: #444 !important;
}

/* Remover fundos brancos residuais */
.dark-mode .contact-form *,
.dark-mode .bg-brown * {
    background-color: transparent !important;
}

.dark-mode .contact-form .form-control,
.dark-mode .bg-brown .form-control {
    background-color: #2a2a2a !important;
}

/* Reforçar visibilidade no modo escuro para o carrossel e formulário */

.dark-mode .contact-form input,
.dark-mode .contact-form textarea,
.dark-mode .contact-form select,
.dark-mode .contact-form .form-control,
.dark-mode .contact-form label,
.dark-mode .form-label {
    background-color: #f8f9fa !important;
    color: #000000 !important;
    border-color: #ccc !important;
}

.dark-mode .contact-form input::placeholder,
.dark-mode .contact-form textarea::placeholder {
    color: #333 !important;
}

.dark-mode .carousel-caption {
    background-color: rgba(255, 255, 255, 0.85) !important;
    color: #000000 !important;
}

.dark-mode .carousel-caption h5,
.dark-mode .carousel-caption p {
    color: #000000 !important;
}

.dark-mode #gallery .text-muted {
    color: #ffffff !important;
}
/* Otimizações específicas para mobile com GIF */
@media (max-width: 768px) {
    .hero-section {
        background-size: cover;
        background-position: center center;
        background-attachment: scroll;
        /* Otimizar para mobile mantendo o GIF */
        background-image: url('imagens/Dji 0042 Gif.gif');
    }
}

/* Para dispositivos muito pequenos */
@media (max-width: 480px) {
    .hero-section {
        background-size: cover;
        background-position: center center;
        min-height: 100vh;
        /* Manter GIF mas otimizar posicionamento */
        background-attachment: scroll;
    }
}

/* Classe adicional para dispositivos móveis */
.mobile-device .hero-section {
    background-attachment: scroll !important;
    /* Força scroll em vez de fixed para melhor performance */
}

/* Otimizações de performance para mobile */
.mobile-device * {
    --animation-duration: 0.3s;
}

.mobile-device {
    overflow-x: hidden;
}

/* Google Translate Widget */
#google_translate_element {
    display: inline-block;
}

#google_translate_element .goog-te-gadget-simple {
    background-color: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 8px 12px !important;
    border-radius: 5px !important;
    font-size: 14px !important;
    color: white !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

#google_translate_element .goog-te-gadget-simple:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

#google_translate_element .goog-te-gadget-simple .goog-te-menu-value {
    color: white !important;
}

/* Hide Google banner */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0px !important;
}

/* Performance optimizations */
img {
    image-rendering: auto;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

video {
    object-fit: cover;
}

/* Lazy loading placeholder */
img[loading="lazy"] {
    background-color: #f8f9fa;
    min-height: 200px;
}

/* Dark mode Google Translate */
.dark-mode #google_translate_element .goog-te-gadget-simple {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #f1f1f1 !important;
}

.dark-mode #google_translate_element .goog-te-gadget-simple .goog-te-menu-value {
    color: #f1f1f1 !important;
}

/* Responsive Google Translate */
@media (max-width: 768px) {
    #google_translate_element {
        margin-top: 10px;
        display: block;
        width: 100%;
    }
    
    #google_translate_element .goog-te-gadget-simple {
        width: 100%;
        text-align: center;
    }
}

/* Video Thumbnail Styles */
.video-thumbnail-container {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-thumbnail-container:hover {
    transform: scale(1.05);
}

.video-thumbnail-container video {
    pointer-events: none;
}

.play-overlay {
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.video-thumbnail-container:hover .play-overlay {
    opacity: 1 !important;
}

/* Video item hover effects */
.video-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Active video highlighting */
.video-item.active-video {
    background-color: rgba(0, 123, 255, 0.2) !important;
    border: 2px solid #007bff;
}

.video-item.active-video .video-thumbnail-container {
    transform: scale(1.02);
}

/* Dark mode video thumbnails */
.dark-mode .video-item {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.dark-mode .video-item:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.dark-mode .video-item.active-video {
    background-color: rgba(0, 123, 255, 0.3) !important;
    border-color: #4dabf7;
}

/* Custom brown background for contact form */
.bg-brown {
    background-color: #ffffff !important; /* Fundo branco */
}

/* Ensure form elements are visible on brown background */
.bg-brown .form-control {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333; /* Texto preto para campos */
    border: 1px solid #ddd;
}
.bg-brown .form-control:focus {
    background-color: #fff;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.bg-brown .form-label {
    color: #000 !important; /* Texto preto para labels */
    font-weight: 500;
}
.bg-brown h4 {
    color: #000 !important; /* Texto preto para título */
}

/* Dark mode adjustments */
.dark-mode .bg-brown {
    background-color: #1e1e1e !important; /* Fundo escuro no modo escuro */
}
.dark-mode .bg-brown .form-control {
    background-color: #2a2a2a;
    color: #ffffff; /* Texto branco no modo escuro */
    border-color: #444;
}
.dark-mode .bg-brown .form-label {
    color: #ffffff !important; /* Texto branco no modo escuro */
}
.dark-mode .bg-brown h4 {
    color: #ffffff !important; /* Texto branco no modo escuro */
}

/* ===== MEDIA QUERIES RESPONSIVAS ===== */

/* Tablets grandes e desktops pequenos */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .hero-text-content {
        max-width: 90%;
    }
}

/* Tablets */
@media (max-width: 992px) {
    .navbar-nav {
        text-align: center;
        padding-top: 1rem;
    }
    
    .navbar-nav .nav-item {
        margin: 0.25rem 0;
    }
    
    #darkModeToggle {
        margin: 1rem auto 0;
        display: block;
        width: fit-content;
    }
    
    .hero-section {
        min-height: 80vh;
        text-align: center;
    }
    
    .hero-text-content {
        margin: 0 auto;
        max-width: 100%;
    }
    
    .carousel-item img,
    .carousel-item video {
        height: clamp(200px, 40vw, 400px);
    }
    
    .video-container {
        margin-bottom: 2rem;
    }
    
    .contact-info .contact-item {
        margin-bottom: 1.5rem;
    }
}

/* Smartphones grandes */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .hero-section {
        min-height: 70vh;
        padding: 2rem 0;
        background-attachment: scroll;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .carousel-item img,
    .carousel-item video {
        height: 250px;
    }
    
    .video-item .col-4 {
        flex: 0 0 40%;
        max-width: 40%;
    }
    
    .video-item .col-8 {
        flex: 0 0 60%;
        max-width: 60%;
    }
    
    .contact-form {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .social-links .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    section {
        padding: 3rem 0;
    }
}

/* Smartphones pequenos */
@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-brand i {
        display: none;
    }
    
    .hero-section {
        min-height: 60vh;
        padding: 1rem 0;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .carousel-item img,
    .carousel-item video {
        height: 200px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 30px;
    }
    
    .carousel-indicators button {
        width: 8px;
        height: 8px;
        margin: 0 2px;
    }
    
    .video-item {
        padding: 0.75rem !important;
    }
    
    .video-item .col-4 {
        flex: 0 0 35%;
        max-width: 35%;
    }
    
    .video-item .col-8 {
        flex: 0 0 65%;
        max-width: 65%;
    }
    
    .contact-form {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .contact-info .contact-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .contact-info .contact-item i {
        font-size: 1.5rem;
    }
    
    .contact-info .contact-item h5 {
        font-size: 1rem;
    }
    
    .contact-info .contact-item p {
        font-size: 0.9rem;
    }
    
    section {
        padding: 2rem 0;
    }
}

/* Smartphones muito pequenos */
@media (max-width: 400px) {
    
    .display-5 {
        font-size: 1.3rem;
    }
    
    .carousel-item img,
    .carousel-item video {
        height: 180px;
    }
    
    .contact-form {
        padding: 0.75rem;
    }
    
    .form-control {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===== OTIMIZAÇÕES PARA DISPOSITIVOS TOUCH ===== */
@media (hover: none) and (pointer: coarse) {
    .gallery-thumb:hover,
    .video-item:hover,
    .contact-info .contact-item:hover,
    .btn:hover {
        transform: none;
    }
    
    .gallery-thumb:active,
    .video-item:active,
    .contact-info .contact-item:active {
        transform: scale(0.98);
    }
    
    .btn:active {
        transform: scale(0.95);
    }
}

/* ===== OTIMIZAÇÕES PARA IMPRESSÃO ===== */
@media print {
    .navbar,
    .btn,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators,
    #darkModeToggle {
        display: none !important;
    }
    
    .hero-section {
        background: none !important;
        color: black !important;
    }
    
    .hero-text-content {
        background: none !important;
        color: black !important;
    }
    
    .hero-text-content h1,
    .hero-text-content p {
        color: black !important;
        text-shadow: none !important;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* ===== OTIMIZAÇÕES PARA ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ===== OTIMIZAÇÕES PARA ALTO CONTRASTE ===== */
@media (prefers-contrast: high) {
    .hero-section::before {
        background: rgba(0, 0, 0, 0.8);
    }
    
    /* Removido para não sobrescrever as configurações de opacidade personalizadas */
    /*
    .hero-text-content {
        background: rgba(0, 0, 0, 0.9);
        border: 2px solid white;
    }
    */
    
    .btn {
        border-width: 2px;
    }
    
    .form-control {
        border-width: 2px;
    }
}

/* ===== ORIENTAÇÃO LANDSCAPE PARA MÓVEIS ===== */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
    }
    
    .hero-text-content {
        padding: 1rem;
    }
    
    .hero-text-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-text-content p {
        font-size: 0.9rem;
    }
    
    section {
        padding: 1.5rem 0;
    }
}

/* ===== GOOGLE MAPS PROTECTION & MOBILE OPTIMIZATION ===== */
/* Proteger Google Maps da tradução automática */
.google-maps-iframe {
    pointer-events: auto;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
}

/* Container do mapa protegido da tradução */
[translate="no"] {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Otimizações específicas para Google Maps em mobile */
@media (max-width: 768px) {
    .google-maps-iframe {
        min-height: 300px;
        width: 100% !important;
        height: 100% !important;
        border-radius: 8px;
        overflow: hidden;
    }
    
    /* Container do ratio para mobile */
    #maps .ratio {
        --bs-aspect-ratio: 75%; /* Ajustar proporção para mobile */
        margin-bottom: 1rem;
    }
    
    /* Melhorar performance do iframe em mobile */
    .google-maps-iframe {
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
    }
}

/* Para dispositivos muito pequenos */
@media (max-width: 480px) {
    .google-maps-iframe {
        min-height: 250px;
    }
    
    #maps .ratio {
        --bs-aspect-ratio: 66.67%; /* Proporção mais quadrada para telas pequenas */
    }
    
    /* Padding reduzido para a seção maps em mobile */
    #maps.py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Prevenir problemas de tradução com controles do Google Maps */
.google-maps-iframe * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Garantir que o iframe mantenha sua funcionalidade */
.google-maps-iframe:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark mode para a seção do mapa */
.dark-mode #maps {
    background-color: #1e1e1e !important;
}

.dark-mode #maps h2 {
    color: #f1f1f1 !important;
}

/* Melhorar visibilidade do mapa no modo escuro */
.dark-mode .google-maps-iframe {
    filter: brightness(0.9) contrast(1.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading state para o mapa */
.google-maps-iframe[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Otimização para touch devices */
@media (hover: none) and (pointer: coarse) {
    .google-maps-iframe {
        touch-action: manipulation;
        -webkit-overflow-scrolling: touch;
    }
}
