:root {
  /* Tema oscuro (por defecto) */
  --bg-primary:      #0f0f0f;
  --bg-secondary:    #1a1a1a;
  --surface:         rgba(30,30,30,0.8);
  --text-primary:    #ffffff;
  --text-secondary:  #b0b0b0;
  --color-primary:   #58A6FF;
  --color-accent:    #10B981;
  --border-color:    rgba(255, 255, 255, 0.1);
  --shadow-color:    rgba(0, 0, 0, 0.3);
  --scroll-track: rgba(255,255,255,0.25);
  --scroll-thumb: rgba(0,0,0,0.18);
  --scroll-thumb-hover: rgba(0,0,0,0.32);
}
.theme-light {
  --bg-primary:      #ffffff;
  --bg-secondary:    #f8f9fa;
  --surface:         rgba(255,255,255,0.9);
  --text-primary:    #1a1a1a;
  --text-secondary:  #444a52;
  --color-primary:   #007bff;
  --color-accent:    #28a745;
  --border-color:    rgba(0, 0, 0, 0.1);
  --shadow-color:    rgba(0, 0, 0, 0.1);
  --scroll-track: rgba(255,255,255,0.25);
  --scroll-thumb: rgba(0,0,0,0.18);
  --scroll-thumb-hover: rgba(0,0,0,0.32);
}
.theme-dark {
  /* Redundante, pero por claridad */
  --bg-primary:      #0f0f0f;
  --bg-secondary:    #1a1a1a;
  --surface:         rgba(30,30,30,0.8);
  --text-primary:    #ffffff;
  --text-secondary:  #b0b0b0;
  --color-primary:   #58A6FF;
  --color-accent:    #10B981;
  --border-color:    rgba(255, 255, 255, 0.1);
  --shadow-color:    rgba(0, 0, 0, 0.3);
  --scroll-track: rgba(30,30,40,0.22);
  --scroll-thumb: rgba(255,255,255,0.18);
  --scroll-thumb-hover: rgba(255,255,255,0.32);
}

/* RESET */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BODY */
body {
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding-top: 6rem; /* espacio para header fijo */
  line-height: 1.5;
  transition: background 0.5s, color 0.5s;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb, rgba(0,0,0,0.18)) transparent;
}

body::-webkit-scrollbar,
.scroll-glass::-webkit-scrollbar {
  width: 10px;
  background: transparent;
}

body::-webkit-scrollbar-track,
.scroll-glass::-webkit-scrollbar-track {
  background: transparent !important;
}

body::-webkit-scrollbar-thumb,
.scroll-glass::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb, rgba(0,0,0,0.18));
  border-radius: 8px;
  backdrop-filter: blur(12px) saturate(1.5);
  box-shadow: 0 2px 12px 2px rgba(0,0,0,0.18);
  transition: background 0.2s, box-shadow 0.2s;
  border: 2px solid transparent;
}

body::-webkit-scrollbar-thumb:hover,
.scroll-glass::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover, rgba(0,0,0,0.32));
  box-shadow: 0 4px 20px 4px rgba(0,0,0,0.22);
}

/* ENLACES */
a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ====================
   HEADER (iOS-26-style)
   ==================== */
.site-header.glass {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  backdrop-filter: blur(20px);
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  max-width: 1200px;
  width: calc(100% - 2rem);
  z-index: 1000;
  box-shadow: 0 4px 20px var(--shadow-color);
  color: var(--text-primary);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
}

.logo-img {
  height: 32px;
  width: auto;
  transition: opacity 0.3s ease;
}

.theme-light .logo-img {
  content: url('/assets/dnb.png');
}

