/* ActiveRankings - Global Styles */

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

:root {
    --color-primary: #0066FF;
    --color-primary-dark: #0052CC;
    --color-accent: #FF6B35;
    --color-dark: #1A1A2E;
    --color-dark-light: #2D2D44;
    --color-neutral: #333333;
    --color-neutral-light: #666666;
    --color-bg: #FFFFFF;
    --color-bg-secondary: #F8F9FA;
    --color-border: #E5E7EB;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Source Serif 4', Georgia, serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-neutral);
    line-height: 1.6;
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

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

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

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

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

/* Header */
.site-header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar {
    background: var(--color-dark);
    color: white;
    font-size: 13px;
    padding: 8px 0;
}

.top-date {
    text-align: right;
    color: #d1d5db;
}

.main-nav {
    padding: 20px 0;
}

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

.logo {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

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

.logo-dark {
    color: var(--color-dark);
}

.logo-white {
    color: white;
}

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

.primary-nav a {
    font-weight: 500;
    color: var(--color-neutral);
    font-size: 15px;
}

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

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

/* Hero Section */
.hero-section {
    padding: 32px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

.hero-main, .hero-secondary {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.hero-main:hover, .hero-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.hero-main {
    height: 500px;
}

.hero-secondary {
    height: 238px;
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (max-width: 1024px) {
    .hero-main {
        height: 400px;
    }
    .hero-secondary {
        height: 250px;
    }
}

.hero-main img, .hero-secondary img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 70%, transparent 100%);
    color: white;
}

.hero-secondary .hero-content {
    padding: 20px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.category-badge {
    background: var(--color-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-date {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
}

.hero-main h1 {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 12px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.hero-main p {
    font-size: 16px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 16px;
    line-height: 1.5;
}

.hero-secondary h2 {
    font-size: 20px;
    line-height: 1.3;
    color: white;
    font-weight: 700;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.hero-main .author-avatar {
    width: 48px;
    height: 48px;
}

.author-name {
    font-weight: 600;
    color: white;
    font-size: 14px;
}

.reading-time {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

/* Categories Navigation */
.categories-nav {
    background: var(--color-bg-secondary);
    padding: 32px 0;
    margin: 32px 0;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.category-link {
    background: white;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 500;
    color: var(--color-neutral);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.2s;
    font-size: 14px;
}

.category-link:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.category-link span {
    color: var(--color-neutral-light);
    margin-left: 4px;
    font-size: 13px;
}

.category-link:hover span {
    color: rgba(255,255,255,0.85);
}

/* Latest Articles Section */
.latest-articles {
    padding: 64px 0;
}

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

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--color-dark);
    letter-spacing: -0.5px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

@media (max-width: 1024px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .section-header h2 {
        font-size: 28px;
    }
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 24px;
}

.card-content .article-meta {
    margin-bottom: 12px;
}

.card-content .category-badge {
    background: rgba(0, 102, 255, 0.1);
    color: var(--color-primary);
    text-transform: none;
    letter-spacing: 0;
    padding: 3px 10px;
    font-size: 12px;
}

.card-content .article-date {
    color: var(--color-neutral-light);
}

.card-content h3 {
    font-size: 20px;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--color-dark);
    font-weight: 700;
}

.card-content h3 a {
    color: var(--color-dark);
}

.card-content h3 a:hover {
    color: var(--color-primary);
}

.card-content p {
    color: var(--color-neutral-light);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.card-footer .article-author {
    gap: 8px;
}

.card-footer .author-avatar {
    width: 32px;
    height: 32px;
}

.card-footer span:not(.reading-time) {
    font-size: 14px;
    color: var(--color-neutral-light);
}

/* Newsletter Section */
.newsletter-section {
    background: var(--color-primary);
    padding: 64px 0;
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    font-size: 32px;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.newsletter-content p {
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    margin-bottom: 32px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}

.newsletter-form input:focus {
    outline: 2px solid rgba(255,255,255,0.5);
    outline-offset: 2px;
}

.newsletter-form button {
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.newsletter-form button:hover {
    background: #e55a2b;
}

@media (max-width: 640px) {
    .newsletter-form {
        flex-direction: column;
    }
}

/* Stats Section */
.stats-section {
    background: var(--color-dark);
    padding: 64px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.stat-label {
    color: #9ca3af;
    font-size: 14px;
}

/* Footer */
.site-footer {
    background: var(--color-dark);
    color: white;
    padding: 64px 0 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

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

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 16px;
}

.footer-col p {
    color: #9ca3af;
    line-height: 1.7;
    font-size: 14px;
}

.footer-col h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    color: #9ca3af;
    font-size: 14px;
    transition: color 0.2s;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 24px 0;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* Article Detail Page */
.article-detail {
    background: white;
}

.article-hero {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-header {
    max-width: 900px;
    margin: -120px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.article-header-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 40px;
}

.article-header-card h1 {
    font-size: 40px;
    line-height: 1.2;
    color: var(--color-dark);
    margin: 16px 0;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.article-excerpt {
    font-size: 18px;
    color: var(--color-neutral-light);
    line-height: 1.6;
    margin: 16px 0 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.article-author-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-info .author-avatar {
    width: 56px;
    height: 56px;
}

.author-info-name {
    font-weight: 600;
    color: var(--color-dark);
}

.author-info-bio {
    font-size: 13px;
    color: var(--color-neutral-light);
}

.article-content {
    max-width: 800px;
    margin: 64px auto;
    padding: 0 24px;
}

.article-body {
    font-family: var(--font-serif);
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-neutral);
}

.article-body h2 {
    font-family: var(--font-sans);
    font-size: 28px;
    color: var(--color-dark);
    margin: 40px 0 20px;
    font-weight: 700;
}

.article-body h3 {
    font-family: var(--font-sans);
    font-size: 22px;
    color: var(--color-dark);
    margin: 32px 0 16px;
    font-weight: 700;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body ul, .article-body ol {
    margin: 20px 0 20px 24px;
}

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

.article-tags {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.article-tags h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--color-dark);
}

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

.tag-list a {
    background: var(--color-bg-secondary);
    color: var(--color-neutral);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    transition: all 0.2s;
}

.tag-list a:hover {
    background: var(--color-primary);
    color: white;
}

@media (max-width: 640px) {
    .article-header-card h1 {
        font-size: 28px;
    }
    .article-body {
        font-size: 16px;
    }
    .article-body h2 {
        font-size: 24px;
    }
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 20px 0;
    font-size: 14px;
    color: var(--color-neutral-light);
}

.breadcrumbs a {
    color: var(--color-neutral-light);
}

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

.breadcrumbs span:not(.separator) {
    color: var(--color-dark);
    font-weight: 500;
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: #d1d5db;
}

/* Category Page */
.category-hero {
    background: var(--color-dark);
    padding: 64px 0;
    color: white;
}

.category-hero h1 {
    font-size: 48px;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.category-hero p {
    font-size: 18px;
    color: rgba(255,255,255,0.8);
    max-width: 700px;
}

.category-articles {
    padding: 64px 0;
}

@media (max-width: 640px) {
    .category-hero h1 {
        font-size: 36px;
    }
}

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

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