/**
 * eSynapses Landing Page - FactCheck.si Inspired Design
 * Dark theme with glassmorphism, animated grid, and gradient orbs
 */

/* ============================================================================
   GOOGLE FONTS
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================================================
   CSS VARIABLES (Dark Theme)
   ============================================================================ */
:root {
    /* Colors */
    --bg-primary: #0A0A0A;
    --bg-secondary: #1A1A2E;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.1);
    
    /* Accent Colors */
    --accent-blue: #0070F3;
    --accent-green: #0DFF00;
    --accent-red: #FF0040;
    --accent-yellow: #FFD600;
    
    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: #888888;
    --text-muted: #666666;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    /* Legacy variables for compatibility */
    --primary: #0070F3;
    --success: #0DFF00;
    --warning: #FFD600;
    --danger: #FF0040;
}

/* ============================================================================
   BASE STYLES
   ============================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ============================================================================
   ANIMATED BACKGROUND GRID (FactCheck.si style)
   ============================================================================ */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* ============================================================================
   ANIMATED GRADIENT ORBS (FactCheck.si style)
   ============================================================================ */
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0,112,243,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(13,255,0,0.1) 0%, transparent 50%);
    animation: orbMove 15s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes orbMove {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-10%, 10%) rotate(180deg); }
}

/* Ensure content is above animated backgrounds */
.navbar, .hero, section, footer {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(135deg, #FFFFFF 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-green);
}

/* ============================================================================
   NAVIGATION
   ============================================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 16px 0;
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-icon {
    height: 32px;
    width: 32px;
}

.logo-text {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 0 80px;
    overflow: visible;
}

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

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    color: var(--accent-blue);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Remove old gradient blur backgrounds (replaced by body::after) */
.gradient-blur {
    display: none;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: #0051cc;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 112, 243, 0.4);
}

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

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: var(--accent-blue);
}

.btn-lg {
    padding: 16px 40px;
    font-size: 18px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ============================================================================
   GLASSMORPHISM SECTIONS (FactCheck.si style)
   ============================================================================ */
.stats, .how-it-works, .leaderboard, .pricing, .final-cta {
    padding: 80px 0;
}

.stats {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 48px;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* ============================================================================
   HOW IT WORKS SECTION
   ============================================================================ */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

.step-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.step-number {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--accent-blue);
    background: rgba(0, 112, 243, 0.1);
    border: 1px solid rgba(0, 112, 243, 0.3);
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.step-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.step-card p {
    color: var(--text-secondary);
}

/* ============================================================================
/* ============================================================================
   ⭐ NEW: LEADERBOARD SECTION - Multi-Language Rankings
   ============================================================================ */
.leaderboard {
    background: rgba(255, 255, 255, 0.02);
    padding: 100px 0;
}

/* 2×2 Grid (2 columns, 2 rows on desktop) */
.rankings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

/* Tablet: 2 kartici za pricing */
@media (max-width: 1024px) and (min-width: 769px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
    }
}

/* Responsive: Stack on mobile */
@media (max-width: 768px) {
    .rankings-grid {
        grid-template-columns: 1fr;
    }
}

/* Individual Ranking Column */
.ranking-column {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ranking-column:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Ranking Header (Flag + Country Name) */
.ranking-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.ranking-header .flag {
    font-size: 1.75rem;
}

.ranking-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Ranking Table (scrollable list) */
.ranking-table {
    padding: 16px;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar */
.ranking-table::-webkit-scrollbar {
    width: 6px;
}

.ranking-table::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.ranking-table::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.ranking-table::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Individual Ranking Row (Media Name + Score) */
.ranking-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.ranking-row:last-child {
    border-bottom: none;
}

.ranking-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Media Name */
.media-name {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 12px;
}

/* Media Score */
.media-score {
    flex-shrink: 0;
}

/* Score Badge */
.score-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.score-badge.score-excellent {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.score-badge.score-good {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.score-badge.score-fair {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.score-badge.score-poor {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Empty State */
.ranking-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.ranking-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* Leaderboard Note */
.leaderboard-note {
    text-align: center;
    margin-top: 24px;
}

.leaderboard-note p {
    margin: 0;
    color: var(--text-secondary);
}

/* ============================================================================
   PRICING SECTION
   ============================================================================ */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 kartice v vrsti */
    gap: 32px;
    max-width: 1200px; /* Povečano za 3 kartice */
    margin: 0 auto;
}

.pricing-card {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px 32px;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.pricing-card.popular {
    border-color: var(--accent-blue);
    box-shadow: 0 0 40px rgba(0, 112, 243, 0.2);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-green) 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.plan-header h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 16px;
}

.currency {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.amount {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.period {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.plan-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.plan-features {
    margin-bottom: 32px;
}

.feature-highlight {
    background: rgba(0, 112, 243, 0.1);
    border: 1px solid rgba(0, 112, 243, 0.3);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    margin-bottom: 24px;
}

.feature-highlight strong {
    display: block;
    font-size: 1.125rem;
    color: var(--accent-blue);
    margin-bottom: 4px;
}

.feature-highlight small {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.plan-features ul {
    list-style: none;
    padding: 0;
}

.plan-features li {
    padding: 12px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.plan-features li:last-child {
    border-bottom: none;
}

/* ============================================================================
   FINAL CTA SECTION
   ============================================================================ */
.final-cta {
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.1) 0%, rgba(13, 255, 0, 0.05) 100%);
    border-top: 1px solid var(--border-color);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ============================================================================
   FOOTER
   ============================================================================ */
.footer {
    padding: 80px 0 32px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-col h4 {
    margin-bottom: 16px;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.footer-col p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.3s ease;
    font-size: 0.875rem;
}

.footer-col a:hover {
    color: var(--accent-blue);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo-img {
    height: 32px;
    width: auto;
    display: block;
}

.footer-logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .steps-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-table-wrapper {
        overflow-x: auto;
    }
    
    .leaderboard-table {
        min-width: 600px;
    }
    
    .container {
        padding: 0 1.5rem;
    }

/* ============================================================================
   PAGE CONTENT SECTION (for CMS pages: about, contact, terms, privacy)
   ============================================================================ */
.page-content {
    padding: 120px 0 80px;
    min-height: 60vh;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 48px 40px;
}

.content-wrapper h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.content-body {
    color: var(--text-secondary);
    line-height: 1.8;
}

.content-body h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 32px 0 16px;
}

.content-body h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 12px;
}

.content-body p {
    margin-bottom: 16px;
}

.content-body ul, .content-body ol {
    margin: 16px 0 16px 24px;
}

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

.content-body a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.content-body a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.content-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .page-content {
        padding: 100px 0 60px;
    }
    
    .content-wrapper {
        padding: 32px 24px;
    }
    
    .content-wrapper h1 {
        font-size: 2rem;
    }
}