/* 
  Estilos base e variáveis do projeto DSM Produções 
  Cores: Preto #333333, Vermelho #fd0203, Branco #e2e2e2
*/

:root {
    --bg-color: #333333;
    --primary-color: #fd0203;
    --text-color: #e2e2e2;
    --font-family: 'Geist', sans-serif;
    --header-height: 80px;

    /* Variáveis baseadas na nova UI */
    --surface-1: #222222;
    --surface-2: #2b2b2b;
    --border: rgba(226, 226, 226, 0.1);
    --text-muted: rgba(226, 226, 226, 0.5);
    --text-accent: var(--primary-color);
    --text-primary: #ffffff;
    --text-secondary: rgba(226, 226, 226, 0.8);
    --radius: 12px;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Ajuste para o header fixo não cobrir o início das seções na âncora */
    scroll-padding-top: var(--header-height);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ==========================================================================
   Header e Navegação (Mobile First)
   ========================================================================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(51, 51, 51, 0.95);
    /* Fundo escuro com leve transparência */
    backdrop-filter: blur(8px);
    z-index: 1000;
    border-bottom: 1px solid rgba(226, 226, 226, 0.05);
    transition: all 0.3s ease;
}

/* Classe adicionada via JS para quando rolar a página */
header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    height: 70px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo-img {
    max-height: 40px;
    width: auto;
    display: block;
}

/* Botão Hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Animação Hamburger Ativo */
.hamburger.active .bar:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* Menu de Navegação - Versão Mobile Off-canvas */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background-color: #222222;
    padding-top: 100px;
    transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    z-index: 999;
    overflow-y: auto;
}

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

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

.nav-menu ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Botão de Orçamento Especial no Menu */
.btn-orcamento {
    background-color: var(--primary-color);
    color: var(--text-color) !important;
    padding: clamp(8px, 1vw, 12px) clamp(12px, 1.5vw, 24px);
    border-radius: 4px;
    font-weight: 700;
    display: inline-block;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-orcamento:hover {
    background-color: #d10203;
    transform: translateY(-2px);
}

/* ==========================================================================
   Seções e Layout
   ========================================================================== */

/* Hero Banner */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1a1a1a;
    /* Cor provisória para o banner */
    background-image: url('banner.webp');
    background-size: cover;
    background-position: center;
}

.hero-content {
    text-align: center;
    padding: 0 20px;
    width: 100%;
}

