/* ================================================================
   IACADEMY – Custom Styles
   ================================================================ */

/* ── Banner / Video ──────────────────────────────────────────── */
.banner-area{
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
.banner-area .row.fullscreen{
  min-height: 100vh;
}
.back-video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}
.banner-area .overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
}
.banner-area .container,
.banner-area .banner-content{
  position: relative;
  z-index: 2;
}


/* ── Social icons ────────────────────────────────────────────── */
.header-top-left a[aria-label="Instagram"] i { color:#fff; }
.header-top-left a[aria-label="Instagram"]:hover i { color:#E4405F; }


/* ================================================================
   CAROUSEL SECTION  –  Animated Glassmorphism Carousel
   ================================================================ */

/* ── Section base ────────────────────────────────────────────── */
.oferta-section{
  position: relative;
  padding: 80px 0 60px;
  background: linear-gradient(165deg, #0a0e1a 0%, #0d1528 35%, #101d35 65%, #0a0e1a 100%);
  overflow: hidden;
}

/* Subtle grid overlay for texture */
.oferta-section::before{
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Particle canvas fills the whole section */
#particles-canvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Header ──────────────────────────────────────────────────── */
.oferta-header{
  text-align: center;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}
.oferta-badge{
  display: inline-block;
  padding: 5px 18px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #60a5fa;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.25);
  margin-bottom: 16px;
}
.oferta-title{
  margin: 0;
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.15;
}
.oferta-subtitle{
  margin: 10px 0 0;
  color: rgba(255,255,255,.5);
  font-size: 1.05rem;
}
.oferta-title-line{
  width: 60px;
  height: 3px;
  margin: 18px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

/* ── Carousel wrapper ────────────────────────────────────────── */
.carousel-wrapper{
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.carousel-viewport{
  overflow: hidden;
  flex: 1;
  border-radius: 20px;
}
.carousel-track{
  display: flex;
  gap: 24px;
  transition: transform 0.55s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}

/* ── Navigation buttons ──────────────────────────────────────── */
.carousel-btn{
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
  z-index: 2;
}
.carousel-btn:hover{
  background: rgba(59,130,246,.25);
  border-color: rgba(59,130,246,.5);
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(59,130,246,.25);
}
.carousel-btn--hidden{
  opacity: .25;
  pointer-events: none;
}

/* Hide buttons on small screens – swipe instead */
@media (max-width: 575px){
  .carousel-btn{ display: none; }
}

/* ── Card ────────────────────────────────────────────────────── */
.carousel-card{
  position: relative;
  flex: 0 0 calc((100% - 48px) / 3);   /* 3 visible on desktop */
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;

  /* Entry animation – cards start invisible */
  opacity: 0;
  transform: translateY(40px) scale(.95);
}
.carousel-card--visible{
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity .6s cubic-bezier(.4,0,.2,1),
              transform .6s cubic-bezier(.4,0,.2,1),
              box-shadow .35s ease,
              border-color .35s ease;
}

.carousel-card:hover{
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 50px rgba(59,130,246,.15), 0 8px 32px rgba(0,0,0,.35);
  border-color: rgba(59,130,246,.3);
}

/* Animated glow ring on hover */
.carousel-card__glow{
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  z-index: -1;
  opacity: 0;
  background: conic-gradient(from var(--glow-angle, 0deg),
    #3b82f6, #8b5cf6, #ec4899, #f59e0b, #10b981, #3b82f6);
  transition: opacity .4s ease;
  animation: glowSpin 4s linear infinite;
}
@keyframes glowSpin{
  to{ --glow-angle: 360deg; }
}
/* Register the custom property so the animation works */
@property --glow-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.carousel-card:hover .carousel-card__glow{
  opacity: 1;
}

/* ── Card thumbnail ──────────────────────────────────────────── */
.carousel-card__thumb{
  position: relative;
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #111;
}
.carousel-card__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .5s ease, filter .5s ease;
}
.carousel-card:hover .carousel-card__thumb img{
  transform: scale(1.08);
  filter: brightness(1.1);
}
/* Gradient overlay on image */
.carousel-card__overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,14,26,.85) 0%, transparent 60%);
  pointer-events: none;
}

/* Category badge on top of image */
.carousel-card__category{
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(59,130,246,.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── Card body ───────────────────────────────────────────────── */
.carousel-card__body{
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 20px 20px 24px;
  flex: 1;
}
.carousel-card__name{
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.carousel-card__desc{
  margin: 0;
  font-size: .88rem;
  line-height: 1.55;
  color: rgba(255,255,255,.6);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1em * 1.55 * 3);
}
.carousel-card__price{
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* CTA button */
.carousel-card__cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: auto;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
}
.carousel-card__cta::before{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  opacity: 0;
  transition: opacity .3s ease;
}
.carousel-card__cta:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59,130,246,.35);
  color: #fff;
  text-decoration: none;
}
.carousel-card__cta:hover::before{
  opacity: 1;
}
.carousel-card__cta svg,
.carousel-card__cta span{
  position: relative;
  z-index: 1;
}
.carousel-card__cta svg{
  transition: transform .3s ease;
}
.carousel-card__cta:hover svg{
  transform: translateX(3px);
}

/* ── Dots / indicators ───────────────────────────────────────── */
.carousel-dots{
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  position: relative;
  z-index: 1;
}
.carousel-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(255,255,255,.15);
  transition: all .35s ease;
}
.carousel-dot.active{
  width: 32px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  box-shadow: 0 0 12px rgba(59,130,246,.4);
}
.carousel-dot:hover:not(.active){
  background: rgba(255,255,255,.3);
}

/* ── Progress bar ────────────────────────────────────────────── */
.carousel-progress{
  width: 100%;
  max-width: 300px;
  height: 3px;
  margin: 16px auto 0;
  border-radius: 3px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.carousel-progress__bar{
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transition: width .55s cubic-bezier(.4,0,.2,1);
}

/* ── Empty state ─────────────────────────────────────────────── */
.carousel-empty{
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,.4);
  font-size: 1.1rem;
  width: 100%;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1199px){
  .carousel-card{
    flex: 0 0 calc((100% - 24px) / 2);  /* 2 visible */
  }
}
@media (max-width: 767px){
  .carousel-card{
    flex: 0 0 100%;                       /* 1 visible */
  }
  .oferta-section{
    padding: 50px 0 40px;
  }
  .oferta-title{
    font-size: 1.7rem;
  }
  .carousel-card__thumb{
    height: 180px;
  }
}
@media (min-width: 1200px){
  .carousel-card__thumb{
    height: 220px;
  }
}


/* ================================================================
   LEGACY SUPPORT – .oferta / .course-card (other pages)
   Keep for course_info, course_detail, etc.
   ================================================================ */
.oferta{ padding: 48px 0; }
.oferta__head{ text-align: center; margin-bottom: 24px; }

.oferta-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

:root{
  --card-radius: 16px;
  --card-bg: #1F1F1F;
  --card-fg: #fff;
  --card-border: rgba(255,255,255,.08);
  --card-shadow: 0 8px 24px rgba(0,0,0,.22);
}

.course-card{
  display: flex;
  flex-direction: column;
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--card-bg);
  color: var(--card-fg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  height: 100%;
}
.course-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,.30);
}
.course-card__thumb{
  position: relative;
  display: block;
  width: 100%;
  height: 220px;
  background: #141414;
}
.course-card__thumb img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.course-card__body{
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1rem 1rem 1.25rem;
  min-height: 220px;
}
.course-card__title{
  margin: 0;
  font-weight: 700;
  line-height: 1.25;
  font-size: 1.1rem;
  color: #fff !important;
}
.course-card__desc{
  margin: 0;
  color: rgba(255,255,255,.82);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1em * 1.45 * 3);
}
.oferta .btn.btn-primary{
  border-radius: 10px;
}
.light .course-card{ background:#fff; color:#0b1220; border-color: rgba(0,0,0,.06); }
.light .course-card__desc{ color:#475569; }

/* Owl Carousel overrides (for other pages that may still use Owl) */
.oferta-carousel .owl-nav{
  display: flex !important;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}
.oferta-carousel .owl-nav button{
  width: 40px; height: 40px; border-radius: 999px;
  background: #1F1F1F !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.oferta-carousel .owl-nav i{
  color: #fff;
  line-height: 40px;
}
.oferta-carousel .owl-dots .owl-dot span{ width:8px; height:8px; }
.oferta-carousel .owl-stage-outer{ padding: 6px 0 16px; }

.oferta-carousel:not(.owl-loaded){
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.oferta-carousel:not(.owl-loaded) .item{ width: auto !important; }
