/*
Theme Name: Sítio Mandaguari Venda
Theme URI: http://vendomeusitio.com.br
Description: V12 - Correção Mobile iOS e Responsividade
Version: 12.0
*/

:root {
    --primary: #27ae60;
    --primary-bright: #2ecc71;
    --accent: #c0392b;
    --dark: #2c3e50;
    --darker: #1a252f;
    --light: #f8f9fa;
    --white: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background-color: var(--light); color: var(--dark); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3 { font-weight: 700; margin-bottom: 15px; line-height: 1.2; }
img { max-width: 100%; display: block; }

/* --- 1. HERO VÍDEO (IMERSIVO) --- */
#video-wrapper { 
    position: relative; 
    width: 100%; 
    height: 100vh; /* Altura da viewport */
    background: #000; 
    overflow: hidden; 
}

/* REGRA DE OURO PARA O VÍDEO PREENCHER TUDO */
#custom-video-player {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1;
}

video { 
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%; 
    min-height: 100%; 
    width: auto; 
    height: auto;
    object-fit: cover; /* Garante que cubra a área sem distorcer */
}

/* BOTÃO DE MUTE (Destaque) */
#btn-mute-hero {
    position: absolute; top: 30px; right: 30px; z-index: 60;
    background: rgba(0, 0, 0, 0.5); color: white; border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px; border-radius: 50px; cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    font-weight: 600; font-size: 0.9rem; text-transform: uppercase;
    backdrop-filter: blur(5px); transition: 0.3s;
}
#btn-mute-hero:hover { background-color: var(--primary); border-color: var(--primary); }
#btn-mute-hero svg { width: 20px; height: 20px; fill: white; }

/* OVERLAYS */
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; z-index: 20;
    background: rgba(0,0,0,0.4); /* Um pouco mais escuro para leitura no celular */
    transition: opacity 1.5s ease-in-out;
    padding: 20px;
}
.hero-overlay.hidden { opacity: 0; pointer-events: none; }

.classified-tag {
    background: var(--accent); color: white; padding: 5px 12px; 
    text-transform: uppercase; font-size: 0.8rem; font-weight: 800; letter-spacing: 1px;
    border-radius: 4px; margin-bottom: 15px; display: inline-block;
}

/* Título Responsivo */
.hero-title {
    font-size: clamp(1.8rem, 5vw, 4.5rem); 
    color: white; text-transform: uppercase;
    text-shadow: 0 4px 20px rgba(0,0,0,1);
    margin-bottom: 15px; max-width: 900px; width: 100%;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem); color: #ecf0f1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8); margin-bottom: 30px; max-width: 800px;
}

/* OVERLAY 2 (TEXTO PERSISTENTE) */
.secondary-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 15; opacity: 0; transition: opacity 2s ease-in-out; pointer-events: none;
    padding: 20px;
}
.secondary-overlay.visible { opacity: 1; }

.secondary-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem); 
    color: white; font-weight: 800; text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,1); margin-bottom: 15px; text-align: center;
}

/* CORREÇÃO DA COR DOS NÚMEROS (IOS) */
.secondary-phones {
    font-size: clamp(1rem, 3vw, 1.6rem);
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,1);
    background: rgba(0,0,0,0.6); padding: 12px 25px; border-radius: 50px;
    display: inline-block; text-align: center;
    
    /* Força cor branca mesmo se virar link */
    color: #ffffff !important; 
}

