/* ===========================
   DICIONÁRIO JURÍDICO - CSS UNIFICADO
   Versão 2.0 - Index + Termos
   =========================== */

/* VARIÁVEIS GLOBAIS */
:root {
    /* Cores principais */
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    
    /* Backgrounds */
    --bg-main: #ffffff;
    --bg-surface: #f8f9fa;
    --bg-hover: #e9ecef;
    
    /* Textos */
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --text-white: #ffffff;
    
    /* Bordas */
    --border-color: #dee2e6;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.1);
    --shadow-xl: 0 12px 24px rgba(0,0,0,0.12);
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    --gradient-premium: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    
    /* Layout */
    --header-height: 90px;
    --sidebar-width: 280px;
    --sidebar-right-width: 320px;
    --content-max-width: 1400px;
    
    /* Espaçamentos */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
    
    /* Transições */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* TEMA ESCURO */
[data-theme="dark"] {
    --bg-main: #1a1a1a;
    --bg-surface: #2d2d2d;
    --bg-hover: #3a3a3a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #6c757d;
    --border-color: #404040;
    --shadow-sm: 0 2px 4px rgba(255,255,255,0.05);
    --shadow-md: 0 4px 8px rgba(255,255,255,0.08);
    --shadow-lg: 0 8px 16px rgba(255,255,255,0.1);
    --gradient-primary: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* RESET E BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
    max-width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--gradient-primary);
    min-height: 100vh;
    padding: 20px;
    transition: background var(--transition-normal), color var(--transition-normal);
    max-width: 100%;
    overflow-x: clip;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--secondary-color);
}

button {
    cursor: pointer;
    font-family: inherit;
    transition: all var(--transition-fast);
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

pre, code {
    max-width: 100%;
    overflow-x: auto;
}

table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

/* CONTAINER PRINCIPAL */
.container {
    max-width: var(--content-max-width);
    width: 100%;
    margin: 0 auto;
    background: var(--bg-main);
    min-height: calc(100vh - 40px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow-x: clip;
}

/* ===========================
   HEADER (COMPARTILHADO)
   =========================== */
.header {
    height: var(--header-height);
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: 0 var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 20px;
    color: var(--text-white);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.back-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateX(-3px);
    color: var(--text-white);
}

.back-icon {
    font-size: 1.1rem;
    font-weight: bold;
}

.header-center {
    flex: 1;
    max-width: 500px;
    margin: 0 var(--spacing-lg);
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-xl) var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: 24px;
    background: rgba(255,255,255,0.95);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-input:focus {
    outline: none;
    background: var(--text-white);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: var(--spacing-sm);
    font-size: 1.1rem;
    opacity: 0.6;
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + var(--spacing-xs));
    left: 0;
    right: 0;
    background: var(--bg-main);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.share-btn,
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-white);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover,
.theme-toggle:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* ===========================
   PÁGINA INDEX - ESPECÍFICOS
   =========================== */

/* Hero Section (substitui o CTA premium no index) */
.hero-section {
    background: var(--gradient-primary);
    padding: var(--spacing-xxl) var(--spacing-lg);
    text-align: center;
    color: var(--text-white);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-xl);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #FFD700;
}

.hero-stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Cards de Áreas do Direito */
.areas-section {
    padding: var(--spacing-xl);
}

.areas-title {
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--text-primary);
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.area-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.area-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.area-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

.area-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.area-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.area-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: var(--spacing-sm);
    line-height: 1.4;
}

/* Termos Populares Section */
.popular-section {
    background: var(--bg-surface);
    padding: var(--spacing-xl);
    margin: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
}

.popular-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.popular-term {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.popular-term:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
    transform: translateX(4px);
}

/* ===========================
   MODAL (DO INDEX)
   =========================== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn var(--transition-normal);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-main);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn var(--transition-normal);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: var(--spacing-xl);
    overflow-y: auto;
    flex: 1;
}

.modal-section {
    margin-bottom: var(--spacing-xl);
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.modal-section-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-section-content p {
    margin-bottom: var(--spacing-md);
}

.modal-examples {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.modal-examples li {
    background: var(--bg-surface);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--primary-color);
}

.modal-references {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.modal-reference {
    background: var(--bg-surface);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.modal-area-badge {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.modal-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.modal-btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
}

.modal-btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.modal-btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.modal-btn-secondary:hover {
    background: var(--bg-surface);
}

/* ===========================
   CTA PREMIUM NATIVO (COMPARTILHADO)
   =========================== */
.premium-native-card {
    background: linear-gradient(135deg, #f6f9fc 0%, #e8f4fd 100%);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg);
    transition: all var(--transition-normal);
}

.premium-native-card.highlighted {
    background: linear-gradient(135deg, #28a745 0%, #2ecc71 100%);
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
    position: relative;
    overflow: hidden;
}

.premium-native-card.highlighted::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: translateX(-200%);
    will-change: transform;
    animation: shine 4s ease-in-out infinite;
}

/* Animação via transform (GPU) - evita CLS */
@keyframes shine {
    0% { transform: translateX(-200%); }
    50% { transform: translateX(300%); }
    100% { transform: translateX(300%); }
}

.premium-native-card.highlighted .premium-title,
.premium-native-card.highlighted .premium-subtitle {
    color: white;
}

.premium-native-card.highlighted .premium-badge {
    background: white;
    color: #28a745;
}

[data-theme="dark"] .premium-native-card {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
    border-color: rgba(52, 152, 219, 0.3);
}

[data-theme="dark"] .premium-native-card.highlighted {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.2) 0%, rgba(46, 204, 113, 0.2) 100%);
}

