/* =====================================================================
   DESIGN SYSTEM - BUSCADOR DJEN PREMIUM V2026
   Vanilla CSS - Core variables, layout, components and micro-animations
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

:root {
    /* --- COLOR PALETTE (LIGHT THEME - Unified with Extension) --- */
    --bg-page: #e2e5e9;
    --bg-header: rgba(226, 229, 233, 0.8);
    --bg-section: #f8f9fa;
    --card-bg: #ffffff;
    --card-inner: #f3f5f8;
    --text-main: #1c1e21;
    --text-muted: #4a4e54;
    --text-placeholder: #6c727a;
    
    --primary: #cc785c;
    --primary-hover: #a9583e;
    --primary-light: rgba(204, 120, 92, 0.15);
    --primary-text: #ffffff;
    --primary-gradient: linear-gradient(135deg, #cc785c, #a9583e);
    
    --border-light: #c1c7cf;
    --border-focus: #cc785c;
    
    /* Semantics & Zen Colors (Unified with Extension) */
    --zen-green: #059669;
    --zen-green-bg: rgba(5, 150, 105, 0.15);
    --zen-orange: #b45309;
    --zen-orange-bg: rgba(217, 119, 6, 0.15);
    --zen-red: #b91c1c;
    --zen-red-bg: rgba(220, 38, 38, 0.15);
    --zen-purple: #7c3aed;
    --zen-purple-bg: rgba(124, 58, 237, 0.12);
    --zen-blue: #0075de;
    --zen-blue-bg: rgba(0, 117, 222, 0.15);
    --zen-gold: #b45309; /* Map gold to orange for visual simplicity */
    --zen-gold-bg: rgba(217, 119, 6, 0.15);
    
    /* Radii & Shadows */
    --radius-btn: 6px;
    --radius-card: 12px;
    --radius-pill: 9999px;
    
    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 15px 40px rgba(204, 120, 92, 0.06), 0 5px 15px rgba(204, 120, 92, 0.03);
    --shadow-modal: 0 30px 60px rgba(0, 0, 0, 0.1), 0 10px 20px rgba(0, 0, 0, 0.05);
    
    --font-heading: 'Google Sans Flex', 'Inter', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

[data-theme="dark"] {
    /* --- COLOR PALETTE (DARK THEME - Unified with Extension) --- */
    --bg-page: #181715;
    --bg-header: rgba(24, 23, 21, 0.8);
    --bg-section: #252320;
    --card-bg: #252320;
    --card-inner: #1f1e1b;
    --text-main: #e5e5e5;
    --text-muted: #a09d96;
    --text-placeholder: #595e63;
    
    --primary: #cc785c;
    --primary-hover: #a9583e;
    --primary-light: rgba(204, 120, 92, 0.15);
    --primary-text: #ffffff; /* Crisp white text on bright coral in dark mode */
    --primary-gradient: linear-gradient(135deg, #cc785c, #a9583e);
    
    --border-light: rgba(250, 249, 245, 0.1);
    --border-focus: #cc785c;
    
    /* Semantics & Zen Colors (Dark - Unified with Extension) */
    --zen-green: #5db872;
    --zen-green-bg: rgba(93, 184, 114, 0.15);
    --zen-orange: #facc15;
    --zen-orange-bg: rgba(250, 204, 21, 0.12);
    --zen-red: #f87171;
    --zen-red-bg: rgba(248, 113, 113, 0.15);
    --zen-purple: #a78bfa;
    --zen-purple-bg: rgba(167, 139, 250, 0.15);
    --zen-blue: #5db8a6;
    --zen-blue-bg: rgba(93, 184, 166, 0.15);
    --zen-gold: #facc15;
    --zen-gold-bg: rgba(250, 204, 21, 0.12);
    
    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.3), 0 5px 15px rgba(0, 0, 0, 0.15);
    --shadow-modal: 0 30px 60px rgba(0, 0, 0, 0.4), 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* =====================================================================
   GLOBAL RESET & TYPOGRAPHY
   ===================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
    background: var(--text-placeholder);
    border-radius: var(--radius-pill);
    border: 2px solid var(--bg-page);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

::selection {
    background-color: rgba(56, 189, 248, 0.2);
    color: var(--text-main);
}

/* Typography elements */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.04em;
    font-weight: 800;
}

h2 {
    font-size: 2.25rem;
    letter-spacing: -0.03em;
}

h3 {
    font-size: 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
}

*:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

/* =====================================================================
   HEADER & NAVIGATION
   ===================================================================== */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 5%;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-header);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: border-color 0.4s, background-color 0.4s;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    white-space: nowrap;
}

