/* ===================================================================
   SHARED HEADER & FOOTER STYLES
   Loaded automatically by inc/partials/cw-header.php
   Do NOT duplicate these rules in page-specific CSS files.
=================================================================== */

/* ===== HEADER — sticky, full-width ===== */
#cw-landing-wrapper .site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e8e5e2;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
  transition: box-shadow .3s ease, background .3s ease
}

#cw-landing-wrapper .site-header.is-scrolled {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 28px rgba(0, 0, 0, .10)
}

#cw-landing-wrapper .header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: relative;
  transition: height .3s ease
}

#cw-landing-wrapper .site-header.is-scrolled .header-inner {
  height: 56px
}

/* Logo */
#cw-landing-wrapper .header-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex-shrink: 0
}

#cw-landing-wrapper .header-logo img,
#cw-landing-wrapper .header-logo .custom-logo {
  height: 42px;
  width: auto;
  display: block
}

#cw-landing-wrapper .header-logo__text {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.1;
  display: flex;
  flex-direction: column
}

#cw-landing-wrapper .header-logo__sub {
  font-family: 'Poppins', sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: #9ca3af
}

/* Nav container */
#cw-landing-wrapper .header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: flex-end
}

/* Nav item wrapper */
#cw-landing-wrapper .nav-item {
  position: relative
}

/* Nav link — button & a */
#cw-landing-wrapper .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 13px;
  border-radius: 100px !important;
  border: none !important;
  background: transparent !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 14.7px !important;
  font-weight: 500 !important;
  color: #2a2a2a !important;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
  line-height: 1
}

#cw-landing-wrapper .nav-link:hover,
#cw-landing-wrapper .nav-item.is-open>.nav-link {
  background: #fff0ee;
  color: #db1709
}

#cw-landing-wrapper .nav-chevron {
  transition: transform .22s ease, stroke .18s ease;
  flex-shrink: 0;
  stroke: #2a2a2a
}

#cw-landing-wrapper .nav-item.is-open>.nav-link .nav-chevron {
  transform: rotate(180deg);
  stroke: #db1709
}

/* ─── Hover also opens dropdown (desktop) ─── */
@media (min-width: 901px) {
  #cw-landing-wrapper .nav-item.has-dropdown:hover>.nav-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(-50%) translateY(0)
  }

  #cw-landing-wrapper .nav-item.has-dropdown:hover>.nav-link {
    background: #fff0ee;
    color: #db1709
  }

  #cw-landing-wrapper .nav-item.has-dropdown:hover>.nav-link .nav-chevron {
    transform: rotate(180deg);
    stroke: #db1709
  }
}

/* ─── Dropdown — animated via opacity+transform ─── */
#cw-landing-wrapper .nav-dropdown {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 240px;
  background: #fff;
  border: 1px solid #e8e5e2;
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .18);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s
}

#cw-landing-wrapper .nav-item.is-open>.nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0)
}

/* Bridge: invisible extension above dropdown so mouse doesn't leave parent */
#cw-landing-wrapper .nav-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
  background: transparent
}

#cw-landing-wrapper .dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-radius: 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 14.4px;
  font-weight: 400;
  color: #2a2a2a;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  gap: 8px
}

#cw-landing-wrapper a.dropdown-item,
#cw-landing-wrapper a.dropdown-item:visited {
  color: #2a2a2a
}

#cw-landing-wrapper .dropdown-item:hover,
#cw-landing-wrapper .dropdown-item.is-active {
  background: #fff0ee;
  color: #db1709
}

#cw-landing-wrapper .dropdown-item:hover svg,
#cw-landing-wrapper .dropdown-item.is-active svg {
  stroke: #db1709
}

/* ─── Catálogo de Cursos (último ítem de "Programas") ─── */
#cw-landing-wrapper .dropdown-divider {
  height: 1px;
  background: #f0ede8;
  margin: 8px 6px
}

