/**
 * MLV News Theme for Grav CMS 2.x
 * Modern, ultra-fast CSS rebuilt for Bootstrap 5.3 & Core Web Vitals
 */

/* ==========================================================================
   1. Root Variables & Reset
   ========================================================================== */
:root {
  --mlv-primary: #FC624D;
  --mlv-primary-rgb: 252, 98, 77;
  --mlv-primary-hover: #E04530;
  --mlv-primary-light: #FFF5F4;
  --mlv-dark: #191E21;
  --mlv-gray: #6C757D;
  --mlv-light-gray: #F8F9FA;
  --mlv-border: #E5E7EB;
  --mlv-footer-bg: #1E242B;
  --mlv-footer-text: #9CA3AF;
  --mlv-font-sans: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mlv-font-heading: 'Raleway', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mlv-font-serif: 'Merriweather', Georgia, serif;
  --mlv-transition: all 0.25s ease-in-out;
}

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

body {
  font-family: var(--mlv-font-sans);
  color: var(--mlv-dark);
  background-color: #FAFAFA;
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6,
.font-heading {
  font-family: var(--mlv-font-heading);
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
}

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

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

/* ==========================================================================
   2. Performance & Core Web Vitals Optimizations (Guidance: defer-rendering-heavy-content)
   ========================================================================== */
.mlv-deferred {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 380px;
}

/* Prevent Cumulative Layout Shift (CLS) on responsive media */
img {
  max-width: 100%;
  height: auto;
}

.ratio-news {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.ratio-news-sm {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

/* ==========================================================================
   3. Header & Navigation
   ========================================================================== */
header.primary {
  background: #FFF;
  border-bottom: 1px solid var(--mlv-border);
  position: relative;
  z-index: 1030;
}

.firstbar {
  padding: 16px 0;
  background-color: #FFF;
  border-bottom: 1px solid #F1F3F5;
}

.firstbar .brand a {
  display: inline-block;
}

.firstbar .brand img {
  height: auto;
  max-height: 68px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.firstbar .nav-icons a i {
  font-size: 1.25rem;
}

.firstbar .header-search-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
}

.firstbar .search-box {
  width: 310px;
  max-width: 100%;
  margin: 0;
  flex-shrink: 0;
}

.firstbar .search-box .input-group {
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid var(--mlv-border);
  height: 38px;
}

.firstbar .search-box .form-control {
  border: none;
  padding-left: 16px;
  font-size: 0.85rem;
}

.firstbar .search-box .form-control:focus {
  box-shadow: none;
}

.firstbar .search-box .btn-search {
  background-color: var(--mlv-primary);
  color: #FFF;
  border: none;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--mlv-transition);
}

.firstbar .search-box .btn-search:hover {
  background-color: var(--mlv-primary-hover);
}

.firstbar .popular-searches {
  font-size: 0.8rem;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mlv-gray);
  white-space: nowrap;
}

.firstbar .popular-searches .popular-label {
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--mlv-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 2px;
}

.firstbar .popular-searches a {
  color: #4B5563;
  text-decoration: none;
  font-weight: 500;
  transition: var(--mlv-transition);
}

.firstbar .popular-searches a:hover {
  color: var(--mlv-primary);
  text-decoration: underline;
}

.firstbar .popular-searches .sep {
  color: #9CA3AF;
  margin-right: 2px;
}

.firstbar .nav-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.firstbar .nav-icons a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--mlv-dark);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

/* Main Navigation Bar */
.mlv-navbar {
  background: #FFF;
  position: relative;
  z-index: 1030;
  padding: 0;
}

.mlv-navbar .container {
  position: relative;
}

.mlv-navbar.sticky-top {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  border-bottom: 1px solid var(--mlv-border);
  transition: box-shadow 0.25s ease;
}

