/* ==========================================================================
   Lateast Blog - Premium Modern Blog Styles
   Bootstrap 4.6 loaded from CDN
   Fonts: Inter (body), Playfair Display (headings)
   ========================================================================== */

/* --- CSS Variables --- */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-darker: #4338ca;
  --primary-light: #eef2ff;
  --primary-lighter: #f5f3ff;
  --accent: #06b6d4;
  --accent-light: #ecfeff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-light: #cbd5e1;
  --bg-body: #f8fafc;
  --bg-white: #ffffff;
  --bg-light: #f1f5f9;
  --bg-dark: #0f172a;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-body);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

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

::selection {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* --- Container Override --- */
@media (min-width: 1200px) {
  .container { max-width: 1200px; }
}

/* =====================================================
   LOADING OVERLAY
   ===================================================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-white);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.loading-content {
  text-align: center;
}

.loading-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  margin: 0 auto 20px;
}

.loading-spinner {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.spinner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: spinnerBounce 1.4s infinite ease-in-out both;
}

.spinner-dot:nth-child(1) { animation-delay: -0.32s; }
.spinner-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes spinnerBounce {
  0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* =====================================================
   HEADER / NAVBAR
   ===================================================== */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0;
}

/* Brand / Logo */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-brand:hover { text-decoration: none; }

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: var(--transition);
}

.navbar-brand:hover .brand-icon {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

/* Nav Links */
.navbar-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-nav-links > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.navbar-nav-links > li > a:hover,
.navbar-nav-links > li > a.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* Dropdown Menus */
.nav-dropdown {
  position: relative;
}

.dropdown-menu-custom {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1001;
}

.nav-dropdown:hover .dropdown-menu-custom,
.nav-dropdown.show .dropdown-menu-custom {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  min-width: 320px;
}

.dropdown-item-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.dropdown-item-custom:hover {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}

.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dropdown-lang {
  min-width: 200px;
}

.dropdown-lang .dropdown-item-custom {
  justify-content: flex-start;
}

.lang-flag {
  font-size: 16px;
  line-height: 1;
}

.lang-code {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Navbar Search */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-search {
  position: relative;
}

.navbar-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
  transition: var(--transition-fast);
}

.navbar-search input {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 9px 16px 9px 38px;
  font-size: 13px;
  font-family: var(--font-body);
  background: var(--bg-light);
  width: 200px;
  transition: var(--transition);
  outline: none;
  color: var(--text-primary);
}

.navbar-search input::placeholder {
  color: var(--text-muted);
}

.navbar-search input:focus,
.navbar-search.focused input {
  border-color: var(--primary);
  background: var(--bg-white);
  width: 260px;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.navbar-search.focused .search-icon {
  color: var(--primary);
}

.navbar-search-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--border);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  transition: var(--transition-fast);
  align-items: center;
  justify-content: center;
}

.navbar-search-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Hamburger */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  z-index: 10;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}

.navbar-toggle.active .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.navbar-toggle.active .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Search Panel */
.mobile-search {
  display: none;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 12px 0;
  box-shadow: var(--shadow);
}

.mobile-search.open {
  display: block;
}

.mobile-search-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-light);
  border-radius: var(--radius-full);
  padding: 4px 16px;
  border: 1.5px solid var(--border);
}

.mobile-search-inner:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.mobile-search-inner i {
  color: var(--text-muted);
  font-size: 14px;
}

.mobile-search-inner input {
  flex: 1;
  border: none;
  background: none;
  padding: 10px 0;
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  color: var(--text-primary);
}

.mobile-search-inner button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
}

/* Mobile Responsive Nav */
@media (max-width: 991px) {
  .navbar-toggle { display: block; }
  .navbar-search-toggle { display: flex; }
  .navbar-search { display: none; }

  .navbar-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    gap: 4px;
    border-top: 1px solid var(--border);
    align-items: stretch;
  }

  .navbar-nav-links.open { display: flex; }

  .navbar-nav-links > li > a {
    padding: 12px 16px;
    font-size: 15px;
  }

  .nav-dropdown .dropdown-menu-custom {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
    opacity: 1;
    visibility: visible;
    display: none;
    min-width: auto;
  }

  .nav-dropdown.show .dropdown-menu-custom {
    display: block;
    transform: none;
  }

  .dropdown-grid {
    grid-template-columns: 1fr;
    min-width: auto;
  }
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero-section {
  padding: 24px 0 8px;
}

