/* =========================================================
   MAIN.CSS — HEADER GLOBAL RESPONSIVE
   SK WELLNESS CENTER — v20260316-2 PREMIUM
   ========================================================= */

:root{
  --header-max: 1320px;
  --header-h: 82px;
  --header-height: 82px;

  --bg-header: rgba(247,243,238,.84);
  --bg-header-solid: rgba(247,243,238,.96);

  --gold: #b58a3a;
  --gold-dark: #7a5118;

  --ink: #1b1713;
  --ink-soft: #3f332b;
}

html,
body{
  overflow-x: hidden;
}

*,
*::before,
*::after{
  box-sizing: border-box;
}

/* ── HEADER ─────────────────────────────────────────── */
.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(181,138,58,.10);
  box-shadow: 0 8px 24px rgba(31,24,19,.04);
  transition:
    background-color .25s ease,
    box-shadow .25s ease,
    border-color .25s ease;
  overflow: visible;
}

.site-header.scrolled,
.site-header.is-open{
  background: var(--bg-header-solid);
  box-shadow: 0 10px 30px rgba(20,20,20,.06);
  border-bottom-color: rgba(181,138,58,.16);
}

.site-header .container{
  width: min(var(--header-max), calc(100% - 24px));
  margin: 0 auto;
}

.header-row{
  position: relative;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── BRAND ───────────────────────────────────────────── */
.brand{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
  padding: 10px 18px 10px 8px;
  border-radius: 999px;
  text-decoration: none !important;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255,255,255,.84) 0%, rgba(248,243,235,.92) 100%);
  border: 1px solid rgba(181,138,58,.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.82),
    0 12px 26px rgba(31,24,18,.06);
  transition:
    transform .24s ease,
    box-shadow .24s ease,
    border-color .24s ease,
    background .24s ease;
}

.brand::before{
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 999px;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.24);
}

.brand::after{
  content: "";
  position: absolute;
  left: 72px;
  right: 16px;
  top: 50%;
  height: 34px;
  transform: translateY(-50%);
  border-radius: 999px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(199,154,69,.10) 0%,
    rgba(199,154,69,.04) 35%,
    rgba(255,255,255,0) 100%
  );
}

.brand:hover{
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(255,255,255,.94) 0%, rgba(250,245,238,.98) 100%);
  border-color: rgba(181,138,58,.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.88),
    0 16px 32px rgba(31,24,18,.08);
}

.brand:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 4px rgba(181,138,58,.14),
    0 16px 32px rgba(31,24,18,.08);
}

.brand-badge{
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  min-width: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 24%, rgba(255,255,255,.46) 0%, rgba(255,255,255,0) 30%),
    linear-gradient(145deg, #edd9a7 0%, #c79a45 36%, #a8752a 64%, #7b551d 100%);
  border: 1px solid rgba(123,85,29,.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.42),
    inset 0 -1px 0 rgba(77,49,13,.14),
    0 10px 22px rgba(181,138,58,.22);
  color: #fffefb;
  font-family: "Fraunces", "Playfair Display", serif;
  font-size: .98rem;
  font-weight: 700;
  letter-spacing: .10em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 1px 1px rgba(70,45,12,.22);
}

.brand-badge::before{
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  pointer-events: none;
}

.brand-badge::after{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0) 38%);
}

.brand-text{
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 1;
}