.theme-dark .logo-img {
  content: url('/assets/dnw.png');
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.desktop-nav {
  display: flex;
}

.desktop-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.desktop-nav a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  border-radius: 0.7rem;
  transition: all 0.2s ease;
}

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

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* Botón de toggle del tema */
.theme-toggle {
  background: var(--surface);
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.theme-toggle:hover {
  background: var(--color-primary);
  color: #fff;
  transform: scale(1.1);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Botón hamburguesa (mobile) */
.menu-toggle {
  display: none;
  background: var(--surface);
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 36px;
  height: 36px;
  position: relative;
}

.menu-toggle:hover {
  background: var(--color-primary);
}

.menu-toggle .hamburger,
.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
}

.menu-toggle .hamburger {
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
}

.menu-toggle .hamburger::before {
  content: '';
  top: -5px;
}

.menu-toggle .hamburger::after {
  content: '';
  top: 5px;
}

/* Animación del hamburger */
.menu-toggle .hamburger.active {
  background: transparent;
}

.menu-toggle .hamburger.active::before {
  transform: translateX(-50%) rotate(45deg);
  top: 0;
}

.menu-toggle .hamburger.active::after {
  transform: translateX(-50%) rotate(-45deg);
  top: 0;
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .header-right {
    gap: 0.8rem;
  }
  
  .theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
}

/* ==================
   LAYOUT PRINCIPAL
   ================== */
.layout {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===========================
   SIDEBAR (PÍLDORAS SIN BOX)
   =========================== */
.sidebar {
  flex: 0 0 240px;
  background: var(--bg-primary);
  padding: 2rem 1rem;
  position: sticky;
  top: 6rem;
}
.sidebar-title {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}
.categories-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.categories-grid li a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  transition: background 0.3s;
}
.categories-grid li a:hover {
  background: rgba(255,255,255,0.1);
}
.categories-grid li a img {
  width: 1.5rem;
  height: 1.5rem;
  filter: brightness(0) invert(1);
}
.categories-grid li a span {
  color: var(--text-primary);
  font-size: 1rem;
}

/* ====================================
   SEARCH HERO (SÓLO SUAVE REDONDEO)
   ==================================== */
.search-hero {
  flex: 1;
  background: transparent;
  border-radius: 12px;
  padding: 2rem;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.search-hero h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}
.search-subtitle {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.search-form {
  display: flex;
  width: 100%;
  max-width: 600px;
}
.search-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(0,0,0,0.1);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 8px 0 0 8px;
  outline: none;
  transition: all 0.3s;
}

[data-theme="light"] .search-form input {
  background: rgba(0,0,0,0.05);
}

.search-form input:focus {
  border-color: var(--color-primary);
  background: rgba(0,0,0,0.15);
}

[data-theme="light"] .search-form input:focus {
  background: rgba(0,0,0,0.1);
}

.search-form button {
  padding: 0 1.25rem;
  background: var(--color-primary);
  border: none;
  color: #fff;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: background 0.3s;
}
.search-form button:hover {
  background: var(--color-accent);
}

/* ====================================
   ARTÍCULOS MÁS RECIENTES (GRID CARDS)
   ==================================== */
.articulos-recientes {
  flex: 1;
  margin-top: 2rem;
  margin-bottom: 3rem;
}
.articulos-recientes h2 {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}
.grid-articulos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.grid-articulos .card {
  max-width: 400px;
  min-width: 280px;
  margin: 0 auto;
}
.card {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  word-break: break-word;
  overflow-wrap: break-word;
}
.card-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  flex: 1;
  margin-bottom: 1rem;
  word-break: break-word;
  overflow-wrap: break-word;
}
.card-content a {
  color: var(--color-primary);
  font-weight: 500;
}

/* ====================
   FOOTER (REDISEÑO COMPLETO - ANCHO TOTAL)
   ============================================ */
/* NOTA: Las clases antiguas del footer han sido eliminadas.
   Solo se mantienen las nuevas clases con sufijo -nuevo */

/* ==========
   RESPONSIVE
   ========== */
@media (max-width: 992px) {
  .layout { flex-direction: column; }
  .sidebar,
  .search-hero,
  .articulos-recientes {
  width: 100%;
  }
  .site-header.glass {
    width: calc(100% - 2rem);
    left: 1rem;
    transform: none;
  }
}

@media (max-width: 900px) {
  .grid-articulos {
    grid-template-columns: 1fr;
  }
}