/* Sticky Navbar Brand Logo */
.navbar-brand-sticky {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.navbar-brand-sticky a {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.navbar-brand-sticky img {
  height: 34px;
  width: auto;
  max-height: 34px;
  object-fit: contain;
}

/* On-Scroll Mode: hidden at top of page, gracefully appears when stuck */
.navbar-brand-sticky.logo-mode-on_scroll {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  margin-right: 0;
  transform: scale(0.9);
  transition: max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease,
              margin-right 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mlv-navbar.is-stuck .navbar-brand-sticky.logo-mode-on_scroll,
.navbar-brand-sticky.logo-mode-always {
  max-width: 170px;
  opacity: 1;
  margin-right: 25px;
  transform: scale(1);
}

.navbar-brand-sticky.logo-mode-hidden {
  display: none !important;
}

@media (max-width: 991.98px) {
  .primary.sticky-mobile-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #FFF;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  }
}

.nav-list,
.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
}

.nav-list > li > a,
.nav-menu > li > a {
  display: block;
  padding: 15px 18px;
  font-family: var(--mlv-font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mlv-dark);
  position: relative;
  line-height: 1.2;
}

.nav-list > li > a::after,
.nav-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 3px;
  background-color: var(--mlv-primary);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav-list > li:hover > a::after,
.nav-list > li.active > a::after,
.nav-menu > li:hover > a::after,
.nav-menu > li.active > a::after {
  transform: scaleX(1);
}

.nav-list > li:hover > a,
.nav-list > li.active > a,
.nav-menu > li:hover > a,
.nav-menu > li.active > a {
  color: var(--mlv-primary);
}

/* Dropdown Menu (Pure CSS Hover on Desktop) */
.mlv-dropdown {
  position: relative;
}

.mlv-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #FFF;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  border: 1px solid var(--mlv-border);
  border-top: 2px solid var(--mlv-primary);
  list-style: none;
  padding: 8px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 1050;
}

.mlv-dropdown:hover > .mlv-dropdown-menu,
.mlv-dropdown:focus-within > .mlv-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.mlv-dropdown-menu li a {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: #374151;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
}

.mlv-dropdown-menu li a i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  font-size: 1.05rem;
  margin-right: 10px;
  color: var(--mlv-gray);
  transition: color 0.2s ease, transform 0.2s ease;
}

.mlv-dropdown-menu li a:hover {
  background-color: var(--mlv-primary-light);
  color: var(--mlv-primary);
  padding-left: 24px;
}

.mlv-dropdown-menu li a:hover i {
  color: var(--mlv-primary);
  transform: scale(1.15);
}

.mlv-dropdown-menu .dropdown-divider {
  height: 1px;
  margin: 6px 0;
  overflow: hidden;
  background-color: var(--mlv-border);
  border: 0;
}

/* Mega Menu */
.mlv-megamenu-item,
.has-megamenu {
  position: static !important;
}

.mlv-megamenu,
.megamenu-panel {
  position: absolute;
  top: 100%;
  left: 12px;
  right: 12px;
  width: auto;
  background: #FFF;
  box-shadow: 0 15px 35px rgba(0,0,0,0.12);
  border: 1px solid var(--mlv-border);
  border-top: 2px solid var(--mlv-primary);
  padding: 20px 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 1040;
}

.mlv-megamenu-item:hover .mlv-megamenu,
.mlv-megamenu-item:focus-within .mlv-megamenu,
.mlv-megamenu-item:hover .megamenu-panel,
.mlv-megamenu-item:focus-within .megamenu-panel,
.has-megamenu:hover .mlv-megamenu,
.has-megamenu:focus-within .mlv-megamenu,
.has-megamenu:hover .megamenu-panel,
.has-megamenu:focus-within .megamenu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.megamenu-heading {
  font-size: 0.9rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--mlv-primary);
  display: inline-block;
}

/* Mega Menu Article Cards - Compact & faithful to editorial */
.megamenu-article {
  margin-bottom: 0;
}

.megamenu-article figure {
  height: 120px;
  width: 100%;
  overflow: hidden;
  border-radius: 3px;
  margin-bottom: 8px;
  background-color: #F3F4F6;
}

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

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

.megamenu-article .detail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}

.megamenu-article .detail .category a {
  color: var(--mlv-primary);
}

.megamenu-article .detail .time {
  color: var(--mlv-gray);
}

.megamenu-article h3.card-title {
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 700;
  margin: 0;
}

.megamenu-article h3.card-title a {
  color: #1F2937;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.megamenu-article h3.card-title a:hover {
  color: var(--mlv-primary);
}

.megamenu-vertical-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.megamenu-vertical-menu li {
  margin-bottom: 4px;
}

.megamenu-vertical-menu li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #F3F4F6;
  transition: var(--mlv-transition);
}

.megamenu-vertical-menu li a:hover {
  color: var(--mlv-primary);
  padding-left: 4px;
}

/* ==========================================================================
   4. Breaking News Ticker (Modern CSS Keyframe)
   ========================================================================== */
