/* --- Organizate y Aliados --- */
.org-fondos-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Técnica padding + margin negativo: da espacio para que la sombra
     y el translateY del hover no sean clippeados por overflow-x: auto.
     El margin negativo compensa visualmente el padding para que nada se desplace. */
  padding: 16px 0 16px 0;
  margin: -16px 0 -16px 0;
}
.org-fondos-grid::-webkit-scrollbar {
  display: none;
}
.org-fondo-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - (2 * 24px)) / 3);
  scroll-snap-align: start;
}
@media (max-width: 900px) {
  .org-fondo-card {
    flex: 0 0 calc((100% - 24px) / 2);
  }
}
@media (max-width: 600px) {
  .org-fondo-card {
    flex: 0 0 100%;
  }
}
.org-fondo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.org-fondo-bookmark {
  color: var(--slate);
  font-size: 20px;
  cursor: pointer;
  transition: .2s;
}
.org-fondo-bookmark:hover { color: var(--teal-600); }
.org-fondo-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 8px;
  line-height: 1.4;
}
.org-fondo-desc {
  font-size: 14.5px;
  color: var(--slate);
  margin-bottom: 24px;
  line-height: 1.5;
}
.org-fondo-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.org-fondo-date {
  font-size: 13.5px;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 6px;
}

.org-aliados-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.org-aliado-card {
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.org-aliado-logo {
  height: 54px;
  width: auto;
  object-fit: contain;
}
.org-aliado-name {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--navy-900);
  margin: 0;
}
.org-aliado-type {
  font-size: 12.5px;
  color: var(--slate);
}

.org-cursos-grid, .grid-auto-260 {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Oculta en Firefox */
}
/* si hay menos de 4 cards, los muestra centrados (no rompe diseño mobile) */
.org-cursos-grid::before,
.org-cursos-grid::after,
.grid-auto-260::before,
.grid-auto-260::after {
  content: "";
  margin: auto;
}
/* Oculta en Chrome, Safari y Edge */
.org-cursos-grid::-webkit-scrollbar, .grid-auto-260::-webkit-scrollbar {
  display: none;
}
.org-curso-card, .card-col {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - (3 * 24px)) / 4);
  scroll-snap-align: start;
}

@media (max-width: 1200px) {
  .org-curso-card, .card-col {
    flex: 0 0 calc((100% - (2 * 24px)) / 3);
  }
}

@media (max-width: 900px) {
  .org-curso-card, .card-col {
    flex: 0 0 calc((100% - 24px) / 2);
  }
}

@media (max-width: 600px) {
  .org-curso-card, .card-col {
    flex: 0 0 100%;
  }
}
.org-curso-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}
.org-curso-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.org-curso-body a {
  margin-top: auto;
}
.org-curso-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 16px;
  line-height: 1.4;
}
.org-curso-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-direction: column;
  justify-content: space-between;
}
.org-curso-meta span {
  font-size: 13px;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 6px;
}


/* --- Pasos (Cómo crear org) --- */
/* -----------------------------------------
   Ruta de 5 Pasos (Cómo crear organización)
----------------------------------------- */
.ui-steps-container {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  margin-top: 40px;
}

.ui-steps-container::before {
  content: '';
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  height: 0;
  border-top: 2px dashed var(--teal-500);
  z-index: 0;
}

.ui-step-item {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}


/* --- Tarjetas Expandibles --- */
/* ============================================================
   UI EXPAND CARDS (REUTILIZABLE - FLOTANTE DESDE EL CENTRO)
   ============================================================ */
/* El contenedor mantiene el espacio original en el layout */
.ui-expand-card {
  position: relative;
  z-index: 1;
  /* Anulamos los estilos de tarjeta original porque se movieron al inner */
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.ui-expand-card:hover {
  z-index: 20;
  transform: none !important; /* Evitamos que el translateY del hover normal aplique al wrapper */
}

/* La tarjeta real que flota y crece */
.ui-expand-card-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  /* El height por defecto es 100% del contenedor */
  min-height: 100%; 
  background-color: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  overflow: hidden;
}

/* Al hacer hover, la tarjeta crece en todas las direcciones (width y height) y cambia de color */
.ui-expand-card:hover .ui-expand-card-inner {
  width: 250px;       /* Ancho expandido */
  min-height: 250px;  /* Altura mínima expandida para dar espacio al texto */
  background-color: var(--navy-900);
  border-color: var(--navy-900);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

/* Forzar colores en hover */
.ui-expand-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--blue-700);
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.ui-expand-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.3;
  text-align: center;
  max-width: 108px;
  margin: 0 auto;
}

.ui-expand-card:hover .ui-expand-icon {
  background-color: rgba(255,255,255,0.2) !important;
  color: white !important;
}
.ui-expand-card:hover .ui-expand-title,
.ui-expand-card:hover .ui-expand-content-inner {
  color: white !important;
}

/* Contenido colapsado */
.ui-expand-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  justify-items: center;
}

.ui-expand-content-inner {
  width: 202px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  color: #475569;
  margin-top: 0;
  transition: margin-top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ui-expand-card:hover .ui-expand-content {
  grid-template-rows: 1fr;
}

.ui-expand-card:hover .ui-expand-content-inner {
  margin-top: 16px;
}

/* ============================================================
   ACCESOS RÁPIDOS (ORGANÍZATE)
   ============================================================ */
.org-quick-card {
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 760px) {
  .org-quick-card {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    overflow-x: visible !important;
    padding: 24px 16px !important;
    gap: 16px;
  }
}

/* ============================================================
   LÍNEA DE TIEMPO VERTICAL (MÓVIL)
   ============================================================ */
@media (max-width: 760px) {
  .ui-expand-card-inner {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    background-color: var(--navy-900) !important;
    border-color: var(--navy-900) !important;
    box-shadow: var(--shadow-md) !important;
    padding: 24px !important;
  }

  .ui-expand-icon {
    background-color: rgba(255,255,255,0.2) !important;
    color: white !important;
  }
  .ui-expand-title, .ui-expand-content-inner {
    color: white !important;
  }

  /* Mostrar el texto siempre (sin hover) */
  .ui-expand-content {
    grid-template-rows: 1fr !important;
  }
  .ui-expand-content-inner {
    margin-top: 16px !important;
  }

  .ui-step-card.ui-expand-card {
    height: auto !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  
  .ui-step-item {
    width: 100%;
    max-width: 340px; 
  }

  .ui-steps-container {
    flex-direction: column !important;
    align-items: center !important;
    gap: 40px !important;
  }
  
  .ui-steps-container::before {
    top: 0 !important;
    bottom: 0 !important;
    left: 50% !important;
    right: auto !important;
    width: 0 !important;
    height: 100% !important;
    transform: translateX(-50%) !important;
    border-top: none !important;
    border-left: 2px dashed var(--teal-500) !important;
  }
}



