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

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;

}

/* ===== THEME SYSTEM ===== */
:root {
    /* Enable automatic dark/light switching

    Disable light theme for now
    
    color-scheme: light dark; */

    color-scheme: dark;

    /* Light Theme Colors */
    --bg-primary-light: #ffffff;
    --bg-secondary-light: #f8f9fa;
    --bg-accent-light: #f1f3f4;
    --text-primary-light: #1a1a1a;
    --text-secondary-light: #5f6368;
    --text-muted-light: #80868b;
    
    /* Dark Theme Colors */
    --bg-primary-dark: #0f0f0f;
    --bg-secondary-dark: #1a1a1a;
    --bg-accent-dark: #2d2d2d;
    --text-primary-dark: #e8eaed;
    --text-secondary-dark: #bdc1c6;
    --text-muted-dark: #9aa0a6;
    
    /* Accent Colors - Work in both themes */
    --purple: #8b5cf6;        /* Main purple */
    --purple-light: #a78bfa;  /* Lighter purple */
    --purple-dark: #7c3aed;   /* Darker purple */
    --orange: #f97316;        /* Main orange */
    --orange-light: #fb923c;  /* Lighter orange */
    --orange-dark: #ea580c;   /* Darker orange */
    
    /* Dynamic Colors using light-dark() */
    --bg-primary: light-dark(var(--bg-primary-light), var(--bg-primary-dark));
    --bg-secondary: light-dark(var(--bg-secondary-light), var(--bg-secondary-dark));
    --bg-accent: light-dark(var(--bg-accent-light), var(--bg-accent-dark));
    --text-primary: light-dark(var(--text-primary-light), var(--text-primary-dark));
    --text-secondary: light-dark(var(--text-secondary-light), var(--text-secondary-dark));
    --text-muted: light-dark(var(--text-muted-light), var(--text-muted-dark));
    
    /* Shadows */
    --shadow-sm: light-dark(
        0 1px 3px rgba(0,0,0,0.12),
        0 1px 3px rgba(0,0,0,0.5)
    );
    --shadow-md: light-dark(
        0 4px 12px rgba(0,0,0,0.08),
        0 4px 12px rgba(0,0,0,0.4)
    );
    --shadow-lg: light-dark(
        0 8px 25px rgba(0,0,0,0.1),
        0 8px 25px rgba(0,0,0,0.6)
    );
    
    /* Other variables */
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
}

/* Fallback for browsers that don't support light-dark() */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: var(--bg-primary-dark);
        --bg-secondary: var(--bg-secondary-dark);
        --bg-accent: var(--bg-accent-dark);
        --text-primary: var(--text-primary-dark);
        --text-secondary: var(--text-secondary-dark);
        --text-muted: var(--text-muted-dark);
    }
}

/* ===== BASE STYLES ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 16px;
    padding-top: 60px; 
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

a {
    color: var(--purple);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--purple-light);
}

/* === Admin Dashboard Compact Tweaks === */
/* Admin Dashboard Compact Tweaks – SCOPED */
body.admin #articles-container { 
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

body.admin .article-card { margin: 0; padding: 12px; }
body.admin .article-header { position: relative; gap: 10px; margin-bottom: 6px; }

body.admin .checkbox-container {
  position: absolute; top: 8px; left: 8px; min-width: unset;
  background: var(--bg-primary); border: 1px solid var(--bg-accent);
  border-radius: 12px; padding: 2px 6px; box-shadow: var(--shadow-sm);
}