.premium-native-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    position: relative;
    z-index: 1;
}

.premium-badge {
    background: var(--gradient-premium);
    color: var(--text-white);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.premium-info {
    flex: 1;
}

.premium-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.premium-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.premium-action {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.premium-old-price {
    text-decoration: line-through;
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
}

.premium-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.highlighted .premium-price {
    color: #FFD700;
}

.premium-btn {
    padding: var(--spacing-md) var(--spacing-xl);
    background: white;
    color: #28a745;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    transition: all var(--transition-fast);
}

.premium-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

/* ===========================
   LAYOUT PRINCIPAL (PÁGINAS DE TERMO)
   =========================== */
.main-content {
    display: grid;
    grid-template-columns: minmax(200px, var(--sidebar-width)) 1fr minmax(280px, var(--sidebar-right-width));
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    min-height: calc(100vh - var(--header-height));
    max-width: 100%;
    width: 100%;
}

/* Garante que todos os filhos diretos do grid respeitem a largura */
.main-content > * {
    min-width: 0;
    max-width: 100%;
}

/* Para o index, usa layout de 1 coluna */
.page-index .main-content {
    grid-template-columns: 1fr;
    padding: 0;
}

/* ===========================
   SIDEBAR ESQUERDA (PÁGINAS DE TERMO)
   =========================== */
.sidebar-left {
    height: fit-content;
    max-width: 100%;
    overflow: hidden;
}

.sidebar-section {
    background: var(--bg-surface);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-color);
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--border-color);
}

.sidebar-icon {
    font-size: 1.2rem;
}

/* Trending Terms */
.trending-terms {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.trending-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.trending-link:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}

.trending-number {
    background: var(--primary-color);
    color: var(--text-white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Native Suggestion (Cross-promo) */
.native-suggestion {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

/* Calculey Card - Estilo especial */
.calculey-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4fd 100%);
    border: 2px solid #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
    transition: all var(--transition-normal);
}

.calculey-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.25);
}

[data-theme="dark"] .calculey-card {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(52, 152, 219, 0.05) 100%);
    border-color: #3498db;
}

.suggestion-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.calculey-card .suggestion-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Header Row - Badge em cima, Label embaixo */
.calculey-card .suggestion-header-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(52, 152, 219, 0.08);
    margin: -16px -16px 16px -16px;
    border-radius: 10px 10px 0 0;
}

.calculey-card .badge-free {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-icon {
    font-size: 1.2rem;
}

.suggestion-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.calculey-card .suggestion-label {
    color: #3498db;
}

.suggestion-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.suggestion-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.calculey-card .suggestion-title {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calculey-card .suggestion-subtitle {
    font-size: 14px;
    color: #3498db;
    font-weight: 600;
    margin-bottom: 10px;
}

[data-theme="dark"] .calculey-card .suggestion-subtitle {
    color: #5dade2;
}

.suggestion-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.suggestion-features {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
    margin: var(--spacing-sm) 0;
}

.feature-tag {
    background: var(--bg-hover);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.calculey-card .feature-tag {
    background: rgba(52, 152, 219, 0.1);
    color: #2980b9;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.suggestion-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius-sm);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.suggestion-btn:hover {
    background: var(--primary-color);
    color: var(--text-white);
    transform: translateY(-2px);
}

.calculey-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.calculey-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f6391 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* Similar Terms e Area Terms */
.similar-terms,
.area-terms {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.similar-link,
.area-link {
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.similar-link:hover,
.area-link:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
    padding-left: var(--spacing-md);
}

/* ===========================
   CONTEÚDO PRINCIPAL (PÁGINAS DE TERMO)
   =========================== */
.content-main {
    background: var(--bg-main);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Term Header */
.term-header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--border-color);
}

.term-title-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.share-btn-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 2px solid #10b981;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.share-btn-inline:hover {
    background: #10b981;
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Modo escuro - share button */
[data-theme="dark"] .share-btn-inline {
    background: rgba(16, 185, 129, 0.2);
    border-color: #34d399;
    color: #6ee7b7;
    box-shadow: 0 2px 8px rgba(52, 211, 153, 0.3);
}

[data-theme="dark"] .share-btn-inline:hover {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.45);
}

.term-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.term-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.term-area-badge {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.term-views {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Content Sections */
.content-section {
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: 1.5rem;
}

.section-icon {
    font-size: 1.4rem;
}

.section-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.section-content p {
    margin-bottom: var(--spacing-md);
}

.section-content p:last-child {
    margin-bottom: 0;
}

/* Lists */
.examples-list,
.references-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.examples-list li,
.references-list li {
    background: var(--bg-surface);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid var(--primary-color);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.examples-list li:hover,
.references-list li:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

/* Ad Placeholder */
.ad-placeholder {
    background: var(--bg-surface);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    margin: 0;
    padding: 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.ad-placeholder[data-ad-size="fluid"] {
    min-height: 280px;
}

.ad-placeholder[data-ad-size="300x600"] {
    width: 100%;
    max-width: 300px;
    height: 600px;
}

/* Label de Patrocinado - Elemento separado acima do ad */
.ad-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    opacity: 0.6;
    text-align: center;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

/* Esconde label do mobile sticky ad */
.ad-label-mobile {
    display: none;
}

/* Tema escuro para label de Patrocinado */
[data-theme="dark"] .ad-label {
    color: #ffffff;
    opacity: 0.6;
}

/* Conteúdo do ad */
.ad-content {
    width: 100%;
    height: 100%;
}

/* Jurisprudence Section */
.jurisprudence-section {
    background: var(--bg-surface);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.jurisprudence-intro {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.jurisprudence-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.jurisprudence-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    transition: all var(--transition-fast);
}

.jurisprudence-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stf-btn:hover {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1) 0%, rgba(39, 174, 96, 0.1) 100%);
    border-color: var(--success-color);
}

.stj-btn:hover {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1) 0%, rgba(41, 128, 185, 0.1) 100%);
    border-color: var(--primary-color);
}

.tribunal-badge {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
}

.tribunal-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.tribunal-action {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Related Section */
.related-section {
    margin-top: var(--spacing-xxl);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.related-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.related-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.related-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex: 1;
}

.related-area {
    font-size: 0.75rem;
    background: var(--bg-hover);
    color: var(--text-secondary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 12px;
    align-self: flex-start;
}

/* ===========================
   SIDEBAR DIREITA (PÁGINAS DE TERMO)
   =========================== */
.sidebar-right {
    position: relative;
    min-height: 100vh;
    max-width: 100%;
}

/* Espaçamento entre elementos da sidebar direita */
.sidebar-right > * {
    margin-bottom: var(--spacing-lg);
    max-width: 100%;
}

/* Remove margin do label e ad na sidebar */
.sidebar-right > .ad-label {
    margin-bottom: 0;
}

.sidebar-right > .ad-placeholder {
    margin-bottom: var(--spacing-lg);
}

.sidebar-right > *:last-child {
    margin-bottom: 0;
}

/* Premium Compact */
.premium-compact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.premium-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.1), transparent);
    pointer-events: none;
}

.compact-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #FFD700;
    color: #2c3e50;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 0 var(--border-radius) 0 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.compact-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.compact-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--spacing-md);
}

.compact-features {
    list-style: none;
    text-align: left;
    margin: var(--spacing-md) 0;
    background: rgba(255,255,255,0.1);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
}

.compact-features li {
    color: white;
    font-size: 0.9rem;
    padding: var(--spacing-xs) 0;
    opacity: 0.95;
}

.compact-pricing {
    margin: var(--spacing-md) 0;
}

.compact-old-price {
    color: rgba(255,255,255,0.6);
    text-decoration: line-through;
    font-size: 1rem;
    display: block;
    margin-bottom: var(--spacing-xs);
}

.compact-price {
    font-size: 2.2rem;
    font-weight: 700;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.compact-btn {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: white;
    color: #667eea;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    margin-top: var(--spacing-md);
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.compact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    background: #FFD700;
    color: #2c3e50;
}

.compact-guarantee {
    display: block;
    margin-top: var(--spacing-sm);
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Dica do Dia */
.tip-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    position: relative;
}

.tip-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color);
}