.brand-title{
  position: relative;
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Fraunces", "Playfair Display", serif;
  font-size: clamp(1.04rem, 1vw + .8rem, 1.42rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: #1b1612;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

.brand-title::after{
  content: "";
  display: block;
  width: 54px;
  max-width: 100%;
  height: 1px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(181,138,58,.82), rgba(181,138,58,0));
}

.brand:hover .brand-title{
  color: #2a2017;
}

/* ── NAV DESKTOP ─────────────────────────────────────── */
.main-nav{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-left: auto;
  min-width: 0;
  flex: 1 1 auto;
}

.nav-link{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
  font-family: "Manrope", "Inter", sans-serif;
  font-size: .96rem;
  font-weight: 700;
  letter-spacing: -.01em;
  transition: color .25s ease, background .25s ease, box-shadow .25s ease;
}

.nav-link::after{
  display: none;
}

.nav-link:hover,
.nav-link:focus-visible{
  color: #17120f;
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 0 0 1px rgba(181,138,58,.14);
  outline: none;
}

.nav-link.is-active,
.nav-link[aria-current="page"]{
  color: #7a531a;
  background: linear-gradient(180deg, rgba(245,227,190,.90) 0%, rgba(236,213,160,.92) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.60),
    0 8px 18px rgba(181,138,58,.14);
}

/* ── HEADER ACTIONS ──────────────────────────────────── */
.header-actions{
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

/* ── BOTONES PREMIUM HEADER / NAV ───────────────────── */
.btn-header,
.btn-aula-nav,
.btn-aula-header,
.btn-fechas-nav{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1;
  color: #fffaf3;
  background: linear-gradient(145deg, #ddb86a 0%, #b9822f 48%, #7a5118 100%);
  border: 1px solid rgba(122,81,24,.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.26),
    inset 0 -1px 0 rgba(90,55,14,.14),
    0 10px 22px rgba(122,81,24,.20);
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform .22s ease,
    box-shadow .22s ease,
    filter .22s ease,
    border-color .22s ease,
    background .22s ease;
}

.btn-header::after,
.btn-aula-nav::after,
.btn-aula-header::after,
.btn-fechas-nav::after{
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255,255,255,.16) 0%,
    rgba(255,255,255,.05) 30%,
    rgba(255,255,255,0) 65%
  );
  z-index: -1;
}

.btn-header:hover,
.btn-aula-nav:hover,
.btn-aula-header:hover,
.btn-fechas-nav:hover,
.btn-header:focus-visible,
.btn-aula-nav:focus-visible,
.btn-aula-header:focus-visible,
.btn-fechas-nav:focus-visible{
  transform: translateY(-1px);
  filter: brightness(1.04) saturate(1.03);
  border-color: rgba(122,81,24,.38);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    inset 0 -1px 0 rgba(90,55,14,.16),
    0 16px 30px rgba(122,81,24,.26);
  outline: none;
}

.btn-header:active,
.btn-aula-nav:active,
.btn-aula-header:active,
.btn-fechas-nav:active{
  transform: translateY(0);
}

.btn-aula-nav::before,
.btn-aula-header::before{
  content: "🎓";
  font-size: 14px;
  line-height: 1;
}

.btn-fechas-nav::before,
.btn-header::before{
  content: "📲";
  font-size: 14px;
  line-height: 1;
}

/* Desktop: ocultar botones del menú móvil */
.btn-aula-nav,
.btn-fechas-nav{
  display: none;
}

/* ── BOTÓN ADMINISTRAR FECHAS ─────────────────────────── */
.btn-admin-calendar{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: #5a3e22;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(181,138,58,.22);
  box-shadow: 0 6px 14px rgba(31,24,19,.05);
  transition:
    transform .22s ease,
    background .22s ease,
    border-color .22s ease,
    box-shadow .22s ease;
  white-space: nowrap;
}

.btn-admin-calendar::before{
  content: "📅";
  font-size: 13px;
  line-height: 1;
}

.btn-admin-calendar:hover{
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(181,138,58,.36);
  box-shadow: 0 10px 20px rgba(31,24,19,.09);
}

.btn-admin-calendar:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(181,138,58,.16);
}

/* ── TOGGLE ──────────────────────────────────────────── */
.nav-toggle{
  width: 46px;
  height: 46px;
  min-width: 46px;
  border: 1px solid rgba(181,138,58,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(31,24,19,.05);
  transition: transform .2s ease, background .25s ease, border-color .25s ease;
}

.nav-toggle:hover{
  transform: translateY(-1px);
  background: #fff;
  border-color: rgba(181,138,58,.28);
}

.nav-toggle:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(181,138,58,.14);
}

.nav-toggle span{
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #7a5118;
  transition: transform .22s ease, opacity .22s ease;
}

.nav-toggle.is-open span:nth-child(1){
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2){
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3){
  transform: translateY(-7px) rotate(-45deg);
}

/* ── DESKTOP / TABLET ────────────────────────────────── */
@media (max-width: 1100px){
  .site-header .container{
    width: min(100%, calc(100% - 24px));
  }

  .header-row{
    gap: 12px;
  }

  .main-nav{
    gap: 6px;
  }

  .nav-link{
    padding: 0 12px;
    font-size: .92rem;
  }

  .btn-header,
  .btn-aula-header{
    min-height: 42px;
    padding: 0 14px;
    font-size: .90rem;
  }
}

@media (max-width: 980px){
  .brand{
    padding: 8px 14px 8px 6px;
  }

  .brand::after{
    left: 66px;
    right: 12px;
    height: 30px;
  }

  .brand-badge{
    width: 46px;
    height: 46px;
    min-width: 46px;
    font-size: .88rem;
  }

  .brand-title{
    font-size: 1.12rem;
  }

  .header-actions .btn-header,
  .header-actions .btn-aula-header{
    padding: 0 12px;
  }
}

