:root {
    /* Premium Color Palette - Pure Luxury & High Contrast */
    --primary: #0a0a0b;
    --primary-light: #161618;
    --accent: #3b82f6;
    /* Sapphire Blue */
    --accent-glow: rgba(59, 130, 246, 0.4);
    --secondary: #f43f5e;
    /* Rose 500 */
    --success: #10b981;

    /* Neutral Tones */
    --bg-main: #fcfcfd;
    --bg-card: #ffffff;
    --text-main: #09090b;
    --text-muted: #71717a;
    --border-light: rgba(9, 9, 11, 0.06);

    /* Glassmorphism Defaults */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(9, 9, 11, 0.05);
    --glass-blur: blur(20px);

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-accent: 'Outfit', sans-serif;
    --font-serif: 'Lora', serif;

    /* Elevation & Shapes */
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 30px var(--accent-glow);
    --radius-premium: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-base: 0.4s var(--ease-out);
}

/* Dark Mode Override - Modern Onyx & Sapphire */
[data-theme="dark"] {
    --bg-main: #050506;
    --bg-card: #121214;
    --text-main: #fafafa;
    --text-muted: #88888d;
    --border-light: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(18, 18, 20, 0.9);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent: #60a5fa;
    --accent-glow: rgba(96, 165, 250, 0.3);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0 0 16px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    font-weight: 700;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Typography Scale */
h1,
h2,
h3 {
    font-family: var(--font-accent);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-wrap: balance;
    text-wrap: pretty;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
    padding: 8px;
    /* Touch target criteria */
}

a img {
    display: block;
}

/* --- HEADER (Glassmorphism & Interactive) --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    height: 80px;
    display: flex;
    align-items: center;
    transition: all 0.4s ease;
}

.site-header.scrolled {
    height: 65px;
    box-shadow: var(--shadow-premium);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-toggle {
    display: inline-flex;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    padding: 0;
    z-index: 11;
    border-radius: 14px;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.logo {
    display: flex;
    align-items: center;
    z-index: 10;
}

.logo a {
    font-family: var(--font-accent);
    font-size: 1.75rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.3s var(--ease-out);
    padding: 0;
}

.logo a:hover,
.logo a:focus-visible {
    transform: scale(1.05);
}

.logo img {
    max-height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

.logo-text {
    font-family: var(--font-accent);
    font-size: 1.75rem;
    font-weight: 900;
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
    padding: 0.5rem 0.75rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0.75rem;
    right: 0.75rem;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: var(--radius-full);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-link:focus-visible {
    outline: none;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

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

/* Theme Toggle */
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-main);
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-toggle:hover,
.nav-toggle:focus-visible,
.nav-close:hover,
.nav-close:focus-visible,
.theme-toggle-btn:hover,
.theme-toggle-btn:focus-visible {
    background: rgba(59, 130, 246, 0.08);
    color: var(--accent);
}

/* --- MOBILE DRAWER --- */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background: var(--bg-card);
    z-index: 2001;
    visibility: hidden;
    transition: all 0.4s var(--ease-out);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem 1rem;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
    border-right: 1px solid var(--glass-border);
    overflow: hidden;
}

.nav-drawer.active {
    left: 0;
    visibility: visible;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    gap: 0.75rem;
    flex-shrink: 0;
}

.drawer-logo {
    max-width: 180px;
}

.drawer-logo a {
    padding: 0;
    display: inline-flex;
    align-items: center;
}

.drawer-logo img {
    width: auto;
    max-width: 100%;
    max-height: 38px;
    object-fit: contain;
}

.nav-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-main);
    cursor: pointer;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.drawer-search {
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.drawer-search-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.drawer-search-form {
    display: flex;
    gap: 0.5rem;
}

.drawer-search-input-wrapper {
    position: relative;
    flex: 1;
}

.drawer-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.drawer-search-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    background: var(--bg-main);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s var(--ease-out);
}

.drawer-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.drawer-search-input:focus,
.drawer-search-input:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.drawer-search-submit {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 14px;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s var(--ease-out);
}

.drawer-search-submit:hover,
.drawer-search-submit:focus-visible {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px rgba(59, 130, 246, 0.4);
}

.drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin: 0;
    padding: 0;
}

.drawer-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    padding-right: 0.2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(107, 114, 128, 0.75) transparent;
    scroll-padding-block: 0.5rem;
}

.drawer-nav::-webkit-scrollbar {
    width: 8px;
}

.drawer-nav::-webkit-scrollbar-track {
    background: transparent;
}

.drawer-nav::-webkit-scrollbar-thumb {
    background: rgba(107, 114, 128, 0.6);
    border-radius: 999px;
}

.drawer-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 85, 99, 0.8);
}

.drawer-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.drawer-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.drawer-links-compact {
    gap: 0.5rem;
    max-height: 42vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.35rem;
}

.drawer-link {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
}

.drawer-link i {
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.3s var(--ease-out);
}

.drawer-link:hover i,
.drawer-link:focus-visible i,
.drawer-link.active i {
    color: var(--accent);
}