.tip-icon {
    font-size: 1.2rem;
}

.tip-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tip-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.tip-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.tip-link {
    display: inline-block;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.tip-link:hover {
    transform: translateX(4px);
}

[data-theme="dark"] .premium-compact {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-color: rgba(102, 126, 234, 0.4);
}

/* Ajuste para terceiro ad menor */
.ad-placeholder[data-ad-size="300x250"] {
    width: 100%;
    max-width: 300px;
    height: 250px;
}

/* ===========================
   STICKY SIDEBAR ELEMENTS
   =========================== */

/* Quando ads estão habilitados, o wrapper do último ad fica sticky */
.ads-enabled .ad-wrapper-sidebar-bottom {
    position: sticky !important;
    top: calc(var(--header-height) + var(--spacing-lg)) !important;
    z-index: 100;
}

/* Quando ads estão desabilitados, o app CTA fica sticky */
.ads-disabled .premium-compact {
    position: sticky !important;
    top: calc(var(--header-height) + var(--spacing-lg)) !important;
    z-index: 100;
}

/* ===========================
   CTA DO APP - CONTROLE DE VISIBILIDADE
   =========================== */

/* Quando CTAs estão desabilitados (app ainda não existe) */
.cta-disabled .app-cta,
.cta-disabled .premium-compact,
.cta-disabled .premium-native-card {
    display: none !important;
}

/* Quando CTAs estão habilitados */
.cta-enabled .app-cta,
.cta-enabled .premium-compact,
.cta-enabled .premium-native-card {
    display: block;
}


/* ===========================
   RESPONSIVIDADE
   =========================== */

/* ===========================
   MEDIA QUERY 770px - 1199px
   Tablet - Otimização de Sidebars
   =========================== */

@media (max-width: 1199px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar-left,
    .sidebar-right {
        position: static;
        max-height: none;
    }
    
    /* ===== SIDEBAR ESQUERDA - GRID 2 COLUNAS ===== */
    .sidebar-left {
        order: 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
        align-items: start;
    }

    .sidebar-left .sidebar-section {
        display: flex;
        flex-direction: column;
    }

    /* LINHA 1: Trending (1º filho) + Calculey (2º filho) */
    .sidebar-left > *:nth-child(1) {
        grid-column: 1 / 2;
        grid-row: 1;
    }

    .sidebar-left > *:nth-child(2) {
        grid-column: 2 / 3;
        grid-row: 1;
    }

    /* LINHA 2: Similar Terms (3º filho) + Area Terms (4º filho) */
    .sidebar-left > *:nth-child(3) {
        grid-column: 1 / 2;
        grid-row: 2;
    }

    .sidebar-left > *:nth-child(4) {
        grid-column: 2 / 3;
        grid-row: 2;
    }

    /* Demais filhos ocupam linha inteira */
    .sidebar-left > *:nth-child(n+5) {
        grid-column: 1 / -1;
    }

    /* ===== SIDEBAR DIREITA - LIMPA E DISCRETA ===== */
    .sidebar-right {
        order: 3;
        display: flex !important;
        flex-direction: column;
        gap: var(--spacing-md);
        opacity: 1;
        visibility: visible;
    }

    /* Primeiro ad - horizontal 90px */
    .sidebar-right .ad-placeholder[data-ad-position="sidebar-top"] {
        width: 100%;
        max-width: 100%;
        height: 90px !important;
        min-height: 90px !important;
        max-height: 90px !important;
    }

    /* Wrapper do segundo ad - VISÍVEL no tablet (após o CTA) */
    .sidebar-right .ad-wrapper-sidebar-bottom {
        display: block;
        width: 100%;
        order: 10; /* Garante que fica após o CTA */
    }

    /* Ad dentro do wrapper - tamanho horizontal no tablet */
    .sidebar-right .ad-wrapper-sidebar-bottom .ad-placeholder {
        min-width: 100%;
        height: 90px !important;
        min-height: 90px !important;
        max-height: 90px !important;
    }

    /* ===== CTA PREMIUM ESTILO NATIVE AD - COMPACTO ===== */
    .sidebar-right .premium-compact {
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        padding: var(--spacing-md);
        box-shadow: none;
        text-align: left;
        min-height: auto;
    }

    .sidebar-right .premium-compact::before {
        display: none;
    }

    .compact-badge {
        position: static;
        display: inline-block;
        background: var(--gradient-premium);
        color: #2c3e50;
        padding: 4px 10px;
        border-radius: 12px;
        font-size: 0.7rem;
        font-weight: 700;
        margin-bottom: var(--spacing-sm);
    }

    .compact-icon {
        display: none;
    }

    .compact-title {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: var(--spacing-xs);
    }

    .compact-subtitle {
        font-size: 0.85rem;
        color: var(--text-secondary);
        margin-bottom: var(--spacing-sm);
        line-height: 1.5;
    }

    .compact-features {
        list-style: none;
        text-align: left;
        margin: var(--spacing-sm) 0;
        background: transparent;
        border-radius: 0;
        padding: 0;
        display: flex;
        flex-wrap: wrap;
        gap: var(--spacing-xs);
    }

    .compact-features li {
        color: var(--text-secondary);
        font-size: 0.75rem;
        padding: 3px 8px;
        background: var(--bg-hover);
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
    }

    .compact-pricing {
        margin: var(--spacing-sm) 0;
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
    }

    .compact-old-price {
        color: var(--text-muted);
        text-decoration: line-through;
        font-size: 0.85rem;
        display: inline;
        margin: 0;
    }

    .compact-price {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--success-color);
        text-shadow: none;
    }

    .compact-btn {
        width: 100%;
        padding: var(--spacing-sm) var(--spacing-md);
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: var(--border-radius-sm);
        font-weight: 600;
        font-size: 0.85rem;
        transition: all var(--transition-fast);
        box-shadow: none;
    }

    .compact-btn:hover {
        transform: translateY(-1px);
        background: var(--secondary-color);
        box-shadow: var(--shadow-sm);
    }

    .compact-guarantee {
        display: block;
        margin-top: var(--spacing-xs);
        color: var(--text-muted);
        font-size: 0.75rem;
        font-weight: 500;
        text-align: center;
    }

    /* Tip Card */
    .sidebar-right .tip-card {
        padding: var(--spacing-md);
    }

    .tip-content {
        font-size: 0.85rem;
        line-height: 1.6;
        margin-bottom: var(--spacing-sm);
    }

    /* Ordem do conteúdo */
    .content-main {
        order: 1;
    }

    /* Footer responsivo */
    .footer-content {
        grid-template-columns: 1.5fr 1fr;
        gap: var(--spacing-xl);
    }

    .footer-section:last-child {
        grid-column: 1 / -1;
        max-width: 50%;
    }
    
    /* Index específico */
    .areas-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .popular-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Index - main content com ads - EMPILHADO no tablet */
    .main-content-with-ads {
        grid-template-columns: 1fr !important;
    }

    .main-content-with-ads .sidebar-right {
        display: flex !important;
        flex-direction: column;
        gap: var(--spacing-md);
        order: 2;
    }

    .main-content-with-ads .results-section {
        order: 1;
    }

    /* Primeiro ad - horizontal 90px */
    .main-content-with-ads .sidebar-right .ad-placeholder[data-ad-position="sidebar-top"] {
        width: 100%;
        max-width: 100%;
        height: 90px !important;
        min-height: 90px !important;
        max-height: 90px !important;
    }

    /* Wrapper do segundo ad - VISÍVEL no tablet (após o CTA) */
    .main-content-with-ads .sidebar-right .ad-wrapper-sidebar-bottom {
        display: block;
        width: 100%;
        order: 10; /* Garante que fica após o CTA */
    }

    /* Ad dentro do wrapper - tamanho horizontal no tablet */
    .main-content-with-ads .sidebar-right .ad-wrapper-sidebar-bottom .ad-placeholder {
        width: 100%;
        height: 90px !important;
        min-height: 90px !important;
        max-height: 90px !important;
    }
}

