/* =========================================================
   ATONIKA FRONT PAGE (mockup 1:1)
   ========================================================= */
/* Palette tokens (--atk-*) now live in base.css so home.css, footer.css
   and the rest of the theme share a single source of truth. */

.atk-home { background: var(--atk-cream); color: var(--atk-ink); }
.atk-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.atk-home h1, .atk-home h2, .atk-home h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
.atk-home :where(a) { text-decoration: none; color: inherit; }

.atk-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 8px; font-size: 15px; font-weight: 600;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.atk-btn--navy { background: var(--atk-navy); color: #fff; }
.atk-btn--navy:hover { background: var(--atk-navy-2); color: #fff; }
.atk-btn--gold { background: var(--atk-gold); color: var(--atk-navy); }
.atk-btn--gold:hover { background: var(--atk-gold-dark); }
.atk-btn--ghost { background: transparent; color: var(--atk-navy); border: 1.5px solid var(--atk-gold); }
.atk-btn--ghost:hover { background: rgba(220,182,129,.18); color: var(--atk-navy); }

.atk-sec { padding: 40px 0; }
.atk-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.atk-sec__title { font-size: clamp(24px, 2.6vw, 30px); color: var(--atk-navy); }
.atk-sec__aside { font-size: 14px; color: var(--atk-ink-soft); }
.atk-sec__link { font-size: 14px; font-weight: 600; color: var(--atk-navy); white-space: nowrap; }
.atk-sec__link:hover { color: var(--atk-gold-dark); }

/* ---------- 1. HERO ---------- */
.atk-hero { position: relative; overflow: hidden; background: var(--atk-cream); color: var(--atk-navy); }
.atk-hero__media { position: absolute; inset: 0; }
.atk-hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center right; }
.atk-hero__media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(251,250,248,1) 0%, rgba(251,250,248,.97) 40%, rgba(251,250,248,.68) 66%, rgba(251,250,248,.18) 84%, rgba(251,250,248,0) 100%);
}
.atk-hero__inner { position: relative; padding: 84px 0 92px; max-width: 560px; }
.atk-hero__title { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.15; font-weight: 700; }
.atk-hero__title em { font-style: normal; color: var(--atk-gold-dark); }
.atk-hero__text { margin: 20px 0 32px; font-size: 15px; line-height: 1.65; color: var(--atk-slate); max-width: 430px; }
.atk-hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.atk-hero__cta .atk-btn { min-width: 168px; text-align: center; }

/* ---------- 2. CATEGORIES ---------- */
.atk-sec--cats .atk-wrap { max-width: 1340px; }
.atk-sec--cats .atk-sec__title { font-size: clamp(26px, 3vw, 34px); }
.atk-sec--cats .atk-sec__aside { font-size: 15px; color: var(--atk-ink-soft); }
.atk-sec--cats .atk-sec__head { margin-bottom: 30px; }

