/*
Theme Name: Solixx Soluções Ambientais
Theme URI: https://solixx.com.br
Author: Grupo Nova
Author URI: https://gruponovase.com.br
Description: Tema profissional para a Solixx Soluções Ambientais. Design Industrial Corporate Minimalism com identidade em laranja e azul escuro.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.5
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: solixx
Tags: environmental, corporate, dark, custom-colors, custom-menu, responsive-layout
*/

/* =============================================
   BASE STYLES (complemento ao Tailwind CDN)
   ============================================= */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: #171c21;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ─── Glass Panels ───────────────────────────────────────────────────────────── */
.glass-panel {
    background: rgba(23, 28, 33, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.glass-card {
    background: rgba(30, 35, 40, 0.80);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.08);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.glass-card:hover {
    border-color: rgba(255, 105, 0, 0.4);
    box-shadow: 0 20px 60px rgba(255, 105, 0, 0.08);
}

/* ─── View Switching ─────────────────────────────────────────────────────────── */
.view-section {
    display: block;
}
.view-section.hidden {
    display: none;
}

/* ─── Mobile Menu ────────────────────────────────────────────────────────────── */
#mobile-menu {
    display: none;
}
#mobile-menu.open {
    display: flex;
}

/* ─── Service Cards hover ────────────────────────────────────────────────────── */
.service-card-hover {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease;
}
.service-card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 64px rgba(255, 105, 0, 0.12);
}

/* ─── Animate pulse (reproduced for compatibility) ──────────────────────────── */
@keyframes ping {
    75%, 100% { transform: scale(2); opacity: 0; }
}
.animate-ping {
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ─── Top border glow on hover for economy cards ──────────────────────────── */
.card-top-glow::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,105,0,0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.card-top-glow:hover::before {
    opacity: 1;
}

/* ─── Skip link acessibilidade ───────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #ff6900;
    color: white;
    padding: 8px;
    z-index: 9999;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
}

/* ─── WordPress Core Classes ─────────────────────────────────────────────────── */
img {
    max-width: 100%;
    height: auto;
}
.widget {
    margin-bottom: 2rem;
}
.aligncenter {
    display: block;
    margin: 0 auto;
}
.alignright {
    float: right;
    margin-left: 1rem;
}
.alignleft {
    float: left;
    margin-right: 1rem;
}

/* ─── Service filter buttons ─────────────────────────────────────────────────── */
.filter-btn {
    transition: background-color 0.2s, color 0.2s;
}
.filter-btn.active {
    background-color: #ff6900;
    color: #ffffff;
}

/* ─── Navbar scroll shadow ───────────────────────────────────────────────────── */
.navbar-scrolled {
    box-shadow: 0 4px 32px rgba(0,0,0,0.4);
}

/* ─── Service detail modal ───────────────────────────────────────────────────── */
#service-modal,
#quote-modal {
    transition: opacity 0.2s;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ANIMATIONS — performance-first (CSS-only, GPU-composited, respects prefers-reduced-motion)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── Keyframes ─────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; transform: translateY(-8px); }
    to   { opacity: 1; max-height: 600px; transform: translateY(0); }
}

