/* ===================================
   MARROCOS ADVOCACIA - RESPONSIVE STYLES
   VERSÃO DEFINITIVA FINAL
   ===================================
   Mantém TUDO funcionando:
   ✅ Sombras nos textos
   ✅ Vídeo em portrait e landscape  
   ✅ Menu clicável em portrait
   ✅ Botões clicáveis
   =================================== */

/* === TABLET (768px - 1199px) === */
@media screen and (max-width: 1199px) {
    :root {
        --container-padding: 40px;
        --spacing-xl: 4rem;
        --spacing-xxl: 6rem;
    }
    
    .hero-headline {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }
    
    .areas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .differentials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xl);
    }
    
    .contact-grid {
        gap: var(--spacing-lg);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-grid .footer-col:first-child {
        grid-column: 1 / -1;
    }
}

/* === MOBILE (max-width: 767px) - TODAS ORIENTAÇÕES === */
@media screen and (max-width: 767px) {
    :root {
        --container-padding: 20px;
        --spacing-sm: 0.75rem;
        --spacing-md: 1.5rem;
        --spacing-lg: 2.5rem;
        --spacing-xl: 3rem;
        --spacing-xxl: 4rem;
    }
    
    /* === HERO SECTION - FUNCIONA EM PORTRAIT E LANDSCAPE === */
    .hero {
        height: 100vh;
        min-height: 600px;
    }
    
    /* ✅ VÍDEO VISÍVEL EM MOBILE */
    .hero-video {
        display: block !important;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* ✅ OVERLAY ESCURO PARA CONTRASTE */
    .hero-overlay {
        background: linear-gradient(135deg, rgba(46, 24, 16, 0.85), rgba(62, 39, 35, 0.75)) !important;
    }
    
    /* ✅ SOMBRAS ELEGANTES NO TEXTO DO HERO */
    .hero-headline {
        font-size: 2rem;
        line-height: 1.3;
        text-shadow: 
            0 2px 4px rgba(0, 0, 0, 0.8),
            0 4px 8px rgba(0, 0, 0, 0.6),
            0 8px 16px rgba(0, 0, 0, 0.4),
            0 0 40px rgba(62, 39, 35, 0.5);
        -webkit-text-stroke: 0.5px rgba(212, 175, 55, 0.3);
    }
    
    .hero-subheadline {
        font-size: 1rem;
        margin-bottom: var(--spacing-md);
        text-shadow: 
            0 2px 4px rgba(0, 0, 0, 0.9),
            0 4px 8px rgba(0, 0, 0, 0.7),
            0 8px 16px rgba(0, 0, 0, 0.5);
        background: rgba(0, 0, 0, 0.3);
        padding: 8px 16px;
        border-radius: 4px;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    
    .hero-cta {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .hero-cta .btn {
        width: 100%;
        box-shadow: 
            0 4px 8px rgba(0, 0, 0, 0.6),
            0 8px 16px rgba(0, 0, 0, 0.4);
    }
    
    .hero-badge {
        margin-top: var(--spacing-md);
    }
    
    /* === NAVIGATION - BASE PARA TODAS ORIENTAÇÕES === */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar.scrolled {
        padding: 0.75rem 0;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .nav-toggle {
        display: flex !important;
    }
    
    /* === BUTTONS === */
    .btn {
        padding: 0.9rem 2rem;
        font-size: 0.95rem;
    }
    
    .btn.large {
        padding: 1rem 2.5rem;
        font-size: 1rem;
    }
    
    /* === SECTIONS === */
    section {
        padding: var(--spacing-xxl) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-lg);
    }
    
    .section-title {
        font-size: 1.75rem;
        line-height: 1.4;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* === ABOUT SECTION === */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .about-image {
        order: 1;
    }
    
    .about-content {
        order: 2;
    }
    
    .about-text p {
        font-size: 1rem;
    }
    
    .about-features {
        gap: var(--spacing-md);
    }
    
    .feature-item {
        gap: var(--spacing-md);
    }
    
    .feature-icon {
        width: 45px;
        height: 45px;
    }
    
    .feature-text h4 {
        font-size: 1.1rem;
    }
    
    .feature-text p {
        font-size: 0.9rem;
    }
    
    /* === AREAS SECTION === */
    .areas-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .area-card {
        padding: var(--spacing-md);
    }
    
    .area-icon {
        width: 50px;
        height: 50px;
    }
    
    .area-title {
        font-size: 1.25rem;
    }
    
    .area-description {
        font-size: 0.9rem;
    }
    
    /* === DIFFERENTIALS SECTION === */
    .differentials-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .differential-icon {
        width: 70px;
        height: 70px;
    }
    
    .differential-title {
        font-size: 1.3rem;
    }
    
    .differential-description {
        font-size: 0.95rem;
    }
    
    /* === TESTIMONIALS SECTION === */
    .testimonial-card {
        padding: var(--spacing-lg);
    }
    
    .quote-icon {
        width: 40px;
        height: 40px;
    }
    
    .testimonial-text {
        font-size: 1.1rem;
    }
    
    .testimonial-author {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .author-avatar {
        width: 70px;
        height: 70px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* === STATS SECTION === */
    .stats {
        padding: var(--spacing-lg) 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-number::after {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    /* === CONTACT SECTION === */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }
    
    .contact-intro {
        font-size: 1rem;
    }
    
    .contact-details {
        gap: var(--spacing-md);
    }
    
    .contact-item {
        gap: var(--spacing-sm);
    }
    
    .contact-icon {
        width: 22px;
        height: 22px;
    }
    
    .contact-text h4 {
        font-size: 0.85rem;
    }
    
    .contact-text p {
        font-size: 0.95rem;
    }
    
    .social-links {
        justify-content: center;
        margin-top: var(--spacing-md);
    }
    
    /* === FORM === */
    .form {
        gap: var(--spacing-md);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.9rem;
        font-size: 1rem;
    }
    
    .form-group textarea {
        min-height: 100px;
    }
    
    .form-group.checkbox label {
        font-size: 0.85rem;
    }
    
    /* === CTA FINAL === */
    .cta-final {
        padding: var(--spacing-xl) 0;
        background-attachment: scroll;
    }
    
    .cta-headline {
        font-size: 1.75rem;
    }
    
    .cta-subheadline {
        font-size: 1rem;
    }
    
    .cta-note {
        font-size: 0.85rem;
    }
    
    /* === FOOTER === */
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-logo {
        height: 45px;
    }
    
    .footer-description {
        font-size: 0.9rem;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-title {
        font-size: 0.8rem;
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
        text-align: center;
    }
    
    .footer-links a:hover {
        padding-left: 0;
    }
    
    .footer-contact {
        gap: var(--spacing-sm);
    }
    
    .footer-contact li {
        font-size: 0.85rem;
        justify-content: center;
    }
    
    .footer-bottom {
        padding-top: var(--spacing-md);
    }
    
    .copyright {
        font-size: 0.75rem;
        line-height: 1.6;
    }
    
    /* === WHATSAPP FLOAT === */
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

/* ============================================================
   MOBILE PORTRAIT - CORREÇÃO CRÍTICA MENU + BOTÕES
   ============================================================ */
@media screen and (max-width: 767px) and (orientation: portrait) {
    
    /* === NAVIGATION - PORTRAIT SPECIFIC FIX === */
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 999999 !important;
        background: rgba(46, 24, 16, 0.98);
    }
    
    .logo-img {
        position: relative;
        z-index: 1000000;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        height: 100dvh;
        background: #1A1410;
        flex-direction: column;
        align-items: flex-start;
        padding: 90px 30px 30px;
        gap: 0;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -15px 0 50px rgba(0, 0, 0, 0.9);
        z-index: 99999999 !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    /* ✅ LINKS BRANCOS E CLICÁVEIS */
    .nav-link {
        font-size: 1.15rem;
        width: 100%;
        padding: 18px 0;
        margin: 0;
        color: #FFFFFF !important;
        background: transparent;
        position: relative;
        z-index: 999999999 !important;
        pointer-events: auto !important;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(212, 175, 55, 0.25);
        user-select: none;
        -webkit-user-select: none;
        border-bottom: 1px solid rgba(212, 175, 55, 0.12);
        transition: all 0.25s ease;
        display: block;
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .nav-link:hover,
    .nav-link:active,
    .nav-link.active {
        color: #D4AF37;
        background: rgba(212, 175, 55, 0.08);
        padding-left: 15px;
        border-left: 4px solid #D4AF37;
    }
    
    /* ✅ HAMBURGER CLICÁVEL */
    .nav-toggle {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        padding: 12px;
        position: relative;
        z-index: 1000000000 !important;
        pointer-events: auto !important;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(212, 175, 55, 0.3);
        user-select: none;
        background: transparent;
        border: none;
    }
    
    .nav-toggle span {
        width: 28px;
        height: 3px;
        background: #FFFFFF;
        display: block;
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }
    
    /* ✅ OVERLAY */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        height: 100dvh;
        background: rgba(0, 0, 0, 0.92);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 99999998 !important;
        pointer-events: none;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    
    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    /* ✅ BOTÕES DO HERO CLICÁVEIS */
    .hero-content {
        position: relative;
        z-index: 10000;
        pointer-events: auto;
    }
    
    .hero-cta {
        position: relative;
        z-index: 10001 !important;
        pointer-events: auto !important;
    }
    
    .hero-cta .btn {
        position: relative;
        z-index: 10002 !important;
        pointer-events: auto !important;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(212, 175, 55, 0.3);
        user-select: none;
    }
    
    .hero-cta .btn:active {
        transform: translateY(-3px) scale(0.98);
        box-shadow: 
            0 8px 16px rgba(0, 0, 0, 0.8),
            0 16px 32px rgba(0, 0, 0, 0.6);
    }
    
    /* ✅ WHATSAPP AJUSTADO */
    .whatsapp-float {
        z-index: 99999997;
        pointer-events: auto;
        touch-action: manipulation;
    }
}

/* === MOBILE LANDSCAPE === */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: 500px;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    /* Garantir que menu funciona em landscape também */
    .nav-menu {
        z-index: 99999999;
    }
    
    .nav-link {
        z-index: 999999999;
        pointer-events: auto;
        color: #FFFFFF;
    }
    
    .hero-cta .btn {
        z-index: 10002;
        pointer-events: auto;
    }
}

/* === SMALL MOBILE === */
@media screen and (max-width: 480px) {
    :root {
        --container-padding: 16px;
    }
    
    .hero-headline {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .stat-number {
        font-size: 2.25rem;
    }
    
    .area-card,
    .testimonial-card {
        padding: var(--spacing-md);
    }
    
    .cta-headline {
        font-size: 1.5rem;
    }
    
    .footer-social {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* === UTILITY === */
@media screen and (max-width: 767px) {
    .hide-mobile {
        display: none;
    }
    
    /* Prevenir zoom em inputs */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
    
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
}

/* === PRINT === */
@media print {
    .navbar,
    .scroll-indicator,
    .whatsapp-float,
    .carousel-controls,
    .hero-cta,
    .areas-cta,
    .cta-final,
    .footer-social,
    .social-links {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    .hero {
        height: auto;
        padding: 2rem 0;
    }
    
    section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