#cw-landing-wrapper a.dropdown-item--catalogo,
#cw-landing-wrapper a.dropdown-item--catalogo:visited {
  justify-content: flex-start;
  gap: 10px;
  color: #db1709;
  font-weight: 600
}

#cw-landing-wrapper .dropdown-item--catalogo svg { stroke: #db1709 }

/* ─── Subdropdown ─── */
#cw-landing-wrapper .has-subdropdown {
  position: relative
}

#cw-landing-wrapper .has-subdropdown::after {
  content: '';
  position: absolute;
  top: 0;
  right: -12px;
  width: 12px;
  height: 100%;
  background: transparent
}

#cw-landing-wrapper .nav-subdropdown {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: absolute;
  left: calc(100% + 8px);
  top: -10px;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e8e5e2;
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .18);
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s
}

#cw-landing-wrapper .has-subdropdown:hover .nav-subdropdown,
#cw-landing-wrapper .has-subdropdown.sub-open .nav-subdropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(0)
}

#cw-landing-wrapper .nav-subdropdown::before {
  content: '';
  position: absolute;
  top: 0;
  left: -12px;
  width: 12px;
  height: 100%;
  background: transparent
}

/* ─── CTA Button ─── */
#cw-landing-wrapper .header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #db1709;
  border-radius: 100px;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 14.4px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 14px -2px rgba(219, 23, 9, .35);
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease
}

#cw-landing-wrapper .header-cta:hover {
  background: #c4160a;
  box-shadow: 0 6px 20px -2px rgba(219, 23, 9, .5);
  transform: translateY(-1px)
}

#cw-landing-wrapper .header-cta:active {
  transform: translateY(0)
}

/* ─── Acceso Button ─── */
#cw-landing-wrapper .header-access {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: #1a1a1a;
  color: #fff;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 8px;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease
}

#cw-landing-wrapper .header-access:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2)
}

#cw-landing-wrapper .header-access:active {
  transform: translateY(0)
}

@media (max-width: 900px) {
  #cw-landing-wrapper .header-access {
    margin-left: auto;
    background: transparent;
    color: #db1709;
    border: 1.5px solid #db1709;
    padding: 6px 12px;
    font-size: 12px;
    box-shadow: none
  }

  #cw-landing-wrapper .header-access:hover {
    background: #db1709;
    color: #fff;
    transform: none;
    box-shadow: none
  }

  #cw-landing-wrapper .header-access__label {
    display: inline
  }
}

/* ─── Hamburger ─── */
#cw-landing-wrapper .header-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background .15s ease;
  margin-left: 8px
}

#cw-landing-wrapper .header-hamburger:hover {
  background: #f5f5f5
}

#cw-landing-wrapper .header-hamburger span {
  display: block;
  width: 22px;
  height: 3px;
  background: #1a1a1a;
  border-radius: 2px;
  transition: transform .28s cubic-bezier(.4, 0, .2, 1), opacity .2s ease
}

#cw-landing-wrapper .header-hamburger.is-open span:nth-child(1) {
  transform: translateY(9px) rotate(45deg)
}

#cw-landing-wrapper .header-hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0)
}

#cw-landing-wrapper .header-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg)
}