.mlv-ticker-wrap {
  background: #111827;
  color: #FFF;
  overflow: hidden;
  display: flex;
  align-items: center;
  height: 44px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mlv-ticker-label,
.mlv-ticker-title {
  background-color: var(--mlv-primary);
  color: #FFF;
  font-family: var(--mlv-font-heading);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.mlv-ticker-label::after,
.mlv-ticker-title::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid var(--mlv-primary);
}

.mlv-ticker-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
  mask-image: linear-gradient(to right, transparent 0, black 20px, black calc(100% - 20px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 20px, black calc(100% - 20px), transparent 100%);
}

.mlv-ticker-items,
.mlv-ticker-track {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  animation: ticker-slide 30s linear infinite;
  will-change: transform;
}

.mlv-ticker-items:hover,
.mlv-ticker-track:hover {
  animation-play-state: paused;
}

@keyframes ticker-slide {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.mlv-ticker-item,
.ticker-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0 6px;
}

.mlv-ticker-item a,
.ticker-item a {
  color: #F3F4F6;
  font-size: 0.88rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.mlv-ticker-item a:hover,
.ticker-item a:hover {
  color: var(--mlv-primary);
}

.ticker-separator {
  color: var(--mlv-primary);
  font-size: 0.35rem;
  margin: 0 10px;
  opacity: 0.7;
  display: inline-flex;
  align-items: center;
}

.mlv-ticker-item .badge-cat,
.ticker-item .badge-cat {
  background-color: rgba(255,255,255,0.15);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
}

/* ==========================================================================
   5. Hero & Featured Magazine Modules
   ========================================================================== */
.hero-module {
  margin-top: 25px;
  margin-bottom: 30px;
}

.featured-main {
  position: relative;
  height: 500px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.featured-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.featured-main:hover img {
  transform: scale(1.05);
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.25) 30%, rgba(0,0,0,0.8) 60%, rgba(0,0,0,0.98) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start; /* Crucial: prevents category label from stretching to 100% width */
  padding: 30px;
  color: #FFF;
  z-index: 2;
}

.featured-overlay .category {
  display: block;
  width: auto;
  margin-bottom: 12px;
}

.featured-overlay .category a,
.featured-badge {
  display: inline-block !important;
  width: auto !important;
  max-width: max-content !important;
  background-color: var(--mlv-primary) !important;
  color: #FFF !important;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 5px 15px;
  border-radius: 30px;
  letter-spacing: 0.5px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: var(--mlv-transition);
}

.featured-overlay .category a:hover,
.featured-badge:hover {
  background-color: var(--mlv-primary-hover) !important;
  color: #FFF !important;
  transform: translateY(-1px);
}

.featured-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: #FFF !important;
  margin-bottom: 10px;
  line-height: 1.25;
  text-shadow: 0 2px 4px #000, 0 4px 12px rgba(0, 0, 0, 0.9);
}

.featured-title a {
  color: #FFF !important;
  text-shadow: 0 2px 4px #000, 0 4px 12px rgba(0, 0, 0, 0.9);
  text-decoration: none;
}

.featured-title a:hover {
  color: #FFD2CC !important;
}

.featured-meta {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.95) !important;
  display: flex;
  gap: 15px;
  text-shadow: 0 1px 3px #000;
}

.featured-meta span {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Hero Carousel Controls (Arrows on sides) */
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
  width: 44px;
  height: 44px;
  top: 50%;
  transform: translateY(-50%);
  bottom: auto;
  z-index: 10 !important;
  opacity: 0.88;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

#heroCarousel .carousel-control-prev {
  left: 16px;
}

#heroCarousel .carousel-control-next {
  right: 16px;
}

#heroCarousel .carousel-control-prev:hover,
#heroCarousel .carousel-control-next:hover,
#heroCarousel .carousel-control-prev:focus,
#heroCarousel .carousel-control-next:focus {
  opacity: 1 !important;
  background: var(--mlv-primary);
  border-color: var(--mlv-primary);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

#heroCarousel .carousel-nav-icon,
#heroCarousel .carousel-control-prev-icon,
#heroCarousel .carousel-control-next-icon {
  background-image: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
}

#heroCarousel .carousel-nav-icon i {
  font-size: 1.35rem;
  line-height: 1;
  color: #FFFFFF !important;
  display: inline-block;
  margin: 0;
  padding: 0;
}

/* Position Indicators (The 3 lines / pills at the bottom) */
#heroCarousel .carousel-indicators {
  position: absolute;
  bottom: 20px;
  right: 24px;
  left: auto;
  margin: 0;
  z-index: 10 !important;
  display: flex;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(17, 24, 39, 0.65);
  backdrop-filter: blur(6px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

#heroCarousel .carousel-indicators [data-bs-target] {
  width: 22px;
  height: 5px;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.5);
  border: none;
  margin: 0;
  opacity: 0.7;
  padding: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

#heroCarousel .carousel-indicators [data-bs-target].active {
  width: 36px;
  background-color: var(--mlv-primary);
  opacity: 1;
  box-shadow: 0 0 10px var(--mlv-primary);
}

#heroCarousel .carousel-indicators [data-bs-target]:hover {
  opacity: 1;
  background-color: #FFFFFF;
}

.featured-side-card {
  position: relative;
  height: 240px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.featured-side-card:last-child {
  margin-bottom: 0;
}

.featured-side-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.featured-side-card:hover img {
  transform: scale(1.06);
}

.featured-side-card .featured-overlay {
  padding: 16px 20px;
  align-items: flex-start;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.45) 25%, rgba(0, 0, 0, 0.88) 60%, rgba(0, 0, 0, 0.98) 100%);
  z-index: 2;
}

