
/* ---------- Franja superior de contacto ---------- */
.ash-topbar{
  background:#e8f4e9;
  color:#123e2b;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
}

.ash-topbar *{
  box-sizing:border-box;
}

.ash-topbar .ash-topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  width:min(1200px,calc(100% - 48px));
  min-height:40px;
  margin-inline:auto;
  padding:7px 25px;
}

.ash-topbar .ash-contact-items{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px 25px;
  min-width:0;
}

.ash-topbar .ash-contact-item{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  margin:0;
  color:inherit;
  font-size:.76rem;
  font-weight:550;
  line-height:1.6;
}

.ash-topbar a.ash-contact-item{
  text-decoration:underline;
  text-underline-offset:3px;
}

.ash-topbar a:focus-visible{
  outline:3px solid #287536;
  outline-offset:4px;
}

.ash-topbar .ash-contact-item svg{
  width:16px;
  height:16px;
  flex:none;
}

@media(max-width:900px){
  .ash-topbar .ash-topbar-inner{
    width:calc(100% - 24px);
    padding:8px 15px;
    gap:12px;
  }

  .ash-topbar .ash-contact-items{
    flex-direction:column;
    align-items:flex-start;
    gap:5px;
  }

  .ash-topbar .ash-contact-item{
    font-size:.72rem;
  }
}

/* ---------- Header ---------- */
.as-header{
  --ash-ink:#123e2b;
  --ash-green:#287536;
  --ash-mint:#e8f4e9;
  position:sticky;
  top:0;
  z-index:100;
  isolation:isolate;
  padding:8px 0;
  background:var(--ash-mint);
  color:var(--ash-ink);
  font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
}

.as-header *,
.as-header *::before,
.as-header *::after{
  box-sizing:border-box;
}

.as-header .ash-inner{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:25px;
  width:min(1200px,calc(100% - 48px));
  min-height:86px;
  margin-inline:auto;
  padding:8px 25px;
  border:1px solid #e4ece0;
  border-radius:6px;
  background:#fff;
  box-shadow:0 5px 18px #123e2b04;
}

.as-header a{
  color:inherit;
  text-decoration:none;
}

.as-header a:focus-visible,
.as-header button:focus-visible{
  outline:3px solid var(--ash-green);
  outline-offset:4px;
}

.as-header .ash-brand{
  display:flex;
  align-items:center;
  flex:none;
}

.as-header .ash-logo{
  display:block;
  width:180px;
  max-width:100%;
  height:auto;
}

.as-header .ash-nav{
  display:flex;
  align-items:center;
  gap:25px;
}

.as-header .ash-links{
  display:flex;
  align-items:center;
  gap:19px;
  margin:0;
  padding:0;
  list-style:none;
}

.as-header .ash-links a{
  position:relative;
  display:flex;
  align-items:center;
  min-height:46px;
  padding:10px 0;
  color:var(--ash-ink);
  font-size:.87rem;
  font-weight:650;
  line-height:1.4;
  white-space:nowrap;
  transition:color 150ms ease;
}

.as-header .ash-links a::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:2px;
  height:2px;
  background:var(--ash-green);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform 150ms ease;
}

.as-header .ash-links a:hover,
.as-header .ash-links a[aria-current="page"]{
  color:var(--ash-green);
}

.as-header .ash-links a:hover::after,
.as-header .ash-links a[aria-current="page"]::after{
  transform:scaleX(1);
}

.as-header .ash-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  flex:none;
  min-height:49px;
  padding:13px 21px;
  border:1px solid var(--ash-green);
  border-radius:7px;
  background:var(--ash-green);
  color:#fff;
  font-size:.87rem;
  font-weight:700;
  line-height:1.4;
  white-space:nowrap;
  transition:background-color 150ms ease,transform 150ms ease;
}

.as-header .ash-cta:hover{
  background:#205f2c;
  transform:translateY(-1px);
}

.as-header .ash-cta-icon{
  font-size:1rem;
  line-height:1;
}

.as-header .ash-toggle{
  display:none;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:44px;
  padding:10px 13px;
  border:1px solid #c2d6bb;
  border-radius:5px;
  background:var(--ash-mint);
  color:var(--ash-ink);
  font:inherit;
  font-size:.83rem;
  font-weight:650;
  cursor:pointer;
}

.as-header .ash-toggle-icon{
  position:relative;
  display:block;
  width:18px;
  height:15px;
}