/* ─── Mobile Nav ─── */
@media (max-width: 900px) {
  #cw-landing-wrapper .header-inner {
    height: 58px
  }

  /* Dropdown panel below the header */
  #cw-landing-wrapper .header-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 250;
    background: #fff;
    border-top: 1px solid #ece9e5;
    box-shadow: 0 16px 40px -8px rgba(0,0,0,.13);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex: none;
    gap: 0;
    padding: 8px 20px 16px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transition: max-height .35s cubic-bezier(.4,0,.2,1), opacity .25s ease, visibility .25s
  }

  #cw-landing-wrapper .header-nav.is-open {
    max-height: 640px;
    opacity: 1;
    visibility: visible
  }

  /* Top-level items */
  #cw-landing-wrapper .nav-item {
    width: 100%;
    border-bottom: 1px solid #f0efee
  }

  #cw-landing-wrapper .nav-item:last-child {
    border-bottom: none
  }

  #cw-landing-wrapper .nav-link,
  #cw-landing-wrapper .nav-link--simple {
    width: 100%;
    justify-content: space-between;
    border-radius: 0;
    padding: 15px 2px;
    font-size: 17px;
    font-weight: 600;
    background: transparent !important;
    color: #1a1a1a !important;
    letter-spacing: -.01em
  }

  #cw-landing-wrapper .nav-link:hover,
  #cw-landing-wrapper .nav-link--simple:hover,
  #cw-landing-wrapper .nav-item.is-open>.nav-link {
    color: #db1709 !important;
    background: transparent !important
  }

  #cw-landing-wrapper .nav-item.is-open>.nav-link .nav-chevron {
    stroke: #db1709
  }

  /* Submenu dropdown */
  #cw-landing-wrapper .nav-dropdown {
    position: static !important;
    transform: none !important;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: max-height .32s cubic-bezier(.4, 0, .2, 1), opacity .25s ease, visibility .25s
  }

  #cw-landing-wrapper .nav-item.is-open>.nav-dropdown {
    max-height: 600px;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    padding: 4px 0 12px
  }

  #cw-landing-wrapper .nav-dropdown::before {
    display: none
  }

  #cw-landing-wrapper .nav-dropdown .dropdown-item {
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 11px 12px !important;
    border-radius: 10px;
    color: #3a3a3a !important;
    background: transparent !important;
    white-space: normal;
    border-left: 2px solid transparent;
    margin-bottom: 2px
  }

  #cw-landing-wrapper .nav-dropdown .dropdown-item:hover {
    background: #fff5f4 !important;
    color: #db1709 !important;
    border-left-color: #db1709
  }

  #cw-landing-wrapper .nav-dropdown a.dropdown-item--catalogo {
    color: #db1709 !important
  }

  #cw-landing-wrapper .has-subdropdown::after {
    display: none
  }

  #cw-landing-wrapper .dropdown-item.has-subdropdown {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0;
    font-size: 14px !important;
    padding: 11px 12px !important
  }

  #cw-landing-wrapper .dropdown-item.has-subdropdown>span {
    flex: 1;
    font-size: 14px !important
  }

  #cw-landing-wrapper .dropdown-item.has-subdropdown>svg {
    flex-shrink: 0;
    transition: transform .22s ease
  }

  #cw-landing-wrapper .dropdown-item.has-subdropdown.sub-open>svg {
    transform: rotate(90deg)
  }

  #cw-landing-wrapper .nav-subdropdown {
    position: static !important;
    transform: none !important;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
    margin-top: 0;
    flex: 0 0 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: max-height .28s ease, opacity .22s ease, visibility .22s
  }

  #cw-landing-wrapper .has-subdropdown.sub-open .nav-subdropdown {
    max-height: 300px;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    margin-top: 4px;
    padding-bottom: 4px
  }

  #cw-landing-wrapper .nav-subdropdown .dropdown-item {
    font-size: 13px !important;
    font-weight: 400 !important;
    padding: 9px 12px 9px 24px !important;
    color: #6b6867 !important;
    background: transparent !important;
    border-radius: 6px;
    white-space: normal;
    border-left: none
  }

  #cw-landing-wrapper .nav-subdropdown .dropdown-item:hover {
    background: #fff5f4 !important;
    color: #db1709 !important
  }

  #cw-landing-wrapper .nav-subdropdown::before {
    display: none
  }

  #cw-landing-wrapper .header-hamburger {
    display: flex
  }

  #cw-landing-wrapper .header-cta {
    padding: 8px 16px;
    font-size: 13.5px
  }
}

@media (max-width: 520px) {
  #cw-landing-wrapper .header-logo__sub {
    display: none
  }
}


/* ===================================================================
   FOOTER
=================================================================== */

#cw-landing-wrapper .footer {
  background: #0d0d0d;
  color: rgba(255, 255, 255, .6)
}