.brand img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1.5px solid var(--border-light);
}

.header-nav {
    display: flex;
    gap: 24px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    padding: 4px 0;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.25s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn-apoio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-section);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    color: var(--primary) !important;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.nav-btn-apoio i {
    font-size: 1.05rem;
}

.nav-btn-apoio:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-light);
}

.nav-btn-apoio:active {
    transform: translateY(0);
}

/* =====================================================================
   BUTTONS & ACTIONS
   ===================================================================== */

.btn-browser {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid var(--border-light);
    background-color: var(--card-bg);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.btn-browser:hover {
    background-color: var(--bg-section);
    border-color: var(--text-placeholder);
}

.btn-browser.primary {
    background: var(--primary-gradient);
    color: var(--primary-text);
    border: 1px solid transparent;
    box-shadow: 0 4px 12px rgba(204, 120, 92, 0.15);
}

.btn-browser.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(204, 120, 92, 0.25);
    background: var(--primary-hover);
}

.btn-browser.primary:active {
    transform: translateY(0);
}

.btn-store {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 24px;
    border-radius: var(--radius-btn);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-card);
}

.btn-store.primary {
    background: var(--primary-gradient);
    color: var(--primary-text);
    border: 1px solid transparent;
}

.btn-store.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(204, 120, 92, 0.25);
    background: var(--primary-hover);
}

.btn-store.secondary {
    background-color: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

.btn-store.secondary:hover {
    transform: translateY(-2px);
    background-color: var(--bg-section);
    box-shadow: var(--shadow-hover);
}

.btn-store .store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    line-height: 1.25;
}

.btn-store .store-text small {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.8;
}

.btn-store .store-text strong {
    font-size: 1rem;
    font-weight: 700;
}

.theme-toggle {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-btn);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.25rem;
}

.theme-toggle:hover {
    background: var(--border-light);
    color: var(--text-main);
}

[data-theme="dark"] .ph-sun { display: block; }
[data-theme="dark"] .ph-moon { display: none; }
[data-theme="light"] .ph-sun { display: none; }
[data-theme="light"] .ph-moon { display: block; }

/* =====================================================================
   HERO SECTION
   ===================================================================== */

.hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 100px 20px 80px;
    background-image: radial-gradient(var(--border-light) 1.2px, transparent 1.2px);
    background-size: 28px 28px;
    background-position: center top;
}

.hero-content {
    max-width: 850px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    margin-bottom: 24px;
    color: var(--text-main);
}

.hero h1 span {
    background: linear-gradient(135deg, #cc785c, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .hero h1 span {
    background: linear-gradient(135deg, #e8987d, #cc785c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    font-weight: 500;
}

.hero-alert-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-light);
    border: 1px solid var(--border-light);
    padding: 4px 16px 4px 6px;
    border-radius: var(--radius-pill);
    margin-bottom: 32px;
    transition: all 0.25s ease;
}

.hero-alert-badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

.hero-alert-badge .badge-new {
    background-color: var(--primary);
    color: var(--primary-text);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
}

.hero-alert-badge .alert-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.hero-alert-badge .alert-icon {
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.hero-alert-badge:hover .alert-icon {
    transform: translateX(4px);
}

/* =====================================================================
   BENTO GRID & CARDS
   ===================================================================== */

.bento-tools {
    background-color: var(--bg-section);
    padding: 100px 5%;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.3s, border-color 0.3s;
}

.bento-header {
    text-align: center;
    margin-bottom: 60px;
}

.bento-header h2 {
    font-size: 2.25rem;
    margin-bottom: 16px;
}

.bento-header p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 750px;
    margin: 0 auto;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    max-width: 1000px;
    margin: 0 auto;
}