/* Regra específica para anular o azul do iPhone */
.secondary-phones a {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* BOTÕES HEADER */
.header-actions { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; width: 100%; }
.btn-header {
    display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    background-color: var(--primary); color: white;
    padding: 15px 30px; border-radius: 50px; text-decoration: none; font-weight: 700;
    transition: all 0.3s; box-shadow: 0 5px 20px rgba(0,0,0,0.4); font-size: 1rem;
    border: 2px solid transparent; pointer-events: auto; white-space: nowrap;
}
.btn-header:hover { background-color: var(--white); color: var(--primary); transform: scale(1.05); }
.btn-header.secondary { background-color: rgba(0,0,0,0.6); border: 2px solid white; }
.btn-header.secondary:hover { background-color: white; color: black; }

/* --- CONTROLES --- */
.video-controls-bar {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 30vh;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    padding: 0 20px 30px; display: flex; flex-direction: column; justify-content: flex-end;
    opacity: 0; transition: opacity 0.3s; z-index: 30;
}
.video-controls-bar:hover { opacity: 1; }

input[type=range].seek-bar { 
    -webkit-appearance: none; appearance: none; width: 100%; background: transparent; cursor: pointer; margin-bottom: 10px;
}
input[type=range].seek-bar:focus { outline: none; }
input[type=range].seek-bar::-webkit-slider-runnable-track { width: 100%; height: 4px; background: rgba(255,255,255,0.3); border-radius: 2px; }
input[type=range].seek-bar:hover::-webkit-slider-runnable-track { height: 6px; }
input[type=range].seek-bar::-webkit-slider-thumb { height: 12px; width: 12px; border-radius: 50%; background: var(--primary); -webkit-appearance: none; margin-top: -4px; }

.controls-row { display: flex; align-items: center; justify-content: space-between; color: white; }
.left-controls, .right-controls { display: flex; align-items: center; gap: 15px; }
.control-btn { background: none; border: none; color: rgba(255,255,255,0.9); cursor: pointer; padding: 5px; }
.control-btn svg { width: 28px; height: 28px; fill: currentColor; }

/* --- BARRA DE CONTEÚDO --- */
.classified-header {
    background: var(--white); padding: 50px 20px; text-align: center; border-bottom: 1px solid #eee;
}
.classified-title { font-size: clamp(1.8rem, 5vw, 2.5rem); color: var(--dark); margin-bottom: 15px; line-height: 1.2; }
.classified-subtitle { font-size: 1.2rem; color: #1a1a1a; font-weight: 500; max-width: 800px; margin: 0 auto 30px; }
.classified-header .header-actions { margin-top: 20px; }

/* --- FAIXA DE NÚMEROS --- */
.highlights-strip { background: var(--darker); color: white; padding: 50px 0; border-top: 4px solid var(--primary); }
.highlights-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); /* Tenta manter em linha no desktop */
    gap: 20px; text-align: center; max-width: 1100px; margin: 0 auto;
}
.highlight-item { padding: 10px; border-right: 1px solid rgba(255,255,255,0.1); }
.highlight-item:last-child { border-right: none; }
.highlight-number { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--primary-bright); display: block; line-height: 1; }
.highlight-label { font-size: 0.9rem; color: #bdc3c7; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* --- CARDS E MAPA --- */
.content-wrapper { position: relative; z-index: 10; background: var(--light); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section-title { text-align: center; font-size: 2.2rem; color: var(--dark); margin-bottom: 40px; margin-top: 60px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; padding-bottom: 60px; }
.feature-card {
    background: white; border-radius: 12px; overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.card-image { height: 220px; } .card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-content { padding: 25px; }
.card-content h3 { color: var(--primary-dark); font-size: 1.3rem; margin-bottom: 10px; }

.map-section { padding: 60px 0; background: #fff; text-align: center; }
#contact-section { background: #1a252f; color: white; padding: 80px 0; text-align: center; }
#contact-section h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 10px; }
.phone-link {
    background: var(--primary); color: white; padding: 15px 30px;
    border-radius: 8px; text-decoration: none; font-size: 1.3rem; font-weight: bold;
    display: inline-flex; align-items: center; gap: 10px; margin: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.whatsapp-float {
    position: fixed; width: 60px; height: 60px; bottom: 25px; right: 25px;
    background-color: #25d366; color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4); z-index: 10005;
}

/* --- AJUSTES EXCLUSIVOS PARA MOBILE (IPHONE) --- */
@media (max-width: 768px) {
    /* Corrige altura do vídeo e barra do navegador */
    #video-wrapper { height: 100dvh; /* Dynamic Viewport Height (Ignora barra do Safari) */ }
    
    /* Garante que o vídeo estique para preencher altura */
    video { min-height: 100%; min-width: 100%; object-fit: cover; }

    /* Ajuste dos textos para não saírem da tela */
    .hero-title { font-size: 1.8rem; padding: 0 10px; }
    .hero-subtitle { font-size: 1rem; padding: 0 15px; margin-bottom: 20px; }
    .secondary-title { font-size: 1.5rem; padding: 0 20px; }
    .secondary-phones { font-size: 0.9rem; padding: 8px 15px; display: block; width: fit-content; margin: 0 auto; }

    /* Botões empilhados no mobile para facilitar clique */
    .header-actions { flex-direction: column; gap: 10px; padding: 0 20px; }
    .btn-header { width: 100%; font-size: 0.95rem; padding: 12px 20px; }

    /* Ajuste da faixa de números para grid 2x2 */
    .highlights-grid { grid-template-columns: 1fr 1fr; gap: 0; }
    .highlight-item { 
        border-right: 1px solid rgba(255,255,255,0.1); 
        border-bottom: 1px solid rgba(255,255,255,0.1); 
        padding: 20px 10px;
    }
    /* Remove bordas das pontas para ficar limpo */
    .highlight-item:nth-child(2n) { border-right: none; }
    .highlight-item:nth-last-child(-n+2) { border-bottom: none; }

    /* Ajuste do botão de som */
    #btn-mute-hero { top: 20px; right: 20px; padding: 8px 15px; font-size: 0.8rem; }
    
    /* Rodapé */
    .phone-link { width: 90%; justify-content: center; font-size: 1.1rem; }
}