/* === SWITCH DE TEMA SLIDER BONITO (RESTABLECIDO) === */
.theme-switch-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
}
.theme-switcher-3 {
  display: flex;
  align-items: center;
  position: relative;
  background: #222;
  border-radius: 16px;
  padding: 2px 6px;
  width: 60px;
  height: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  justify-content: space-between;
}
.theme-light .theme-switcher-3 {
  background: #eaeaea;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}
.theme-btn {
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  color: #888;
  font-size: 1.25rem;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: color 0.2s, opacity 0.2s;
  position: relative;
  opacity: 0.6;
}
.theme-btn.active {
  color: #fff;
  opacity: 1;
}
.theme-light .theme-btn.active[data-theme="light"] {
  color: #222;
}
.theme-light .theme-btn {
  color: #bbb;
}
.theme-slider {
  position: absolute;
  top: 2px;
  width: 26px;
  height: 26px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: left 0.3s cubic-bezier(.4,0,.2,1), background 0.3s;
  z-index: 1;
}
.theme-light .theme-slider {
  background: #222;
}
.theme-switcher-3[data-mode="light"] .theme-slider {
  left: 2px;
}
.theme-switcher-3[data-mode="dark"] .theme-slider {
  left: 32px;
}
.theme-btn i {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
@media (max-width: 600px) {
  .theme-switcher-3 {
    width: 44px;
    height: 26px;
    padding: 2px 3px;
  }
  .theme-slider {
    width: 20px;
    height: 20px;
    top: 2px;
    left: 2px;
    transition: left 0.3s cubic-bezier(.4,0,.2,1), background 0.3s;
  }
  .theme-switcher-3[data-mode="light"] .theme-slider {
    left: 2px;
  }
  .theme-switcher-3[data-mode="dark"] .theme-slider {
    left: 22px;
  }
  .theme-btn {
    width: 20px;
    height: 20px;
    font-size: 1rem;
  }
  .theme-btn i {
    font-size: 1rem;
  }
}

/* === FOOTER PROFESIONAL === */
.nuevo-footer {
  padding: 0.7rem 0 0.3rem 0;
}
.footer-content-nuevo {
  gap: 0.7rem;
}
.footer-row-nuevo.footer-row-distribucion {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  min-height: 0;
  gap: 0;
}
.footer-col-izq {
  grid-column: 1;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  padding-left: clamp(1.2rem, 4vw, 3rem);
}
.footer-logo-social {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.7rem;
  justify-self: center;
  transform: translateX(-136px);
  margin-top: 32px;
}
.footer-logo-nuevo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin-bottom: 0;
}
.footer-logo-nuevo img[src*="logo.svg"],
.footer-logo-nuevo img[src*="logo2.svg"] {
  width: 120px;
  max-width: 100vw;
  height: auto;
  margin-bottom: 0.3rem;
  transition: opacity 0.5s, filter 0.5s;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.footer-logo-nuevo span {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
  display: block;
}
.footer-social-nuevo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  width: 100%;
}
.footer-social-nuevo a img {
  width: 34px;
  height: 34px;
}
.theme-dark .footer-social-nuevo a img {
  filter: brightness(0) invert(1) !important;
}
.theme-light .footer-social-nuevo a img {
  filter: none !important;
}
.footer-copyright {
  color: #888;
  font-size: 0.98rem;
  margin-top: 0.2rem;
}
@media (max-width: 900px) {
  .footer-row-nuevo.footer-row-distribucion {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 0 0.5rem;
  }
  .footer-logo-social {
    margin-top: 0;
    gap: 0.7rem;
    transform: none;
    width: 100%;
    align-items: center;
    justify-content: center;
  }
  .footer-logo-nuevo img[src*="logo.svg"],
  .footer-logo-nuevo img[src*="logo2.svg"] {
    width: 90px;
    margin-bottom: 0.2rem;
  }
  .footer-col-izq {
    align-items: center;
    padding-left: 0;
    max-width: 100%;
    width: 100%;
    margin-bottom: 0.7rem;
  }
  .footer-bottom-nuevo {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    padding: 0 0.5rem;
    font-size: 0.93rem;
    margin-top: 1.2rem;
  }
  .footer-legal-nuevo {
    flex-wrap: wrap;
    gap: 0.7rem;
    justify-content: center;
    padding-left: 0;
    margin-bottom: 0.5rem;
  }
  .footer-lang-theme-bottom {
    gap: 0.7rem;
    padding-right: 0;
    justify-content: space-between;
    width: 100%;
  }
  .sidebar {
    display: none !important;
  }
}
.footer-legal-nuevo {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
    align-items: center;
  padding-left: 1.15rem;
}
.footer-legal-nuevo a {
  color: #888;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s;
}
.footer-legal-nuevo a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}
.footer-lang-theme-bottom {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  justify-content: flex-end;
  padding-right: clamp(1.2rem, 4vw, 3rem);
}
.footer-lang-switch {
  position: relative;
}
.lang-btn {
  background: var(--surface);
  color: var(--text-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 0.7rem;
  padding: 0.4rem 1.2rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  transition: border 0.2s, background 0.2s, color 0.2s;
}
.theme-light .lang-btn {
  background: #fff;
  color: #222;
  border: 1.5px solid #e0e0e0;
}
.theme-dark .lang-btn {
  background: #222;
  color: #fff;
  border: 1.5px solid #444;
}
.lang-menu {
  position: absolute;
  left: 0;
  bottom: 110%;
  background: var(--surface);
  border: 1.5px solid var(--border-color);
  border-radius: 0.7rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  min-width: 80px;
  z-index: 10;
  padding: 0.3rem 0;
  color: var(--text-primary);
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.theme-light .lang-menu {
  background: #fff;
  color: #222;
  border: 1.5px solid #e0e0e0;
}
.theme-dark .lang-menu {
  background: #222;
  color: #fff;
  border: 1.5px solid #444;
}
.lang-menu li {
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  font-size: 1rem;
  color: inherit;
  transition: background 0.2s;
}
.lang-menu li[aria-selected="true"] {
  background: #f0f0f0;
  font-weight: 600;
  color: var(--color-primary);
}
.theme-dark .lang-menu li[aria-selected="true"] {
  background: #333;
  color: var(--color-primary);
}
.lang-menu li:hover {
  background: #eaeaea;
}
.theme-dark .lang-menu li:hover {
  background: #333;
}

.newsletter-block {
  width: 100%;
  max-width: 300px;
  margin-bottom: 1.2rem;
}
.newsletter-input-group-nuevo {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 340px;
  border-bottom: 2px solid #fff;
  background: none;
  padding: 0;
}
.theme-light .newsletter-input-group-nuevo {
  border-bottom: 2px solid #222;
}
.newsletter-input-group-nuevo input[type="email"] {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1rem;
  padding: 0.3rem 0;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-sizing: border-box;
}
.articulo-contenido img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  margin: 1.5em auto;
  box-sizing: border-box;
  border-radius: 12px;
  object-fit: contain;
}
.theme-light .newsletter-input-group-nuevo input[type="email"] {
  color: #222;
}
.newsletter-input-group-nuevo input[type="email"]::placeholder {
  color: #bbb;
  opacity: 1;
  font-weight: 400;
}
.newsletter-input-group-nuevo button {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  padding: 0;
}
.theme-light .newsletter-input-group-nuevo button {
  color: #222;
}
.newsletter-input-group-nuevo button:hover {
  color: var(--color-primary);
}
.newsletter-input-group-nuevo svg {
  display: block;
}

.footer-link-izq {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.3rem;
}

.footer-bottom-nuevo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.1rem;
  padding: 0 2vw;
  font-size: 0.95rem;
}

