@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary: #22c55e;
    --bg: #0f172a;
    --bg-light: #1e293b;
    --text: #f8fafc;
    --text-dim: #94a3b8;
}

/* RESET E PREVENÇÃO DE SCROLL LATERAL */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

img { max-width: 100%; height: auto; }

/* LAYOUT GERAL - CORRIGIDO O BUG DO FLEXBOX */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 20px;
    text-align: center; /* Mantém tudo centralizado sem forçar corte na esquerda */
}

/* Força a quebra de palavras muito grandes para não esticarem a tela */
h1, h2, h3, p, span {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.highlight { color: var(--primary); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 40px; font-weight: 700; }

.btn {
    background: var(--primary);
    padding: 14px 30px;
    display: inline-block;
    margin-top: 20px;
    color: #000;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.3s ease;
    border: none;
    cursor: pointer;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(34, 197, 94, 0.3); }

/* HERO */
.hero { position: relative; height: 70vh; min-height: 600px; width: 100%; overflow: hidden; }
.hero-swiper { width: 100%; height: 100%; }
.swiper-slide {
    background-size: cover; background-position: center;
    display: flex; align-items: center; justify-content: center;
    opacity: 0 !important; transition: opacity 1s ease-in-out;
}
.swiper-slide-active { opacity: 1 !important; z-index: 1; }

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.text-wrapper { 
    width: 100%; 
    max-width: 800px; 
    margin: 0 auto; /* Centraliza sem quebrar */
    padding: 0 15px; 
}
.hero-img { max-width: 150px; border-radius: 12px; margin-bottom: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.hero h1 { font-size: clamp(2rem, 6vw, 3.5rem); margin-bottom: 20px; line-height: 1.2; font-weight: 700; }
.hero p { font-size: clamp(1rem, 2vw, 1.1rem); color: #e0e0e0; max-width: 600px; margin: 0 auto; }

/* ANIMAÇÕES DO HERO */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
.hero-content .fade-item { opacity: 0; }
.swiper-slide-active .hero-content h1 { animation: fadeInUp 0.8s ease forwards 0.2s; }
.swiper-slide-active .hero-content p { animation: fadeInUp 0.8s ease forwards 0.4s; }
.swiper-slide-active .hero-content .btn { animation: fadeInUp 0.8s ease forwards 0.6s; }

/* PROJETOS E CARDS */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px;
    width: 100%;
}
.card {
    background: var(--bg-light); border-radius: 16px; overflow: hidden;
    transition: 0.4s; border: 1px solid rgba(255,255,255,0.05); text-align: left;
    width: 100%;
}
.card:hover { transform: translateY(-10px); border-color: var(--primary); }
.card-img-wrapper { height: 200px; overflow: hidden; }
.card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.card:hover .card-img-wrapper img { transform: scale(1.1); }
.card-content { padding: 25px; }
.card-content h3 { color: var(--primary); margin-bottom: 10px; }
.card-content p { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 15px; }

.btn-detalhes {
    background: none; border: 1px solid var(--primary); color: var(--primary);
    padding: 10px 20px; border-radius: 8px; cursor: pointer;
    font-weight: 600; transition: 0.3s; width: 100%;
}
.btn-detalhes:hover { background: var(--primary); color: #000; }

/* SOBRE */
.sobre-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
    text-align: left; align-items: center; width: 100%;
}
.sobre-texto p { margin-bottom: 20px; color: var(--text-dim); }
.stats-container { display: grid; grid-template-columns: 1fr; gap: 20px; width: 100%; }
.stat-card { background: var(--bg-light); padding: 25px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); }
.stat-card h3 { font-size: 2rem; color: var(--primary); margin-bottom: 5px; }

/* DEPOIMENTOS */
.feedback-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px; width: 100%; margin-top: 20px;
}
.feedback-card {
    background: var(--bg-light); padding: 30px; border-radius: 12px;
    font-style: italic; border-left: 4px solid var(--primary); text-align: left; width: 100%;
}
.feedback-card span { display: block; margin-top: 15px; font-weight: bold; color: var(--primary); font-style: normal; }

/* FORMULÁRIO */
#contactForm {
    width: 100%; 
    max-width: 600px; 
    margin: 0 auto; /* Importante: Mantém o formulário centralizado sem quebrar */
    background: var(--bg-light);
    padding: 40px; border-radius: 15px; display: flex; flex-direction: column; gap: 15px;
    text-align: left;
}
input, select, textarea {
    background: var(--bg); border: 1px solid #334155; padding: 15px;
    color: #fff; border-radius: 6px; font-family: inherit; width: 100%;
}
textarea { height: 120px; resize: vertical; }