body.admin .article-title {
  /* if you kept the bigger headline tweak, include it here too */
  font-weight: 700;
  font-size: clamp(1rem, 1.2vw + .7rem, 1.35rem);
  line-height: 1.25; margin: 2px 0 6px 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

body.admin .article-summary {
  font-size: .95rem; color: #495057; margin: 4px 0 0 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

body.admin .content-text { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
body.admin .content-text.is-open { max-height: 520px; padding-top: 6px; }
/* Readability polish – SCOPED */
body.admin .article-card {
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: .75rem;
  background: var(--bs-body-bg, #fff);
  transition: box-shadow .15s, border-color .15s;
}
body.admin .article-card:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,.06);
  border-color: rgba(0,0,0,.08);
}

body.admin .article-meta { margin: 2px 0 8px 0; }
body.admin .article-byline { font-size: .9rem; color: #6c757d; }

body.admin .status-badge {
  font-size: .75rem; padding: .35rem .6rem; border: 1px solid transparent;
}
body.admin .status-new { background-color: #e9ecef; color: #495057; }
body.admin .status-queued_for_translation { background-color: #fff3cd; color: #664d03; }
body.admin .status-translated { background-color: #cff4fc; color: #055160; }
body.admin .status-published { background-color: #d1e7dd; color: #0f5132; }
body.admin .status-draft { background-color: #f8d7da; color: #842029; }

body.admin .scrape-btn { margin-top: 8px; }
body.admin .content-preview { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--bs-border-color, #dee2e6); }

/* ===== LAYOUT ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (max-width: 767px) {
  .container {
    max-width: 100vw !important;
    width: 100vw !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* ===== NEW & UPDATED NAVBAR STYLES ===== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--bg-accent);
    transition: all 0.4s ease-in-out;
    padding: var(--spacing-md) 0; /* CHANGED: from var(--spacing-lg) to var(--spacing-md) */
}

.navbar.scrolled {
    padding: var(--spacing-xs) 0; /* CHANGED: from var(--spacing-sm) to var(--spacing-xs) */
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    border-bottom: 2px solid var(--bg-accent);
}

/* ===== NAVBAR CONTAINER - Missing from your CSS ===== */
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    transition: all 0.4s ease-in-out;
    width: 100%;
}

@media (min-width: 768px) {
    .navbar-container {
        padding: 0 var(--spacing-xl);
    }
}

/* Logo styling */
.navbar h1 a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s ease-in-out;
    align-items: center;
    margin-bottom: -17px;
}

/* Logo styling - SMALLER */
.logo-icon  {
    width: 4rem;
    height: 4rem;
    display: inline-block;
    object-fit: contain;
    transition: width 0.4s, height 0.4s;
}

.logo-text {
    width: 230px;         /* Adjust as needed for your graphic */
    height: auto;
    display: inline-block;
    object-fit: contain;
    transition: width 0.4s, opacity 0.4s;
}

/* Smaller logo when scrolled - EVEN SMALLER */
.navbar.scrolled .logo-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.navbar.scrolled .logo-text {
    font-size: 0; /* Hide text completely */
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* ===== HAMBURGER TOGGLE ===== */
.hamburger-toggle {
    width: 24px; /* CHANGED: from 30px to 24px */
    height: 18px; /* CHANGED: from 24px to 18px */
    position: relative;
    cursor: pointer;
    background: transparent;
    border: none;
    z-index: 1003;
    padding: 0;
    transition: color 0.3s ease;
    color: var(--text-primary);
}

.hamburger-toggle span {
    display: block;
    position: absolute;
    width: 100%;
    height: 2px; /* CHANGED: from 3px to 2px */
    background-color: currentColor;
    border-radius: 2px; /* CHANGED: from 3px to 2px */
    transition: all 0.35s ease-in-out;
}

.hamburger-toggle span:nth-child(1) { top: 0; }
.hamburger-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger-toggle span:nth-child(3) { bottom: 0; }

/* Hamburger animation to 'X' - ADJUSTED FOR SMALLER SIZE */
.hamburger-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg); /* CHANGED: from 10px to 8px */
}
.hamburger-toggle.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg); /* CHANGED: from -11px to -9px */
}

/* Lateral Sidebar Menu */
.hamburger-sidebar {
    position: fixed;
    top: 0;
    right: -300px; /* Hidden off-screen to the right */
    width: 300px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--bg-accent);
    box-shadow: -5px 0 25px rgba(0,0,0,0.3);
    z-index: 1002;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    padding: var(--spacing-2xl) 0;
}

/* Show sidebar when active */
.hamburger-sidebar.active {
    right: 0; /* Slide in from the right */
}

/* Sidebar header */
/* Adjust sidebar header padding to make room for close button */
.sidebar-header {
    padding: 0 calc(var(--spacing-xl) + 50px) 0 var(--spacing-xl); /* Extra padding on right */
    margin-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--bg-accent);
    padding-bottom: var(--spacing-lg);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

/* ===== SIDEBAR LOGO IMAGE ===== */
.sidebar-logo-image {
    max-width: 200px;        /* Adjust based on your logo dimensions */
    max-height: 40px;        /* Keep it proportional to sidebar */
    width: auto;
    height: auto;
    object-fit: contain;     /* Maintains aspect ratio */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.sidebar-logo:hover .sidebar-logo-image {
    opacity: 0.8;
    transform: scale(1.02);  /* Subtle hover effect */
}

.sidebar-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: var(--spacing-xl) 0;
}

.sidebar-social-icon {
  width: 28px;
  height: 28px;
  display: block;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
}
.sidebar-social-link:hover .sidebar-social-icon {
  opacity: 1;
  transform: scale(1.13);
}

.sidebar-legal {
  position: absolute;
  bottom: 18px;
  left: 0;
  width: 100%;
  text-align: center;
}
.sidebar-legal-link {
  color: var(--text-muted);
  font-size: 0.6rem;
  opacity: 0.75;
  text-decoration: none;
  font-style: none;
  transition: opacity 0.2s, text-decoration 0.2s;
}
.sidebar-legal-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Mobile adjustments for sidebar logo */
@media (max-width: 480px) {
    .sidebar-logo-image {
        max-width: 180px;
        max-height: 35px;
    }
}

/* ===== SIDEBAR CLOSE BUTTON ===== */
.sidebar-close-btn {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 40px;
    height: 40px;
    background: var(--bg-accent);
    border: 2px solid var(--bg-accent);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
    z-index: 1004;
}

.sidebar-close-btn:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.sidebar-close-btn:active {
    transform: rotate(90deg) scale(0.95);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: 0 var(--spacing-lg);
}

.sidebar-nav a {
    color: var(--text-primary);
    padding: var(--spacing-) var(--spacing-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.7rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    position: relative;
}

.sidebar-nav a:hover {
    background: var(--bg-accent);
    color: var(--purple);
    transform: translateX(5px);
    padding-left: var(--spacing-md);
}

/* Add icons to menu items (optional) */
.sidebar-nav a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--orange);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover::before {
    background: var(--purple);
    transform: scale(1.3);
}

.sidebar-nav a.active {
    background: var(--bg-accent);
    color: var(--purple);
    transform: translateX(5px);
}

.sidebar-nav a.active::before {
    background: var(--purple);
    transform: scale(1.3);
}

/* Add a subtle gradient accent for active items */
.sidebar-nav a.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--purple) 0%, var(--orange) 100%);
}

