/* ============================================
   SOLNER ENERGIA — BASE UTILITIES
   Utilitários globais compartilhados por todas as páginas.
   Depende de variables.css (carregado antes).
   NÃO defina :root aqui.
============================================ */

/* ============================================
   CONTAINER UNIVERSAL — definição única
============================================ */
.container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
}

/* ============================================
   ANIMAÇÕES DE SCROLL — definição única
   Usado em: home, conta-de-energia, solucoes,
   calculadora, orcamento, quem-somos, suporte
============================================ */
.fade-in-element,
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-element.visible,
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-element.delay-1,
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-element.delay-2,
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-element.delay-3,
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-element.delay-4,
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-element.delay-5 { transition-delay: 0.5s; }

/* ============================================
   SISTEMA DE BOTÕES — definição única
   Todos os CTAs do site seguem este padrão:
   padding: 16px 32px | font-size: 16px | border-radius: 12px
   hover: translateY(-2px)
============================================ */
.btn-cta-primary,
.btn-hero-cta,
.btn-calcular,
.btn-enviar,
.btn-cta-block {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-orange);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    font-family: var(--font-main);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: 0 4px 12px rgba(220, 88, 42, 0.25);
    position: relative;
    overflow: hidden;
}

/* Efeito brilho no hover */
.btn-cta-primary::before,
.btn-hero-cta::before,
.btn-calcular::before,
.btn-enviar::before,
.btn-cta-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-cta-primary:hover::before,
.btn-hero-cta:hover::before,
.btn-calcular:hover::before,
.btn-enviar:hover::before,
.btn-cta-block:hover::before {
    left: 100%;
}

.btn-cta-primary:hover,
.btn-hero-cta:hover,
.btn-calcular:hover,
.btn-enviar:hover,
.btn-cta-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(220, 88, 42, 0.4);
    color: var(--white);
}

.btn-cta-primary:active,
.btn-hero-cta:active,
.btn-calcular:active,
.btn-enviar:active,
.btn-cta-block:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 88, 42, 0.3);
}

/* Botão secundário — contorno */
.btn-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    font-family: var(--font-main);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    transform: translateY(-2px);
    color: var(--white);
}

/* Variante outline laranja (fundo claro) */
.btn-cta-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: transparent;
    color: var(--accent-orange);
    border: 2px solid var(--accent-orange);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    font-family: var(--font-main);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-cta-outline:hover {
    background: var(--accent-orange);
    color: var(--white);
    transform: translateY(-2px);
}

/* Estado desabilitado universal */
.btn-cta-primary:disabled,
.btn-hero-cta:disabled,
.btn-calcular:disabled,
.btn-enviar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   GRADIENTE DE TEXTO — definição única
============================================ */
.title-gradient {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   HERO BADGE — definição única
   Usado em: quem-somos, orcamento, calculadora,
   conta-de-energia, solucoes
============================================ */
.hero-badge-cinema {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 100px;
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.badge-pulse {
    position: relative;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-yellow) 100%);
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(220, 88, 42, 0.8),
                0 0 16px rgba(220, 88, 42, 0.4);
}

.badge-pulse::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(220, 88, 42, 0.6) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: radar-ping 2s ease-out infinite;
}

.badge-pulse::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(255, 182, 0, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: radar-ping 2s ease-out infinite 1s;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1); opacity: 1;
        box-shadow: 0 0 8px rgba(220, 88, 42, 0.8), 0 0 16px rgba(220, 88, 42, 0.4);
    }
    50% {
        transform: scale(1.1); opacity: 0.9;
        box-shadow: 0 0 12px rgba(220, 88, 42, 1), 0 0 24px rgba(220, 88, 42, 0.6), 0 0 32px rgba(255, 182, 0, 0.3);
    }
}

@keyframes radar-ping {
    0%  { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    80% { transform: translate(-50%, -50%) scale(3.5); opacity: 0; }
    100%{ transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

/* ============================================
   SCROLL INDICATOR — definição única
============================================ */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
}

.scroll-indicator:hover {
    transform: translateX(-50%) translateY(-5px);
}

.scroll-arrows {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.arrow {
    opacity: 0;
    animation: arrow-float 2s ease-in-out infinite;
}

.arrow-1 { animation-delay: 0s; }
.arrow-2 { animation-delay: 0.3s; }
.arrow-3 { animation-delay: 0.6s; }

@keyframes arrow-float {
    0%   { opacity: 0; transform: translateY(-10px); }
    50%  { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(10px); }
}

/* ============================================
   SECTION HEADER PADRÃO — definição única
============================================ */
.section-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-orange);
    margin-bottom: 12px;
}

/* ============================================
   TIPOGRAFIA HERO — padrão único para todos os heros
============================================ */
.hero-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 500;
    line-height: 1.2;
    color: var(--white);
    margin: 0 0 20px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 auto 40px;
    max-width: 700px;
}