.as-header .ash-toggle-icon::before,
.as-header .ash-toggle-icon::after{
  content:"";
  position:absolute;
  left:0;
  width:18px;
  height:2px;
  border-radius:2px;
  background:currentColor;
  transition:transform 150ms ease;
}

.as-header .ash-toggle-icon::before{
  top:3px;
}

.as-header .ash-toggle-icon::after{
  top:10px;
}

.as-header[data-menu-open] .ash-toggle-icon::before{
  transform:translateY(3.5px) rotate(45deg);
}

.as-header[data-menu-open] .ash-toggle-icon::after{
  transform:translateY(-3.5px) rotate(-45deg);
}

@media(min-width:901px) and (max-width:1100px){
  .as-header .ash-inner{
    width:calc(100% - 32px);
    padding-inline:18px;
    gap:18px;
  }

  .as-header .ash-logo{
    width:160px;
  }

  .as-header .ash-nav{
    gap:17px;
  }

  .as-header .ash-links{
    gap:13px;
  }

  .as-header .ash-links a{
    font-size:.8rem;
  }

  .as-header .ash-cta{
    padding-inline:15px;
    font-size:.81rem;
  }
}

@media(max-width:900px){
  .as-header{
    padding:6px 0;
  }

  .as-header .ash-inner{
    width:calc(100% - 24px);
    min-height:74px;
    padding:6px 15px;
    flex-wrap:wrap;
    gap:0 12px;
  }

  .as-header .ash-logo{
    width:160px;
  }

  .as-header .ash-nav{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    width:100%;
    gap:17px;
    padding:15px 0;
  }

  .as-header .ash-links{
    flex-direction:column;
    align-items:stretch;
    gap:0;
  }

  .as-header .ash-links a{
    min-height:47px;
    padding:12px 4px;
    border-bottom:1px solid #e4ecdf;
    font-size:.94rem;
    white-space:normal;
  }

  .as-header .ash-links a::after{
    display:none;
  }

  .as-header .ash-links a[aria-current="page"]{
    padding-left:13px;
    border-left:3px solid var(--ash-green);
    background:var(--ash-mint);
  }

  .as-header .ash-cta{
    width:100%;
  }

  .as-header[data-enhanced] .ash-toggle{
    display:inline-flex;
  }

  .as-header[data-enhanced]:not([data-menu-open]) .ash-nav{
    display:none;
  }

  .as-header[data-enhanced][data-menu-open] .ash-nav{
    position:absolute;
    top:calc(100% + 7px);
    right:0;
    left:0;
    width:auto;
    max-height:calc(100svh - 108px);
    overflow-y:auto;
    overscroll-behavior:contain;
    padding:15px 20px 20px;
    border:1px solid #d7e4d0;
    border-radius:6px;
    background:#fff;
    box-shadow:0 12px 28px #123e2b12;
    animation:ash-menu-reveal 150ms ease-out;
  }
}

@media(max-width:360px){
  .as-header .ash-logo{
    width:140px;
  }

  .as-header .ash-inner{
    padding-inline:12px;
  }

  .as-header .ash-toggle{
    padding-inline:10px;
  }
}

@keyframes ash-menu-reveal{
  from{opacity:.8;transform:translateY(-3px)}
  to{opacity:1;transform:translateY(0)}
}

html{
  scroll-behavior:smooth;
  scroll-padding-top:105px;
}

@media(max-width:900px){
  html{
    scroll-padding-top:90px;
  }
}

@keyframes as-reveal-content{
  from{opacity:.65;transform:translateY(-3px)}
  to{opacity:1;transform:translateY(0)}
}

details[open] > :not(summary){
  animation:as-reveal-content 160ms ease-out;
}

select{
  transition:border-color 140ms ease,background-color 140ms ease;
}

@media(prefers-reduced-motion:reduce){
  html{
    scroll-behavior:auto;
  }

  .as-header .ash-links a,
  .as-header .ash-links a::after,
  .as-header .ash-cta,
  .as-header .ash-toggle-icon::before,
  .as-header .ash-toggle-icon::after,
  select{
    transition:none;
  }

  .as-header[data-enhanced][data-menu-open] .ash-nav,
  details[open] > :not(summary){
    animation:none;
  }
}

/* ---------- Desplegable de Cursos ---------- */
.as-header .ash-courses{
  position:relative;
}

.as-header .ash-courses > summary{
  position:relative;
  display:flex;
  align-items:center;
  gap:9px;
  min-height:46px;
  padding:10px 0;
  color:var(--ash-ink);
  font-size:.87rem;
  font-weight:650;
  line-height:1.4;
  list-style:none;
  cursor:pointer;
  transition:color 150ms ease;
}