/* Overlay background */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

.navbar.scrolled .hamburger-toggle {
    color: var(--orange);
}

/* Prevent body scrolling when sidebar is open */
body.sidebar-open {
    overflow: hidden;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .hamburger-sidebar {
        width: 280px;
        right: -280px;
    }
    
    .sidebar-nav a {
        font-size: 1.5rem;
        ppadding: var(--spacing-) var(--spacing-md);
    }
}

/* ===== FEATURED SLIDER - FIXED ===== */
.featured-slider {
    margin: var(--spacing-2xl) 0;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--bg-accent);
    position: relative;
}

/* Add gradient accent border */
.featured-slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--purple) 0%, var(--orange) 100%);
    z-index: 2;
}

.slider-container {
    position: relative;
    height: 290px;
}

.slides-wrapper {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    pointer-events: none;
    z-index: 1;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Hover effect on the slide container */
.slide:hover {
    transform: translateY(-4px); /* Only move upward, same as article cards */
    box-shadow: var(--shadow-lg); /* Enhanced shadow */
}

/* 

.slide:hover .slide-content {
    border-left: 3px solid var(--purple); /* Purple accent line gets thicker 
    background: var(--bg-primary); /* Slight background change 
    transform: translateX(8px); /* horizontal movement
}
*/

.slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
    animation: slideGradientGlow 0.6s ease-out;
}

@keyframes slideGradientGlow {
    0% {
        box-shadow: inset 0 0 0 rgba(139, 92, 246, 0);
    }
    50% {
        box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.1);
    }
    100% {
        box-shadow: inset 0 0 0 rgba(139, 92, 246, 0);
    }
}