.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    padding: 40px;
    border-radius: var(--radius-card);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
    box-shadow: var(--shadow-card);
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.bento-icon-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.bento-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--bg-page);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-light);
    font-size: 1.5rem;
    transition: background-color 0.3s;
}

.bento-limit {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
}

.bento-card h3 {
    margin-bottom: 12px;
}

.bento-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 32px;
    flex-grow: 1;
}

/* =====================================================================
   SEARCH INTERFACE (busca.html)
   ===================================================================== */

.search-container {
    max-width: 900px;
    margin: 40px auto 80px;
    padding: 0 20px;
}

.search-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 32px;
    box-shadow: var(--shadow-card);
    margin-bottom: 32px;
    transition: background-color 0.3s, border-color 0.3s;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.search-header h1 {
    font-size: 1.75rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.input-grid-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.input-group input, .input-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-btn);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: var(--font-body);
    outline: none;
    transition: all 0.2s;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.input-group input:focus, .input-group select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-light);
    background: var(--card-bg);
}

.radar-panel {
    background: var(--card-inner);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-card);
    padding: 24px;
    margin-bottom: 24px;
}

.radar-panel label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--zen-orange);
    font-weight: 700;
    font-size: 1rem;
}

.results-area {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 28px;
    box-shadow: var(--shadow-card);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-card:hover {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-hover);
}

.result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.tribunal-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
}

.date-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.process-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.publication-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-height: 160px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: justify;
}

.publication-text.expanded {
    max-height: 4000px;
}

.publication-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(transparent, var(--card-bg));
    pointer-events: none;
    transition: opacity 0.2s;
}

.publication-text.expanded::after {
    opacity: 0;
}

.read-more-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.read-more-btn:hover {
    color: var(--primary-hover);
    gap: 10px;
}

.mark-radar {
    background-color: var(--zen-orange-bg);
    color: var(--zen-orange);
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 700;
    border-bottom: 2px solid var(--zen-orange);
}

/* =====================================================================
   CALCULATOR TIMELINE & AUDITORIA (calculadora.html)
   ===================================================================== */

.calc-wrapper {
    max-width: 720px;
    margin: 40px auto 80px;
    padding: 0 20px;
}

.calc-result-box {
    display: none;
    text-align: center;
    padding: 40px;
    background: var(--card-bg);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.resultado-data-fatal {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin: 8px 0 24px;
    letter-spacing: -0.03em;
    font-family: var(--font-heading);
}

.audit-flow {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-section);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-light);
    transition: background-color 0.3s;
}

.audit-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 6px;
    border-radius: var(--radius-btn);
    border: 1px solid var(--border-light);
    background: var(--card-bg);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    box-shadow: var(--shadow-sm);
}

.audit-day:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-focus);
    z-index: 2;
}

.audit-day.is-fatal {
    background: var(--zen-red-bg);
    border-color: var(--zen-red);
}

.audit-day.is-fatal .day-num {
    color: var(--zen-red);
}

.audit-day.is-pulo {
    opacity: 0.6;
    background: transparent;
    box-shadow: none;
    border-style: dashed;
}

.audit-day .day-icon {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.audit-day.is-fatal .day-icon {
    color: var(--zen-red);
}

.audit-day .day-num {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
}

.audit-day .day-date {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 6px 12px;
    background: var(--text-main);
    color: var(--bg-page);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-btn);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    z-index: 10;
    box-shadow: var(--shadow-modal);
}

[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% - 4px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: var(--text-main) transparent transparent transparent;
    opacity: 0;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 10;
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
}

[data-tooltip]:hover::after {
    opacity: 1;
    bottom: calc(100% - 2px);
}

/* =====================================================================
   MODAL PAYWALL / OVERLAYS
   ===================================================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: rgba(11, 15, 25, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-modal);
    max-width: 480px;
    width: 100%;
    padding: 44px;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.show .modal-card {
    transform: translateY(0);
}

/* =====================================================================
   MICRO-ANIMATIONS & LOADERS
   ===================================================================== */