/* Tablet/Mobile (600px - 769px) - 2x2 IGUAL AO DESKTOP */
@media (max-width: 769px) and (min-width: 600px) {
    /* Sidebar left mantém grid 2 colunas IGUAIS (50% cada) */
    .sidebar-left {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: var(--spacing-md) !important;
    }

    /* LINHA 1: Trending (1º filho) + Calculey (2º filho) */
    .sidebar-left > *:nth-child(1) {
        grid-column: 1 / 2 !important;
        grid-row: 1 !important;
    }

    .sidebar-left > *:nth-child(2) {
        grid-column: 2 / 3 !important;
        grid-row: 1 !important;
    }

    /* LINHA 2: Termos Similares (3º filho) + Direito Constitucional (4º filho) */
    .sidebar-left > *:nth-child(3) {
        grid-column: 1 / 2 !important;
        grid-row: 2 !important;
    }

    .sidebar-left > *:nth-child(4) {
        grid-column: 2 / 3 !important;
        grid-row: 2 !important;
    }

    /* Demais filhos ocupam linha inteira */
    .sidebar-left > *:nth-child(n+5) {
        grid-column: 1 / -1 !important;
    }

    /* Botões de jurisprudência e termos relacionados mantêm em linha */
    .jurisprudence-grid,
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* ===== AD MOBILE STICKY ===== */
    .ad-mobile-sticky {
        display: block !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        background: var(--bg-main) !important;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.15) !important;
        border-top: 1px solid var(--border-color) !important;
        padding: 0 !important;
        margin: 0 !important;
        text-align: center !important;
        animation: slideUpSticky 0.4s ease !important;
    }

    /* Adiciona espaço no body para não cobrir conteúdo */
    body.has-sticky-ad {
        padding-bottom: 60px !important;
    }
}