.featured-side-card .featured-overlay .category {
  margin-bottom: 8px;
}

.featured-side-card .featured-overlay .category a,
.featured-side-card .featured-badge {
  font-size: 0.65rem;
  padding: 3px 10px;
}

.featured-side-card .featured-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  text-shadow: 0 2px 4px #000, 0 3px 8px rgba(0, 0, 0, 0.9);
}

.featured-side-card .featured-title a {
  color: #FFF !important;
}

.featured-side-card .featured-meta span {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 1px 3px #000;
}

.featured-side-card .featured-meta {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* ==========================================================================
   6. Section Headings
   ========================================================================== */
.section-title {
  position: relative;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 25px;
  padding-bottom: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #E5E7EB;
}

.section-title span.title-text {
  position: relative;
}

.section-title span.title-text::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--mlv-primary);
}

.section-title a.view-all {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mlv-gray);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-title a.view-all:hover {
  color: var(--mlv-primary);
}

/* ==========================================================================
   7. Article Cards & Grids
   ========================================================================== */
.article-card {
  background: #FFF;
  border: 1px solid var(--mlv-border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 25px;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.article-card:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.article-card figure {
  margin: 0;
  overflow: hidden;
  position: relative;
}

.article-card figure img {
  transition: transform 0.5s ease;
}

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

.article-card .card-body {
  padding: 18px;
}

.article-meta {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--mlv-gray);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.article-meta .category {
  color: var(--mlv-primary);
}

.article-card h2.card-title,
.article-card h3.card-title {
  font-size: 1.15rem;
  line-height: 1.35;
  margin-bottom: 10px;
}

.article-card h2.card-title a,
.article-card h3.card-title a {
  color: #1F2937;
}

.article-card h2.card-title a:hover,
.article-card h3.card-title a:hover {
  color: var(--mlv-primary);
}

.article-card p.card-excerpt {
  font-size: 0.9rem;
  color: #4B5563;
  line-height: 1.55;
  margin-bottom: 14px;
}

.article-card .card-footer {
  background: transparent;
  border-top: 1px solid #F3F4F6;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Mini Article (Used in sidebar, megamenu, best-of-week) */
.article-mini {
  display: flex;
  gap: 15px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #F3F4F6;
}

.article-mini:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.article-mini figure {
  width: 95px;
  height: 75px;
  flex-shrink: 0;
  margin: 0;
  border-radius: 3px;
  overflow: hidden;
}

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

.article-mini .content {
  flex: 1;
}

.article-mini h4 {
  font-size: 0.92rem;
  line-height: 1.35;
  margin: 0 0 5px 0;
}

.article-mini h4 a {
  color: #1F2937;
}

.article-mini h4 a:hover {
  color: var(--mlv-primary);
}

/* Best of the Week: Modern CSS Scroll Snap & Carousel Controls */
.carousel-nav-btns {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.carousel-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--mlv-border);
  background: #FFF;
  color: var(--mlv-dark);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--mlv-transition);
}

.carousel-nav-btn:hover {
  background: var(--mlv-primary);
  color: #FFF;
  border-color: var(--mlv-primary);
}

.best-of-week-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.best-of-week-track::-webkit-scrollbar {
  display: none;
}

.best-of-week-item {
  flex: 0 0 calc(33.333% - 14px);
  min-width: 250px;
  scroll-snap-align: start;
}

/* ==========================================================================
   7b. Just Another News & Horizontal Article List (.article-list)
   ========================================================================== */
.article-list {
  display: flex;
  background: #FFF;
  border: 1px solid var(--mlv-border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-list:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.article-list .article-list-img {
  width: 280px;
  min-width: 280px;
  height: 200px;
  margin: 0;
  overflow: hidden;
  position: relative;
  background-color: #111;
}

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

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

.article-list .article-list-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.article-list .article-list-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--mlv-gray);
  margin-bottom: 6px;
}

.article-list .article-list-meta .category {
  font-weight: 700;
  text-transform: uppercase;
  color: var(--mlv-primary);
}

.article-list .article-list-meta .category a {
  color: var(--mlv-primary);
}

.article-list .article-list-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}

.article-list .article-list-title a {
  color: var(--mlv-dark);
  text-decoration: none;
}

.article-list .article-list-title a:hover {
  color: var(--mlv-primary);
}

.article-list .article-list-desc {
  color: #4B5563;
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-list .article-list-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #F3F4F6;
}

.article-list .btn-love {
  background: transparent;
  border: 0;
  color: var(--mlv-gray);
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--mlv-transition);
}

.article-list .btn-love:hover,
.article-list .btn-love.active {
  color: #EF4444;
}

.article-list .btn-love.active i {
  color: #EF4444;
}