/* ============================================
   FEATURES INLINE (hero) — definição única
============================================ */
.hero-features-inline {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.feature-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 15px;
    font-weight: 500;
}

.feature-inline img,
.feature-inline svg.feature-icon-desktop {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.feature-inline img {
    filter: brightness(0) invert(1);
}

/* ============================================
   HERO OVERLAY PATTERN — definição única
============================================ */
.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2;
}

.hero-gradient-mesh {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at 20% 20%, rgba(255, 182, 0, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(220, 88, 42, 0.12) 0%, transparent 50%);
    opacity: 0.8;
    z-index: 3;
}

.hero-grid-pattern {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
    z-index: 4;
}

/* ============================================
   ACESSIBILIDADE — FOCUS STATES (WCAG 2.1 AA)
============================================ */

/* Inputs, selects, textareas */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Botões */
button:focus-visible,
.btn-cta-primary:focus-visible,
.btn-cta-secondary:focus-visible,
.btn-hero-cta:focus-visible,
.btn-calcular:focus-visible,
.btn-enviar:focus-visible {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
}

/* Links e itens de navegação */
a:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible,
.mobile-nav-link:focus-visible {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Radio e checkbox */
input[type="radio"]:focus-visible,
input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Respeita preferência por menos animação */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   SPINNER — definição única
============================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVO MOBILE — features inline
============================================ */
@media (max-width: 768px) {
    .scroll-indicator {
        bottom: 24px;
    }

    .hero-features-inline {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
        align-items: center;
        justify-items: center;
        margin-bottom: 32px;
    }

    .hero-features-inline .feature-icon-desktop {
        display: none;
    }

    .feature-inline {
        position: relative;
        padding: 0 12px;
        font-size: 13px;
    }

    .feature-inline:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 1px;
        height: 16px;
        background: rgba(255, 255, 255, 0.3);
    }
}

/* ============================================
   UTILITY PAGE — 401, Obrigado, etc.
   Carregado globalmente (base.css)
============================================ */
.utility-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 0 80px;
    background: var(--gray-50);
}

.utility-page-content {
    text-align: center;
    max-width: 480px;
}

.utility-page-content img {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: block;
}

.utility-page-content h1,
.utility-page-content h2 {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 12px;
}

.utility-page-content p {
    font-size: 16px;
    color: var(--gray-600);
    margin: 0 0 28px;
    line-height: 1.6;
}

.utility-page-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   GENERIC PAGE CONTENT — page.php
   Carregado globalmente (base.css)
============================================ */
.page-content-section {
    padding: 80px 0;
    background: var(--gray-50);
    min-height: 60vh;
}

.page-featured-image {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
    max-height: 480px;
}

.page-featured-image img,
.page-thumb {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

.page-content-body {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.page-content-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 32px;
    line-height: 1.25;
}

.page-rich-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--gray-700);
}

.page-rich-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 32px 0 16px;
    line-height: 1.3;
}

.page-rich-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 24px 0 12px;
    line-height: 1.3;
}

.page-rich-content p { margin: 0 0 20px; }

.page-rich-content a {
    color: var(--accent-orange);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition-fast);
}

.page-rich-content a:hover { color: var(--primary-blue); }

.page-rich-content ul,
.page-rich-content ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.page-rich-content li { margin-bottom: 8px; }

.page-rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
    display: block;
}

.page-rich-content blockquote {
    border-left: 4px solid var(--accent-orange);
    background: var(--gray-100);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--gray-600);
}

@media (max-width: 768px) {
    .page-content-section { padding: 60px 0; }
    .page-content-body { padding: 28px 20px; border-radius: 16px; }
    .page-content-title { font-size: 26px; }
    .utility-page { padding: 100px 0 60px; }
}

/* ============================================
   POLÍTICA DE PRIVACIDADE
============================================ */
.politica-page {
    background: var(--white);
}