.hero-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: block;
  background: var(--bg-dark);
  height: 460px;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  transition: all 0.5s ease;
}

.hero-card:hover img {
  opacity: 0.5;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 36px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  color: #fff;
}

.hero-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.hero-category {
  display: inline-block;
  color: #fff;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border-radius: var(--radius-full);
}

.hero-lang {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  color: #fff;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-summary {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  display: flex;
  gap: 16px;
}

.hero-meta i {
  margin-right: 4px;
}

/* Sidebar Cards */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 460px;
}

.sidebar-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-dark);
  flex: 1;
  display: block;
}

.sidebar-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  transition: all 0.4s ease;
}

.sidebar-card:hover img {
  opacity: 0.5;
  transform: scale(1.03);
}

.sidebar-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

@media (max-width: 991px) {
  .hero-card { height: 320px; }
  .hero-title { font-size: 24px; }
  .hero-overlay { padding: 28px 24px; }
  .hero-sidebar { height: auto; flex-direction: row; }
  .sidebar-card { min-height: 200px; }
}

@media (max-width: 576px) {
  .hero-card { height: 280px; }
  .hero-title { font-size: 20px; }
  .hero-overlay { padding: 24px 20px; }
  .hero-summary { display: none; }
  .hero-sidebar { flex-direction: column; }
  .sidebar-card { min-height: 180px; }
}

/* =====================================================
   CATEGORIES STRIP
   ===================================================== */
.categories-strip {
  padding: 20px 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}

.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.categories-scroll::-webkit-scrollbar {
  display: none;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--bg-light);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: var(--transition-fast);
  border: 1.5px solid transparent;
  text-decoration: none;
}

.category-chip:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  text-decoration: none;
}

.category-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.category-chip i {
  font-size: 12px;
}

/* =====================================================
   POST CARDS GRID
   ===================================================== */
.posts-section {
  padding: 40px 0 56px;
}

.section-header {
  margin-bottom: 28px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.section-title .page-indicator {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 8px;
}

.section-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

/* Post Card */
.post-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-light);
}

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

.post-card-image {
  position: relative;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.card-category {
  display: inline-block;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.card-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  min-width: 28px;
  text-align: center;
}

.post-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-title a {
  color: var(--text-primary);
}

.post-card-title a:hover {
  color: var(--primary);
}

.post-card-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
  flex: 1;
}

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