/* Slider image links */
.slide-image {
    flex: 1.3;
    overflow: hidden;
    display: block; /* Make the link fill the container */
    text-decoration: none;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.slide-image:hover img {
    transform: scale(1.05); /* Slight zoom on hover */
}

.slide-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(249, 115, 22, 0.15) 100%
    );
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.slide-image:hover::after {
    opacity: 0.7;
}

.slide-content {
    flex: 1;
    padding: var(--spacing-2xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-secondary);
    border-left: 1px solid var(--bg-accent);
    position: relative;
}

/* Full-height gradient accent line */
.slide-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;         /* Changed from 20% to 0 */
    bottom: 0;      /* Changed from 20% to 0 */
    width: 4px;     /* Made slightly wider */
    background: linear-gradient(180deg, var(--purple) 0%, var(--orange) 100%);
    opacity: 0.8;   /* Slightly more visible */
    transition: all 0.3s ease;
}

/* .slide:hover .slide-content::before {
    width: 6px; /* Make gradient line thicker 
    opacity: 1; /* Make it fully visible 
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3); /* Add glow effect 
}

*/

.slide-content h2 {
    font-size: 2.2rem;  /* Made bigger - was 1.75rem */
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    font-weight: 800;   /* Made bolder */
    transition: all 0.3s ease;
}

.slide-content h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.slide-content h2 a:hover {
    color: var(--purple);
}

.slide-summary {
    color: var(--text-secondary);
    font-size: 1.1rem;  /* Made slightly bigger */
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    transition: all 0.3s ease;
}

/* .slide:hover .slide-summary {
    transform: translateX(5px); /* Move summary text slightly
    color: var(--text-primary); /* Make summary text darker
}

*/

/* Border glow effect around entire slide */
.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

.slide:hover::after {
    border: 2px solid var(--purple); /* Purple border on hover */
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2); /* Subtle glow */
}

/* Slider Navigation - Fixed */
.slider-btn {
    position: absolute;
    background: var(--bg-primary);
    border: 2px solid transparent;
    background-image: 
        linear-gradient(var(--bg-primary), var(--bg-primary)),
        linear-gradient(135deg, var(--purple) 0%, var(--orange) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.prev-btn {
    left: var(--spacing-lg);
    bottom: var(--spacing-lg); /* Change from top: 50% to bottom */
    transform: none; /* Remove the translateY(-50%) transform */
}

.next-btn {
    right: var(--spacing-lg);
    bottom: var(--spacing-lg); /* Change from top: 50% to bottom */
    transform: none; /* Remove the translateY(-50%) transform */
}

/* Update the hover state to only scale, not translate */
.slider-btn:hover {
    background: linear-gradient(135deg, var(--purple) 0%, var(--orange) 100%);
    color: white;
    transform: scale(1.1);
}

.slider-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Dots Navigation */
.slider-dots {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--spacing-sm);
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-sm);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.dot:hover {
    background: linear-gradient(135deg, var(--purple-light) 0%, var(--orange-light) 100%);
    transform: scale(1.2);
}

.dot.active {
    background: linear-gradient(135deg, var(--purple) 0%, var(--orange) 100%);
    transform: scale(1.4);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

/* Disable hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {
    .slide:hover {
        transform: none;
        box-shadow: var(--shadow-md);
    }
    
    .slide:hover .slide-content h2,
    .slide:hover .slide-summary {
        transform: none;
        color: inherit;
    }
    
    .slide:hover::after,
    .slide:hover::before {
        opacity: 0;
        border: none;
    }
}

/* Mobile Slider Adjustments */
@media (max-width: 768px) {
    .slider-container {
        height: 400px;
    }
    
    .slide {
        flex-direction: column;
    }
    
    .slide-image {
        flex: 1.5;
    }
    
    .slide-content {
        padding: var(--spacing-lg) var(--spacing-lg) 50px var(--spacing-lg);
        /* Reduced top/sides padding, added large bottom padding for arrows */
        justify-content: flex-start; /* Align to top instead of center */
        transform: translateY(0px); /* Move content up by 30px */
  
    }
    
    .slide-content h2 {
        font-size: 1.8rem;  /* Bigger on mobile too */
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
    }
    
    .slider-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .slide-summary {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.4; /* Ensure consistent line height */
        max-height: calc(1.4em * 2); /* Fallback for browsers without line-clamp support */
    }
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: var(--spacing-2xl) 0 var(--spacing-lg) 0;
    position: relative;
    padding-left: var(--spacing-md);
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--orange) 100%);
    border-radius: 2px;
}