.hero-logo {
    max-width: 90%;
    width: 450px;
    /* Tamanho base ideal para a logo principal */
    height: auto;
    filter: drop-shadow(0px 4px 15px rgba(0, 0, 0, 0.5));
    /* Leve sombra para destacar sobre o fundo */
    opacity: 0;
    /* Começa invisível para a animação */
    animation: fadeInUp 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Seções Padrão */
.section {
    padding: 100px 0;
    min-height: 60vh;
    border-bottom: 1px solid rgba(226, 226, 226, 0.05);
}

/* Variação sutil de fundo para seções ímpares */
.section:nth-of-type(even) {
    background-color: #2b2b2b;
}

.section h2 {
    font-size: 1.9rem;
    margin-bottom: 10px;
    color: var(--text-color);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.placeholder-content {
    text-align: center;
    padding: 60px 20px;
    border: 2px dashed rgba(226, 226, 226, 0.2);
    border-radius: 8px;
    color: rgba(226, 226, 226, 0.5);
    font-size: 1.1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    background-color: #1a1a1a;
    font-size: 0.9rem;
    color: rgba(226, 226, 226, 0.6);
}

/* Botão WhatsApp Flutuante */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    font-size: 34px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.whatsapp-float a:hover {
    transform: scale(1.1);
}

/* Estilos da Seção Sobre e Animação */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Nova Seção Sobre */
.sobre-layout {
    background: var(--surface-1);
    border-radius: var(--radius);
    padding: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sobre-imagens {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.img-destaque {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius);
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.img-destaque i {
    font-size: 56px;
    color: var(--text-muted);
}

.img-legenda {
    position: absolute;
    bottom: 10px;
    right: 12px;
    font-size: 11px;
    color: var(--text-muted);
}

.img-fit {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.img-destaque:hover .img-fit,
.img-pequena:hover .img-fit {
    transform: scale(1.06);
}

.img-grid-pequenas {
    display: flex;
    gap: 12px;
}

.img-pequena {
    flex: 1;
    aspect-ratio: 1/1;
    border-radius: calc(var(--radius) - 4px);
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-pequena i {
    font-size: 28px;
    color: var(--text-muted);
}

.sobre-texto {
    display: flex;
    flex-direction: column;
}

.sobre-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

section h2.sobre-title {
    font-size: 1.9rem;
    line-height: 1.2;
    margin: 0 0 16px;
    color: var(--text-primary);
    text-transform: none;
    text-align: left;
    letter-spacing: normal;
}

.sobre-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 24px;
}

.sobre-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-numero {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-legenda {
    font-size: 13px;
    color: var(--text-muted);
}

/* Divisor Parallax */
.parallax-divider {
    width: 100%;
    height: 40vh;
    /* Altura responsiva, ocupando cerca de 40% da tela */
    min-height: 250px;
    background-image: url('parallax.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    position: relative;
}

/* Película sutil de sobreposição para manter o contraste do tema escuro */
.parallax-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    /* Ajuste a opacidade (0.5) se quiser mais claro/escuro */
}

/* ==========================================================================
   Seção Equipamentos e Serviços
   ========================================================================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.section-title {
    font-size: 2.2rem;
    line-height: 1.2;
    margin: 0;
    color: var(--text-primary);
    text-transform: none;
}

/* Cards de Serviços */
.servicos-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

.servico-card {
    position: relative;
    overflow: hidden;
    background-color: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
}

.card-bg-1 {
    background-image: linear-gradient(rgba(20, 20, 20, 0.88), rgba(20, 20, 20, 0.88)), url('gal5.webp');
    background-size: cover;
    background-position: center;
    border-color: transparent;
}

.card-bg-2 {
    background-image: linear-gradient(rgba(20, 20, 20, 0.88), rgba(20, 20, 20, 0.88)), url('gal9.webp');
    background-size: cover;
    background-position: center;
    border-color: transparent;
}

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

.servico-icon {
    width: 60px;
    height: 60px;
    background: var(--surface-2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.servico-icon i {
    font-size: 32px;
    color: var(--text-accent);
}

.servico-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.servico-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Galeria */
.galeria-equipamentos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 12px;
}

.galeria-item {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: var(--surface-2);
}

.galeria-item.destaque {
    grid-column: span 2;
    grid-row: span 2;
}

.galeria-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease-out;
}

.galeria-item:hover .galeria-img {
    transform: scale(1.05);
}

.galeria-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
}

.galeria-item:hover::after {
    opacity: 1;
}

/* Animações da Galeria e Global Stagger */
.galeria-anim {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.galeria-anim.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: var(--anim-delay, 0s);
}

.animate-on-scroll.is-visible {
    transition-delay: var(--anim-delay, 0s);
}

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

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

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--primary-color);
}

/* ==========================================================================
   Divisor Animado (Sem cortes)
   ========================================================================== */
.fullscreen-divider {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    margin-top: -60px; /* Reduz o espaço da seção anterior */
    margin-bottom: -60px; /* Reduz o espaço da próxima seção */
    z-index: 2;
}

.divider-img {
    width: 100%;
    height: auto;
    display: block;
    /* Animação com grayscale(1) para tons de cinza, focada na luz */
    animation: cinematicPulse 6s ease-in-out infinite alternate;
}

.fullscreen-divider::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Reduzida a área do gradiente (apenas 2%) para ocupar menos espaço da imagem */
    background: linear-gradient(to bottom, rgba(51,51,51,1) 0%, rgba(51,51,51,0) 2%, rgba(51,51,51,0) 98%, rgba(51,51,51,1) 100%);
    pointer-events: none;
}

@keyframes cinematicPulse {
    0% { filter: grayscale(1) brightness(0.6) contrast(1.1); }
    100% { filter: grayscale(1) brightness(1.1) contrast(1.0); }
}

/* ==========================================================================
   Seção Contato
   ========================================================================== */
.contato-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.contato-item {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    min-width: 280px;
    flex: 1;
    max-width: 350px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.contato-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-color: var(--primary-color);
}

.contato-icon {
    width: 70px;
    height: 70px;
    background: var(--surface-2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 36px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.contato-item:hover .contato-icon {
    background: var(--primary-color);
    color: #ffffff;
    transform: scale(1.1);
}

.contato-info h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contato-info p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin: 0;
    transition: color 0.3s ease;
}

.contato-item:hover .contato-info p {
    color: var(--text-primary);
}

/* ==========================================================================
   Seção Orçamento
   ========================================================================== */
.orcamento-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface-1);
    padding: 3rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.orcamento-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.form-group label {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.orcamento-form input,
.orcamento-form textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.orcamento-form input:focus,
.orcamento-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(253, 2, 3, 0.2);
}

/* Deixa o ícone de calendário branco para contrastar no fundo escuro */
.orcamento-form input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.btn-submit {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 1rem;
}

.btn-submit:hover {
    background-color: #d10000;
    transform: translateY(-2px);
}

.form-mensagem {
    background-color: rgba(37, 211, 102, 0.1);
    border: 1px solid #25D366;
    color: #25D366;
    padding: 1rem;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 500;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.form-mensagem.hidden {
    display: none;
}

/* ==========================================================================
   Media Queries (Desktop)
   ========================================================================== */

@media (min-width: 850px) {
    .hamburger {
        display: none;
    }

    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        padding-top: 0;
        box-shadow: none;
        overflow-y: visible;
        flex: 1;
        display: flex;
        justify-content: flex-end;
    }

    .nav-menu ul {
        flex-direction: row;
        gap: 30px;
        white-space: nowrap;
    }

    .nav-menu ul li a {
        font-size: 1rem;
    }

    .hero-content h1 {
        font-size: 4rem;
    }

    .section h2 {
        font-size: 2.8rem;
    }
}

/* Força adaptação extrema para telas entre o hamburger (850px) e desktop padrão (1200px) */
@media (min-width: 850px) and (max-width: 1200px) {
    .nav-menu ul {
        gap: 1.5vw;
    }

    .nav-menu ul li a {
        font-size: 1.25vw;
    }

    .btn-orcamento {
        padding: 0.8vw 1.2vw !important;
        font-size: 1.25vw !important;
    }

    .logo-img {
        max-height: 4vw;
    }
}

/* Responsividade adicional para a seção Sobre e Equipamentos */
@media (max-width: 850px) {
    .sobre-layout {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 2rem;
    }

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

    .servicos-cards {
        grid-template-columns: 1fr;
    }

    .galeria-equipamentos {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 200px;
    }

    .galeria-item.destaque {
        grid-column: span 2;
        grid-row: span 2;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .orcamento-form-container {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   Rodapé
   ========================================================================== */
.footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: center;
    padding: 2rem 0;
}

.dev-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.dev-link:hover {
    opacity: 0.8;
}

.assinatura {
    white-space: nowrap;
}