.post-card-date,
.post-card-read-time {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-card-date i,
.post-card-read-time i {
  font-size: 11px;
}

/* =====================================================
   ARTICLE DETAIL PAGE
   ===================================================== */
.article-detail {
  padding: 32px 0 80px;
}

.article-container {
  max-width: 760px;
  margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb-nav {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: 13px;
  color: var(--text-muted);
  align-items: center;
}

.breadcrumb-nav li {
  display: flex;
  align-items: center;
}

.breadcrumb-nav a {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

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

.breadcrumb-nav .separator {
  margin: 0 8px;
  font-size: 9px;
  color: var(--text-light);
}

.breadcrumb-nav li[aria-current="page"] {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Article Header */
.article-header {
  margin-bottom: 36px;
}

.article-header-badges {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.article-category {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.article-category:hover {
  text-decoration: none;
  opacity: 0.8;
}

.article-lang-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-light);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

.article-header h1 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 18px;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.article-summary {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  font-weight: 400;
}

/* Article Info Bar */
.article-info-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  gap: 16px;
}

.info-left { display: flex; align-items: center; }
.info-right {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.author-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.author-date {
  font-size: 13px;
  color: var(--text-muted);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-muted);
}

.info-item i {
  font-size: 12px;
  color: var(--text-light);
}

/* Key Takeaways */
.article-key-takeaways {
  background: linear-gradient(135deg, var(--primary-light), #ede9fe);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 32px;
}

.takeaway-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
  margin-bottom: 14px;
}

.takeaway-header i {
  font-size: 16px;
  color: var(--warning);
}

.takeaway-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.takeaway-list li {
  position: relative;
  padding: 6px 0 6px 22px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}

.takeaway-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* Featured Image */
.article-featured-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 36px;
}

.article-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Article Content */
.article-content {
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 1.5em;
}

.article-content h2 {
  font-size: 26px;
  margin-top: 2.2em;
  margin-bottom: 0.8em;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-light);
}

.article-content h3 {
  font-size: 22px;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

.article-content h4 {
  font-size: 18px;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.article-content ul, .article-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

.article-content li {
  margin-bottom: 0.5em;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: 18px 28px;
  margin: 1.8em 0;
  background: var(--primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 16px;
}

.article-content img {
  border-radius: var(--radius);
  margin: 1.5em 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 14px;
  border-radius: var(--radius);
  overflow: hidden;
}

.article-content table th,
.article-content table td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: left;
}

.article-content table th {
  background: var(--bg-light);
  font-weight: 600;
}

.article-content table tr:nth-child(even) {
  background: var(--bg-light);
}

.article-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(99, 102, 241, 0.3);
  text-underline-offset: 3px;
}

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

.article-content code {
  background: var(--bg-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.article-content pre {
  background: var(--bg-dark);
  color: #e2e8f0;
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5em 0;
  font-size: 14px;
  line-height: 1.6;
}

.article-content pre code {
  background: none;
  padding: 0;
}

/* FAQ Section */
.article-faq {
  margin: 48px 0 36px;
  padding: 28px 32px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}

.faq-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
  border: none;
  padding: 0;
}

.faq-title i {
  color: var(--primary);
  font-size: 20px;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  line-height: 1.45;
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-chevron {
  flex-shrink: 0;
  transition: transform 0.25s ease;
  margin-left: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  padding: 0 0 18px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
}

/* Article Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 28px 0;
  margin-top: 36px;
  border-top: 1px solid var(--border);
  align-items: center;
}

.tag-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
}

.tag-label i {
  color: var(--text-muted);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags-list a,
.article-tags a {
  display: inline-block;
  padding: 4px 14px;
  background: var(--bg-light);
  color: var(--text-secondary);
  font-size: 13px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  transition: var(--transition-fast);
}

.tags-list a:hover,
.article-tags a:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  text-decoration: none;
}

/* Share Section */
.article-share {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.share-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.share-buttons {
  display: flex;
  gap: 8px;
}

.share-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  transition: var(--transition-fast);
  color: var(--text-secondary);
  background: var(--bg-light);
  border: 1px solid var(--border);
}

.share-btn:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.share-twitter:hover { background: #000; border-color: #000; }
.share-facebook:hover { background: #1877f2; border-color: #1877f2; }
.share-linkedin:hover { background: #0a66c2; border-color: #0a66c2; }
.share-email:hover { background: var(--primary); border-color: var(--primary); }

/* Related Articles */
.article-related {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 2px solid var(--border-light);
}

.related-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
  border: none;
  padding: 0;
}

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

.related-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  transition: var(--transition);
}

.related-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  text-decoration: none;
  border-color: var(--border);
}

.related-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card:hover img {
  transform: scale(1.03);
}

.related-card-body {
  padding: 16px;
}

.related-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: block;
}

.related-card-body h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.related-card-date {
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .article-header h1 { font-size: 28px; }
  .article-summary { font-size: 16px; }
  .article-content { font-size: 16px; }
  .related-grid { grid-template-columns: 1fr; }
  .article-faq { padding: 20px; }
  .article-info-bar { flex-direction: column; align-items: flex-start; }
}

/* =====================================================
   SEARCH RESULTS
   ===================================================== */
.search-section {
  padding: 40px 0 80px;
}

.search-header {
  text-align: center;
  margin-bottom: 36px;
}

.search-icon-large {
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 20px;
}

.search-header h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.search-query {
  font-size: 16px;
  color: var(--text-secondary);
}

.search-keyword {
  color: var(--primary);
  font-weight: 600;
}

.search-count {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Search Again */
.search-again {
  margin-bottom: 32px;
}

.search-again-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-white);
  border-radius: var(--radius-full);
  padding: 4px 20px;
  border: 2px solid var(--border);
  transition: var(--transition);
}

.search-again-inner:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-again-inner i {
  color: var(--text-muted);
  font-size: 15px;
}

.search-again-inner input {
  flex: 1;
  border: none;
  background: none;
  padding: 14px 0;
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  color: var(--text-primary);
}

/* Search Result Cards */
.search-result-card {
  display: flex;
  gap: 20px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  padding: 20px;
  margin-bottom: 16px;
  transition: var(--transition);
}

.search-result-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border);
  transform: translateX(4px);
}

.search-result-card .src-image {
  flex-shrink: 0;
}

.search-result-card .src-image img {
  width: 200px;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
}

.search-result-card .src-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.src-top {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.src-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.src-lang {
  font-size: 14px;
}

.src-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.35;
}

.src-title a {
  color: var(--text-primary);
}

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

.src-summary {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
  flex: 1;
}

.src-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
}