/* ===== ARTICLES GRID ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.articles-grid-wide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

#loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
}

#loading-indicator::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--bg-accent);
    border-top: 2px solid var(--purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: var(--spacing-sm);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#no-more-articles {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-muted);
    font-style: italic;
}

/* Smooth loading transitions */
.article-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

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

/* ===== ARTICLE CARDS ===== */
.article-card,
.article-card-wide {
    background: var(--bg-primary);
    border: 1px solid var(--bg-accent);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.article-card:hover,
.article-card-wide:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--purple);
}

/* Article card image links */
.article-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    display: block;
    text-decoration: none;
}

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

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

/* Ensure article cards maintain their hover effects */
.article-card:hover .article-image img,
.article-card-wide:hover .article-image img {
    transform: scale(1.05);
}
.article-content {
    padding: var(--spacing-lg);
}

.article-content h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.article-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-content h3 a:hover {
    color: var(--purple);
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: var(--spacing-sm) 0 var(--spacing-md) 0;
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    font-weight: 500;
}

.summary {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.read-more {
    color: var(--orange);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: var(--transition);
}

.read-more:hover {
    color: var(--orange-dark);
    transform: translateX(3px);
}

/* ===== FIXED TAB SYSTEM ===== */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--bg-accent);
    padding-bottom: var(--spacing-xs);
    overflow-x: auto;
    overflow-y: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

/* ===== FIXED TAB SYSTEM - NATURAL COLORS ===== */
.category-tabs a {
    color: var(--text-secondary); /* Keep natural gray */
    text-decoration: none;
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    font-size: 0.85rem;
    min-width: 60px;
    text-align: center;
    padding-bottom: 4px;
}

.category-tabs a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--purple) 0%, var(--orange) 100%);
    transition: width 0.3s ease;
    z-index: 1;
}

/* ONLY the underline changes, not text color */
.category-tabs a.active::after,
.category-tabs a:hover::after {
    width: 100%;
}

/* Keep text color natural - don't change to purple */
.category-tabs a.active,
.category-tabs a:hover {
    color: var(--text-secondary); /* Stay gray/natural */
}

/* Same for sort tabs */

.sort-tabs {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    padding: 0;
    margin-top: -4px;
}

.sort-tab {
    color: var(--text-secondary); /* Keep natural gray */
    text-decoration: none;
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    font-size: 0.85rem;
    min-width: 60px;
    text-align: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding-bottom: 7px;
}

.sort-tab::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--purple) 0%, var(--orange) 100%);
    transition: width 0.3s ease;
    z-index: 1;
}

.sort-tab.active::after,
.sort-tab:hover::after {
    width: 100%;
}

/* Keep text color natural - don't change to purple */
.sort-tab.active,
.sort-tab:hover {
    color: var(--text-secondary); /* Stay gray/natural */
}

/* ===== MOBILE OPTIMIZATIONS - CONSOLIDATED ===== */

/* Mobile - Small screens (480px and below) */
@media (max-width: 480px) {
    /* Category tabs mobile styles */
    .category-tabs a {
        font-size: 0.8rem;
        padding: 6px 8px;
        min-width: 55px;
        padding-bottom: 4px
    }
    
    /* Sort tabs mobile styles */
    .sort-tab {
        font-size: 0.8rem;
        padding: 6px 12px;
        min-width: 80px;
        padding-bottom: 7px
    }
    
    /* Adjust sort tabs gap */
    .sort-tabs {
        gap: var(--spacing-md);
    }
}

/* Mobile - Extra small screens (320px and below) */
@media (max-width: 320px) {
    /* Allow category tabs to scroll horizontally */
    .category-tabs {
        justify-content: flex-start;
        padding: 0 var(--spacing-sm);
    }
    
    /* Stack sort tabs vertically on tiny screens */
    .sort-tabs {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: center;
    }
    
    /* Full width sort buttons on tiny screens */
    .sort-tab {
        width: 200px;
    }
}

