/* ============================================
   DEMIAN MAX - MASTER EDITION
   Webmaster Level: Responsividade, Contraste e UX
   ============================================ */

:root {
    --color-bg-deep: #050505;
    --color-bg-dark: #080808;
    --color-bg-graphite: #111111;
    --color-bg-soft: #161616;
    --color-off-white: #F5F0E8;
    --color-gold: #B89B5E;
    --color-gold-light: #D8C08A;
    --color-gray: #A0A0A0;
    --header-height: 70px;
    
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
    
    --transition: all 0.4s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { background-color: var(--color-bg-deep); color: var(--color-off-white); font-family: var(--font-sans); line-height: 1.6; overflow-x: hidden; }

/* TIPOGRAFIA */
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--color-off-white); line-height: 1.2; }
p { color: var(--color-gray); }
.text-gold { color: var(--color-gold); }
.text-uppercase { text-transform: uppercase; letter-spacing: 2px; font-size: 0.75rem; font-weight: 600; }

/* CONTAINER */
.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }
section { padding: 100px 0; position: relative; scroll-margin-top: 70px; }

/* BOTÕES */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}
.btn-primary { background-color: var(--color-gold); color: var(--color-bg-deep); }
.btn-primary:hover { background-color: var(--color-gold-light); transform: translateY(-2px); }
.btn-outline { border-color: var(--color-gold); color: var(--color-gold); background: transparent; }
.btn-outline:hover { background-color: var(--color-gold); color: var(--color-bg-deep); }

/* HEADER */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(184, 155, 94, 0.1);
    transition: var(--transition);
}
.header.scrolled { padding: 5px 0; background: rgba(5, 5, 5, 0.95); }
.header.scrolled .logo-img { height: 60px; }
.header-container { display: flex; justify-content: space-between; align-items: center; }
.logo-img { height: 70px; width: auto; transition: var(--transition); }

.nav ul { display: flex; list-style: none; gap: 25px; align-items: center; }
.nav-link { 
    color: var(--color-off-white); 
    text-decoration: none; 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 1px;
    opacity: 0.8;
    transition: var(--transition);
}
.nav-link:hover { opacity: 1; color: var(--color-gold); }

/* HERO */
.hero { 
    height: 100vh; 
    min-height: 600px;
    display: flex; 
    align-items: center; 
    padding: 0; 
    position: relative;
    overflow: hidden;
}
.hero-bg { 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 0; 
}
/* FIX PC: object-position top para não cortar o rosto */
.hero-bg img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center 20%;
    display: block;
}
.hero-bg::after { 
    content: ''; 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; 
    height: 100%; 
    background: linear-gradient(to right, rgba(5,5,5,0.8) 0%, rgba(5,5,5,0.2) 50%, rgba(5,5,5,0.6) 100%);
}
.hero .container {
    position: relative;
    z-index: 1;
    width: 100%;
}
.hero-content {
    padding-top: calc(var(--header-height) + 40px);
}
.hero-title { font-size: clamp(2.5rem, 8vw, 4rem); margin-bottom: 20px; }
.hero-subtitle { font-size: clamp(1rem, 3vw, 1.5rem); color: var(--color-gold); margin-bottom: 40px; font-weight: 300; }

/* GRIDS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.grid-formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }

/* IMAGENS SEM FILTROS */
img { max-width: 100%; height: auto; display: block; filter: none !important; transition: opacity 0.5s ease-in-out; }

/* CARDS */
.card-premium {
    background: var(--color-bg-graphite);
    padding: 40px;
    border: 1px solid rgba(184, 155, 94, 0.1);
    transition: var(--transition);
}
.card-premium:hover { border-color: var(--color-gold); background: var(--color-bg-soft); }

/* FORMULÁRIO */
.form-container { background: var(--color-bg-graphite); padding: 60px; border: 1px solid rgba(184, 155, 94, 0.2); }
.form-group { margin-bottom: 25px; }
label { display: block; margin-bottom: 10px; color: var(--color-off-white); opacity: 1; font-weight: 600; }
input, select, textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    color: #FFFFFF;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
}
input::placeholder { color: rgba(255, 255, 255, 0.4); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-gold); background: rgba(255, 255, 255, 0.1); }

/* FOOTER */
.footer { padding: 80px 0 40px; background: var(--color-bg-dark); border-top: 1px solid rgba(184, 155, 94, 0.1); }
.dynamic-reference-wrap { width: 100%; display: flex; justify-content: center; margin-top: 40px; opacity: 0.3; }

/* ============================================
	   SEÇÃO TV & MÍDIA — THUMBNAILS COM PLAY
	   ============================================ */
.midia-single-center {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.midia-single-center .midia-item {
    width: calc(50% - 20px); /* Mesmo tamanho dos itens da grid-2 */
}

@media (max-width: 991px) {
    .midia-single-center .midia-item {
        width: 100%;
    }
}


.midia-item { transition: var(--transition); }
.midia-item:hover .midia-thumb { opacity: 0.8; }
.midia-thumb-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    background: #000;
}
.midia-thumb {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.midia-play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 70px; height: 70px;
    background: rgba(5, 5, 5, 0.4);
    backdrop-filter: blur(5px);
    border: 2px solid var(--color-gold);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--color-gold);
    pointer-events: none;
    transition: var(--transition);
    box-shadow: 0 0 20px rgba(184, 155, 94, 0.2);
}
.midia-play-btn svg {
    width: 28px;
    height: 28px;
    margin-left: 4px; /* Compensação visual para o triângulo */
}
.midia-item:hover .midia-play-btn {
    background: var(--color-gold);
    color: var(--color-bg-deep);
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 0 30px rgba(184, 155, 94, 0.5);
}