.drawer-link:hover,
.drawer-link:focus-visible,
.drawer-link.active {
    background: rgba(59, 130, 246, 0.08);
    color: var(--accent);
    transform: translateX(4px);
}

.drawer-link.active {
    border-left: 3px solid var(--accent);
    border-radius: 4px 16px 16px 4px;
}

.drawer-link-compact {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.65rem 0.85rem;
}

.drawer-footer {
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 0.85rem;
    flex-shrink: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.drawer-footer p {
    margin: 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: sticky;
    top: 100px;
}

.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-premium);
    padding: 2rem;
    box-shadow: var(--shadow-premium);
}

.sidebar-title {
    font-family: var(--font-accent);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-title-accent {
    width: 30px;
    height: 2px;
    border-radius: var(--radius-full);
    background: var(--accent);
}

.sidebar-ranking {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-ranking-link {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
    padding: 1rem;
    border-radius: 20px;
    margin: 0 -0.5rem;
}

.sidebar-ranking-link:hover,
.sidebar-ranking-link:focus-visible {
    background: rgba(59, 130, 246, 0.06);
}

.sidebar-ranking-number {
    font-size: 2rem;
    font-weight: 900;
    color: rgba(9, 9, 11, 0.12);
    line-height: 1;
    transition: color 0.3s ease, transform 0.3s ease;
}

.sidebar-ranking-title {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.sidebar-ranking-link:hover .sidebar-ranking-number,
.sidebar-ranking-link:focus-visible .sidebar-ranking-number {
    color: var(--accent);
    transform: translateY(-1px);
}

.sidebar-ranking-link:hover .sidebar-ranking-title,
.sidebar-ranking-link:focus-visible .sidebar-ranking-title {
    color: var(--accent);
}

.sidebar-premium-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-premium);
    padding: 2.5rem;
    text-align: center;
    color: white;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-premium);
}

.sidebar-premium-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 4.25rem;
    font-size: 1.7rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sidebar-premium-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.sidebar-premium-copy {
    font-size: 0.95rem;
    opacity: 0.78;
    line-height: 1.7;
    margin: 0;
}

/* --- ARTICLE CARDS (Premium Elevate) --- */
.premium-hero {
    margin-top: 2rem;
}

.hero-card {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    min-height: 500px;
    box-shadow: var(--shadow-premium);
}

.hero-card-link {
    display: block;
    height: 100%;
    padding: 0;
}

.hero-card-image {
    width: 100%;
    height: 100%;
    min-height: 500px;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.hero-card-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 4rem 3rem;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.4) 60%, transparent 100%);
    color: white;
}

.hero-card-category {
    position: static;
    margin-bottom: 1.5rem;
}

.hero-card-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-top: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-card-meta {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 1.5rem;
}

/* --- CATEGORY & SEARCH HEADER (Premium Layout) --- */
.premium-category-header {
    margin: 3rem 0;
    text-align: center;
    position: relative;
}

.premium-breadcrumbs {
    display: inline-block;
    margin-bottom: 2rem;
}

.breadcrumb-list {
    list-style: none; /* Elimina los números y viñetas */
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-premium);
    font-size: 0.85rem;
    font-weight: 600;
}

.breadcrumb-link {
    color: var(--text-muted);
    transition: color 0.3s var(--ease-out);
    padding: 0;
}

.breadcrumb-link:hover,
.breadcrumb-link:focus-visible {
    color: var(--accent);
}

.breadcrumb-sep {
    color: rgba(9, 9, 11, 0.2);
    font-weight: 400;
}

[data-theme="dark"] .breadcrumb-sep {
    color: rgba(255, 255, 255, 0.2);
}

.breadcrumb-current {
    color: var(--accent);
    font-weight: 800;
}

.category-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

.header-accent-bar {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--secondary));
    margin: 0 auto;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* --- SECTION HEADER (Latest News / Más en) --- */
.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    margin-top: 2rem;
}

.section-title-text {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
}

.search-result-count {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.section-header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-light), transparent);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.premium-card {
    background: var(--bg-card);
    border-radius: var(--radius-premium);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all 0.5s var(--ease-out);
    position: relative;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.8s ease backwards;
}

.premium-card:hover,
.premium-card:focus-within {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium), 0 20px 40px -20px var(--accent-glow);
    border-color: var(--accent);
    z-index: 10;
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.card-img-wrapper a {
    padding: 0;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out);
}

.premium-card:hover .card-img-wrapper img,
.premium-card:focus-within .card-img-wrapper img {
    transform: scale(1.1);
}

.card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    line-height: 1.3;
}

.card-title a {
    padding: 0;
}

.card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* --- SINGLE ARTICLE PAGE (Luxury Layout) --- */
.article-hero {
    margin-top: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.article-main-title {
    margin: 1.5rem auto;
    max-width: 900px;
}

.article-header-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-weight: 500;
}

.article-featured-img {
    width: 100%;
    height: auto;
    max-height: 600px;
    border-radius: var(--radius-premium);
    object-fit: cover;
    box-shadow: var(--shadow-premium);
}

