/* =============================================
   Range Institute - Premium Dark Theme
   Design: GTO/Poker Strategy Style (Dark/Gold/Emerald)
   ============================================= */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background-color: #0f172a;
    /* Dark Slate */
    color: #e2e8f0;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ==================== Variables ==================== */
:root {
    /* Colors */
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-card-hover: rgba(51, 65, 85, 0.8);

    --primary: #10b981;
    /* Emerald Green */
    --primary-glow: rgba(16, 185, 129, 0.5);

    --accent: #f59e0b;
    /* Amber/Gold */
    --accent-glow: rgba(245, 158, 11, 0.5);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --border: rgba(148, 163, 184, 0.1);

    /* Spacing */
    --container-width: 1200px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Effects */
    --glass-blur: blur(10px);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px var(--primary-glow);
}

/* ==================== Background Glow ==================== */
.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

/* ==================== Typography ==================== */
h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

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

h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.text-gradient {
    background: linear-gradient(to right, var(--primary), #34d399);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.highlight {
    color: var(--primary);
}

/* ==================== Layout ==================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==================== Header ==================== */
header {
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
}

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

.site-title {
    font-size: 1.5rem;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ==================== Hero Section ==================== */
.hero {
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px -4px var(--primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px -4px var(--primary);
    background: #059669;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

/* ==================== Audience Section ==================== */
.audience {
    padding: 4rem 0;
}

.audience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.audience-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    backdrop-filter: blur(5px);
}

.audience-card.fit {
    border-left: 4px solid var(--primary);
}

.audience-card.not-fit {
    border-left: 4px solid #ef4444;
}

.audience-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 1rem;
}

.fit .icon-box {
    background: rgba(16, 185, 129, 0.2);
    color: var(--primary);
}

.not-fit .icon-box {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ==================== Articles Section ==================== */
.articles {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

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

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.article-card h3 a {
    color: var(--text-main);
    display: block;
}

.article-summary {
    color: var(--text-muted);
    font-size: 0.925rem;
    margin: 1rem 0 2rem;
    flex-grow: 1;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: auto;
}

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

.read-more {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

/* ==================== Affiliate Section ==================== */
.affiliate {
    margin-bottom: 4rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(15, 23, 42, 0.5));
    border: 1px solid var(--primary-glow);
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
}

.platform-list {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.platform-btn {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid var(--border);
}

.platform-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--text-main);
}

/* ==================== Footer ==================== */
footer {
    background: #020617;
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    color: var(--text-muted);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand h3 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

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

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

/* ==================== Animations & Utils ==================== */
.hidden {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .audience-grid,
    .footer-content {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .nav-links {
        display: none;
        /* Simplification for mobile task */
    }
}