/* ============================================
   SEÇÃO SOBRE — IFRAME COM EFEITO DE FOGO
   ============================================ */
.about-visual-container {
    width: 100%;
    max-width: 478px;
    margin: 0;
    position: relative;
    /* Mantém a proporção 478x659 */
    padding-bottom: 137.8%; 
    height: 0;
    overflow: hidden;
}

/* FIX DESKTOP: centraliza o texto com a imagem */
.about-text-container {
    margin-top: -180px; /* Centraliza o texto com a imagem */
}

/* Grid da seção sobre: alinha itens ao centro para desktop */
.about-grid {
    align-items: center;
}

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

/* ============================================
   RESPONSIVIDADE — TABLET (≤ 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .nav ul { gap: 15px; }
    .nav-link { font-size: 0.7rem; }
    
    /* Hero: ajuste de padding para logo menor */
    .hero-content {
        padding-top: calc(var(--header-height) * 0.8);
    }
}

/* ============================================
   RESPONSIVIDADE — MOBILE/TABLET (≤ 991px)
   ============================================ */
@media (max-width: 991px) {
    :root {
        --header-height: 70px;
    }

    .header-container { padding: 0 20px; }
    .logo-img { height: 65px; }
    .header.scrolled .logo-img { height: 50px; }

    /* NAV mobile — esconde o menu desktop */
    .nav { display: none; }

    /* HERO mobile */
    .hero { 
        height: 100svh;
        min-height: 500px;
        align-items: flex-end;
    }
    .hero-content {
        padding-top: 0;
        padding-bottom: 60px;
        text-align: center;
    }
    .hero-bg img {
        object-position: center top;
    }
    .hero-bg::after {
        background: linear-gradient(
            to top,
            rgba(5,5,5,0.95) 0%,
            rgba(5,5,5,0.6) 40%,
            rgba(5,5,5,0.2) 100%
        );
    }
    .hero-actions { 
        justify-content: center; 
        display: flex; 
        flex-direction: column; 
        gap: 15px; 
        align-items: center;
    }
    .hero-actions .btn { margin: 0 !important; width: fit-content; }

    /* GRIDS: coluna única */
    .grid-2, .grid-3 { grid-template-columns: 1fr; }

    /* SEÇÃO SOBRE — FIX SOBREPOSIÇÃO MOBILE */
    .about-grid {
        align-items: start; /* Volta ao topo em mobile */
    }
    .about-visual-container {
        max-width: 100%;
        width: 100%;
        padding-bottom: 120%; /* Proporção ajustada para mobile */
    }
    /* Remove o margin negativo que causava sobreposição */
    .about-text-container {
        margin-top: 0;
        padding: 20px 0;
    }

    /* FORMULÁRIO */
    .form-container { padding: 30px 20px; }
    .form-container .grid-2 { grid-template-columns: 1fr; }

    /* FOOTER */
    .footer .grid-3 { grid-template-columns: 1fr; gap: 40px; }

    /* TIPOGRAFIA: tamanhos menores em mobile */
    h2[style*="font-size: 3rem"],
    h2 { font-size: clamp(1.8rem, 7vw, 3rem) !important; }

    /* CARDS */
    .card-premium { padding: 25px 20px; }

    /* SECTIONS: menos padding vertical */
    section { padding: 70px 0; }
}

/* ============================================
   MENU MOBILE OVERLAY
   ============================================ */
.nav.active {
    display: flex !important;
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: var(--color-bg-deep);
    flex-direction: column; justify-content: center; align-items: center;
    z-index: 999;
}
.nav.active ul { flex-direction: column; gap: 30px; }
.nav.active .nav-link { font-size: 1.5rem; }

.menu-toggle {
    display: none; background: none; border: none; cursor: pointer; z-index: 1001;
    flex-direction: column; gap: 6px;
    padding: 5px;
}
.menu-toggle span { width: 30px; height: 2px; background: var(--color-gold); transition: var(--transition); display: block; }

@media (max-width: 991px) {
    .menu-toggle { display: flex; }
    .header-cta { display: none; }
}

/* ============================================
   RESPONSIVIDADE — MOBILE PEQUENO (≤ 480px)
   ============================================ */
@media (max-width: 480px) {
    .container { padding: 0 4%; }
    section { padding: 60px 0; }

    .hero-title { font-size: clamp(2rem, 10vw, 3rem); }
    .hero-subtitle { font-size: 1rem; }

    .btn { padding: 14px 24px; font-size: 0.8rem; }

    .card-premium { padding: 20px 16px; }

    .form-container { padding: 24px 16px; }

    /* Seção Sobre: iframe menor em telas muito pequenas */
    .about-visual-container {
        padding-bottom: 130%;
    }

    /* Depoimentos: fonte menor */
    .grid-3 .card-premium p { font-size: 0.9rem; }
}