.article-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 0 1.5rem;
}

.article-content {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    line-height: 1.8;
}

/* Elegante Drop Cap - Solo primer párrafo (Luxury Criteria) */
.article-content>p:first-of-type::first-letter {
    float: left;
    font-family: var(--font-accent);
    font-size: 4rem;
    line-height: 0.85;
    padding: 4px 8px 4px 0;
    margin-right: 0.5rem;
    font-weight: 900;
    color: var(--accent);
}

.premium-tag-link {
    background: var(--bg-card);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    transition: all 0.3s var(--ease-out);
    display: inline-flex;
    align-items: center;
}

.premium-tag-link:hover,
.premium-tag-link:focus-visible {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px var(--accent-glow);
}

/* Share Sidebar */
.share-bar-fixed {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.share-btn:hover,
.share-btn:focus-visible {
    transform: scale(1.15) rotate(5deg);
    color: white;
}

.share-btn.fb:hover,
.share-btn.fb:focus-visible {
    background: #3b5998;
    border-color: #3b5998;
}

.share-btn.tw:hover,
.share-btn.tw:focus-visible {
    background: #000000;
    border-color: #000000;
}

.share-btn.wa:hover,
.share-btn.wa:focus-visible {
    background: #25d366;
    border-color: #25d366;
}

.share-btn.tg:hover,
.share-btn.tg:focus-visible {
    background: #0088cc;
    border-color: #0088cc;
}

.share-btn.ds:hover,
.share-btn.ds:focus-visible {
    background: #5865f2;
    border-color: #5865f2;
}

.share-btn.copy:hover,
.share-btn.copy:focus-visible {
    background: var(--accent);
    border-color: var(--accent);
}

/* --- FOOTER --- */
.site-footer {
    background: var(--primary);
    color: white;
    padding: 5rem 0 2rem;
    margin-top: 5rem;
}

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

.footer-logo {
    font-family: var(--font-accent);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    display: block;
    padding: 0;
}

.footer-desc {
    color: #94a3b8;
    max-width: 400px;
    margin-bottom: 2rem;
}

.footer-column h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: #94a3b8;
    transition: color 0.3s;
    padding: 4px 0;
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* --- FOCUS ACCESSIBILITY --- */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* --- UTILS & ANIMATIONS --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 1500;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--accent), var(--secondary));
    width: 0%;
    transition: width 0.1s linear;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }

    .share-bar-fixed {
        position: fixed;
        bottom: 1.5rem;
        left: 50%;
        top: auto;
        transform: translateX(-50%);
        flex-direction: row;
        background: var(--glass-bg);
        backdrop-filter: var(--glass-blur);
        padding: 0.75rem;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        border: 1px solid var(--glass-border);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .sidebar {
        position: static;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .site-header {
        height: 70px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .hero-card,
    .hero-card-image {
        min-height: 360px;
    }

    .hero-card-content {
        padding: 2rem 1.25rem 1.5rem;
    }

    .hero-card-title {
        font-size: clamp(1.4rem, 6vw, 2rem);
        line-height: 1.2;
        margin-top: 0.75rem;
    }

    .hero-card-meta {
        margin-top: 1rem;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .article-header-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .nav-drawer {
        width: min(86vw, 320px);
        left: -110%;
        visibility: hidden;
        padding: 1.25rem 1rem 0.85rem;
    }

    .sidebar-section,
    .sidebar-premium-card {
        padding: 1.5rem;
    }

    .sidebar-ranking-link {
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }
}

/* UI Elements */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 4rem;
}

.page-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    font-weight: 700;
}

.page-link.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* --- LANGUAGE SELECTOR --- */
.lang-selector {
    position: relative;
}

.lang-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-premium);
    cursor: pointer;
    font-weight: 600;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-premium);
    box-shadow: var(--shadow-premium);
    width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.lang-selector:hover .lang-dropdown,
.lang-selector:focus-within .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-item {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: background 0.3s;
}

.lang-item:hover,
.lang-item:focus-visible {
    background: var(--bg-main);
    color: var(--accent);
}

.lang-item img {
    border-radius: 2px;
}

#main-content {
    animation: fadeInPage 0.8s var(--ease-out) backwards;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus-visible {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.4);
}

::selection {
    background: var(--accent);
    color: white;
}/* --- DRAWER SEARCH --- */
.drawer-search {
    margin-bottom: 2rem;
}
.drawer-search-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.drawer-search-form {
    display: flex;
    gap: 0.5rem;
    position: relative;
}
.drawer-search-input-wrapper {
    position: relative;
    flex: 1;
}
.drawer-search-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}
.drawer-search-input:focus,
.drawer-search-input:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.drawer-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}
.drawer-search-submit {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
}
.drawer-search-submit:hover,
.drawer-search-submit:focus-visible {
    background: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.drawer-search-submit:active {
    transform: scale(0.95);
}

/* Empty State (Palette UX Standard) */
.empty-state {
    text-align: center;
    padding: 5rem 0;
    opacity: 0.5;
}
.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
}
.empty-state h5 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