/* ── MOBILE MENU ─────────────────────────────────────── */
@media (max-width: 900px){
  :root{
    --header-h: 74px;
    --header-height: 74px;
  }

  .site-header .container{
    width: min(100%, calc(100% - 20px));
  }

  .header-row{
    min-height: var(--header-h);
    gap: 10px;
  }

  .brand{
    max-width: calc(100% - 56px);
  }

  .nav-toggle{
    display: inline-flex;
    margin-left: auto;
    position: relative;
    z-index: 1301;
    flex: 0 0 auto;
  }

  .header-actions{
    display: none;
  }

  .main-nav{
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
    justify-content: stretch;
    background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(246,240,232,.99) 100%);
    border: 1px solid rgba(181,138,58,.18);
    border-radius: 22px;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.84),
      0 24px 50px rgba(15,23,42,.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(.98);
    transform-origin: top center;
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
    z-index: 1200;
  }

  #menuBtn[aria-expanded="true"] + #mainNav{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .main-nav .nav-link{
    width: 100%;
    min-height: 50px;
    justify-content: flex-start;
    padding: 0 16px;
    border-radius: 16px;
    white-space: normal;
    text-align: left;
  }

  .main-nav .nav-link.is-active,
  .main-nav .nav-link[aria-current="page"]{
    background: linear-gradient(135deg, rgba(181,138,58,.24), rgba(181,138,58,.12));
    color: #7a571f;
    box-shadow: inset 0 0 0 1px rgba(181,138,58,.10);
  }

  .btn-aula-nav,
  .btn-fechas-nav,
  .btn-admin-calendar{
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border-radius: 16px;
    justify-content: flex-start;
    font-size: .94rem;
  }

  .btn-aula-nav,
  .btn-fechas-nav{
    display: inline-flex;
  }

  .btn-admin-calendar{
    color: #6b4c2a;
    background: rgba(245,235,215,.55);
    border-color: rgba(181,138,58,.20);
  }

  body.menu-open{
    overflow: hidden;
  }
}

/* ── SMALL MOBILE ────────────────────────────────────── */
@media (max-width: 640px){
  .brand{
    gap: 10px;
    padding: 6px 12px 6px 4px;
    max-width: calc(100% - 54px);
  }

  .brand::after{
    left: 58px;
    right: 10px;
    height: 24px;
  }

  .brand-badge{
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: .78rem;
    letter-spacing: .07em;
  }

  .brand-title{
    font-size: 1rem;
  }

  .brand-title::after{
    width: 30px;
    margin-top: 5px;
  }

  .nav-toggle{
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
  }

  .main-nav{
    padding: 10px;
    border-radius: 18px;
  }

  .main-nav .nav-link{
    min-height: 48px;
    padding: 0 14px;
    font-size: .94rem;
  }

  .btn-aula-nav,
  .btn-fechas-nav,
  .btn-admin-calendar{
    min-height: 48px;
    font-size: .92rem;
  }
}

@media (max-width: 420px){
  .header-row{
    gap: 8px;
  }

  .brand{
    padding-right: 10px;
  }

  .brand-title{
    font-size: .92rem;
  }

  .brand-title::after{
    width: 22px;
  }
}

@media (max-width: 360px){
  .brand{
    gap: 8px;
    padding: 5px 9px 5px 3px;
  }

  .brand-badge{
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: .72rem;
  }

  .brand-title{
    font-size: .84rem;
  }

  .nav-toggle{
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .main-nav .nav-link{
    font-size: .9rem;
  }
}

/* =========================================================
   BOTÓN AULA — variante standalone (.btn-aula)
   ========================================================= */
.btn-aula{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .01em;
  color: #fffaf3;
  border: 1px solid rgba(122,81,24,.20);
  background: linear-gradient(
    145deg,
    var(--sk-gold-2, #d0a553) 0%,
    var(--sk-gold-3, #ab7426) 58%,
    var(--sk-gold-4, #7a5118) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 16px 32px rgba(122,81,24,.22);
  transition:
    transform .22s ease,
    box-shadow .22s ease,
    filter .22s ease,
    border-color .22s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-aula::before{
  content: "🎓";
  font-size: 16px;
  line-height: 1;
}

.btn-aula:hover{
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 22px 36px rgba(122,81,24,.28);
  filter: brightness(1.02);
}

.btn-aula:active{
  transform: translateY(0);
}

.btn-aula:focus-visible{
  outline: none;
  box-shadow:
    0 0 0 4px rgba(184,155,94,.18),
    inset 0 1px 0 rgba(255,255,255,.18),
    0 22px 36px rgba(122,81,24,.28);
}

.btn-aula--ghost{
  color: #221b16;
  border: 1px solid rgba(181,138,58,.18);
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 22px rgba(31,24,19,.05);
}

.btn-aula--ghost:hover{
  background: rgba(255,255,255,.96);
  border-color: rgba(181,138,58,.28);
  box-shadow: 0 14px 28px rgba(31,24,19,.08);
}

@media (max-width: 640px){
  .btn-aula{
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    font-size: 14px;
  }
}