.close-sidebar {
    display: none;
  }
#mobileSidebar,
#sidebarBackdrop {
  display: none;
}
@media (max-width: 900px) {
  #mobileSidebar,
  #sidebarBackdrop,
  .close-sidebar,
  .mobile-header,
  .mobile-main-nav,
  .mobile-nav-btn,
  .mobile-category-btn,
  .mobile-categories-list {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
  }
  .sidebar {
    display: none !important;
  }
}

/* Menú móvil */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--surface);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-color);
  z-index: 9999 !important;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px var(--shadow-color);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  padding: 1.5rem;
  display: flex;
  justify-content: flex-end;
  border-bottom: 1px solid var(--border-color);
}

.close-menu {
  background: var(--surface);
  border: none;
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-menu:hover {
  background: var(--color-primary);
  color: #fff;
  transform: scale(1.1);
}

.mobile-nav {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.mobile-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.8rem 1rem;
  border-radius: 0.7rem;
  display: block;
  transition: all 0.2s ease;
}

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

.mobile-categories {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.mobile-categories h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  font-weight: 500;
}

.mobile-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-categories-grid li a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  background: var(--surface);
  border-radius: 0.7rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.mobile-categories-grid li a:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}

.mobile-categories-grid li a img {
  width: 1.2rem;
  height: 1.2rem;
  filter: brightness(0) invert(1);
}

.mobile-categories-grid li a:hover img {
  filter: brightness(0) invert(1);
}

/* Backdrop para el menú móvil */
.menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9998 !important;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.menu-backdrop.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .mobile-menu {
    max-width: 100%;
  }
  
  .mobile-categories-grid {
    grid-template-columns: 1fr;
  }
}

/* Iconos de categorías adaptativos */
.icon-categoria {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5em;
}
.icon-categoria i {
  font-size: 1.25em;
  color: var(--icon-categoria-color, #222);
  transition: color 0.3s;
}
.theme-dark .icon-categoria i {
  color: var(--icon-categoria-color-dark, #fff);
}

/* Microanimaciones y transiciones suaves */

/* Enlaces */
a, .desktop-nav a, .mobile-nav a, .mobile-categories-grid li a, .categories-grid li a {
  transition: color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.18s;
}

a:focus-visible, .desktop-nav a:focus-visible, .mobile-nav a:focus-visible, .mobile-categories-grid li a:focus-visible, .categories-grid li a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(88,166,255,0.18);
  z-index: 2;
}

/* Botones */
button, .lang-btn, .theme-btn, .menu-toggle, .close-menu, .newsletter-input-group-nuevo button {
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.18s;
}
button:active, .lang-btn:active, .theme-btn:active, .menu-toggle:active, .close-menu:active, .newsletter-input-group-nuevo button:active {
  transform: scale(0.96);
}

/* Cards */
.card {
  transition: box-shadow 0.22s, transform 0.18s;
}
.card:hover {
  box-shadow: 0 8px 32px rgba(88,166,255,0.10), 0 2px 8px rgba(0,0,0,0.10);
  transform: translateY(-2px) scale(1.012);
}

/* Inputs */
input, textarea, select {
  transition: border 0.2s, box-shadow 0.2s, background 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(88,166,255,0.13);
  outline: none;
}