@keyframes navUnderline {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* ─── View section entrance ─────────────────────────────────────────────────── */
/* When a view becomes visible we add .view-entering; the class is removed after
   the animation completes via JS so subsequent re-visits replay it. */
.view-section.view-entering {
    animation: fadeIn 0.35s ease both;
}

/* Children with .anim-child stagger in with fadeInUp */
.view-section.view-entering .anim-child {
    opacity: 0;
    animation: fadeInUp 0.45s ease forwards;
}

/* Stagger delays 1-8 */
.view-section.view-entering .anim-child:nth-child(1)  { animation-delay: 0.05s; }
.view-section.view-entering .anim-child:nth-child(2)  { animation-delay: 0.10s; }
.view-section.view-entering .anim-child:nth-child(3)  { animation-delay: 0.15s; }
.view-section.view-entering .anim-child:nth-child(4)  { animation-delay: 0.20s; }
.view-section.view-entering .anim-child:nth-child(5)  { animation-delay: 0.25s; }
.view-section.view-entering .anim-child:nth-child(6)  { animation-delay: 0.30s; }
.view-section.view-entering .anim-child:nth-child(7)  { animation-delay: 0.35s; }
.view-section.view-entering .anim-child:nth-child(8)  { animation-delay: 0.40s; }

/* Cards in grids — each card gets a short delay based on its grid position */
.view-section.view-entering .anim-card {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}
.view-section.view-entering .anim-card:nth-child(1)  { animation-delay: 0.08s; }
.view-section.view-entering .anim-card:nth-child(2)  { animation-delay: 0.16s; }
.view-section.view-entering .anim-card:nth-child(3)  { animation-delay: 0.24s; }
.view-section.view-entering .anim-card:nth-child(4)  { animation-delay: 0.32s; }
.view-section.view-entering .anim-card:nth-child(5)  { animation-delay: 0.40s; }
.view-section.view-entering .anim-card:nth-child(6)  { animation-delay: 0.48s; }

/* ─── Hero section elements ─────────────────────────────────────────────────── */
.view-section.view-entering .anim-hero-badge   { opacity: 0; animation: fadeInUp 0.4s ease 0.05s forwards; }
.view-section.view-entering .anim-hero-title   { opacity: 0; animation: fadeInUp 0.5s ease 0.15s forwards; }
.view-section.view-entering .anim-hero-sub     { opacity: 0; animation: fadeInUp 0.5s ease 0.25s forwards; }
.view-section.view-entering .anim-hero-actions { opacity: 0; animation: fadeInUp 0.4s ease 0.35s forwards; }
.view-section.view-entering .anim-hero-stats   { opacity: 0; animation: fadeInUp 0.4s ease 0.45s forwards; }

/* ─── Mobile menu slide-down ────────────────────────────────────────────────── */
#mobile-menu.open {
    display: flex;
    animation: slideDown 0.25s ease both;
    overflow: hidden;
}

/* ─── Nav link hover underline ──────────────────────────────────────────────── */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 2px;
    background: #ff6900;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.2s ease;
}
.nav-link:hover::after,
.nav-link.active-link::after {
    transform: scaleX(1);
}

/* ─── Modal entrance ────────────────────────────────────────────────────────── */
#service-modal > div,
#quote-modal > div {
    animation: fadeInUp 0.28s ease both;
}

/* ─── Respect user preference ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .view-section.view-entering,
    .view-section.view-entering .anim-child,
    .view-section.view-entering .anim-card,
    .view-section.view-entering .anim-hero-badge,
    .view-section.view-entering .anim-hero-title,
    .view-section.view-entering .anim-hero-sub,
    .view-section.view-entering .anim-hero-actions,
    .view-section.view-entering .anim-hero-stats,
    #mobile-menu.open,
    #service-modal > div,
    #quote-modal > div {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LIGHT MODE  (body.light-mode)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ── Transição suave ao trocar tema ─────────────────────────────────────────── */
body, body * {
    transition-property: background-color, border-color, color, box-shadow;
    transition-duration: 0.25s;
    transition-timing-function: ease;
}
/* Não aplicar transição em elementos de animação/transform */
body *, body *::before, body *::after {
    transition-property: background-color, border-color, color, box-shadow;
}
/* Preserva transições já definidas ─ (transform, opacity etc.) */
.service-card-hover, .glass-card, .filter-btn, .nav-link::after, #theme-toggle {
    transition: background-color 0.25s ease,
                border-color 0.25s ease,
                color 0.25s ease,
                box-shadow 0.25s ease,
                transform 0.3s ease,
                opacity 0.25s ease,
                transform 0.25s ease !important;
}

/* ── Base ────────────────────────────────────────────────────────────────────── */
body.light-mode {
    background-color: #f0f4f8 !important;
    color: #1e293b !important;
}