.atk-cats-carousel { position: relative; }
.atk-cats {
  display: flex; justify-content: flex-start; align-items: stretch; gap: 24px;
  overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x proximity;
  padding: 6px; margin: -6px; cursor: grab;
  scrollbar-width: none; -ms-overflow-style: none;
}
.atk-cats::-webkit-scrollbar { display: none; }
.atk-cats.is-grabbing { cursor: grabbing; scroll-behavior: auto; }
.atk-cats__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--atk-line); color: var(--atk-navy);
  cursor: pointer; box-shadow: 0 6px 18px rgba(17,24,39,.10);
  transition: opacity .18s ease, transform .18s ease;
}
.atk-cats__nav svg { width: 20px; height: 20px; }
.atk-cats__nav--prev { left: -18px; }
.atk-cats__nav--prev svg { transform: rotate(180deg); }
.atk-cats__nav--next { right: -18px; }
.atk-cats__nav:hover:not(:disabled) { transform: translateY(-50%) scale(1.06); }
.atk-cats__nav:disabled { opacity: 0; pointer-events: none; }
.atk-cat {
  flex: 0 0 clamp(210px, 22%, 302px); min-height: 300px; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: #f8f5ef; border: 0; border-radius: 18px;
  padding: 34px 26px 26px; transition: transform .18s ease, box-shadow .18s ease;
}
.atk-cat:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(17,24,39,.08); }
.atk-cat__icon {
  width: 108px; height: 108px; flex: 0 0 108px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #dcdcf5; color: #111827; margin-bottom: 28px;
}
.atk-cat:nth-child(2) .atk-cat__icon { background: #fbe2ce; }
.atk-cat:nth-child(3) .atk-cat__icon { background: #d9eedd; }
.atk-cat:nth-child(4) .atk-cat__icon { background: #fbe3d0; }
.atk-cat:nth-child(5) .atk-cat__icon { background: #dcdcf5; }
.atk-cat__icon svg { width: 54px; height: 54px; }
.atk-cat__name { font-size: 22px; font-weight: 700; color: #111827; }
.atk-cat__desc { font-size: 15px; line-height: 1.5; color: #4b5563; margin-top: 8px; max-width: 220px; }
.atk-cat__arrow { color: #111827; margin-top: auto; padding-top: 30px; }
.atk-cat__arrow svg { width: 26px; height: 26px; }

/* ---------- 3. COURSES ---------- */
.atk-courses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.atk-course {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--atk-line); border-radius: 14px; padding: 12px;
}
.atk-course__thumb {
  position: relative; display: block; aspect-ratio: 16 / 10;
  border-radius: 8px; overflow: hidden; background: #dcd6cc;
}
.atk-course__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.atk-course__play {
  position: absolute; inset: 0; margin: auto; width: 44px; height: 44px;
  border-radius: 50%; background: rgba(255,255,255,.92); color: var(--atk-navy);
  display: flex; align-items: center; justify-content: center;
}
.atk-course__play svg { width: 18px; height: 18px; margin-left: 2px; }
.atk-course__title {
  font-size: 16px; font-weight: 700; line-height: 1.35; margin: 14px 0 4px; color: var(--atk-navy);
  min-height: 2.7em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.atk-course__teacher { font-size: 13px; color: var(--atk-ink-soft); }
.atk-course__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--atk-ink-soft); }
.atk-course__level { background: #f0eeeb; color: #4a4a4a; border-radius: 4px; padding: 3px 8px; font-weight: 600; }
.atk-course__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 13px; font-weight: 600; }
.atk-course__rating { display: inline-flex; align-items: center; gap: 5px; }
.atk-course__rating svg { width: 14px; height: 14px; color: var(--atk-navy); }
.atk-course__rating span { font-weight: 400; color: var(--atk-ink-soft); }
.atk-course__save { background: none; border: 0; padding: 0; cursor: pointer; color: var(--atk-ink); line-height: 0; }
.atk-course__save svg { width: 17px; height: 17px; }

/* ---------- 4. METHOD ---------- */
.atk-method { background: var(--atk-method-bg); border-radius: 16px; padding: 46px 36px; text-align: center; }
.atk-method .atk-method__title { font-size: clamp(24px, 2.4vw, 29px); margin: 0 0 46px; text-align: center; color: var(--atk-navy); }
.atk-method__steps { display: flex; align-items: flex-start; justify-content: center; gap: 14px; }
.atk-step { flex: 1; max-width: 230px; }
.atk-step__icon {
  width: 78px; height: 78px; border-radius: 50%; background: var(--atk-navy); color: #fff;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.atk-step__icon svg { width: 52px; height: 52px; }
.atk-step__name { font-size: 15.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--atk-navy); }
.atk-step__desc { font-size: 13.5px; line-height: 1.55; color: #4b5563; margin: 10px auto 0; max-width: 190px; }
.atk-method__arrow { color: var(--atk-gold-dark); font-size: 20px; margin-top: 22px; flex: 0 0 auto; }
.atk-method__arrow svg { width: 34px; height: 34px; stroke-width: 2.4; }

/* ---------- 5. EXPLORA (blog mosaic) ---------- */
.atk-explore__tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.atk-tab {
  border: 0; background: transparent; cursor: pointer;
  padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #4b5563;
}
.atk-tab:hover { color: var(--atk-navy); }
.atk-tab.is-active { background: var(--atk-navy); color: #fff; }

.atk-mosaic {
  display: grid; grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(160px, 1fr));
  gap: 16px;
}
.atk-post { position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  border-radius: 12px; overflow: hidden; padding: 20px; color: #fff; min-height: 150px;
  background: var(--atk-navy); }
.atk-post img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.atk-post::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(15,22,45,.18) 0%, rgba(15,22,45,.55) 55%, rgba(15,22,45,.92) 100%);
}
.atk-post > * { position: relative; z-index: 1; }
.atk-post__badge {
  align-self: flex-start; position: absolute; top: 16px; left: 16px; z-index: 1;
  background: var(--atk-navy); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 5px 9px; border-radius: 4px;
}
.atk-post__title { font-size: 16px; line-height: 1.3; font-weight: 700; color: #fff; }
.atk-post__title a { color: inherit; }
.atk-post__excerpt { font-size: 12.5px; line-height: 1.5; color: rgba(255,255,255,.82); margin-top: 8px; }
.atk-post__meta { font-size: 12px; color: rgba(255,255,255,.8); margin-top: 12px; margin-bottom: 0; }
.atk-post--feature { grid-column: 1; grid-row: 1 / span 2; }
.atk-post--feature .atk-post__title { font-size: clamp(20px, 2vw, 26px); }
.atk-post--c1 { grid-column: 2; grid-row: 1; }
.atk-post--c2 { grid-column: 3; grid-row: 1; }
.atk-post--c3 { grid-column: 2; grid-row: 2; }
.atk-post--c4 { grid-column: 3; grid-row: 2; }
.atk-post--light { background: #fff; color: var(--atk-ink); }
.atk-post--light::after { display: none; }
.atk-post--light .atk-post__title { color: var(--atk-ink); }
.atk-post--light .atk-post__meta { color: var(--atk-ink-soft); }

/* ---------- 6. PLUS ---------- */
.atk-plus {
  background: var(--atk-navy-2); color: #fff; border-radius: 16px;
  display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: center;
  padding: 40px 44px;
}
.atk-plus__logo { font-size: clamp(26px, 3vw, 34px); font-weight: 800; line-height: 1.05; letter-spacing: .04em; }
.atk-plus__logo span { display: block; color: rgba(255,255,255,.55); }
.atk-plus__logo sup { color: var(--atk-gold-dark); font-size: .5em; }
.atk-plus__title { font-size: 20px; font-weight: 700; color: #fff !important; }
.atk-plus .atk-plus__title,
.atk-home .atk-plus .atk-plus__title,
body .atk-plus .atk-plus__title { color: #fff !important; }
.atk-plus__text { font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,.78); max-width: 330px; margin-top: 10px; }
.atk-plus__cta { margin-top: 22px; }
.atk-plus__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 18px; }
.atk-plus__body { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; }
.atk-benefit { display: flex; gap: 10px; font-size: 12.5px; line-height: 1.45; color: rgba(255,255,255,.9); }
.atk-benefit svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--atk-gold-dark); }

/* ---------- responsive ---------- */
@media (max-width: 1250px) {
  .atk-cats { gap: 20px; }
  .atk-cat { flex: 0 0 262px; }
  .atk-cats__nav--prev { left: -8px; }
  .atk-cats__nav--next { right: -8px; }
}
@media (max-width: 1024px) {
  .atk-cats { gap: 20px; }
  .atk-cat { flex: 0 0 250px; }
  .atk-courses { grid-template-columns: repeat(2, 1fr); }
  .atk-plus { grid-template-columns: 1fr; gap: 26px; }
  .atk-plus__body { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 860px) {
  .atk-method__steps { flex-wrap: wrap; gap: 26px; }
  .atk-method__arrow { display: none; }
  .atk-step { flex: 0 0 45%; max-width: none; }
  .atk-mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .atk-post--feature, .atk-post--c1, .atk-post--c2, .atk-post--c3, .atk-post--c4 { grid-column: auto; grid-row: auto; }
  .atk-post--feature { grid-column: 1 / -1; min-height: 240px; }
}
@media (max-width: 600px) {
  .atk-cats { gap: 16px; }
  .atk-cat { flex: 0 0 78%; }
  .atk-cats__nav { display: none; }
  .atk-courses { grid-template-columns: 1fr; }
  .atk-plus__grid { grid-template-columns: 1fr 1fr; }
  .atk-hero__inner { padding: 56px 0; }
  .atk-mosaic { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .atk-cat { flex: 0 0 84%; }
}

/* =========================================================
   HOME HEADER OVERRIDES (mockup: white / navy / tan)
   ========================================================= */
body.home .alert-bar { display: none; }
body.home .site-header { background: #fff; border-bottom: 1px solid var(--atk-line); color: var(--atk-navy); }
body.home .site-header .brand,
body.home .site-header .brand::first-letter { color: var(--atk-navy) !important; }
body.home .site-header .brand span { color: var(--atk-navy) !important; }
body.home .site-header .site-nav a,
body.home .site-header .site-nav__list--desktop a { color: #4b5563; }
body.home .site-header .site-nav a:hover,
body.home .site-header .site-nav__list--desktop a:hover { background: rgba(27,42,94,.06); color: var(--atk-navy); }
body.home .site-header .site-nav a.nav-plus,
body.home .site-header .site-nav__list--desktop a.nav-plus { color: var(--atk-navy); }
body.home .nav-plus__badge { background: var(--atk-gold); color: var(--atk-navy); box-shadow: none; }
body.home .site-search .search-field { background: #fff; border-color: var(--atk-line); color: var(--atk-ink); }
body.home .site-search .search-field::placeholder { color: #9ca3af; }
body.home .site-search .search-field:focus { background: #fff; border-color: var(--atk-gold-dark); box-shadow: 0 0 0 2px rgba(201,165,123,.22); }
body.home .site-actions .action-link,
body.home .site-actions .action-icon { color: var(--atk-navy); }
body.home .site-actions .action-link:hover,
body.home .site-actions .action-icon:hover { background: rgba(27,42,94,.06); }
body.home .site-header .menu-toggle { color: var(--atk-navy); }
body.home .site-header .btn--brand { background: var(--atk-gold); color: var(--atk-navy); }
body.home .site-header .btn--brand:hover { background: var(--atk-gold-dark); color: var(--atk-navy); }
body.home .drawer__cta { background: var(--atk-gold); color: var(--atk-navy); }
body.home .drawer__cta:hover { background: var(--atk-gold-dark); color: var(--atk-navy); }
body.home .drawer__nav a.nav-plus { color: var(--atk-navy); }
body.home .mega-menu__panel { background: #fff; color: var(--atk-ink); border-top: 1px solid var(--atk-line); box-shadow: 0 20px 40px rgba(27,42,94,.12); }
body.home .mega-menu__heading { color: var(--atk-navy); }
body.home .mega-menu__list a { color: var(--atk-ink-soft); }
body.home .mega-menu__list a:hover { color: var(--atk-navy); }
body.home .site-footer { background: var(--atk-cream); }

/* =========================================================
   SCROLL ANIMATIONS (IO reveal + GSAP SplitText titles)
   ========================================================= */
.atonika__title-anim,
.atonika__title-anim-wrap { position: relative; }
.atonika__title-anim-wrap { transform: translateZ(0); }
.atonika__title-anim .char {
	display: inline-block;
	will-change: transform, opacity;
}
.atk-hero__title em { transform: translateZ(0); }

html.js-anim .wow { opacity: 0; animation-name: none; }
html.js-anim .wow.revealed {
	opacity: 1;
	animation-name: var(--wow-name, fadeIn);
	animation-duration: 1s;
	animation-delay: var(--wow-delay, 0s);
	animation-fill-mode: both;
}

@media (prefers-reduced-motion: reduce) {
	html.js-anim .wow { opacity: 1; animation: none; }
	.atk-home .atonika__title-anim .char { animation: none; transition: none; }
}
/* =========================================================
   HOME COURSES CARDS - FORCED OVERRIDES (!important)
   Fuerza el estilo de las cards de "Empieza por aqui" frente a
   hojas de terceros presentes en el servidor.
   ========================================================= */
.atk-home .atk-courses {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 22px !important;
  align-items: stretch !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.atk-home .atk-courses .atk-course {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  background: #fff !important;
  border: 1px solid var(--atk-line) !important;
  border-radius: 14px !important;
  padding: 12px !important;
  box-shadow: none !important;
}
.atk-home .atk-courses .atk-course__thumb {
  position: relative !important;
  display: block !important;
  aspect-ratio: 16 / 10 !important;
  width: 100% !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #dcd6cc !important;
}
.atk-home .atk-courses .atk-course__thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  max-width: none !important;
  border-radius: 0 !important;
}
.atk-home .atk-courses .atk-course__play {
  position: absolute !important;
  inset: 0 !important;
  margin: auto !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.92) !important;
  color: var(--atk-navy) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.atk-home .atk-courses .atk-course__play svg {
  width: 18px !important;
  height: 18px !important;
  margin-left: 2px !important;
}
.atk-home .atk-courses .atk-course__title {
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  margin: 14px 0 4px !important;
  color: var(--atk-navy) !important;
  min-height: 2.7em !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
.atk-home .atk-courses .atk-course__title a {
  color: var(--atk-navy) !important;
  text-decoration: none !important;
}
.atk-home .atk-courses .atk-course__teacher {
  font-size: 13px !important;
  color: var(--atk-ink-soft) !important;
  margin: 0 !important;
}
.atk-home .atk-courses .atk-course__meta {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 10px !important;
  font-size: 12px !important;
  color: var(--atk-ink-soft) !important;
}
.atk-home .atk-courses .atk-course__level {
  background: #f0eeeb !important;
  color: #4a4a4a !important;
  border-radius: 4px !important;
  padding: 3px 8px !important;
  font-weight: 600 !important;
}
.atk-home .atk-courses .atk-course__foot {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-top: 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}
.atk-home .atk-courses .atk-course__rating {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.atk-home .atk-courses .atk-course__rating svg {
  width: 14px !important;
  height: 14px !important;
  color: var(--atk-navy) !important;
}
.atk-home .atk-courses .atk-course__save {
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  cursor: pointer !important;
  color: var(--atk-ink) !important;
  line-height: 0 !important;
}
.atk-home .atk-courses .atk-course__save svg {
  width: 17px !important;
  height: 17px !important;
}
.atk-home .atk-sec__link {
  color: var(--atk-navy) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

@media (max-width: 1024px) {
  .atk-home .atk-courses { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
  .atk-home .atk-courses { grid-template-columns: 1fr !important; }
}