.loader {
    display: none;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-weight: 600;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-section {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* =====================================================================
   FOOTER
   ===================================================================== */

footer {
    padding: 60px 20px 40px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-page);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color 0.3s, border-color 0.3s;
}

.footer-content {
    max-width: 500px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-copy {
    text-align: center;
    color: var(--text-placeholder);
    font-size: 0.85rem;
}

/* =====================================================================
   RESPONSIVE OVERRIDES
   ===================================================================== */

@media (max-width: 900px) {
    .header-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }
    h2 {
        font-size: 1.75rem;
    }
    .hero {
        padding-top: 50px;
    }
    .input-grid {
        grid-template-columns: 1fr;
    }
    .bento-card {
        padding: 32px;
    }
    .modal-card {
        padding: 32px 24px;
    }
}

/* =====================================================================
   FEATURES / BENTO GRID
   ===================================================================== */
.features-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 5%;
}

.features-header {
    text-align: center;
    margin-bottom: 60px;
}

.features-header h2 {
    font-size: 3rem;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 40px 32px;
    box-shadow: var(--shadow-card);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-focus);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 24px;
    padding: 12px;
    border-radius: 12px;
    background: var(--bg-section);
    display: inline-flex;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.highlight-term {
    font-weight: 600;
    color: var(--text-main);
}

.feature-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--primary);
    transition: color 0.2s, gap 0.2s;
}

.feature-link:hover {
    color: var(--primary-hover);
    gap: 12px;
}

/* =====================================================================
   AUTHORITY BOX & INFO CONTAINER
   ===================================================================== */
.info-container {
    max-width: 900px;
    margin: 80px auto;
    padding: 0 5%;
}

.authority-box {
    background: var(--card-inner);
    border-left: 4px solid var(--primary);
    padding: 40px;
    border-radius: 0 var(--radius-card) var(--radius-card) 0;
    box-shadow: var(--shadow-card);
}

.authority-box h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.authority-box p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* =====================================================================
   FAQ SECTION
   ===================================================================== */
.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 32px;
    transition: box-shadow 0.3s;
}

.faq-item:hover {
    box-shadow: var(--shadow-hover);
}

.faq-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.faq-header i {
    font-size: 1.5rem;
}

/* =====================================================================
   BOTTOM CTA
   ===================================================================== */
.bottom-cta {
    text-align: center;
    padding: 100px 5%;
    background: var(--bg-section);
    border-top: 1px solid var(--border-light);
}

.bottom-cta h2 {
    font-size: 3.5rem;
    margin-bottom: 24px;
    color: var(--text-main);
}

.bottom-cta p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* =====================================================================
   FOOTER & COFFEE
   ===================================================================== */
footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-light);
    padding: 60px 5% 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.coffee-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.coffee-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border-light);
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s;
}

.coffee-btn:hover, .coffee-btn.active {
    background: var(--bg-section);
    border-color: var(--border-focus);
}

.coffee-content {
    width: 100%;
    margin-top: 16px;
    padding: 32px;
    background: var(--bg-section);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
}

.coffee-content.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.pix-code-container {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.pix-code-container input {
    flex-grow: 1;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-btn);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.pix-code-container input:focus {
    outline: none;
    border-color: var(--border-focus);
}

.pix-code-container button {
    padding: 0 24px;
    background: var(--primary);
    color: var(--primary-text);
    border: none;
    border-radius: var(--radius-btn);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.pix-code-container button:hover {
    background: var(--primary-hover);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-main);
}

.footer-copy {
    color: var(--text-placeholder);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 768px) {
    .features-header h2 { font-size: 2.5rem; }
    .bottom-cta h2 { font-size: 2.5rem; }
    .pix-code-container { flex-direction: column; }
    .pix-code-container button { padding: 12px; }
}

/* =====================================================================
   PREMIUM CAROUSEL / SHOWCASE (index.html)
   ===================================================================== */
.gallery-section {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 5%;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.gallery-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.carousel-controls {
    display: flex;
    gap: 12px;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-light);
    background: var(--card-bg);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-card);
}

.carousel-btn:hover {
    background: var(--primary);
    color: var(--primary-text);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.carousel-wrapper {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
}

.carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 24px;
    padding: 10px 0 20px;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.carousel::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

.carousel-item {
    flex: 0 0 calc(50% - 12px);
    scroll-snap-align: start;
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: var(--card-bg);
    box-shadow: var(--shadow-card);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
    cursor: zoom-in;
}

@media (max-width: 900px) {
    .carousel-item {
        flex: 0 0 100%;
    }
}

.carousel-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-focus);
}

