/*
Theme Name: Attiva Marketing 2026
Theme URI: https://attiva.tec.br
Author: Attiva - Marketing com Tecnologia
Author URI: https://attiva.tec.br
Description: Tema moderno e minimalista para agência de marketing digital com tecnologia. Design premium com glassmorphism, animações suaves e foco em conversão.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: attiva
Tags: marketing, agency, technology, modern, minimal, dark-theme, responsive, custom-menu, featured-images, threaded-comments, translation-ready

Este tema foi desenvolvido especificamente para a Attiva Marketing.
Todas as cores, tipografia e componentes seguem o design system da marca.

CHANGELOG v1.0.1:
- Corrigido glassmorphism para iOS Safari
- Adicionados fallbacks para backdrop-filter
- Melhorado contraste para legibilidade em todos os dispositivos
*/

/* =========================================================
   DESIGN TOKENS (Variáveis Globais)
========================================================= */
/* =========================================================
   1. DESIGN TOKENS (Variáveis Globais)
========================================================= */
:root {
    --bg-black: #030303;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-solid: rgba(12, 12, 12, 0.95); /* Fallback sólido para iOS */
    --border-glass: rgba(255, 255, 255, 0.1);

    --accent-green: #00ff88;
    --accent-red: #ff3b3b;

    --text-muted: #888;
}

/* =========================================================
   2. BASE
========================================================= */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-black);
    color: #ffffff;
    letter-spacing: -0.02em;
    overflow-x: hidden;
    font-size: 16px;
    line-height: 1.7;
}

/* Tipografia Base - Apenas parágrafos melhorados */
p {
    font-size: 1.125rem; /* 18px */
    line-height: 1.8;
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Parágrafos maiores para destaque */
.lead,
p.lead {
    font-size: 1.25rem; /* 20px */
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
}

h1, h2, h3, .navbar-brand {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.04em;
}

/* Responsividade apenas para parágrafos */
@media (max-width: 576px) {
    body {
        font-size: 15px;
    }
    
    p {
        font-size: 1.0625rem; /* 17px */
    }
    
    .lead,
    p.lead {
        font-size: 1.125rem; /* 18px */
    }
}

/* =========================================================
   3. BACKGROUND VISUAL EFFECT
========================================================= */
.glow-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 10% 10%, rgba(0, 255, 136, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 59, 59, 0.04) 0%, transparent 40%);
    z-index: -1;
}

/* =========================================================
   4. NAVBAR - CORRIGIDO PARA iOS
========================================================= */
.navbar {
    /* Mantém transparência original para desktop */
    background: rgba(3, 3, 3, 0.5);
    
    /* Glassmorphism para navegadores com suporte */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); /* Prefixo para Safari/iOS */
    
    border-bottom: 1px solid var(--border-glass);
    padding: 25px 0;
    
    /* Força camada de composição no iOS */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.nav-link {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
    margin: 0 15px;
    color: var(--text-muted) !important;
    transition: 0.3s;
}

.nav-link:hover {
    color: #fff !important;
}

/* Menu Mobile - Animação suave sem Bootstrap JS */
.navbar-collapse {
    transition: all 0.3s ease-in-out;
}