@media (max-width: 767.98px) {
  .article-list {
    flex-direction: column;
  }
  .article-list .article-list-img {
    width: 100%;
    min-width: 100%;
    height: 190px;
  }
  .article-list .article-list-body {
    padding: 16px;
  }
}

/* ==========================================================================
   8. Videos Showcase Module
   ========================================================================== */
.video-module {
  background-color: #111827;
  color: #FFF;
  padding: 50px 0;
  margin: 40px 0 0 0;
}

#main-content > section:last-child,
#main-content > .video-module:last-child {
  margin-bottom: 0 !important;
}

#main-content > .container:last-child {
  margin-bottom: 3rem;
}

.video-module .section-title {
  color: #FFF;
  border-bottom-color: rgba(255,255,255,0.12);
}

.video-module .section-title span.title-text::after {
  background-color: var(--mlv-primary);
}

.video-module.video-bg-light {
  background-color: #FFFFFF;
  color: var(--mlv-dark);
}

.video-module.video-bg-light .section-title {
  color: var(--mlv-dark);
  border-bottom-color: var(--mlv-border);
}

.video-module.video-bg-gray {
  background-color: #F8F9FA;
  color: var(--mlv-dark);
}

.video-module.video-bg-gray .section-title {
  color: var(--mlv-dark);
  border-bottom-color: var(--mlv-border);
}

.video-card.video-card-light {
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  border: 1px solid var(--mlv-border);
}

.video-card {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.video-card .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background-color: var(--mlv-primary);
  color: #FFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  transition: transform 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
}

.video-card:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.15);
  background-color: var(--mlv-primary-hover);
}

/* ==========================================================================
   9. Sidebar Widgets
   ========================================================================== */
@media (min-width: 992px) {
  .sidebar.sidebar-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 75px;
    z-index: 10;
  }
}

.sidebar aside {
  background: #FFF;
  border: 1px solid var(--mlv-border);
  border-radius: 4px;
  padding: 22px;
  margin-bottom: 25px;
}

.sidebar .aside-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--mlv-primary);
  display: inline-block;
  font-weight: 800;
}

.custom-widget-content {
  overflow: hidden;
  word-break: break-word;
}

.custom-widget-content iframe,
.custom-widget-content img {
  max-width: 100%;
}

/* Social Count Widget */
.social-widget-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.social-widget-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 3px;
  color: #FFF !important;
  font-weight: 600;
  font-size: 0.82rem;
}