.src-meta i {
  margin-right: 3px;
}

@media (max-width: 576px) {
  .search-result-card {
    flex-direction: column;
    padding: 16px;
  }
  .search-result-card .src-image img {
    width: 100%;
    height: 180px;
  }
}

/* =====================================================
   CATEGORY PAGE
   ===================================================== */
.category-section {
  padding: 40px 0 80px;
}

.category-header {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.category-header-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.category-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 22px;
  flex-shrink: 0;
}

.category-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 4px;
}

.category-description {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.category-count {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.category-nav-strip {
  margin-bottom: 8px;
}

/* =====================================================
   NO CONTENT
   ===================================================== */
.no-content {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.no-content i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
  display: block;
}

.no-content h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.no-content p {
  font-size: 15px;
  max-width: 400px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.btn-back-home:hover {
  background: var(--primary-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination-nav {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}

.pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-item .page-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: var(--transition-fast);
  min-width: 42px;
  justify-content: center;
}

.page-item .page-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
}

.page-item.active .page-link {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.page-item.disabled .page-link {
  color: var(--text-light);
  pointer-events: none;
  background: var(--bg-light);
  border-color: var(--border-light);
}

.page-prev,
.page-next {
  font-weight: 500;
}

@media (max-width: 576px) {
  .page-item .page-link {
    padding: 8px 12px;
    font-size: 13px;
    min-width: 36px;
  }
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  margin-top: auto;
}

.footer-main {
  padding: 56px 0 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 16px;
}

.footer-logo .brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.footer-logo .brand-text {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.footer-tagline {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  border-radius: 50%;
  font-size: 14px;
  transition: var(--transition-fast);
}

.footer-social a:hover {
  background: var(--primary);
  color: #fff;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.9);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: #fff;
  padding-left: 4px;
}

.footer-newsletter-text {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin-bottom: 16px;
}

.footer-rss-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition-fast);
  border: 1px solid rgba(255,255,255,0.15);
}

.footer-rss-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  text-decoration: none;
}

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

.footer-quick-links a {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
}

.footer-quick-links a:hover {
  color: #fff;
}

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
}

.footer-bottom a:hover {
  color: #fff;
}

.footer-bottom-links {
  display: flex;
  gap: 16px;
}

/* =====================================================
   BACK TO TOP
   ===================================================== */
#return-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 16px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
}

#return-to-top.show {
  opacity: 1;
  visibility: visible;
}

#return-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-xl);
}

/* =====================================================
   ANIMATIONS & TRANSITIONS
   ===================================================== */
.post-card,
.search-result-card,
.related-card {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 0.5s ease forwards;
}

.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.3s; }

.search-result-card:nth-child(1) { animation-delay: 0.05s; }
.search-result-card:nth-child(2) { animation-delay: 0.1s; }
.search-result-card:nth-child(3) { animation-delay: 0.15s; }
.search-result-card:nth-child(4) { animation-delay: 0.2s; }

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

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.mb-grid { margin-bottom: 24px; }

/* Fix for Bootstrap dropdown conflict */
.nav-dropdown .dropdown-toggle-link::after {
  display: none;
}

/* Smooth image loading */
.post-card-image img,
.hero-card img,
.sidebar-card img,
.related-card img,
.search-result-card .src-image img {
  background: var(--bg-light);
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
  .site-header, .site-footer, #return-to-top, .pagination-nav,
  .article-share, .article-related, .article-faq, .article-tags,
  .categories-strip, .hero-section, .mobile-search { display: none; }
  .article-content { font-size: 12pt; }
  .article-container { max-width: 100%; }
  body { background: #fff; }
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* =====================================================
   RESPONSIVE FINE-TUNING
   ===================================================== */
@media (max-width: 768px) {
  .footer-main { padding: 40px 0 24px; }
  .footer-bottom-inner { justify-content: center; text-align: center; }
  .footer-bottom-links { justify-content: center; }
  .section-title { font-size: 24px; }
  .category-header-content { flex-direction: column; align-items: flex-start; gap: 12px; }
  .category-title { font-size: 26px; }
}

@media (max-width: 576px) {
  .hero-section { padding: 16px 0 8px; }
  .posts-section { padding: 28px 0 40px; }
  .category-section { padding: 28px 0 56px; }
  .search-section { padding: 28px 0 56px; }
  .search-header h1 { font-size: 24px; }
}