@media (max-width: 991px) {
    .navbar-collapse {
        display: none;
        overflow: hidden;
    }
    
    .navbar-collapse.show {
        display: block;
    }
    
    .navbar-collapse.showing {
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Navbar com scroll (opcional - ativa via JavaScript) */
.navbar-scrolled {
    background: rgba(3, 3, 3, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Logo Responsividade */
.navbar-brand img {
    height: 40px; /* Reduzido de 56px para 40px em desktop */
    width: auto;
    max-width: 150px; /* Reduzido de 180px para 150px */
    transition: all 0.3s ease;
}

/* Tablets */
@media (max-width: 991px) {
    .navbar {
        padding: 15px 0;
    }
    
    .navbar-brand img {
        height: 36px; /* Reduzido de 48px para 36px */
        max-width: 130px; /* Reduzido de 160px para 130px */
    }
}

/* Mobile */
@media (max-width: 576px) {
    .navbar {
        padding: 12px 0;
    }
    
    .navbar-brand img {
        height: 32px; /* Reduzido de 40px para 32px */
        max-width: 110px; /* Reduzido de 140px para 110px */
    }
}

/* Mobile Pequeno */
@media (max-width: 375px) {
    .navbar-brand img {
        height: 28px; /* Reduzido de 36px para 28px */
        max-width: 95px; /* Reduzido de 120px para 95px */
    }
}

/* =========================================================
   5. SECTIONS
========================================================= */
section {
    padding: 120px 0;
}

.sec-hero {
    background: radial-gradient(at 50% 0%, #0a0a0a 0%, var(--bg-black) 70%);
}

.sec-alt {
    background: #080808;
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

/* =========================================================
   6. BUTTONS
========================================================= */
.btn-premium {
    border-radius: 100px;
    padding: 16px 40px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid transparent;
}

.btn-green {
    background: var(--accent-green);
    color: #000;
}

.btn-green:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
}

.btn-red {
    background: var(--accent-red);
    color: #fff;
}

.btn-red:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(255, 59, 59, 0.4);
}

.btn-outline-white {
    border: 1px solid var(--border-glass);
    color: #fff;
    background: transparent;
}

.btn-outline-white:hover {
    background: #fff;
    color: #000;
}

/* =========================================================
   7. CARDS - CORRIGIDO PARA iOS
========================================================= */
.premium-card {
    /* Mantém transparência original para desktop */
    background: var(--bg-card);
    
    /* Glassmorphism para navegadores com suporte */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    border: 1px solid var(--border-glass);
    border-radius: 30px;
    padding: 45px;
    height: 100%;
    transition: all 0.4s ease;
    
    /* Força camada de composição no iOS */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.premium-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-10px) translateZ(0);
    -webkit-transform: translateY(-10px) translateZ(0);
}

/* Tipografia dos Cards - Melhorada para melhor legibilidade */
.premium-card h3,
.premium-card h4,
.premium-card h5 {
    color: #ffffff;
}

.premium-card p {
    font-size: 1.0625rem; /* 17px - mais confortável que 16px */
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 1rem;
}

.premium-card .small,
.premium-card small {
    font-size: 0.9375rem; /* 15px */
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

/* Cards em mobile */
@media (max-width: 576px) {
    .premium-card {
        padding: 30px;
    }
    
    .premium-card p {
        font-size: 1rem; /* 16px em mobile */
    }
}

/* =========================================================
   8. ICONS
========================================================= */
.icon-box {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #fff;
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    display: inline-block;
}

/* =========================================================
   9. TYPOGRAPHY UTILITIES
========================================================= */
.text-gradient {
    background: linear-gradient(to bottom, #fff 40%, #666 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.label-premium {
    font-size: 0.75rem; /* 12px */
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent-green);
    display: block;
    margin-bottom: 20px;
    font-weight: 700;
}

.number-bg {
    font-size: 4rem;
    font-weight: 800;
    opacity: 0.1;
    font-family: 'Space Grotesk';
    line-height: 1;
}

/* Listas - melhor legibilidade */
ul, ol {
    font-size: 1.125rem; /* 18px */
    line-height: 1.8;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

ul li, ol li {
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.premium-card ul,
.premium-card ol {
    font-size: 1.0625rem; /* 17px nos cards */
    line-height: 1.75;
}

.premium-card ul li,
.premium-card ol li {
    margin-bottom: 0.625rem;
    color: rgba(255, 255, 255, 0.88);
}

/* Links */
a {
    color: var(--accent-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #00cc6a;
}

/* Texto auxiliar */
.text-muted {
    color: var(--text-muted) !important;
    font-size: 1rem; /* 16px */
}

.small, small {
    font-size: 0.9375rem; /* 15px */
    line-height: 1.7;
}

/* Responsividade para listas */
@media (max-width: 576px) {
    ul, ol {
        font-size: 1.0625rem; /* 17px em mobile */
        padding-left: 1.25rem;
    }
    
    .premium-card ul,
    .premium-card ol {
        font-size: 1rem; /* 16px nos cards em mobile */
    }
}

/* =========================================================
   10. SCROLL INDICATOR
========================================================= */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.scroll-indicator-mouse {
    width: 24px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.scroll-indicator-wheel {
    width: 3px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 2px;
    animation: scroll 1.5s ease-in-out infinite;
}

/* =========================================================
   11. ANIMATIONS
========================================================= */
@keyframes scroll {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}

/* =========================================================
   12. CLIENTES
========================================================= */

.clients-marquee {
    overflow: hidden;
    width: 100%;
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
    padding: 32px 0;
}

.clients-track {
    display: flex;
    gap: 60px;
    width: max-content;
    animation: scrollClients 45s linear infinite;
}

.client-logo {
    min-width: 200px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.client-logo img {
    max-height: 80px;
    max-width: 200px;
    object-fit: contain;
}

.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: translateY(-2px);
}

/* Animação suave */
@keyframes scrollClients {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

.clients-marquee {
    position: relative;
}

.clients-marquee::before,
.clients-marquee::after {
    content: "";
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.clients-marquee::before {
    left: 0;
    background: linear-gradient(to right, #080808, transparent);
}

.clients-marquee::after {
    right: 0;
    background: linear-gradient(to left, #080808, transparent);
}

.clients-marquee:hover .clients-track {
    animation-play-state: paused;
}

/* =========================================================
   13. FIX ESPECÍFICO PARA iOS SAFARI
========================================================= */

/* Detecta iOS Safari e aplica correções adicionais */
@supports (-webkit-touch-callout: none) {
    /* Força aceleração de hardware */
    .navbar,
    .premium-card {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    
    /* Aplica backgrounds mais sólidos APENAS no iOS para garantir legibilidade */
    .navbar {
        background: rgba(3, 3, 3, 0.92) !important;
    }
    
    .premium-card {
        background: rgba(12, 12, 12, 0.90) !important;
    }
    
    .premium-card:hover {
        background: rgba(18, 18, 18, 0.92) !important;
    }
}

/* Fallback adicional para dispositivos que não suportam backdrop-filter */
@supports not (backdrop-filter: blur(20px)) and not (-webkit-backdrop-filter: blur(20px)) {
    .navbar {
        background: rgba(3, 3, 3, 0.95);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .premium-card {
        background: rgba(12, 12, 12, 0.95);
    }
}}

/* =========================================================
   14. SINGLE POST FIXES
========================================================= */

/* Remover altura 100% dos cards no single.php */
.single .premium-card {
    height: auto;
}

/* Corrigir min-vh-100 em mobile para single posts */
@media (max-width: 768px) {
    .single .min-vh-100 {
        min-height: auto;
        padding-top: 80px;
        padding-bottom: 60px;
    }
}

/* Garantir que o conteúdo do post não expanda além do necessário */
.post-content {
    width: 100%;
    max-width: 100%;
}

/* Corrigir imagens dentro do conteúdo do post */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 12px;
}

/* Ajustar espaçamento do hero do single */
.single .sec-hero {
    position: relative;
    padding-bottom: 80px;
}

/* Mobile: reduzir altura mínima das sections */
@media (max-width: 576px) {
    .single section {
        padding: 60px 0;
    }
    
    .single .sec-hero {
        padding-bottom: 60px;
    }
}

/* =========================================================
   15. MIN-VH RESPONSIVO
========================================================= */

/* Ajustar min-vh-50 para mobile */
@media (max-width: 768px) {
    .min-vh-50 {
        min-height: auto !important;
        padding-top: 60px !important;
        padding-bottom: 40px !important;
    }
}

/* Ajustar min-vh-100 para mobile em geral */
@media (max-width: 768px) {
    .min-vh-100 {
        min-height: 100vh;
    }
}