.social-widget-item.facebook { background-color: #1877F2; }
.social-widget-item.twitter { background-color: #000; }
.social-widget-item.youtube { background-color: #FF0000; }
.social-widget-item.instagram { background-color: #E4405F; }
.social-widget-item.linkedin { background-color: #0A66C2; }
.social-widget-item.github { background-color: #24292F; }

/* Newsletter Box */
.newsletter-box {
  background-color: var(--mlv-primary-light);
  border: 1px dashed var(--mlv-primary);
  border-radius: 4px;
  padding: 24px;
  text-align: center;
}

.newsletter-box .icon {
  font-size: 3rem;
  color: var(--mlv-primary);
  margin-bottom: 10px;
}

.newsletter-box h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.newsletter-box p {
  font-size: 0.85rem;
  color: var(--mlv-gray);
  margin-bottom: 16px;
}

/* Tags Cloud */
.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tags-cloud a {
  display: inline-block;
  background-color: #F3F4F6;
  color: #374151;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--mlv-border);
}

.tags-cloud a:hover {
  background-color: var(--mlv-primary);
  color: #FFF;
  border-color: var(--mlv-primary);
}

/* Ad Banner Box */
.ad-banner-box {
  text-align: center;
}

.ad-banner-box figcaption {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #9CA3AF;
  letter-spacing: 1px;
  margin-top: 6px;
}

/* ==========================================================================
   10. Single Article View
   ========================================================================== */
article.main-article {
  background: #FFF;
  border: 1px solid var(--mlv-border);
  border-radius: 4px;
  padding: 30px;
  margin-bottom: 30px;
}

article.main-article header {
  margin-bottom: 25px;
}

article.main-article h1.entry-title {
  font-size: 2.2rem;
  line-height: 1.25;
  margin-bottom: 15px;
  color: #111827;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.82rem;
  color: var(--mlv-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #F3F4F6;
}

.entry-meta span.category a {
  color: var(--mlv-primary);
}

.entry-featured-media {
  margin-bottom: 30px;
  border-radius: 4px;
  overflow: hidden;
}

.entry-featured-media figcaption {
  font-size: 0.8rem;
  color: #9CA3AF;
  text-align: right;
  margin-top: 6px;
}

.entry-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2D3748;
}

.entry-content p {
  margin-bottom: 1.5rem;
}

.entry-content blockquote {
  font-family: var(--mlv-font-serif);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.6;
  border-left: 4px solid var(--mlv-primary);
  padding: 15px 25px;
  margin: 30px 0;
  background-color: var(--mlv-primary-light);
  border-radius: 0 4px 4px 0;
}

/* Love / Like Button & Social Share */
.article-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid #F3F4F6;
  border-bottom: 1px solid #F3F4F6;
  margin: 30px 0;
}

.btn-love {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #FFF;
  border: 1px solid var(--mlv-border);
  color: var(--mlv-gray);
  padding: 8px 18px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--mlv-transition);
}

.btn-love i {
  color: #EF4444;
  font-size: 1.2rem;
}

.btn-love:hover,
.btn-love.active {
  background-color: #FEF2F2;
  border-color: #FCA5A5;
  color: #EF4444;
}

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

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF !important;
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.share-btn:hover {
  transform: translateY(-2px);
}

.share-btn.fb { background-color: #1877F2; }
.share-btn.tw { background-color: #000; }
.share-btn.wa { background-color: #25D366; }
.share-btn.li { background-color: #0A66C2; }

/* Author Bio Box */
.author-box {
  display: flex;
  gap: 20px;
  background-color: #F9FAFB;
  border: 1px solid var(--mlv-border);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 35px;
}

.author-box .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.author-box .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-box .job-title {
  font-size: 0.78rem;
  color: var(--mlv-primary);
  text-transform: uppercase;
  font-weight: 700;
}

.author-box .author-name {
  font-size: 1.25rem;
  margin: 2px 0 8px 0;
}

.author-box p {
  font-size: 0.9rem;
  color: #4B5563;
  margin-bottom: 10px;
}

/* ==========================================================================
   11. Footer (Faithful 4-column layout matching editorial)
   ========================================================================== */
footer.footer {
  background-color: var(--mlv-footer-bg);
  color: var(--mlv-footer-text);
  padding-top: 50px;
  padding-bottom: 25px;
  margin-top: 0;
  border-top: 4px solid var(--mlv-primary);
}

footer.footer .block {
  margin-bottom: 20px;
}

footer.footer .block-title {
  font-size: 16px;
  font-family: var(--mlv-font-heading);
  position: relative;
  margin: 0;
  color: #FFF;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

footer.footer .block-title .right {
  float: right;
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
}

footer.footer .block-title .right a {
  color: #9CA3AF;
}

footer.footer .block-title .right a:hover {
  color: var(--mlv-primary);
}

footer.footer .block-title::after {
  content: ' ';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 25px;
  height: 2px;
  background-color: var(--mlv-primary);
}

footer.footer .block-body {
  margin-top: 15px;
}

footer.footer .line {
  background-color: #2D3748;
  height: 1px;
  margin: 25px 0;
  border: none;
}

footer.footer .foot-logo {
  width: 140px;
  margin-bottom: 16px;
}

footer.footer .foot-logo a {
  display: inline-block;
  transition: opacity 0.2s ease;
}

footer.footer .foot-logo a:hover {
  opacity: 0.85;
}

footer.footer .foot-logo img {
  width: 100%;
  height: auto;
}

footer.footer .brand-description {
  line-height: 1.7;
  font-size: 0.88rem;
  margin-bottom: 14px;
  color: #D1D5DB;
}

/* Footer Contact Info List (Email, Phone, Address, Hours) */
footer.footer .footer-contact-info {
  margin-top: 12px;
  margin-bottom: 18px;
  font-size: 0.83rem;
  color: #E5E7EB;
}

footer.footer .footer-contact-info li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
  line-height: 1.45;
}

footer.footer .footer-contact-info li i {
  font-size: 0.92rem;
  margin-top: 2px;
  flex-shrink: 0;
  width: 18px;
  color: var(--mlv-primary) !important;
}

footer.footer .footer-contact-info li a {
  color: #E5E7EB;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer.footer .footer-contact-info li a:hover {
  color: var(--mlv-primary);
  text-decoration: underline;
}

/* Footer Newsletter Descriptions & High-Contrast Typography */
footer.footer .footer-newsletter-desc,
footer.footer .footer-desc-text {
  color: #E5E7EB !important;
  font-size: 0.84rem;
  line-height: 1.55;
}

/* Button MLV White */
.btn-mlv.white {
  border: 1px solid #FFF;
  color: #FFF;
  background: transparent;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 3px;
  display: inline-block;
  transition: var(--mlv-transition);
}

.btn-mlv.white:hover {
  background-color: #FFF;
  color: var(--mlv-primary);
}

/* Footer Tag Pills */
footer.footer .tags {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

footer.footer .tags li a {
  padding: 5px 12px;
  color: #9CA3AF;
  border: 1px solid #374151;
  border-radius: 2px;
  font-size: 0.8rem;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

footer.footer .tags li a:hover {
  border-color: var(--mlv-primary);
  background-color: var(--mlv-primary);
  color: #FFF;
}

/* Footer Newsletter Form */
footer.footer .newsletter-form .input-group {
  background-color: #111827;
  border: 1px solid #4B5563;
  border-radius: 4px;
  overflow: hidden;
}

footer.footer .newsletter-form .form-control {
  background: transparent !important;
  border: none !important;
  color: #FFFFFF !important;
  font-size: 0.88rem;
  padding: 10px 14px;
}

footer.footer .newsletter-form .form-control::placeholder {
  color: #9CA3AF !important;
  opacity: 1;
}

footer.footer .newsletter-form .form-control:focus {
  background: transparent !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
}

footer.footer .newsletter-form .input-group-text {
  background: transparent !important;
  border: none !important;
  color: #D1D5DB !important;
  padding-right: 14px;
}

footer.footer .newsletter-form .newsletter-help-text {
  font-size: 0.78rem;
  color: #D1D5DB !important;
  margin-top: 8px;
  line-height: 1.4;
}

footer.footer .newsletter-form .newsletter-help-text i {
  color: #10B981;
}

footer.footer .newsletter-form .btn-subscribe {
  background-color: var(--mlv-primary);
  border: none;
  color: #FFF;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border-radius: 3px;
  transition: background-color 0.2s ease;
}

footer.footer .newsletter-form .btn-subscribe:hover {
  background-color: var(--mlv-primary-hover);
}

/* Footer Mini Articles (Column 3) */
footer.footer .article-mini {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  align-items: center;
  border-bottom: none;
  padding-bottom: 0;
}

footer.footer .article-mini figure {
  width: 65px;
  height: 52px;
  flex-shrink: 0;
  margin: 0;
  border-radius: 3px;
  overflow: hidden;
}

footer.footer .article-mini figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

footer.footer .article-mini .padding,
footer.footer .article-mini .content {
  flex: 1;
  min-width: 0;
}

footer.footer .article-mini h4,
footer.footer .article-mini .padding h4,
footer.footer .article-mini .content h4 {
  font-size: 0.85rem;
  line-height: 1.35;
  margin: 0 0 4px 0;
  font-weight: 600;
}

footer.footer .article-mini h4 a,
footer.footer .article-mini .padding h4 a,
footer.footer .article-mini .content h4 a {
  color: #F9FAFB !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer.footer .article-mini h4 a:hover,
footer.footer .article-mini .padding h4 a:hover,
footer.footer .article-mini .content h4 a:hover {
  color: var(--mlv-primary) !important;
}

footer.footer .article-mini .footer-article-meta,
footer.footer .article-mini .text-muted {
  color: #9CA3AF !important;
  font-size: 0.75rem;
  line-height: 1.2;
}

footer.footer .article-mini .footer-article-meta i,
footer.footer .article-mini .text-muted i {
  color: var(--mlv-primary);
  opacity: 0.9;
}

/* Footer Social Icons (Column 4) */
footer.footer .footer-social-icons {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

footer.footer .footer-social-icons li a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  color: #FFF;
  font-size: 1rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

footer.footer .footer-social-icons li a:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

footer.footer .footer-social-icons li a.fb { background-color: #3b5998; }
footer.footer .footer-social-icons li a.tw { background-color: #000; }
footer.footer .footer-social-icons li a.yt { background-color: #C4302B; }
footer.footer .footer-social-icons li a.ig { background-color: #885343; }
footer.footer .footer-social-icons li a.li { background-color: #007BB6; }
footer.footer .footer-social-icons li a.rss { background-color: #ee802f; }

/* Footer Horizontal Nav */
footer.footer .footer-nav-horizontal {
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

footer.footer .footer-nav-horizontal li {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
}

footer.footer .footer-nav-horizontal li a {
  color: #9CA3AF;
  transition: color 0.2s ease;
}

footer.footer .footer-nav-horizontal li a:hover {
  color: var(--mlv-primary);
}

footer.footer .footer-nav-horizontal li:not(:last-child)::after {
  content: '/';
  margin-left: 8px;
  color: #4B5563;
}

/* Footer Legal Links (Privacy, Terms, Cookies, Legal Notice) */
footer.footer .footer-legal-links {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 20px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: none;
}

footer.footer .footer-legal-links li {
  display: inline-flex;
  align-items: center;
}

footer.footer .footer-legal-links li a {
  color: #D1D5DB;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer.footer .footer-legal-links li a:hover {
  color: var(--mlv-primary);
  text-decoration: underline;
}

footer.footer .footer-legal-links li:not(:last-child)::after {
  content: "•";
  margin-left: 20px;
  color: #4B5563;
}

/* Footer Bottom Copyright */
footer.footer .copyright {
  text-align: center;
  margin-top: 45px;
  color: #9CA3AF;
  border-top: 1px solid #2D3748;
  padding-top: 30px;
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
}

footer.footer .copyright a {
  color: #E5E7EB;
  text-decoration: underline;
}

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

footer.footer .copyright .credits {
  margin-top: 6px;
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: normal;
  color: #6B7280;
}

/* ==========================================================================
   12. Buttons & Form Styling
   ========================================================================== */
.btn-primary {
  background-color: var(--mlv-primary);
  border-color: var(--mlv-primary);
  font-family: var(--mlv-font-heading);
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 8px 22px;
  border-radius: 4px;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--mlv-primary-hover);
  border-color: var(--mlv-primary-hover);
}

.btn-mlv {
  border: 1px solid var(--mlv-primary);
  color: var(--mlv-primary);
  background: transparent;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 3px;
  transition: var(--mlv-transition);
}

.btn-mlv:hover {
  background-color: var(--mlv-primary);
  color: #FFF;
}

/* Back to top floating button */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 44px;
  height: 44px;
  background-color: var(--mlv-primary);
  color: #FFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: var(--mlv-transition);
  z-index: 999;
  cursor: pointer;
}

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

.back-to-top:hover {
  background-color: var(--mlv-primary-hover);
  color: #FFF;
  transform: translateY(-3px);
}

/* ==========================================================================
   13. Responsive Media Queries
   ========================================================================== */
@media (max-width: 991.98px) {
  .firstbar .header-search-wrapper {
    flex-direction: column;
    gap: 8px;
  }

  .firstbar .search-box {
    margin-top: 15px;
    max-width: 100%;
    width: 100%;
  }
  
  .firstbar .nav-icons {
    margin-top: 15px;
    justify-content: center;
  }
  
  .mlv-navbar {
    display: none; /* Desktop menu hidden on mobile */
  }
  
  .featured-main {
    height: 380px;
    margin-bottom: 20px;
  }

  .best-of-week-item {
    flex: 0 0 calc(50% - 10px);
  }
}

@media (max-width: 575.98px) {
  .featured-main {
    height: 300px;
  }
  
  .featured-title {
    font-size: 1.3rem;
  }
  
  .best-of-week-item {
    flex: 0 0 85%;
  }
  
  article.main-article {
    padding: 18px;
  }
  
  article.main-article h1.entry-title {
    font-size: 1.6rem;
  }
}

/* ==========================================================================
   Grav Form Plugin Integration & Notices
   ========================================================================== */
.form-wrapper .form-field {
  margin-bottom: 1.25rem;
}
.form-wrapper .form-label label {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  display: block;
  color: var(--mlv-dark);
}
.form-wrapper .form-label .required {
  color: var(--mlv-primary);
  font-weight: 700;
  margin-left: 3px;
}
.form-wrapper .form-data .form-control {
  border-radius: 4px;
  border: 1px solid #D1D5DB;
  padding: 0.65rem 0.9rem;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-wrapper .form-data .form-control:focus {
  border-color: var(--mlv-primary);
  box-shadow: 0 0 0 0.25rem rgba(var(--mlv-primary-rgb), 0.15);
}
.form-wrapper .buttons {
  margin-top: 1.5rem;
}
.form-wrapper .buttons .btn {
  padding: 0.65rem 1.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
}

/* Grav Session and Form Notices */
.notices {
  padding: 1rem 1.25rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  border-left: 4px solid transparent;
}
.notices p {
  margin: 0;
}
.notices.green, .notices.success {
  background-color: #D1E7DD;
  border-color: #198754;
  color: #0F5132;
}
.notices.red, .notices.error {
  background-color: #F8D7DA;
  border-color: #DC3545;
  color: #842029;
}
.notices.yellow, .notices.warning {
  background-color: #FFF3CD;
  border-color: #FFC107;
  color: #664D03;
}
.notices.blue, .notices.info {
  background-color: #CFF4FC;
  border-color: #0DCAF0;
  color: #055160;
}

/* Modular Homepage Layout with Unified Continuous Sidebar */
.main-news-section {
  position: relative;
}

.modular-news-block:not(:last-child) {
  margin-bottom: 3.5rem;
}

/* Related Articles Module ("También te puede interesar") */
.related-articles-section .article-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-color: #FFF;
}

.related-articles-section .article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
}

.related-articles-section .article-meta .category {
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Prevent entire window horizontal scroll on mobile */
body {
  overflow-x: hidden;
}

/* Responsive Markdown Tables & Embeds in Articles (prevent mobile horizontal overflow) */
.main-article,
.entry-content {
  max-width: 100%;
  overflow-x: hidden;
}

figure.wp-block-table {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.wp-block-table,
.main-article table,
.entry-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  border-collapse: collapse;
}

.main-article img,
.entry-content img {
  max-width: 100%;
  height: auto;
}