/* ── Principais fundos escuros → tons claros ─────────────────────────────────── */
body.light-mode [class*="bg-[#171c21]"] { background-color: #f0f4f8 !important; }
body.light-mode [class*="bg-[#12161a]"] { background-color: #e2e8f0 !important; }
body.light-mode [class*="bg-[#1e2328]"] { background-color: #ffffff !important; }
body.light-mode [class*="bg-[#1a1f25]"] { background-color: #f8fafc !important; }
body.light-mode [class*="bg-[#2c3136]"] { background-color: #dde3ea !important; }
body.light-mode [class*="bg-[#181c20]"] { background-color: #e8edf2 !important; }

/* ── Header — sempre branco/translúcido ──────────────────────────────────────── */
body.light-mode #site-header {
    background-color: rgba(255, 255, 255, 0.97) !important;
    border-bottom-color: #e2e8f0 !important;
}

/* ── Slate backgrounds ───────────────────────────────────────────────────────── */
body.light-mode [class*="bg-slate-800"]  { background-color: #e2e8f0 !important; }
body.light-mode [class*="bg-slate-900"]  { background-color: #f1f5f9 !important; }
/* bg-slate-950 e bg-slate-950/60 → card branco destacado */
body.light-mode [class*="bg-slate-95"]   {
    background-color: #ffffff !important;
    border-color: #d1d5db !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ── Borders ─────────────────────────────────────────────────────────────────── */
body.light-mode [class*="border-slate-8"] { border-color: #e2e8f0 !important; }
body.light-mode [class*="border-slate-7"] { border-color: #cbd5e1 !important; }

/* ── Textos ──────────────────────────────────────────────────────────────────── */
body.light-mode .text-white             { color: #0f172a !important; }
body.light-mode [class*="text-slate-3"] { color: #334155 !important; }
body.light-mode [class*="text-slate-4"] { color: #475569 !important; }
body.light-mode [class*="text-slate-5"] { color: #64748b !important; }
body.light-mode [class*="text-slate-6"] { color: #4b5563 !important; }

/* ── Glass cards / panels ────────────────────────────────────────────────────── */
body.light-mode .glass-card {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
body.light-mode .glass-card:hover {
    border-color: rgba(255, 105, 0, 0.4) !important;
    box-shadow: 0 20px 60px rgba(255, 105, 0, 0.10) !important;
}
body.light-mode .glass-panel {
    background: rgba(255, 255, 255, 0.88) !important;
}

/* ── Hero: overlay de gradiente ──────────────────────────────────────────────── */
body.light-mode .hero-gradient-overlay {
    background: linear-gradient(
        to right,
        rgba(240, 244, 248, 0.97) 0%,
        rgba(240, 244, 248, 0.82) 55%,
        transparent 100%
    ) !important;
}

/* ── Mobile menu ─────────────────────────────────────────────────────────────── */
body.light-mode #mobile-menu {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}

/* ── Gradientes "from bottom" em cards de imagem ─────────────────────────────── */
body.light-mode [class*="from-[#171c21]"] {
    --tw-gradient-from: #f0f4f8 !important;
}

/* ── Botões de filtro de serviços ────────────────────────────────────────────── */
body.light-mode .filter-btn {
    background-color: #e2e8f0 !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}
body.light-mode .filter-btn.active {
    background-color: #ff6900 !important;
    color: #ffffff !important;
}

/* ── Modal overlays ──────────────────────────────────────────────────────────── */
body.light-mode #service-modal,
body.light-mode #quote-modal {
    background-color: rgba(15, 23, 42, 0.45) !important;
}

/* ── Navbar shadow no scroll ─────────────────────────────────────────────────── */
body.light-mode .navbar-scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10) !important;
}

/* ── Hover: evita texto branco em fundo claro ────────────────────────────────── */
body.light-mode [class*="hover:text-white"]:hover {
    color: #0f172a !important;
}
body.light-mode [class*="hover:bg-slate-7"]:hover {
    background-color: #e2e8f0 !important;
}
body.light-mode [class*="hover:bg-slate-8"]:hover {
    background-color: #e2e8f0 !important;
}

/* ── Badge de status (header top bar) ───────────────────────────────────────── */
body.light-mode .text-emerald-400 { color: #059669 !important; }
body.light-mode .bg-emerald-500   { background-color: #10b981 !important; }

/* ── Inputs / selects no modal de orçamento ──────────────────────────────────── */
body.light-mode input,
body.light-mode select,
body.light-mode textarea {
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}
body.light-mode input::placeholder,
body.light-mode textarea::placeholder {
    color: #94a3b8 !important;
}

/* ── Skip link ───────────────────────────────────────────────────────────────── */
body.light-mode .skip-link { background: #ff6900; }

/* ── Indicador de tema no toggle button ──────────────────────────────────────── */
/* ícone único — controlado via JS (solixxApplyTheme) */