/* =========================================================
   FORMULÁRIO - CORREÇÃO DE OVERFLOW E ALINHAMENTO DO SELECT
   ========================================================= */
/*#contactForm {
    width: 100%; 
    max-width: 600px; 
    margin: 0 auto; 
    background: var(--bg-light);
    padding: clamp(20px, 5vw, 40px); /* Ajusta o padding dinamicamente sem estourar */
/*    border-radius: 15px; 
    display: flex; 
    flex-direction: column; 
    gap: 15px;
    text-align: left;
    box-sizing: border-box; /* Impede que o padding some com a largura do celular */
/*}*/

input, select, textarea {
    background: var(--bg); 
    border: 1px solid #334155; 
    padding: 15px;
    color: #fff; 
    border-radius: 6px; 
    font-family: inherit; 
    width: 100%;
    max-width: 100%; /* Trava a largura ao contêiner pai */
    box-sizing: border-box;
    font-size: 16px !important; /* IMPORTANTE: Previne o zoom automático no celular que desloca a tela */
}

/* ESTILIZAÇÃO DO SELECT PARA FORÇAR LIMITES E DEIXAR MODERNO */
select {
    appearance: none; /* Remove o visual nativo bugado do sistema */
    -webkit-appearance: none;
    -moz-appearance: none;
    /* Insere uma setinha customizada em SVG direto no CSS */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 40px; /* Dá espaço para a setinha */
    text-overflow: ellipsis; /* Coloca "..." se o texto for muito grande */
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
}

/* Fundo das opções do Select */
select option {
    background: var(--bg-light);
    color: #fff;
    padding: 10px;
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary); /* Feedback visual moderno ao clicar */
}

textarea { 
    height: 120px; 
    resize: vertical; /* Permite redimensionar só para baixo, nunca pros lados */
}

/* FOOTER */
footer { padding: 40px 20px; background: #0a0f1d; border-top: 1px solid #1e293b; text-align: center; }
.footer-socials { margin-top: 20px; }
.footer-socials a { color: var(--text-dim); margin: 0 10px; text-decoration: none; transition: 0.3s; }
.footer-socials a:hover { color: var(--primary); }

/* WHATSAPP FLOAT */
.whatsapp-float {
    position: fixed !important; bottom: 20px !important; right: 20px !important;
    width: 55px !important; height: 55px !important;
    background-color: #25d366 !important; color: #fff !important;
    border-radius: 50% !important; display: flex !important; justify-content: center !important; align-items: center !important;
    z-index: 999999 !important; box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
    transition: transform 0.3s ease !important; text-decoration: none;
}
.whatsapp-float svg { width: 30px !important; height: 30px !important; }
.whatsapp-float:hover { transform: scale(1.1) !important; }

/* MODAL & LIGHTBOX */
.modal { display: none; position: fixed; z-index: 2000; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(5px); overflow-y: auto; padding: 20px; }
.modal-content { background: var(--bg); margin: 20px auto; width: 100%; max-width: 900px; border-radius: 20px; position: relative; border: 1px solid #334155; }
.close-modal { position: absolute; right: 20px; top: 15px; font-size: 35px; color: #fff; cursor: pointer; z-index: 10; }
.slider-container { position: relative; width: 100%; height: 300px; overflow: hidden; border-radius: 20px 20px 0 0; }
.slider { display: flex; transition: 0.5s ease; height: 100%; }
.slider img { width: 100%; height: 100%; object-fit: cover; flex-shrink: 0; }
.slider-prev, .slider-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; border: none; padding: 15px; cursor: pointer; font-size: 20px; }
.slider-next { right: 0; }
.modal-info { padding: 30px; text-align: left; }
.lightbox { display: none; position: fixed; z-index: 3000; inset: 0; background: rgba(0,0,0,0.95); justify-content: center; align-items: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 10px; }

/* =========================================================
   BLINDAGEM MOBILE: PREVINE QUALQUER ESTOURO DE TELA
   ========================================================= */
@media (max-width: 992px) {
    .sobre-grid { grid-template-columns: 1fr; text-align: center; }
    .stats-container { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .stats-container { grid-template-columns: 1fr; }
    #contactForm { padding: 25px; }
    .modal-content { margin: 10px auto; }
}

@media (max-width: 600px) {
    /* FORÇA AS GRADES A SEREM 1 COLUNA NO CELULAR (Proteção contra corte) */
    .grid, .sobre-grid, .feedback-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .container { padding: 60px 20px; }
    .hero-img { max-width: 120px; }
    .whatsapp-float { bottom: 15px !important; right: 15px !important; width: 45px !important; height: 45px !important; }
    .whatsapp-float svg { width: 24px !important; height: 24px !important; }
}