.as-header .ash-courses > summary::-webkit-details-marker{
  display:none;
}

.as-header .ash-courses > summary::marker{
  content:"";
}

/* Subrayado coherente con el resto de enlaces del menú */
.as-header .ash-courses > summary::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:2px;
  height:2px;
  background:var(--ash-green);
  transform:scaleX(0);
  transform-origin:left;
  transition:transform 150ms ease;
}

.as-header .ash-courses > summary:focus-visible{
  outline:3px solid var(--ash-green);
  outline-offset:4px;
}

.as-header .ash-courses > summary:hover,
.as-header .ash-courses[open] > summary,
.as-header .ash-courses[data-current] > summary{
  color:var(--ash-green);
}

.as-header .ash-courses > summary:hover::after,
.as-header .ash-courses[open] > summary::after,
.as-header .ash-courses[data-current] > summary::after{
  transform:scaleX(1);
}

.as-header .ash-courses-arrow{
  width:7px;
  height:7px;
  margin-top:-3px;
  border-right:1.5px solid currentColor;
  border-bottom:1.5px solid currentColor;
  transform:rotate(45deg);
  transition:transform 150ms ease;
}

.as-header .ash-courses[open] .ash-courses-arrow{
  margin-top:3px;
  transform:rotate(225deg);
}

.as-header .ash-submenu{
  position:absolute;
  top:100%;
  left:0;
  z-index:2;
  width:350px;
  max-width:calc(100vw - 48px);
  max-height:calc(100svh - 160px);
  overflow-y:auto;
  margin:0;
  padding:8px;
  border:1px solid #d7e4d0;
  border-radius:8px 24px 8px 8px;
  background:#fff;
  box-shadow:0 12px 28px #123e2b12;
  list-style:none;
}

.as-header .ash-submenu a{
  min-height:44px;
  padding:10px 12px;
  border-radius:4px;
  font-size:.82rem;
  font-weight:550;
  white-space:normal;
}

.as-header .ash-submenu a::after{
  display:none;
}

.as-header .ash-submenu a:hover,
.as-header .ash-submenu a[aria-current]{
  background:var(--ash-mint);
  color:var(--ash-green);
}

.as-header .ash-submenu > li:first-child a{
  margin-bottom:5px;
  border-bottom:1px solid #e4ecdf;
  border-radius:0;
  font-weight:750;
}

@media(min-width:901px) and (max-width:1100px){
  .as-header .ash-links{
    gap:10px;
  }

  .as-header .ash-links > li > a,
  .as-header .ash-courses > summary{
    font-size:.76rem;
  }

  .as-header .ash-nav{
    gap:12px;
  }

  .as-header .ash-logo{
    width:145px;
  }
}

@media(max-width:900px){
  .as-header .ash-courses > summary{
    justify-content:space-between;
    min-height:47px;
    padding:12px 4px;
    border-bottom:1px solid #e4ecdf;
    font-size:.94rem;
  }

  .as-header .ash-courses > summary::after{
    display:none;
  }

  .as-header .ash-submenu{
    position:static;
    width:100%;
    max-width:none;
    max-height:none;
    overflow:visible;
    margin:7px 0 12px;
    padding:5px;
    border-radius:6px;
    background:#f6f9f3;
    box-shadow:none;
  }

  .as-header .ash-submenu a{
    padding:10px;
    font-size:.85rem;
  }

  .as-header .ash-submenu a[aria-current]{
    padding-left:10px;
    border-left:0;
  }
}

@media(prefers-reduced-motion:reduce){
  .as-header .ash-courses > summary,
  .as-header .ash-courses > summary::after,
  .as-header .ash-courses-arrow{
    transition:none;
  }
}

/* ---------- Desplegable de Preguntas frecuentes ---------- */
@media(min-width:901px){
  .as-header .ash-faq-menu .ash-submenu{
    right:0;
    left:auto;
  }
}

@media(max-width:900px){
  .ash-topbar .ash-topbar-inner{
    justify-content:center;
  }

  .ash-topbar .ash-contact-items{
    width:100%;
    align-items:center;
  }

  .ash-topbar .ash-contact-item{
    justify-content:center;
    text-align:center;
  }

  .as-header .ash-nav{
    text-align:center;
  }

  .as-header .ash-links a,
  .as-header .ash-courses > summary{
    justify-content:center;
    text-align:center;
  }

  .as-header .ash-links a[aria-current="page"]{
    padding-inline:10px;
    border-left:0;
  }
}