/* ─── TOP: Brand + Nav cols ─── */
#cw-landing-wrapper .footer__top {
  padding: 64px 0 56px
}

#cw-landing-wrapper .footer__top-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 570px 1fr 1fr;
  gap: 48px
}

#cw-landing-wrapper .footer__logo-wrap {
  margin-bottom: 16px
}

#cw-landing-wrapper .footer__logo-img {
  max-height: 40px;
  width: auto
}

#cw-landing-wrapper .footer__brand-desc {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, .5);
  max-width: 240px
}

#cw-landing-wrapper .footer__col-title {
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: .01em
}

#cw-landing-wrapper .footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px
}

#cw-landing-wrapper .footer__col a {
  color: rgba(255, 255, 255, .5);
  text-decoration: none;
  font-size: 13px;
  transition: color .15s
}

#cw-landing-wrapper .footer__col a:hover {
  color: #fff
}

/* ─── MID: Social + Horario ─── */
#cw-landing-wrapper .footer__mid {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 48px 0
}

#cw-landing-wrapper .footer__mid-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px
}

#cw-landing-wrapper .footer__section-title {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 24px
}

#cw-landing-wrapper .footer__social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 12px
}

#cw-landing-wrapper .footer__social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .55);
  text-decoration: none;
  font-size: 13px;
  transition: color .15s
}

#cw-landing-wrapper .footer__social-link svg {
  flex-shrink: 0;
  opacity: .7
}

#cw-landing-wrapper .footer__social-link:hover {
  color: #fff
}

#cw-landing-wrapper .footer__social-link:hover svg {
  opacity: 1
}

#cw-landing-wrapper .footer__schedule-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin-bottom: 20px
}

#cw-landing-wrapper .footer__schedule-item {
  display: flex;
  flex-direction: column;
  gap: 4px
}

#cw-landing-wrapper .footer__schedule-day {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 600
}

#cw-landing-wrapper .footer__schedule-hours {
  font-size: 13px;
  color: rgba(255, 255, 255, .5);
  padding-left: 19px
}

#cw-landing-wrapper .footer__address {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 13px;
  color: rgba(255, 255, 255, .55);
  line-height: 1.5
}

#cw-landing-wrapper .footer__address svg {
  flex-shrink: 0;
  margin-top: 1px
}

/* ─── BOTTOM BAR ─── */
#cw-landing-wrapper .footer__bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 24px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px
}

#cw-landing-wrapper .footer__bottom span {
  font-size: 12px;
  color: rgba(255, 255, 255, .35)
}

#cw-landing-wrapper .footer__bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px
}

#cw-landing-wrapper .footer__bottom-links a {
  font-size: 12px;
  color: rgba(255, 255, 255, .35);
  text-decoration: none;
  transition: color .15s;
  font-weight: 600
}

#cw-landing-wrapper .footer__bottom-links a:hover {
  color: rgba(255, 255, 255, .7)
}

/* FOOTER RESPONSIVE */
@media(max-width:960px) {
  #cw-landing-wrapper .footer__top-grid {
    grid-template-columns: 1fr 1fr
  }

  #cw-landing-wrapper .footer__brand {
    grid-column: 1/-1
  }

  #cw-landing-wrapper .footer__mid-grid {
    grid-template-columns: 1fr
  }

  #cw-landing-wrapper .footer__schedule-cols {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:600px) {
  #cw-landing-wrapper .footer__top-grid {
    grid-template-columns: 1fr
  }

  #cw-landing-wrapper .footer__mid-grid {
    grid-template-columns: 1fr
  }

  #cw-landing-wrapper .footer__social-grid {
    grid-template-columns: 1fr 1fr
  }

  #cw-landing-wrapper .footer__schedule-cols {
    grid-template-columns: 1fr
  }

  #cw-landing-wrapper .footer__top {
    padding: 48px 0 40px
  }

  #cw-landing-wrapper .footer__mid {
    padding: 36px 0
  }

  #cw-landing-wrapper .footer__bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center
  }
}