/* ===== MOST READ SECTIONS ===== */
.most-read-section {
    background: var(--bg-secondary);
    border: 1px solid var(--bg-accent);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.most-read-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.most-read-list {
    list-style: none;
    counter-reset: item-counter;
}

.most-read-item {
    counter-increment: item-counter;
    padding: var(--spacing-sm);
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    padding-left: var(--spacing-2xl);
    margin-bottom: var(--spacing-sm);
}

.most-read-item::before {
    content: counter(item-counter);
    position: absolute;
    left: var(--spacing-sm);
    top: var(--spacing-sm);
    background: var(--orange);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.most-read-item:hover {
    background: var(--bg-accent);
    transform: translateX(5px);
}

.most-read-item a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
}

.most-read-item a:hover {
    color: var(--purple);
}

.most-read-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--spacing-xs);
}

/* ===== ARTICLE DETAIL PAGE ===== */
.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    margin: var(--spacing-xl) 0;
}

@media (min-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr 300px;
    }
}

.article-full {
    background: var(--bg-primary);
    border: 1px solid var(--bg-accent);
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
}

.article-header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--bg-accent);
}

/* ===== CATEGORY PAGES ===== */
.category-hero {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--bg-accent);
    padding: 4rem 0px;
    margin-bottom: var(--spacing-2xl);
    position: relative;
}

.category-hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--purple) 0%, var(--orange) 100%);
}

.category-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.category-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
}

.category-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.category-articles {
    margin-bottom: var(--spacing-2xl);
}

.category-title-image {
    max-width: 450px;
    width: 300%;
    display: block;
    margin: 0px auto;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .category-title {
        font-size: 2.2rem;
    }
    
    .category-description {
        font-size: 1rem;
        padding: 0 var(--spacing-md);
    }
}

     .category-title-image {
         max-width: 450px;
         width: 100%;
         display: block;
         margin: 0px auto;
     }

.category-hero {
    padding: 3rem 0px;
}

.category-header {
    max-width: 800px;
    margin: 0px auto;
    padding: 0px;
}

/* Optional: Enhanced HR styling */
.article-body hr {
    margin: var(--spacing-2xl) auto;
    border: none;
    height: 2px;
    background: linear-gradient(135deg, var(--purple) 0%, var(--orange) 100%);
    border-radius: 2px;
    width: 60%; /* Make it shorter and centered */
    opacity: 0.6;
}

/* .breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--purple);
    font-weight: 600;
} */

.category-tag {
    display: inline-block;
    background: var(--orange);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 20px;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-full h1 {
    font-size: 2.2rem;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    font-weight: 800;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.article-body ul, .article-body ol {
    list-style-position: inside;   /* Bullets are inside the content box */
    padding-left: 0;               /* Remove browser default */
    margin-left: 0;                /* Remove browser default */
    margin-bottom: var(--spacing-md);
}

.article-body li:not(:last-child) {
    margin-bottom: var(--spacing-md); /* Good spacing between items */
}

.article-body li {
    margin-bottom: var(--spacing-md); /* Consistent vertical spacing */
    line-height: 1.7;
    font-size: 1em;
    padding-left: 0.25em; /* Small space if needed for alignment */
}

.article-body p {
    margin-bottom: var(--spacing-lg);
}

.article-body h2,
.article-body h3 {
    color: var(--text-primary);
    margin: var(--spacing-xl) 0 var(--spacing-md) 0;
}

.article-body h2 {
    font-size: 1.4rem;
    border-left: 4px solid var(--purple);
    padding-left: var(--spacing-md);
}

.article-body a {
    color: var(--purple);
    font-weight: 600;
}

.article-body a:hover {
    color: var(--purple-light);
}

/* Article Hero Image */
.article-hero-image {
    margin: var(--spacing-xl) 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--bg-accent);
}

.article-hero-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.article-hero-image figcaption {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    background: var(--bg-secondary);
}

/* Mobile sections */
.mobile-sections {
    display: block;
    padding: var(--spacing-xl) var(--spacing-md);
    background: var(--bg-secondary);
}

@media (min-width: 1024px) {
    .mobile-sections {
        display: none;
    }
    
    .breadcrumb {
        display: none;
    }
}

.mobile-section {
    margin-bottom: var(--spacing-xl);
}

.mobile-section h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.mobile-articles-grid {
    display: grid;
    gap: var(--spacing-md);
}

.mobile-article-card {
    background: var(--bg-primary);
    border: 1px solid var(--bg-accent);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.mobile-article-card:hover {
    border-color: var(--purple);
}

.mobile-article-card a {
    display: block;
    padding: var(--spacing-md);
    color: inherit;
    text-decoration: none;
}

.mobile-article-card h4 {
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    font-weight: 600;
}

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

@media (max-width: 768px) {
    .article-header .category-tag {
        margin-bottom: 1.5rem; /* Adjust this value to move it lower */
        margin-top: 2.5rem;    /* Optional: adjust top spacing */
    }

footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--bg-accent);
    text-align: center;
    padding: var(--spacing-2xl);
    margin-top: var(--spacing-2xl);
    color: var(--text-secondary);
    width: 100%;
    display: block;
}

/* Footer */
footer .container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
    footer .container {
        padding: 0 var(--spacing-xl);
    }
}