/* Mobile (menos de 600px) - EMPILHA OS 4 CARDS EM 1 COLUNA */
@media (max-width: 599px) {
    /* Sidebar left vira 1 coluna */
    .sidebar-left {
        display: flex !important;
        flex-direction: column !important;
        gap: var(--spacing-md) !important;
    }

    /* Todos os cards ocupam largura total */
    .sidebar-left > * {
        width: 100% !important;
    }

    /* Calculey card mais compacto */
    .calculey-card {
        padding: var(--spacing-md) !important;
    }

    .calculey-card .suggestion-title {
        font-size: 1rem !important;
    }

    .calculey-card .suggestion-desc {
        font-size: 0.85rem !important;
    }

    .calculey-card .feature-tag {
        font-size: 0.7rem !important;
    }

    .calculey-card .suggestion-btn {
        padding: var(--spacing-sm) var(--spacing-md) !important;
        font-size: 0.9rem !important;
        width: 100% !important;
    }

    /* AD MOBILE STICKY */
    .ad-mobile-sticky {
        display: block !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 9999 !important;
        background: var(--bg-main) !important;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.15) !important;
        border-top: 1px solid var(--border-color) !important;
        padding: 0 !important;
        margin: 0 !important;
        text-align: center !important;
        animation: slideUpSticky 0.4s ease !important;
    }

    body.has-sticky-ad {
        padding-bottom: 60px !important;
    }
}

/* Mobile (menos de 768px) */
@media (max-width: 767px) {
    /* Body mobile */
    body {
        padding: 10px;
    }

    /* Container mobile */
    .container {
        border-radius: 15px;
    }

    /* Header Mobile */
    .header {
        padding: var(--spacing-sm) var(--spacing-md);
        flex-wrap: wrap;
        height: auto;
        position: relative;
    }
    
    .header-left {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        margin-bottom: var(--spacing-sm);
    }
    
    .site-title {
        font-size: 1rem;
        flex: 1;
        margin-left: var(--spacing-sm);
    }
    
    .back-text {
        display: none;
    }
    
    .header-center {
        width: 100%;
        margin: 0;
        order: 2;
    }
    
    .header-right {
        display: flex;
        gap: var(--spacing-xs);
        margin-left: auto;
    }
    
    /* Hero Mobile */
    .hero-section {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    /* Premium CTA Mobile - REDUZIDO */
    .premium-native-card {
        padding: var(--spacing-md);
        margin: var(--spacing-md);
    }
    
    .premium-native-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .premium-title {
        font-size: 1rem;
    }
    
    .premium-subtitle {
        font-size: 0.85rem;
    }
    
    .premium-badge {
        font-size: 0.8rem;
    }
    
    .premium-action {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: var(--spacing-md);
    }
    
    .premium-old-price {
        font-size: 0.9rem;
    }
    
    .premium-price {
        font-size: 1.4rem;
    }
    
    .premium-btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: 0.95rem;
    }
    
    /* Main Content Mobile */
    .main-content {
        padding: var(--spacing-md);
        gap: var(--spacing-md);
    }
    
    .content-main {
        padding: var(--spacing-lg);
    }
    
    .term-title {
        font-size: 1.8rem;
    }
    
    .term-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Sidebar left - layout controlado pelas media queries específicas (600-769px e <599px) */
    /* Não definir grid-template-columns aqui para evitar conflitos */

    /* Index Mobile */
    .areas-grid {
        grid-template-columns: 1fr;
    }
    
    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Modal Mobile */
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
   
    .modal-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .modal-btn {
        width: 100%;
    }

    /* Ad Placeholders e Labels Mobile - ESCONDE sidebar-top */
    .ad-placeholder[data-ad-position="sidebar-top"],
    .sidebar-right > .ad-label:first-of-type {
        display: none !important;
    }

    /* Wrapper do segundo ad - VISÍVEL no mobile (após o CTA) */
    .ad-wrapper-sidebar-bottom,
    .main-content-with-ads .sidebar-right .ad-wrapper-sidebar-bottom {
        display: block !important;
        width: 100%;
        order: 10;
    }

    .ad-wrapper-sidebar-bottom .ad-placeholder,
    .main-content-with-ads .sidebar-right .ad-wrapper-sidebar-bottom .ad-placeholder {
        width: 100%;
        height: 90px !important;
        min-height: 90px !important;
        max-height: 90px !important;
    }

    /* Index específico mobile */
    .index-logo {
        height: 90px;
        max-width: 280px;
    }

    .header-index .subtitle {
        font-size: 0.9rem;
    }

    .app-cta {
        margin: var(--spacing-md);
        padding: var(--spacing-md);
    }

    .app-cta-content h3 {
        font-size: 1.1rem;
    }

    .app-cta-btn {
        font-size: 0.95rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .search-section {
        padding: var(--spacing-sm);
    }

    .search-options {
        gap: var(--spacing-sm);
        justify-content: center;
    }

    .main-content-with-ads {
        padding: var(--spacing-md);
    }

    .terms-list {
        grid-template-columns: 1fr;
    }

    .alphabet-nav {
        display: none;
    }

    /* Sidebar do index fica visível no mobile, mas ads somem (regra em 2074-2077) */
    .main-content-with-ads .sidebar-right {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-md);
        order: 2;
    }
}