.politica-hero {
    background: linear-gradient(140deg, #060b1a 0%, #001489 60%, #0d1a4a 100%);
    padding: 140px 0 80px;
    text-align: center;
}

.politica-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.politica-badge {
    display: inline-block;
    background: rgba(220, 88, 42, 0.2);
    color: #dc582a;
    border: 1px solid rgba(220, 88, 42, 0.4);
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.politica-hero h1 {
    color: #fff;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.15;
}

.politica-hero p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    line-height: 1.6;
    margin: 0 0 16px;
}

.politica-data {
    display: inline-block;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
}

.politica-conteudo-section {
    padding: 80px 0 100px;
}

.politica-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 60px;
    align-items: start;
}

/* Sumário lateral */
.politica-sumario {
    position: sticky;
    top: 100px;
    background: var(--gray-50, #f8f9fa);
    border: 1px solid var(--gray-200, #e9ecef);
    border-radius: 16px;
    padding: 28px 24px;
}

.politica-sumario h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500, #6c757d);
    margin: 0 0 16px;
}

.politica-sumario ol {
    margin: 0;
    padding-left: 20px;
}

.politica-sumario li {
    margin-bottom: 10px;
}

.politica-sumario a {
    color: var(--primary-blue, #001489);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.politica-sumario a:hover {
    color: var(--accent-orange, #dc582a);
}

/* Texto principal */
.politica-intro-box {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f4fd 100%);
    border: 1px solid rgba(0, 20, 137, 0.12);
    border-left: 4px solid #001489;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 48px;
}

.politica-intro-box p {
    color: var(--gray-700, #495057);
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 12px;
}

.politica-intro-box p:last-child { margin-bottom: 0; }

.politica-secao {
    margin-bottom: 52px;
    padding-bottom: 52px;
    border-bottom: 1px solid var(--gray-100, #f1f3f5);
}

.politica-secao:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.politica-secao h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-blue, #001489);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-orange, #dc582a);
    display: inline-block;
}

.politica-secao h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-800, #343a40);
    margin: 24px 0 12px;
}

.politica-secao p {
    color: var(--gray-700, #495057);
    font-size: 15px;
    line-height: 1.75;
    margin: 0 0 16px;
}

.politica-secao a {
    color: var(--accent-orange, #dc582a);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.politica-secao a:hover {
    color: var(--primary-blue, #001489);
}

.politica-secao ul,
.politica-secao ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.politica-secao li {
    color: var(--gray-700, #495057);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 10px;
}

.politica-aviso {
    background: #fff8e1;
    border: 1px solid #ffd54f;
    border-left: 4px solid #f9a825;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 14px;
    color: #795548;
    margin: 20px 0;
}

/* Tabela */
.politica-tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 20px 0;
    border-radius: 12px;
    overflow: hidden;
}

.politica-tabela th {
    background: var(--primary-blue, #001489);
    color: #fff;
    font-weight: 700;
    padding: 14px 18px;
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.politica-tabela td {
    padding: 12px 18px;
    color: var(--gray-700, #495057);
    border-bottom: 1px solid var(--gray-100, #f1f3f5);
    vertical-align: top;
    line-height: 1.6;
}

.politica-tabela tr:last-child td { border-bottom: none; }
.politica-tabela tr:nth-child(even) td { background: #f8f9fa; }

/* Grid de direitos */
.politica-direitos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0 24px;
}

.direito-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 18px 20px;
    border-left: 3px solid var(--accent-orange, #dc582a);
}

.direito-item strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-blue, #001489);
    margin-bottom: 8px;
}

.direito-item p {
    font-size: 13px;
    color: var(--gray-600, #6c757d);
    line-height: 1.6;
    margin: 0 !important;
}

/* Caixa de contato */
.politica-contato-box {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f4fd 100%);
    border: 1px solid rgba(0, 20, 137, 0.12);
    border-radius: 12px;
    padding: 24px 28px;
    margin: 20px 0;
}

.politica-contato-box p {
    margin: 0 0 10px !important;
}

.politica-contato-box p:last-child { margin-bottom: 0 !important; }

/* Responsivo */
@media (max-width: 1024px) {
    .politica-layout {
        grid-template-columns: 220px 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .politica-hero { padding: 120px 0 60px; }
    .politica-conteudo-section { padding: 48px 0 60px; }

    .politica-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .politica-sumario {
        position: static;
    }

    .politica-direitos-grid {
        grid-template-columns: 1fr;
    }

    .politica-tabela {
        font-size: 13px;
    }

    .politica-tabela th,
    .politica-tabela td {
        padding: 10px 12px;
    }
}