.carousel-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-item:hover img {
    transform: scale(1.02);
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 24px;
    background: rgba(18, 18, 18, 0.75);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: background 0.3s;
}

[data-theme="light"] .carousel-caption {
    background: rgba(255, 255, 255, 0.80);
    color: #111111;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* =====================================================================
   TIMELINE CHANGELOG (versoes.html)
   ===================================================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 60px auto;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 2px;
    background: var(--border-light);
}

.timeline-item {
    position: relative;
    margin-bottom: 48px;
}

.timeline-badge {
    position: absolute;
    left: -40px;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-pill);
    background: var(--bg-section);
    border: 2px solid var(--border-light);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.timeline-badge.badge-active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-text);
    box-shadow: 0 0 12px rgba(42, 42, 42, 0.2);
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 32px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s;
}

.timeline-content:hover {
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-status {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.timeline-status.active {
    color: var(--zen-green);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.timeline-status.active::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--zen-green);
    box-shadow: 0 0 8px var(--zen-green);
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--text-placeholder);
    font-weight: 500;
}

.timeline-content h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.changelog-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.changelog-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.changelog-list li strong {
    color: var(--text-main);
}

/* Version tags */
.tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.tag-new {
    background: var(--zen-green-bg);
    color: var(--zen-green);
}

.tag-improvement {
    background: var(--zen-blue-bg);
    color: var(--zen-blue);
}

.tag-fix {
    background: var(--zen-red-bg);
    color: var(--zen-red);
}

/* highlight class for support container */
.highlight-glow {
    animation: flashBorder 2s ease-out;
}

@keyframes flashBorder {
    0% {
        border-color: var(--zen-orange);
        box-shadow: 0 0 20px rgba(232, 123, 35, 0.4);
    }
    100% {
        border-color: var(--border-light);
        box-shadow: var(--shadow-card);
    }
}

.bento-grid {
    max-width: 1200px !important;
}

/* =====================================================================
   STORE CARDS & CHROME/FIREFOX/WEBAPP INDICATORS (versoes.html)
   ===================================================================== */
.stores-container {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
    flex-wrap: wrap;
    width: 100%;
}

.store-card {
    display: flex;
    align-items: center;
    flex: 1 1 calc(33.333% - 16px);
    min-width: 260px;
    max-width: 320px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-card);
    padding: 20px 24px;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s, border-color 0.3s;
    box-shadow: var(--shadow-card);
}

.store-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-focus);
}

.store-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
}

.store-microcopy {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.store-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.store-version {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-placeholder);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.store-version.version-chrome {
    color: #0ea5e9;
}

.store-version.version-firefox {
    color: #f97316;
}

.store-version.version-webapp {
    color: var(--zen-purple);
}

/* Pulsing Dot Indicator */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    animation: pulseGlow 1.5s infinite;
}

.dot-chrome {
    background-color: #0ea5e9;
    box-shadow: 0 0 8px #0ea5e9;
}

.dot-firefox {
    background-color: #f97316;
    box-shadow: 0 0 8px #f97316;
}

.dot-webapp {
    background-color: var(--zen-purple);
    box-shadow: 0 0 8px var(--zen-purple);
}

@media (max-width: 768px) {
    .features-header h2 { font-size: 2.5rem; }
    .bottom-cta h2 { font-size: 2.5rem; }
    .pix-code-container { flex-direction: column; }
    .pix-code-container button { padding: 12px; }
    .timeline { padding-left: 20px; }
    .timeline::before { left: 5px; }
    .timeline-badge { left: -20px; width: 26px; height: 26px; font-size: 0.65rem; }
}

/* Tooltip de versão flutuante nos botões da loja */
.version-tooltip {
    position: absolute;
    top: -12px;
    right: 12px;
    background-color: var(--zen-orange);
    color: #ffffff !important;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-light);
    z-index: 10;
}

[data-theme="dark"] .version-tooltip {
    color: #191919 !important; /* Em modo escuro, zen-orange é amarelo (#facc15), exigindo alto contraste escuro */
}