/* Mobile pequeno (menos de 480px) */
@media (max-width: 479px) {
    body {
        font-size: 14px;
    }

    .term-title {
        font-size: 1.5rem;
    }

    .share-btn-inline {
        width: 32px;
        height: 32px;
    }

    .share-btn-inline svg {
        width: 16px;
        height: 16px;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .premium-price {
        font-size: 1.2rem;
    }

    .popular-grid {
        grid-template-columns: 1fr;
    }

    /* Jurisprudência e termos relacionados em 1 coluna em telas pequenas */
    .jurisprudence-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    /* Sidebar direita já está em flex-column no breakpoint 1199px */
}

/* Mobile muito pequeno (menos de 400px) */
@media (max-width: 399px) {
    body {
        padding: 3px;
    }

    .container {
        border-radius: 8px;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .header-index {
        padding: var(--spacing-sm) var(--spacing-xs);
    }

    .index-logo {
        height: 70px;
        max-width: 220px;
    }

    /* Conteúdo central - centralizado */
    .main-content-with-ads {
        padding: var(--spacing-xs) !important;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .main-content-with-ads .sidebar-right {
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .results-section {
        padding: var(--spacing-xs) !important;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* Sidebar section sem margem extra */
    .sidebar-section {
        padding: var(--spacing-xs);
        margin: 0;
    }

    .header-index .subtitle {
        font-size: 0.8rem;
    }

    .header-index .theme-toggle {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
    }

    .app-cta {
        margin: var(--spacing-xs);
        padding: var(--spacing-xs);
    }

    .app-cta-content h3 {
        font-size: 1rem;
    }

    .app-cta-btn {
        font-size: 0.85rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .search-section {
        padding: var(--spacing-xs);
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* Premium compact mais compacto */
    .premium-compact {
        padding: var(--spacing-xs);
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .compact-title {
        font-size: 0.95rem;
    }

    .compact-subtitle {
        font-size: 0.8rem;
    }

    .compact-btn {
        font-size: 0.85rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    /* Wrapper do ad também centralizado */
    .ad-wrapper-sidebar-bottom {
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* Terms list sem overflow */
    .terms-list {
        width: 100%;
        box-sizing: border-box;
    }
}

/* ===========================
   UTILITÁRIOS
   =========================== */
.hidden {
    display: none !important;
}

.visible-mobile {
    display: none;
}

@media (max-width: 767px) {
    .visible-mobile {
        display: block;
    }
    
    .hidden-mobile {
        display: none !important;
    }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Print styles */
@media print {
    .header,
    .sidebar-left,
    .sidebar-right,
    .ad-placeholder,
    .premium-native-card {
        display: none !important;
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .content-main {
        border: none;
        padding: 0;
    }
}

/* ===========================
   ESTILOS ESPECÍFICOS DO INDEX
   Adicionar ao final do unified-style.css
   =========================== */

/* Header específico do Index */
.header-index {
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-md);
    background: var(--gradient-primary);
    color: var(--text-white);
    position: relative;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.header-index .theme-toggle {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
}

/* Logo Container - Index */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

/* Logo Index - tamanho controlado */
.index-logo {
    height: 150px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
}

.header-index .subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

/* Logo no Header das páginas de termos */
.header-logo {
    height: 140px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.site-logo {
    display: flex;
    align-items: center;
}

/* Alternância de logos claro/escuro */
.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

/* App CTA específico */
.app-cta {
    background: linear-gradient(135deg, #28a745 0%, #2ecc71 100%);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    color: white;
    text-align: center;
}

.app-cta-content h3 {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
}

.app-cta-content p {
    margin-bottom: var(--spacing-md);
}

.app-cta-btn {
    background: white;
    color: #28a745;
    border: none;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.app-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

/* Search Section do Index - COMPACTA */
.search-section {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-surface);
}

/* Layout principal da busca - tudo em linha */
.search-section .search-container {
    max-width: 100%;
    margin: 0 0 var(--spacing-xs) 0;
}

.search-section .search-input {
    padding: var(--spacing-sm) var(--spacing-xxl) var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.95rem;
}

.search-section .search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.search-icon {
    position: absolute;
    right: var(--spacing-sm);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.6;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-xs);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow-xl);
    z-index: 100;
}

.autocomplete-item {
    padding: var(--spacing-md);
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.autocomplete-item:hover {
    background: var(--bg-hover);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* Search History - Compacto */
.search-history {
    margin: 0 0 var(--spacing-xs) 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    align-items: center;
}

.history-item {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 2px var(--spacing-sm);
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.history-item:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

/* Filters - Layout compacto em linha */
.filters {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.filter-select {
    padding: 4px var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    background: var(--bg-main);
    font-size: 0.85rem;
    cursor: pointer;
}

.search-options {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    flex-wrap: wrap;
}

.search-option {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.radio-custom {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    transition: all var(--transition-fast);
}

.search-option input[type="radio"] {
    display: none;
}

.search-option input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary-color);
}

.search-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.clear-btn {
    padding: 4px var(--spacing-sm);
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.8rem;
}

.clear-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Main Content com Ads */
.main-content-with-ads {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
}

/* Sidebar direita do index - mesma estrutura do habeas-corpus */
.main-content-with-ads .sidebar-right {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    position: relative;
}

.main-content-with-ads .sidebar-right > * {
    margin-bottom: 0;
}

.main-content-with-ads .sidebar-right > .ad-label {
    margin-bottom: 0;
}

.main-content-with-ads .sidebar-right > .ad-placeholder {
    margin-bottom: var(--spacing-lg);
}

.main-content-with-ads .sidebar-right > .ad-placeholder:last-child {
    margin-bottom: 0;
}

/* Sticky para o wrapper do último ad do index (quando ads habilitados) */
.ads-enabled .main-content-with-ads .sidebar-right .ad-wrapper-sidebar-bottom {
    position: sticky;
    top: var(--spacing-lg);
    z-index: 100;
}

/* Sticky para premium no index (quando ads desabilitados) */
.ads-disabled .main-content-with-ads .sidebar-right .premium-compact {
    position: sticky;
    top: var(--spacing-lg);
    z-index: 100;
}

/* Results Section */
.results-section {
    background: var(--bg-main);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
}

.results-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Alphabet Navigation */
.alphabet-nav {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.alphabet-btn {
    width: 30px;
    height: 30px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.alphabet-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.alphabet-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Terms List */
.terms-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.term-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.term-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.term-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.term-area {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.pagination-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-number {
    width: 35px;
    height: 35px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.page-number:hover {
    background: var(--bg-hover);
}

.page-number.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Sidebar Ads */
.ad-sidebar-top,
.ad-sidebar-middle,
.ad-banner-top,
.ad-banner-bottom {
    background: var(--bg-surface);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    margin-bottom: var(--spacing-lg);
}

.ad-sidebar-top,
.ad-sidebar-middle {
    min-height: 600px;
}


/* Modal específico do index */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
}

.close-btn {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.close-btn:hover {
    color: var(--danger-color);
    transform: rotate(90deg);
}

/* Dark theme adjustments para elementos do index */
[data-theme="dark"] .app-cta {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.2) 0%, rgba(46, 204, 113, 0.2) 100%);
}

[data-theme="dark"] .search-input {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .autocomplete-list {
    background: var(--bg-surface);
}

[data-theme="dark"] .filter-select {
    background: var(--bg-surface);
    color: var(--text-primary);
}

[data-theme="dark"] .term-card {
    background: var(--bg-surface);
}

[data-theme="dark"] .modal-content {
    background: var(--bg-surface);
}

/* Paginação no modo escuro */
[data-theme="dark"] .pagination-btn {
    color: #ffffff;
    background: var(--bg-surface);
}

[data-theme="dark"] .page-number {
    color: #ffffff;
    background: var(--bg-surface);
}

[data-theme="dark"] .page-number.active {
    color: #ffffff;
    background: var(--primary-color);
}

/* ===========================
   FIM DOS ESTILOS DO INDEX
   =========================== */


   /* ===========================
   FOOTER (COMPARTILHADO - OTIMIZADO)
   =========================== */

.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: var(--text-white);
    margin-top: var(--spacing-xxl);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xxl) var(--spacing-lg);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-xl);
}

/* Colunas do Footer */
.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: #FFD700;
}

/* Logo no Footer */
.footer-brand {
    margin-bottom: var(--spacing-md);
}

.footer-logo {
    height: 90px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
}

.footer-logo.logo-dark {
    display: none;
}

[data-theme="dark"] .footer-logo.logo-light {
    display: none;
}

[data-theme="dark"] .footer-logo.logo-dark {
    display: block;
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.footer-badges {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.footer-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Links do Footer */
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    display: inline-block;
    text-decoration: none;
    padding: 2px 0;
    border-bottom: 1px solid transparent;
}

.footer-links li a:hover {
    color: var(--text-white);
    transform: translateX(4px);
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: var(--spacing-lg) var(--spacing-lg);
}

.footer-bottom-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.8;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.85rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.8);
    transition: all var(--transition-fast);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    background: transparent;
}

.footer-legal a:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.1);
}

.footer-separator {
    opacity: 0.5;
}

/* ===========================
   FOOTER MINIMALISTA
   =========================== */

.footer-minimal .footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-lg);
    gap: var(--spacing-md);
}

.footer-minimal .footer-brand {
    margin-bottom: 0;
}

.footer-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer-nav a:hover {
    color: var(--text-white);
}

.footer-minimal .footer-copyright {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ===========================
   RESPONSIVIDADE DO FOOTER
   =========================== */

/* Tablet (até 900px) - 2 colunas equilibradas */
@media (max-width: 900px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
        padding: var(--spacing-xl) var(--spacing-lg);
    }
    
    /* Coluna "Sobre" ocupa as 2 colunas */
    .footer-col-about {
        grid-column: 1 / -1;
    }
    
    .footer-desc {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile (até 640px) - Empilhamento total */
@media (max-width: 480px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        padding: var(--spacing-lg) var(--spacing-md);
        text-align: center;
    }
    
    .footer-col-about {
        grid-column: 1;
    }
    
    .footer-desc {
        font-size: 0.85rem;
        max-width: 100%;
    }
    
    .footer-badges {
        justify-content: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .footer-links li a:hover {
        transform: none; /* Remove animação em mobile */
    }
    
    /* Footer Bottom em mobile */
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .footer-copyright {
        order: 2;
    }
    
    .footer-legal {
        order: 1;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Mobile Muito Pequeno (até 400px) - Simplificação máxima */
@media (max-width: 400px) {
    .footer-container {
        gap: var(--spacing-lg);
        padding: var(--spacing-md);
    }
    
    .footer-badges {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    
    .footer-badge {
        font-size: 0.75rem;
        padding: 3px 10px;
    }
    
    .footer-title {
        font-size: 1rem;
    }
    
    .footer-desc {
        font-size: 0.8rem;
        line-height: 1.5;
    }
    
    .footer-links li a {
        font-size: 0.85rem;
    }
    
    .footer-separator {
        display: none;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 8px;
    }
}

/* ===========================
   AD MOBILE STICKY - Animações e estados
   =========================== */

.ad-mobile-sticky {
    display: none;
}

/* Esconde mobile sticky quando ads estão desabilitados (sobrescreve !important das media queries) */
body.ads-disabled .ad-mobile-sticky,
body.ads-disabled .ad-label-mobile {
    display: none !important;
}

.ad-mobile-sticky.hidden {
    animation: slideDownSticky 0.3s ease;
    transform: translateY(100%);
}

@keyframes slideUpSticky {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDownSticky {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.ad-mobile-close {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 22px;
    height: 22px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.ad-mobile-close:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

/* ===========================
   AD AFTER-MEANING RESPONSIVO
   =========================== */

/* Desktop: mantém fluid */
.ad-placeholder[data-ad-position="after-meaning"] {
    min-height: 280px;
}

/* Tablet grande (1000px - 1199px): reduz um pouco */
@media (max-width: 1199px) and (min-width: 1000px) {
    .ad-placeholder[data-ad-position="after-meaning"] {
        min-height: 200px !important;
        max-height: 220px !important;
    }
}

/* Tablet médio (770px - 999px): mais compacto */
@media (max-width: 999px) and (min-width: 770px) {
    .ad-placeholder[data-ad-position="after-meaning"] {
        min-height: 100px !important;
        max-height: 150px !important;
    }
}

/* Mobile (menos de 770px): muito menor */
@media (max-width: 769px) {
    .ad-placeholder[data-ad-position="after-meaning"] {
        min-height: 90px !important;
        max-height: 150px;
        margin: var(--spacing-md) 0;
    }
}

/* Mobile pequeno: ainda menor */
@media (max-width: 479px) {
    .ad-placeholder[data-ad-position="after-meaning"] {
        min-height: 50px !important;
        max-height: 100px;
    }
}

/* ===========================
   AVANTE ESTUDOS - Card Elegante
   =========================== */

/* Card base - estilo similar ao Calculey */
.avante-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 50%, #eff6ff 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
    transition: all var(--transition-normal);
}

.avante-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .avante-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.08) 100%);
    border-color: #10b981;
}

/* Header Row - Badge e Label na mesma linha */
.avante-card .suggestion-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -16px -16px 12px -16px;
    padding: 10px 12px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 10px 10px 0 0;
}

.avante-card .badge-free {
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

/* Header */
.avante-card .suggestion-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.avante-card .suggestion-icon {
    font-size: 18px;
}

.avante-card .suggestion-label {
    color: #10b981;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Platform Brand */
.avante-card .platform-brand {
    margin-bottom: 14px;
}

.avante-card .brand-name {
    font-size: 20px;
    font-weight: 800;
    color: #059669;
    margin: 0 0 4px 0;
}

[data-theme="dark"] .avante-card .brand-name {
    color: #34d399;
}

.avante-card .brand-tagline {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

[data-theme="dark"] .avante-card .brand-tagline {
    color: #94a3b8;
}

/* Título */
.avante-card .suggestion-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #1e293b;
}

[data-theme="dark"] .avante-card .suggestion-title {
    color: #f1f5f9;
}

/* Subtítulo */
.avante-card .suggestion-subtitle {
    font-size: 12px;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Descrição */
.avante-card .suggestion-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 14px;
}

[data-theme="dark"] .avante-card .suggestion-desc {
    color: #94a3b8;
}

/* Features - tags com borda */
.avante-card .suggestion-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.avante-card .feature-item {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    color: #059669;
    font-weight: 500;
}

[data-theme="dark"] .avante-card .feature-item {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.avante-card .feature-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.avante-card .feature-text {
    white-space: nowrap;
}

/* Botão */
.avante-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    color: white;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.avante-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.avante-card .btn-text {
    font-size: 14px;
    font-weight: 700;
}

.avante-card .btn-subtext {
    font-size: 10px;
    opacity: 0.9;
}

/* Footer */
.avante-card .suggestion-footer {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .avante-card .suggestion-footer {
    border-top-color: rgba(16, 185, 129, 0.3);
}

