/*
  ================================================================
  Módulo: Programas Posgrado - Carrusel Interactivo
  Versión: 3.1 (Mobile Touch & Swipe Perfected)
  ================================================================
*/
{% scope_css %}

:root {
  --uao-carrusel-color-primary: #AC0B32;
  --uao-carrusel-color-text: #2B0007;
  --uao-carrusel-card-radius: 12px;
  --uao-carrusel-transition: all 0.3s ease;
}

/* --- Reseteo de Box-Sizing --- */
.uao-posgrados-carrusel,
.uao-posgrados-carrusel * {
  box-sizing: border-box !important;
}

.uao-posgrados-carrusel {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  text-align: center;
}

.uao-posgrados-carrusel__header { margin-bottom: 50px; }
.uao-posgrados-carrusel__title { color: var(--uao-carrusel-color-primary); font-size: clamp(28px, 4vw, 36px); margin-bottom: 15px; }
.uao-posgrados-carrusel__intro { color: var(--uao-carrusel-color-text); max-width: 800px; margin: 0 auto; font-size: clamp(16px, 2vw, 18px); }

.uao-posgrados-carrusel__wrapper { position: relative; }

.uao-posgrados-carrusel__track-container {
  width: 100%;
  overflow: hidden;
}

.uao-posgrados-carrusel__track {
  display: flex;
  gap: 20px;
  
  /* --- AJUSTES CLAVE PARA LA EXPERIENCIA MÓVIL --- */
  overflow-x: auto !important; /* 1. Fuerza el scroll horizontal */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; /* 2. Activa scroll nativo y suave en iOS */
  touch-action: pan-x; /* 3. Optimiza para gestos de deslizamiento horizontal */
  
  padding-bottom: 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.uao-posgrados-carrusel__track::-webkit-scrollbar {
  display: none;
}

.uao-posgrados-carrusel__slide {
  flex: 0 0 90%;
  scroll-snap-align: center;
}

/* ... (Estilos de la tarjeta se mantienen idénticos) ... */
.uao-posgrados-carrusel__card { border: 1px solid #EAEAEA; border-radius: var(--uao-carrusel-card-radius); overflow: hidden; background-color: #FFFFFF; box-shadow: 0 4px 20px rgba(0,0,0,0.05); height: 100%; text-align: left; transition: var(--uao-carrusel-transition); }
.uao-posgrados-carrusel__card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.uao-posgrados-carrusel__card-image { height: 220px; background-size: cover; background-position: center; }
.uao-posgrados-carrusel__card-content { padding: 25px; }
.uao-posgrados-carrusel__card-title { font-size: 20px; font-weight: 700; }
.uao-posgrados-carrusel__card-title a { color: var(--uao-carrusel-color-text); text-decoration: none; }

/* --- Estilos de las flechas (sin cambios, pero se ocultarán en móvil) --- */
.uao-posgrados-carrusel__button { position: absolute !important; top: 40% !important; z-index: 10 !important; width: 45px !important; height: 45px !important; padding: 0 !important; border-radius: 50% !important; flex-shrink: 0 !important; background-color: white !important; border: 1px solid #ddd !important; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.1); transition: var(--uao-carrusel-transition); display: flex !important; justify-content: center !important; align-items: center !important; }
.uao-posgrados-carrusel__button:hover { transform: scale(1.1); background-color: var(--uao-carrusel-color-primary) !important; }
.uao-posgrados-carrusel__button:hover svg { fill: white !important; }
.uao-posgrados-carrusel__button--prev { left: 0; transform: translateX(-50%); }
.uao-posgrados-carrusel__button--next { right: 0; transform: translateX(50%); }
.uao-posgrados-carrusel__button svg { width: 28px !important; height: 28px !important; fill: var(--uao-carrusel-color-primary); }

/* --- Responsive --- */
@media (max-width: 991px) {
  .uao-posgrados-carrusel__wrapper {
    padding: 0;
  }
  .uao-posgrados-carrusel__button {
    display: none !important; /* Oculta las flechas en tablet y móvil */
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .uao-posgrados-carrusel__slide {
    flex-basis: 50%; /* 2 slides en tablet */
  }
}
@media (min-width: 992px) {
  .uao-posgrados-carrusel__slide {
    flex-basis: 33.333%; /* 3 slides en escritorio */
  }
}
{% end_scope_css %}