/*!
 * Kriya Yoga de Babaji - Mobile-Only Responsive CSS
 * Version: 3.0.0 (Surgical approach)
 * Description: ONLY affects mobile devices (<768px) - Desktop layout untouched
 * Author: Development Team
 *
 * NOTA: Cuando el usuario elige "Ver Versión Web" desde mobile, se activa la clase
 *       'prefer-web-version' en body, que muestra el diseño desktop con botón flotante
 */

/* ========================================
   MOBILE-ONLY RESPONSIVE STYLES
   CRITICAL: Only applies to screens <768px
   NOTA: Las reglas de visibilidad de #desktop-noticias, #mobile-noticias
         y .mobile-only-image están en version-toggle.css
   ======================================== */

/* Only apply changes on mobile devices (unless user prefers web version) */
@media screen and (max-width: 767px) {

  body {
    background-color: #FAFAFA !important;
    background-image: linear-gradient(to bottom, #FFFFFF 0%, #FAFAFA 100px, #FAFAFA 100%) !important;
  }

  /* Mobile container adjustments */
  #contenedor {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  #todaPagina {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  #todaPaginaB {
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Make images responsive on mobile - FORZAR para evitar overflow */
  img {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Forzar imágenes con atributos inline width/height */
  img[width],
  img[height] {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Logo principal debe usar todo el ancho */
  #cabeceraIndex img[width="922"] {
    width: 100% !important;
    height: auto !important;
  }

  /* Mobile typography adjustments */
  body {
    font-size: 16px;
    line-height: 1.4;
  }

  /* Tables responsive on mobile */
  table {
    width: 100% !important;
    border-collapse: collapse;
  }

  table td, table th {
    padding: 8px;
    font-size: 14px;
  }

  /* Basic responsive utilities - mobile only */
  .mobile-text-center {
    text-align: center;
  }

  .mobile-full-width {
    width: 100%;
  }

  .mobile-hidden {
    display: none;
  }

  .mobile-block {
    display: block;
  }

  /* ========================================
     FASE 1: FIXES CRÍTICOS DE LAYOUT
     Layout de 3 columnas a 1 columna en móvil
     ======================================== */

  /* FIX 1: Layout de 3 columnas (#lateral + #blanco2 + #noticias) a 1 columna */
  #contenidos2,
  #contenidos2 li {
    float: none !important;
    display: block !important;
    width: 100% !important;
  }

  /* FIX 2: Ocultar sidebar en móvil (se integra en burger menu) */
  #lateral {
    display: none !important;
  }

  /* FIX 3: Ocultar espaciador (30px) en móvil - desperdicia espacio */
  #blanco2 {
    display: none !important;
  }

  /* FIX 4: Contenido principal al 100% con padding para buena distribución */
  #noticias,
  #noticiasA {
    width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  /* FIX 5: Barra divisoria responsive */
  #barra,
  #barra img {
    width: 100% !important;
  }

  /* FIX 6: Sub-layouts de noticias (bloques flotantes internos) */
  .noticias1,
  .noticias2 {
    width: 100% !important;
  }

  .noticias1Ul li,
  .noticias2Ul li,
  .bienvenidosUl li {
    float: none !important;
    display: block !important;
    width: 100% !important;
    margin-bottom: 15px;
  }

  /* FIX 7: Ocultar separadores "|" del menú en móvil */
  #menu li:not(:has(a)) {
    display: none !important;
  }

  /* Alternativa compatible (si :has no funciona en navegadores antiguos) */
  #menu ul > li:nth-child(2),
  #menu ul > li:nth-child(4),
  #menu ul > li:nth-child(6),
  #menu ul > li:nth-child(8),
  #menu ul > li:nth-child(10),
  #menu ul > li:nth-child(12) {
    display: none !important;
  }

  /* FIX 8: Ocultar enlaces del cabecera en mobile (se integran en burger) */
  #cabecera {
    display: none !important;
  }

  /* FIX: Ocultar items originales del menú desktop en mobile */
  #menu .desktop-only-menu-item {
    display: none !important;
  }

  /* Mostrar solo los items personalizados del menú mobile */
  #menu .mobile-menu-item {
    display: block !important;
    width: 100% !important;
    float: none !important;
  }

  /* FIX 9: Evitar overflow horizontal - AGRESIVO */
  html {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  * {
    max-width: 100vw !important;
  }

  body {
    overflow-x: hidden !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #contenedor,
  #todaPagina,
  #todaPaginaB,
  #cabeceraIndex,
  #cita,
  .bienvenidos {
    overflow-x: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Forzar todo el contenido dentro del viewport */
  div, p, h1, h2, h3, h4, ul, li {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Header centrado */
  #cabeceraIndex {
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Ocultar logo original en mobile (lo pondremos en navbar) */
  #cabeceraIndex img[name="logo"] {
    display: none !important;
  }

  /* Cita del día - OCULTAR en mobile */
  #cita {
    display: none !important;
  }

  /* FIX 10: ESPACIADO JERÁRQUICO - Bloques separados, imagen+texto juntos */

  /* Contenedores principales */
  #todaPagina {
    padding: 10px 15px !important; /* Aumentado padding lateral */
  }

  #noticias {
    padding: 0 !important; /* Sin padding para mobile custom content */
  }

  /* === JERARQUÍA DE BLOQUES === */
  /* Cada bloque de noticias (imagen + texto) separado claramente */
  .noticias1,
  .noticias2 {
    margin-top: 30px !important;    /* SEPARACIÓN GRANDE del bloque anterior */
    margin-bottom: 0 !important;
    padding: 15px 0 !important;
    border-top: 2px solid #f0f0f0;  /* Línea sutil para separar bloques */
  }

  /* Primer bloque sin borde superior */
  .noticias1:first-of-type,
  .noticias2:first-of-type {
    border-top: none !important;
    margin-top: 10px !important;
  }

  /* === DENTRO DEL BLOQUE: Imagen cerca de su texto === */
  /* FORZAR orden: imagen SIEMPRE antes de texto en mobile */
  .noticias1Ul,
  .noticias2Ul {
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .noticias1Ul li,
  .noticias2Ul li {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* Orden forzado en mobile: imagen primero, texto después */
  .noticias1Ul li:has(#fotoNoticias1),
  .noticias1Ul li:has(#fotoNoticias2),
  .noticias1Ul li:has(#fotoNoticias3),
  .noticias1Ul li:has(#fotoNoticias4),
  .noticias1Ul li:has(#fotoLibro),
  .noticias2Ul li:has(#fotoNoticias1),
  .noticias2Ul li:has(#fotoNoticias2),
  .noticias2Ul li:has(#fotoNoticias3),
  .noticias2Ul li:has(#fotoNoticias4),
  .noticias2Ul li:has(#fotoLibro) {
    order: 1 !important;  /* Imagen va primero */
  }

  .noticias1Ul li:has(#textoNoticias1),
  .noticias1Ul li:has(#textoNoticias2),
  .noticias1Ul li:has(#textoNoticias3),
  .noticias1Ul li:has(#textoLibro),
  .noticias2Ul li:has(#textoNoticias1),
  .noticias2Ul li:has(#textoNoticias2),
  .noticias2Ul li:has(#textoNoticias3),
  .noticias2Ul li:has(#textoLibro) {
    order: 2 !important;  /* Texto va segundo */
  }

  /* Espaciadores siempre ocultos */
  .noticias1Ul li:has(#blancoNoticias1),
  .noticias1Ul li:has(#blancoLibro),
  .noticias2Ul li:has(#blancoNoticias1),
  .noticias2Ul li:has(#blancoLibro) {
    display: none !important;
  }

  /* Respaldo: ocultar espaciadores directamente */
  #blancoNoticias1,
  #blancoLibro {
    display: none !important;
  }

  /* Contenedor de foto: centrado y sin dimensiones fijas */
  #fotoNoticias1,
  #fotoNoticias2,
  #fotoNoticias3,
  #fotoNoticias4,
  #fotoLibro {
    text-align: center !important;
    margin: 0 auto 12px auto !important;  /* 12px entre imagen y texto */
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  /* Imágenes centradas y sin restricciones que causen superposición */
  #fotoNoticias1 img,
  #fotoNoticias2 img,
  #fotoNoticias3 img,
  #fotoNoticias4 img,
  #fotoLibro img {
    display: block !important;
    margin: 0 auto !important;
    max-width: 85% !important;  /* Un poco de margen a los lados */
    width: auto !important;
    height: auto !important;
    position: static !important;
    float: none !important;
  }

  /* Contenedor de texto: pegado a la imagen, sin dimensiones fijas */
  #textoNoticias1,
  #textoNoticias2,
  #textoNoticias3,
  #textoLibro {
    margin: 0 !important;
    padding: 0 20px !important; /* Aumentado de 10px a 20px */
    text-align: left !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    overflow: visible !important;
    position: static !important;
    float: none !important;
  }

  /* === TIPOGRAFÍA === */
  #textoNoticias1 h2,
  #textoNoticias2 h2,
  #textoNoticias3 h2,
  #textoLibro h2 {
    margin-top: 0 !important;
    margin-bottom: 8px !important;
    line-height: 1.3 !important;
  }

  #textoNoticias1 h4,
  #textoNoticias2 h4,
  #textoNoticias3 h4,
  #textoLibro h4 {
    margin: 8px 0 !important;
    color: #AC1429 !important;
    font-weight: bold !important;
  }

  /* Párrafos dentro de textos */
  #textoNoticias1 p,
  #textoNoticias2 p,
  #textoNoticias3 p,
  #textoLibro p {
    margin: 6px 0 !important;
  }

  /* === BARRAS DIVISORIAS === */
  /* Las barras entre bloques deben ser visibles pero discretas */
  img[src*="barraAtenuada"] {
    display: block !important;
    width: 100% !important;
    height: 1px !important;
    margin: 25px auto !important;
    opacity: 0.3 !important;
  }

  /* === ELIMINAR ESPACIOS INNECESARIOS === */
  /* Párrafos vacíos completamente ocultos */
  p:empty,
  p:blank {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Párrafos con solo &nbsp; */
  #noticias > p {
    display: none !important;
  }

  /* BRs ocultos */
  br {
    display: none !important;
  }

  /* Barra divisoria principal (#barra) */
  #barra {
    margin: 20px 0 !important;
    padding: 0 !important;
  }

  #barra img {
    width: 100% !important;
    opacity: 0.5 !important;
  }

  /* === SLIDESHOW Y OTRAS IMÁGENES === */
  /* OCULTAR slideshow en mobile */
  .bienvenidos {
    display: none !important;
  }

  .bienvenidosUl {
    margin: 0 !important;
    padding: 0 !important;
  }

  .bienvenidosUl li {
    margin: 0 auto !important;
    padding: 0 !important;
    text-align: center !important;
  }

  /* Contenedor del slideshow */
  #pictureholder,
  .pictureholder {
    margin: 0 auto !important;
    text-align: center !important;
  }

  /* Todas las imágenes del slideshow centradas */
  #pictureholder img,
  .pictureholder img,
  .picture {
    display: block !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    height: auto !important;
  }

  /* === LINKS EN IMÁGENES === */
  /* Asegurar que los enlaces no descuadren las imágenes */
  a img {
    display: block !important;
    margin: 0 auto !important;
  }

  /* === TEXTO "OM KRIYA BABAJI" === */
  /* OCULTAR en mobile */
  .textoBienvenidos {
    display: none !important;
  }

  /* ========================================
     MOBILE CUSTOM CONTENT STYLES
     Estilos para el contenido personalizado de mobile
     ======================================== */

  .mobile-content-wrapper {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Cita del día - elegante y minimalista (va primero, debajo del navbar) */
  .mobile-cita-container {
    width: 100% !important;
    padding: 15px 15px 15px 15px !important;
    margin: -130px 0 15px 0 !important;
    box-sizing: border-box;
  }

  /* Título Kriya Yoga - parte superior de la tarjeta unificada */
  .mobile-titulo-kriya {
    width: 100% !important;
    text-align: center !important;
    padding: 28px 28px 20px 28px !important;
    margin: 0 !important;
    background-color: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 12px 12px 0 0;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-bottom: none;
  }

  .mobile-titulo-kriya h1 {
    color: #AC1429 !important;
    font-size: 28px !important;
    font-weight: bold !important;
    margin: 0 0 20px 0 !important;
    padding-bottom: 12px !important;
    text-align: center !important;
    position: relative;
  }

  .mobile-titulo-kriya h1::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background: linear-gradient(to bottom, transparent, #AC1429 20%, #D4526E 50%, #AC1429 80%, transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    border-radius: 2px;
  }

  /* Portada mobile - parte media de la tarjeta unificada */
  .mobile-portada {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    background-color: #FFFFFF;
    border-left: 1px solid #E5E5E5;
    border-right: 1px solid #E5E5E5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  .mobile-portada img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Contenedor de imágenes en otras páginas */
  .mobile-image-container {
    width: 100% !important;
    margin: 20px 0 !important;
    padding: 0 !important;
    text-align: center !important;
  }

  .mobile-image-container img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 8px !important;
  }

  .mobile-cita {
    background: linear-gradient(to bottom, #FFFFFF, #FAFAFA);
    border-left: 4px solid #B8860B;
    border-radius: 8px;
    padding: 20px 25px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
  }

  .mobile-cita::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(184, 134, 11, 0.05));
    border-radius: 0 8px 0 100%;
  }

  .cita-titulo {
    color: #AC1429;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
  }

  .cita-icon {
    color: #B8860B;
    font-size: 24px;
    text-align: center;
    margin-bottom: 12px;
    opacity: 0.6;
  }

  .cita-texto {
    font-size: 16px !important;
    line-height: 1.7 !important;
    color: #444 !important;
    font-style: italic;
    text-align: center !important;
    position: relative;
    z-index: 1;
  }

  .mobile-section {
    width: 100% !important;
    padding: 28px !important;
    margin-bottom: 40px !important;
    background-color: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  /* Sección Kriya Yoga - parte inferior de la tarjeta unificada */
  #mobile-kriya-yoga {
    border-radius: 0 0 12px 12px !important;
    border-top: none !important;
    margin-top: 0 !important;
    margin-bottom: 40px !important;
  }

   .mobile-section h1 {
    color: #AC1429 !important;
    font-size: 20px !important;
    margin-bottom: 20px !important;
    margin-top: 0 !important;
    font-weight: bold !important;
    padding-bottom: 12px !important;
    text-align: center !important;
    position: relative;
  }

  .mobile-section h1::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent, #AC1429 20%, #D4526E 50%, #AC1429 80%, transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    border-radius: 2px;
  }
  .mobile-section h2 {
    color: #AC1429 !important;
    font-size: 20px !important;
    margin-bottom: 20px !important;
    margin-top: 0 !important;
    font-weight: bold !important;
    padding-bottom: 12px !important;
    text-align: center !important;
    position: relative;
  }

  .mobile-section h2::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent, #AC1429 20%, #D4526E 50%, #AC1429 80%, transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    border-radius: 2px;
  }

  .mobile-section h3 {
    color: #AC1429 !important;
    font-size: 18px !important;
    margin-bottom: 15px !important;
    margin-top: 0 !important;
    font-weight: bold !important;
    padding-bottom: 10px !important;
    text-align: center !important;
    position: relative;
  }

  .mobile-section h3::after {
    content: '';
    display: block;
    width: 80%;
    height: 2px;
    background: linear-gradient(to right, transparent, #AC1429 20%, #D4526E 50%, #AC1429 80%, transparent);
    position: absolute;
    bottom: 0;
    left: 10%;
    border-radius: 2px;
  }

  .mobile-section p {
    font-size: 20px !important;
    line-height: 1.6 !important;
    margin-bottom: 15px !important;
    color: #333 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    text-align: justify !important;
  }

  /* Mantra centrado - debe tener mayor especificidad para sobrescribir justify */
  .mobile-section p.mantra-centrado {
    text-align: center !important;
    font-style: italic !important;
    color: #AC1429 !important;
    font-weight: 500 !important;
    font-size: 18px !important;
  }

  /* Botones de contacto (Llamar y WhatsApp) */
  .mobile-contact-buttons {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
    margin: 25px 0 10px 0 !important;
  }

  .mobile-section .contact-button,
  .mobile-section a.contact-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 70% !important;
    padding: 8px 16px !important;
    border-radius: 30px !important;
    text-decoration: none !important;
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    font-family: 'Lato', Helvetica, Arial, sans-serif !important;
    font-size: 20px !important;
    font-weight: bold !important;
    color: white !important;
  }

  .mobile-section .contact-button:hover,
  .mobile-section a.contact-button:hover {
    transform: scale(0.97) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
    color: white !important;
  }

  .mobile-section .contact-button:active,
  .mobile-section a.contact-button:active {
    transform: scale(0.92) !important;
    transition: transform 0.1s ease-in !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2) !important;
  }

  /* Botón de llamada - Rojo a Naranja */
  .mobile-section .contact-button.phone-button,
  .mobile-section a.contact-button.phone-button {
    background: linear-gradient(to bottom, #fa460a 0%, #ffa83d 100%) !important;
  }

  /* Botón de WhatsApp - Verde */
  .mobile-section .contact-button.whatsapp-button,
  .mobile-section a.contact-button.whatsapp-button {
    background: linear-gradient(to bottom, #4e9c5d 0%, #6be883 100%) !important;
  }

  /* Texto de los botones */
  .mobile-section .contact-button span,
  .mobile-section a.contact-button span {
    text-decoration: none !important;
    color: white !important;
  }

  .mobile-section ul {
    margin: 20px 0 !important;
    padding-left: 20px !important;
  }

  .mobile-section ul li {
    font-size: 17px !important;
    line-height: 1.6 !important;
    margin-bottom: 15px !important;
    color: #333 !important;
  }

  .mobile-section a {
    color: #AC1429 !important;
    text-decoration: underline !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
    max-width: 100% !important;
    display: inline-block !important;
    transition: all 0.3s ease;
  }

  .mobile-section a:hover {
    color: #B8860B !important;
    text-decoration-color: #B8860B !important;
  }

  .mobile-section strong {
    font-weight: bold !important;
    color: #AC1429 !important;
  }

  /* Imagen de terapias (Chakras) */
  .mobile-terapia-image {
    width: 100% !important;
    margin: 20px 0 !important;
    text-align: center !important;
  }

  .mobile-terapia-image img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }

  /* Imágenes de linaje */
  .mobile-linaje-image {
    width: 100% !important;
    margin: 20px 0 !important;
    text-align: center !important;
  }

  .mobile-linaje-image img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }

  /* Imagen de contacto (Nityananda) */
  .mobile-contacto-image {
    width: 100% !important;
    margin: 20px 0 !important;
    text-align: center !important;
  }

  .mobile-contacto-image img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }

  /* Estilos para libros en mobile */
  .mobile-book {
    margin: 20px 0 !important;
    padding: 20px !important;
    background-color: #FAFAFA;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    text-align: center !important;
  }

  .mobile-book img {
    max-width: 200px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto 15px auto !important;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
  }

  .mobile-book a:hover img {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  }

  .mobile-book p {
    text-align: left !important;
    font-size: 14px !important;
    margin: 0 !important;
  }

  /* Slider de álbumes musicales */
  .music-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 20px 0 !important;
  }

  .music-slider {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
  }

  .music-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
  }

  .music-slide img {
    width: 220px !important;
    height: 220px !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
  }

  .music-slide a:hover img {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }

  /* Controles del slider */
  .slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
  }

  .slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #E5E5E5;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
  }

  .slider-dot.active {
    background: linear-gradient(to bottom, #AC1429, #C23750);
    width: 28px;
    border-radius: 5px;
  }

  .slider-dot:hover {
    background: #B8860B;
  }

  /* Slider de Terapias */
  .terapias-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 20px 0 !important;
  }

  .terapias-slider {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
  }

  .terapias-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
  }

  .terapias-slide img {
    width: 220px !important;
    height: 300px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto 15px auto !important;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
  }

  .terapia-description {
    text-align: center !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #333 !important;
    padding: 0 20px !important;
    margin: 0 !important;
  }

  .terapia-description strong {
    color: #AC1429 !important;
  }

  /* Slider de Libros */
  .libros-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 20px 0 !important;
  }

  .libros-slider {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
  }

  .libros-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
  }

  .libros-slide img {
    width: 220px !important;
    height: 300px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto 15px auto !important;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
  }

  .libro-description {
    text-align: center !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #333 !important;
    padding: 0 20px !important;
    margin: 0 !important;
  }

  .libro-description strong {
    color: #AC1429 !important;
  }

  /* Slider de Linaje */
  .linaje-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 20px 0 !important;
  }

  .linaje-slider {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
  }

  .linaje-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0 10px;
    box-sizing: border-box;
  }

  .linaje-slide img {
    width: 220px !important;
    height: 300px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto 15px auto !important;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
  }

  .linaje-description {
    text-align: center !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #333 !important;
    padding: 0 20px !important;
    margin: 0 !important;
    font-weight: 600 !important;
  }

  /* Enlaces de música */
  .mobile-music-links {
    margin: 20px 0 !important;
    background-color: #FAFAFA;
    padding: 20px !important;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    overflow-x: hidden !important;
    max-width: 100% !important;
  }

  .mobile-music-links p {
    margin: 15px 0 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
  }

  .mobile-music-links a {
    display: block !important;
    padding: 10px !important;
    background-color: #f0f0f0;
    border-radius: 4px;
    font-weight: bold !important;
    text-decoration: none !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-all !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .mobile-music-links a:hover {
    background-color: #e0e0e0;
  }

  /* Ocultar el footer y los botones de compartir en mobile */
  #final,
  #botones {
    display: none !important;
  }

  /* Botón Scroll to Top */
  #scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(to bottom, #AC1429, #C23750);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(172, 20, 41, 0.3);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }

  #scroll-to-top:hover {
    background: linear-gradient(to bottom, #C23750, #D4526E);
    box-shadow: 0 6px 16px rgba(172, 20, 41, 0.4);
    transform: translateY(-3px) scale(1.05);
  }

  #scroll-to-top:active {
    transform: translateY(-1px) scale(1.02);
  }

  /* Estilos para el formulario de Mailchimp en mobile */
  #mc_embed_signup {
    background-color: #FFFFFF !important;
    padding: 28px 28px 40px 28px !important;
    margin-bottom: 40px !important;
    border: 1px solid #E5E5E5 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    overflow: visible !important;
  }

  #mc_embed_signup_scroll {
    padding-bottom: 30px !important;
    overflow: visible !important;
  }

  #mc_embed_signup h2 {
    color: #AC1429 !important;
    font-size: 20px !important;
    margin-bottom: 20px !important;
    margin-top: 0 !important;
    font-weight: bold !important;
    padding-bottom: 12px !important;
    text-align: center !important;
    position: relative;
  }

  #mc_embed_signup h2::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent, #AC1429 20%, #D4526E 50%, #AC1429 80%, transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    border-radius: 2px;
  }

  #mc_embed_signup p {
    text-align: justify !important;
    font-size: 20px !important;
    line-height: 1.6 !important;
    margin-bottom: 15px !important;
    color: #333 !important;
  }

  #mc_embed_signup .mc-field-group {
    margin-bottom: 20px !important;
  }

  #mc_embed_signup .mc-field-group label {
    display: block !important;
    margin-bottom: 5px !important;
    font-weight: bold !important;
    color: #333 !important;
    font-size: 15px !important;
  }

  #mc_embed_signup input[type="email"],
  #mc_embed_signup input[type="text"] {
    width: 100% !important;
    padding: 10px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }

  #mc_embed_signup .button {
    width: 100% !important;
    height: auto !important;
    line-height: normal !important;
    padding: 12px !important;
    margin: 15px 0 0 0 !important;
    background: linear-gradient(to bottom, #AC1429 0%, #D4526E 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 25px !important;
    font-size: 18px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
  }

  #mc_embed_signup .button:hover {
    background: linear-gradient(to bottom, #8B1021 0%, #C23750 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(172, 20, 41, 0.4) !important;
  }

  #mc_embed_signup .clear {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
  }

  #mc_embed_signup .indicates-required {
    font-size: 15px !important;
  }

  /* Privacy link con fuente más pequeña */
  #mc_embed_signup .privacy-link {
    font-size: 13px !important;
    display: inline-block !important;
    white-space: nowrap !important;
  }

  /* Redes sociales centradas sin tarjeta */
  .mobile-social-links {
    text-align: center !important;
    padding: 20px 28px !important;
    margin: 20px 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  .mobile-social-links p {
    font-size: 16px !important;
    margin-bottom: 15px !important;
    line-height: 1.6 !important;
    padding: 0 !important;
    text-align: left !important;
  }

  .mobile-social-links a {
    color: #AC1429 !important;
    text-decoration: underline !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    text-align: left !important;
  }

  .mobile-social-links a:hover {
    color: #B8860B !important;
    text-decoration-color: #B8860B !important;
  }

  /* Copyright centrado sin tarjeta */
  .mobile-copyright {
    text-align: center !important;
    padding: 20px 28px 0px 28px !important;
    margin: 0 0 -30px 0 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  .mobile-copyright p {
    font-size: 14px !important;
    color: #666 !important;
    margin: 0 !important;
  }

  /* Botón Versión Web - disponible en ambos modos */
  .mobile-version-toggle {
    text-align: center !important;
    padding: 20px 28px !important;
    margin: 0 0 20px 0 !important;
    background: none !important;
  }

  .version-web-button {
    display: inline-block !important;
    padding: 12px 40px !important;
    background: linear-gradient(to bottom, #AC1429 0%, #D4526E 100%) !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 25px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    box-shadow: 0 4px 12px rgba(172, 20, 41, 0.3) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    border: none !important;
  }

  .version-web-button:hover {
    background: linear-gradient(to bottom, #8B1021 0%, #C23750 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(172, 20, 41, 0.4) !important;
    color: white !important;
  }

  .version-web-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(172, 20, 41, 0.3) !important;
  }

}

/* ========================================
   TABLET MINOR ADJUSTMENTS (768px - 991px)
   ======================================== */
@media screen and (min-width: 768px) and (max-width: 991px) {
  /* Only very minimal adjustments for tablets */
  #contenedor {
    width: 95%;
    max-width: 953px;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  #contenedor {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  #todaPagina {
    border: none !important;
    padding: 0 !important;
  }
}
