/* ========================================
   DownloadHub - Modern Download Website
   ======================================== */

/* CSS Variables */
:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #16161f;
    --bg-hover: #1f1f2e;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b80;
    
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --accent-glow: rgba(99, 102, 241, 0.4);
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --border-color: #2a2a3a;
    --border-light: #3a3a4a;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    
    --shadow-accent: 0 8px 32px rgba(99, 102, 241, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-light: #cbd5e1;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
    
    --shadow-accent: 0 8px 32px rgba(99, 102, 241, 0.2);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-base), color var(--transition-base);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Header
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition-base);
}

/* ========================================
   OS Navigation Styles
   ======================================== */
.os-nav {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    margin-top: 80px; /* Logo abaixo do header fixo */
    position: sticky;
    top: 80px;
    z-index: 900;
}

.os-menu {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.os-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: all 0.3s;
}

.os-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.os-link.active {
    color: var(--accent-primary);
    background: var(--bg-hover);
    box-shadow: 0 0 0 1px var(--accent-primary);
}

.os-link i {
    font-size: 1.2rem;
}

.header.scrolled {
    background: rgba(10, 10, 15, 0.95);
    border-bottom-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .header.scrolled {
    background: rgba(255, 255, 255, 0.95);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo i {
    font-size: 1.8rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-list {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

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

.nav-link.active {
    background: var(--accent-gradient);
    color: white;
}

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

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--accent-primary);
    transform: rotate(15deg);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    padding: 160px 0 100px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    opacity: 0.5;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

/* Search Bar */
.search-container {
    position: relative;
    margin-bottom: 40px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 8px 8px 8px 24px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-accent);
}

.search-icon {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-right: 16px;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    padding: 12px 0;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: var(--accent-gradient);
    color: white;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-accent);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 8px;
    padding: 8px;
    display: none;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 12px;
}

.suggestion-item:hover {
    background: var(--bg-hover);
}

.suggestion-item i {
    color: var(--accent-primary);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 48px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Hero Image */
.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-icons {
    position: relative;
    width: 400px;
    height: 400px;
}

.float-icon {
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
    animation-delay: var(--delay);
}

.float-icon:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); color: #4285f4; }
.float-icon:nth-child(2) { top: 20%; right: 0; color: #ff7139; }
.float-icon:nth-child(3) { bottom: 30%; right: 10%; color: #00d959; }
.float-icon:nth-child(4) { bottom: 0; left: 50%; transform: translateX(-50%); color: #1e88e5; }
.float-icon:nth-child(5) { bottom: 30%; left: 0; color: #1db954; }
.float-icon:nth-child(6) { top: 20%; left: 10%; color: #5865f2; }

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(-50%); }
    50% { transform: translateY(-20px) translateX(-50%); }
}

/* ========================================
   Section Styles
   ======================================== */
section {
    padding: 100px 0;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-title i {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ========================================
   Featured Section
   ======================================== */
.featured {
    background: var(--bg-secondary);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.featured-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    overflow: hidden;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-primary);
}

.featured-card:hover::before {
    transform: scaleX(1);
}

.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-gradient);
    color: white;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.card-badge.popular {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 24px;
}

.chrome-icon { background: linear-gradient(135deg, #4285f4, #34a853, #fbbc05, #ea4335); color: white; }
.firefox-icon { background: linear-gradient(135deg, #ff7139, #ff9500); color: white; }
.edge-icon { background: linear-gradient(135deg, #0078d7, #00bcf2); color: white; }
.brave-icon { background: linear-gradient(135deg, #fb542b, #ff7139); color: white; }
.opera-icon { background: linear-gradient(135deg, #ff1b2d, #ff4d4d); color: white; }
.avast-icon { background: linear-gradient(135deg, #ff7139, #ff5722); color: white; }
.avg-icon { background: linear-gradient(135deg, #e74c3c, #c0392b); color: white; }
.bitdefender-icon { background: linear-gradient(135deg, #ed1c24, #c41c1f); color: white; }
.kaspersky-icon { background: linear-gradient(135deg, #00a75a, #00d959); color: white; }
.malwarebytes-icon { background: linear-gradient(135deg, #007bff, #0056b3); color: white; }
.defender-icon { background: linear-gradient(135deg, #0078d4, #00bcf2); color: white; }
.winrar-icon { background: linear-gradient(135deg, #b95d00, #e67e22); color: white; }
.sevenzip-icon { background: linear-gradient(135deg, #5c5c5c, #3a3a3a); color: white; }
.ccleaner-icon { background: linear-gradient(135deg, #f39c12, #e67e22); color: white; }
.teamviewer-icon { background: linear-gradient(135deg, #0056a6, #007bff); color: white; }
.anydesk-icon { background: linear-gradient(135deg, #e74c3c, #c0392b); color: white; }
.vlc-icon { background: linear-gradient(135deg, #ff8800, #ff6600); color: white; }
.spotify-icon { background: linear-gradient(135deg, #1db954, #1ed760); color: white; }
.discord-icon { background: linear-gradient(135deg, #5865f2, #4752c4); color: white; }
.telegram-icon { background: linear-gradient(135deg, #0088cc, #0099ff); color: white; }
.libreoffice-icon { background: linear-gradient(135deg, #0078d4, #00bcf2); color: white; }
.adobe-icon { background: linear-gradient(135deg, #ff0000, #cc0000); color: white; }
.foxit-icon { background: linear-gradient(135deg, #e74c3c, #c0392b); color: white; }
.whatsapp-icon { background: linear-gradient(135deg, #25d366, #128c7e); color: white; }
.slack-icon { background: linear-gradient(135deg, #4a154b, #6b2d6d); color: white; }
.zoom-icon { background: linear-gradient(135deg, #2d8cff, #007bff); color: white; }
.utorrent-icon { background: linear-gradient(135deg, #87bc28, #5c8a00); color: white; }
.qbittorrent-icon { background: linear-gradient(135deg, #2db959, #1e8e3e); color: white; }
.obs-icon { background: linear-gradient(135deg, #302e39, #1a1a2e); color: white; }
.audacity-icon { background: linear-gradient(135deg, #0066cc, #004c99); color: white; }
.gimp-icon { background: linear-gradient(135deg, #635b46, #8b7355); color: white; }
.steam-icon { background: linear-gradient(135deg, #171a21, #1b2838); color: white; }
.epic-icon { background: linear-gradient(135deg, #2d2d2d, #1a1a1a); color: white; }
.vscode-icon { background: linear-gradient(135deg, #0078d4, #00bcf2); color: white; }
.git-icon { background: linear-gradient(135deg, #f05032, #e74c3c); color: white; }
.nodejs-icon { background: linear-gradient(135deg, #339933, #2d7d2d); color: white; }
.python-icon { background: linear-gradient(135deg, #3776ab, #ffd343); color: white; }

.card-title {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.card-category {
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 12px;
}

.card-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

.card-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.meta-item i {
    color: var(--warning);
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--accent-gradient);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-fast);
    width: 100%;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

.official-site-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: underline;
    font-size: 0.85rem;
    transition: color var(--transition-fast);
}

.official-site-link:hover {
    color: var(--accent-primary);
}

.official-site-link--featured {
    margin-top: 12px;
    justify-content: center;
    width: 100%;
}

.official-site-link--program {
    font-size: 0.75rem;
    color: var(--accent-primary);
    text-decoration: underline;
}

.official-site-link--popular {
    display: inline-flex;
    margin-top: 6px;
    font-size: 0.8rem;
}

.program-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.description-trigger {
    cursor: pointer;
}

.description-trigger:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}

/* Link direto - indica que o download é direto */
.download-btn.direct-link,
.program-download.direct-link,
.popular-download.direct-link {
    position: relative;
}

.download-btn.direct-link::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    background: #10b981;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ========================================
   Categories Section
   ======================================== */
.categories {
    background: var(--bg-primary);
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.category-tab:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.category-tab.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.program-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-fast);
}

.program-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.program-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.program-info {
    flex: 1;
    min-width: 0;
}

.program-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.program-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.program-tags {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    color: var(--text-muted);
}

.program-download {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.program-download:hover {
    background: var(--accent-gradient);
    color: white;
}

/* Indicador de link direto para program-download */
.program-download.direct-link {
    position: relative;
}

.program-download.direct-link::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    background: #10b981;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ========================================
   Popular Section
   ======================================== */
.popular {
    background: var(--bg-secondary);
}

.popular-list {
    display: grid;
    gap: 16px;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    transition: all var(--transition-fast);
}

.popular-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.popular-rank {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
}

.popular-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.popular-info {
    flex: 1;
}

.popular-info h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.popular-downloads {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.popular-download {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.popular-download:hover {
    background: var(--accent-gradient);
    color: white;
}

/* Indicador de link direto para popular-download */
.popular-download.direct-link {
    position: relative;
}

.popular-download.direct-link::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    background: #10b981;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ========================================
   App Description Modal
   ======================================== */
.app-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 25, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
    z-index: 2000;
    padding: 24px;
}

.app-modal.active {
    opacity: 1;
    visibility: visible;
}

.app-modal-content {
    position: relative;
    width: min(520px, 92vw);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-xl);
}

.app-modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.app-modal-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.app-modal-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.app-modal-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.app-modal-link:hover {
    transform: translateY(-2px);
    background: var(--bg-hover);
}

.app-modal-link--primary {
    background: var(--accent-gradient);
    color: white;
}

.app-modal-link--primary:hover {
    box-shadow: var(--shadow-accent);
}

.app-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.app-modal-close:hover {
    background: var(--bg-hover);
    transform: rotate(90deg);
}

.modal-open {
    overflow: hidden;
}

/* ========================================
   Features Section
   ======================================== */
.features {
    background: var(--bg-primary);
}

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

.feature-card {
    text-align: center;
    padding: 40px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-secondary);
}

.contact-item i {
    width: 44px;
    height: 44px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--accent-gradient);
    color: white;
    transform: translateY(-4px);
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--accent-gradient);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-fast);
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 80px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom i {
    color: var(--danger);
}

/* ========================================
   Back to Top
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-accent);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
}

/* ========================================
   Toast Notification
   ======================================== */
.toast {
    position: fixed;
    bottom: 100px;
    right: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--success);
    border-radius: var(--radius-lg);
    padding: 16px 24px;
    box-shadow: var(--shadow-xl);
    transform: translateX(150%);
    transition: transform var(--transition-base);
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    color: var(--success);
    font-size: 1.3rem;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1200px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-image {
        display: none;
    }
    
    .hero-subtitle {
        margin: 0 auto 40px;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 992px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
        transform: translateY(-150%);
        transition: transform var(--transition-base);
    }
    
    .nav.active {
        transform: translateY(0);
    }
    
    .nav-list {
        flex-direction: column;
    }
    
    .nav-link {
        display: block;
        padding: 14px 20px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .search-box {
        flex-direction: column;
        padding: 16px;
        border-radius: var(--radius-xl);
    }
    
    .search-icon {
        display: none;
    }
    
    .search-box input {
        width: 100%;
        text-align: center;
        padding: 12px 0;
    }
    
    .search-btn {
        width: 100%;
        margin-top: 12px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .featured-grid,
    .programs-grid {
        grid-template-columns: 1fr;
    }
    
    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    .category-tab {
        flex-shrink: 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .contact-form {
        padding: 24px;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ========================================
   Modal / Popup Styles
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-card);
    width: 100%;
    max-width: 650px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 40px;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
}

.modal-icon {
    width: 90px;
    height: 90px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: var(--bg-tertiary);
}

.modal-info h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 800;
}

.modal-body {
    margin-bottom: 30px;
}

#modalDescription {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 24px;
    line-height: 1.7;
}

.modal-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.meta-box {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: var(--radius-md);
    text-align: center;
}

.meta-box span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.meta-box strong {
    font-size: 1.2rem;
    color: var(--text-primary);
}

.modal-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-footer .download-btn {
    width: 100%;
}

.official-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.official-btn:hover {
    background: var(--bg-hover);
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.program-card {
    animation: fadeInUp 0.4s ease forwards;
}

/* ========================================
   Pagination & Layout Fixes
   ======================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
    padding: 20px;
    flex-wrap: wrap;
}

.pag-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s;
    min-width: 45px;
}

.pag-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.pag-btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

.pag-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Padronização de ícones do Grid (Neutros) */
#programsGrid .program-icon {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    box-shadow: none !important;
}

#programsGrid .program-card:hover .program-icon {
    color: var(--accent-primary) !important;
}

/* Ícones dos Destaques (Mantêm cores originais) */
#featuredGrid .card-icon {
    box-shadow: var(--shadow-accent);
}

/* Scrollbar improvement */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* Hidden class */
.hidden { display: none !important; }