/* Back button */
.back-home {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--purple);
    text-decoration: none;
    font-weight: 600;
    padding: var(--spacing-md) var(--spacing-xl);
    border: 2px solid var(--purple);
    border-radius: 8px;
    transition: var(--transition);
    margin: var(--spacing-xl) auto var(--spacing-2xl) auto;
    text-align: center;
}

.back-home:hover {
    background: var(--purple);
    color: white;
    transform: translateX(-3px);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }

 .articles-grid,
    .articles-grid-wide {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

.article-layout {
        grid-template-columns: 1fr;
        gap: 0;
        margin: 0;
    }
    
    .article-header {
        padding: var(--spacing-md);
        margin-bottom: 0;
        border-bottom: none;
    }
    
    .category-tag {
        margin-bottom: var(--spacing-lg); /* Adds extra space below the tag */
        margin-top: var(--spacing-md);    /* (Optional) Adds a bit of space above the tag if needed */
    }
    
    .article-full h1 {
        font-size: 1.6rem;
        padding: 0 var(--spacing-md);
        margin-bottom: var(--spacing-md);
    }
    
    .article-meta {
        padding: 0 var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }
    
    .article-full {
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: var(--bg-primary);
    }
    .article-hero-image {
        margin: 0;
        border-radius: 0;
        border: none;
    }
    .article-hero-image img {
        width: 100vw;
        max-width: 100vw;
        min-width: 100vw;
        margin-left: 50%;
        transform: translateX(-50%);
        border-radius: 0;
    }
    .article-body {
        padding: var(--spacing-md);
    }
}
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .slide-content h2 {
        font-size: 1.2rem;
    }
    
    .category-tabs {
        gap: var(--spacing-xs);
    }
}

@media (max-width: 480px) {
    .most-read-item {
        padding-left: var(--spacing-xl);
    }
    
    .most-read-item::before {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
}

/* ===== UTILITIES ===== */
.no-content {
    text-align: center;
    padding: var(--spacing-2xl) 0;
    color: var(--text-muted);
    font-style: italic;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 1rem; /* space between items */
    margin-bottom: 1rem;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid var(--purple);
    outline-offset: 2px;
}

/* ===== EMBEDDED VIDEOS - YouTube iframe styling ===== */
.article-body iframe {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16/9; /* Maintain YouTube aspect ratio */
    border-radius: var(--border-radius);
    border: 1px solid var(--bg-accent);
    box-shadow: var(--shadow-sm);
    margin: var(--spacing-lg) 0;
}

/* Specific YouTube iframe styling */
.article-body iframe[src*="youtube.com"],
.article-body iframe[src*="youtu.be"] {
    width: 100%;
    height: 315px; /* Standard YouTube embed height */
    min-height: 200px;
}

/* Responsive video sizing */
@media (max-width: 768px) {
    .article-body iframe[src*="youtube.com"],
    .article-body iframe[src*="youtu.be"] {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .article-body iframe[src*="youtube.com"],
    .article-body iframe[src*="youtu.be"] {
        height: 200px;
    }
}

