/* Keeps the signed-in landing header aligned and makes repeated mobile content swipeable. */
.site-header.has-profile {
  box-sizing: border-box;
  grid-template-columns: max-content minmax(0, 1fr) auto minmax(145px, 190px) auto auto;
  grid-template-areas: "brand nav contact identity logout admin";
  align-items: center;
  gap: 10px;
  padding-block: 14px;
}

.site-header.has-profile > .brand { grid-area: brand; min-width: 0; }
.site-header.has-profile > .site-menu-button { display: none; }
.site-header.has-profile > .site-menu-button { border: 1px solid #343852; border-radius: 12px; background: #121a30; color: #e5e9fa; cursor: pointer; font-size: 20px; line-height: 1; }
.site-header.has-profile > #siteNav {
  grid-area: nav;
  min-width: 0;
  justify-content: center;
  gap: clamp(7px, .8vw, 13px);
  font-size: clamp(10px, .79vw, 12px);
}
.site-header.has-profile > #contactTop { grid-area: contact; padding: 11px 14px; font-size: 13px; }
.site-header.has-profile > .account-identity {
  grid-area: identity;
  display: flex;
  min-width: 0;
  max-width: 190px;
  align-items: center;
  gap: 8px;
  color: #f1f4ff;
}
.site-header.has-profile .account-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid #9c7add;
  border-radius: 50%;
  background: #30274b;
  color: #f3eaff;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 14px;
  font-weight: 750;
}
.site-header.has-profile .account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.site-header.has-profile .account-copy { display: grid; min-width: 0; }
.site-header.has-profile .account-copy strong,
.site-header.has-profile .account-copy small {
  display: block;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-header.has-profile .account-copy strong { font-size: 12px; line-height: 1.3; }
.site-header.has-profile .account-copy small { margin-top: 2px; color: #aab6ce; font-size: 9px; }
.site-header.has-profile > #homeLogin { grid-area: logout; padding: 11px 14px; font-size: 12px; }
.site-header.has-profile > #admin {
  grid-area: admin;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  padding: 10px 12px;
  border: 1px solid #343852;
  border-radius: 12px;
  background: #121a30;
  color: #e5e9fa;
  font-size: 12px;
  white-space: nowrap;
}
.site-header.has-profile > #admin[hidden] { display: none !important; }
.site-header.has-profile > #homeAccount { display: none; }
.site-header.has-profile .mobile-account-link { display: none; }

@media (max-width: 1320px) and (min-width: 761px) {
  .site-header.has-profile {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    grid-template-areas: "brand identity logout menu" "nav nav nav nav" "contact contact admin admin";
    gap: 10px 14px;
    padding-inline: 24px;
  }
  .site-header.has-profile > .site-menu-button {
    grid-area: menu;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
  }
  .site-header.has-profile > #siteNav { display: none; }
  .site-header.has-profile > #siteNav.is-open {
    display: grid;
    grid-area: nav;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border: 1px solid #343852;
    border-radius: 14px;
    background: #111a2d;
  }
  .site-header.has-profile > #siteNav.is-open a { padding: 9px 6px; text-align: center; }
  .site-header.has-profile .mobile-account-link { display: block; }
  .site-header.has-profile > #contactTop,
  .site-header.has-profile > #admin { display: none; }
  .site-header.has-profile:has(> #siteNav.is-open) > #contactTop { display: inline-flex; grid-area: contact; justify-self: start; width: min(100%, 220px); }
  .site-header.has-profile:has(> #siteNav.is-open) > #admin:not([hidden]) { display: inline-flex; grid-area: admin; }
  .site-header.has-profile > #homeLogin { grid-area: logout; }
}

@media (max-width: 760px) {
  .site-header.has-profile {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas: "brand brand brand brand brand brand identity identity identity identity menu menu" "nav nav nav nav nav nav nav nav nav nav nav nav";
    align-items: center;
    column-gap: 4px;
    row-gap: 9px;
    padding: 11px 16px;
  }
  .site-header.has-profile > .brand { margin: 0; }
  .site-header.has-profile > .brand > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-header.has-profile > .brand img { width: 40px; height: 40px; }
  .site-header.has-profile > .brand small { display: none; }
  .site-header.has-profile > .site-menu-button {
    grid-area: menu;
    display: grid;
    width: 100%;
    min-width: 36px;
    height: 40px;
    place-items: center;
    order: initial;
  }
  .site-header.has-profile > .account-identity {
    order: initial;
    max-width: 158px;
    gap: 6px;
  }
  .site-header.has-profile .account-avatar { width: 34px; height: 34px; flex-basis: 34px; }
  .site-header.has-profile .account-copy strong { max-width: 106px; font-size: 10px; }
  .site-header.has-profile .account-copy small { max-width: 106px; font-size: 8px; }
  .site-header.has-profile > #siteNav {
    display: none;
    grid-area: nav;
    width: 100%;
    padding: 8px;
    border: 1px solid #343852;
    border-radius: 14px;
    background: #111a2d;
  }
  .site-header.has-profile > #siteNav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  .site-header.has-profile > #siteNav a { padding: 9px 7px; font-size: 12px; text-align: center; }
  .site-header.has-profile .mobile-account-link { display: block; }
  .site-header.has-profile > #contactTop,
  .site-header.has-profile > #homeLogin,
  .site-header.has-profile > #admin { display: none; }
  .site-header.has-profile:has(> #siteNav.is-open) > #contactTop {
    display: inline-flex;
    grid-area: contact;
    justify-self: center;
    justify-content: center;
    width: min(100%, 220px);
    min-height: 40px;
  }
  .site-header.has-profile:has(> #siteNav.is-open) > #homeLogin {
    display: inline-flex;
    grid-area: logout;
    justify-content: center;
    min-height: 40px;
  }
  .site-header.has-profile:has(> #siteNav.is-open) > #admin:not([hidden]) {
    display: inline-flex;
    grid-area: admin;
    min-height: 40px;
  }
  .site-header.has-profile:has(> #siteNav.is-open) {
    grid-template-areas:
      "brand brand brand brand brand brand identity identity identity identity menu menu"
      "nav nav nav nav nav nav nav nav nav nav nav nav"
      "contact contact contact contact contact contact contact contact contact contact contact contact"
      "logout logout logout logout logout logout logout admin admin admin admin admin";
  }

  body { font-size: 15px; line-height: 1.55; }
  .wrap { padding-inline: 16px; }
  section.wrap { padding-block: 27px; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 17px;
    padding: 25px 16px 27px;
  }
  h1 { margin: 12px 0 14px; font-size: clamp(32px, 9vw, 42px); line-height: 1.04; letter-spacing: -1.7px; }
  .hero-line { white-space: normal; }
  .hero-copy > p { margin: 10px 0; font-size: 15px; line-height: 1.5; }
  .hero-actions { gap: 8px; margin: 17px 0 12px; }
  .hero-actions .primary { min-height: 42px; padding: 10px 13px; font-size: 13px; }
  .hero-actions .text-link { margin-top: 2px; font-size: 13px; }
  .hero-note { gap: 7px; font-size: 10px; }
  .hero-visual { max-width: 560px; padding: 13px; border-radius: 21px; }
  .visual-top { margin-bottom: 10px; }
  .preview-window img { aspect-ratio: 1.75; }
  .visual-caption { gap: 9px; margin: 13px 0 10px; }
  .visual-caption strong { font-size: 19px; }
  .visual-caption small { font-size: 11px; }
  .preview-bottom { margin-top: 10px; font-size: 12px; }
  .preview-note { margin: 7px 0 0; font-size: 10px; }
  .marquee-strip { padding-block: 10px; }
  .marquee-group { gap: 24px; padding-right: 24px; }
  .marquee-group span { font-size: 12px; }
  .section-title { gap: 10px; }
  .section-title > p { display: none; }
  h2 { font-size: clamp(23px, 6.5vw, 29px); line-height: 1.15; letter-spacing: -.7px; }
  .audience-title { margin-bottom: 17px; }
  .audience-title > p { margin: 7px 0 0; font-size: 14px; line-height: 1.45; }

  #catalogo .cards,
  #funciones .feature-grid,
  #instalar .install-grid,
  #como-funciona .step-grid,
  #para-vos .audience-grid,
  #planes .plan-grid {
    display: flex;
    align-items: stretch;
    gap: 11px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-width: thin;
    scrollbar-color: #7958b9 #1b2033;
    padding: 3px 2px 12px;
    margin-inline: -2px;
  }
  #catalogo .cards > article { flex: 0 0 min(88vw, 365px); scroll-snap-align: start; }
  #funciones .feature-grid > article { flex: 0 0 min(76vw, 300px); scroll-snap-align: start; }
  #instalar .install-grid > article { flex: 0 0 min(78vw, 310px); scroll-snap-align: start; }
  #como-funciona .step-grid > article { flex: 0 0 min(80vw, 320px); scroll-snap-align: start; }
  #para-vos .audience-grid > article { flex: 0 0 min(84vw, 340px); scroll-snap-align: start; }
  #planes .plan-grid > article { flex: 0 0 min(88vw, 365px); scroll-snap-align: start; }
  #catalogo .app-card { padding: 16px; border-radius: 19px; }
  #catalogo .app-card h3 { margin-block: 12px 8px; font-size: 25px; }
  #catalogo .app-card p,
  #catalogo .app-card ul { font-size: 13px; line-height: 1.5; }
  #catalogo .app-card ul { margin-block: 13px; }
  #catalogo .app-card li { margin-block: 7px; }
  #catalogo .card-actions { margin-top: 13px; padding-top: 12px; }
  #funciones .feature-grid > article { padding: 15px; }
  #funciones .feature-grid h3 { margin: 10px 0 6px; font-size: 17px; }
  #funciones .feature-grid p { font-size: 13px; line-height: 1.45; }
  #instalar .install-grid > article,
  #como-funciona .step-grid > article { padding: 16px; }
  #instalar .install-grid h3,
  #como-funciona .step-grid h3 { margin: 8px 0 5px; font-size: 18px; }
  #instalar .install-grid p,
  #como-funciona .step-grid p { font-size: 13px; line-height: 1.45; }
  #para-vos .audience-grid > article,
  #planes .plan-grid > article { padding: 17px; border-radius: 19px; }
  #para-vos .audience-grid h3,
  #planes .plan-grid h3 { margin: 11px 0 7px; font-size: 21px; }
  #para-vos .audience-grid p,
  #planes .plan-grid p { font-size: 13px; line-height: 1.5; }
  #para-vos .audience-grid ul,
  #planes .plan-grid ul { margin: 12px 0; font-size: 12px; line-height: 1.45; }
  #para-vos .audience-grid li,
  #planes .plan-grid li { gap: 7px; margin: 7px 0; }
  #planes .plan-price { margin: 2px 0 7px; font-size: 22px; }
  #planes .plan-card > a { min-height: 42px; padding: 10px 12px; font-size: 13px; }

  #empresas .company-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  #empresas .company-benefits article { padding: 12px; }
  #empresas .company-benefits h3 { font-size: 14px; }
  #empresas .company-benefits p { font-size: 12px; line-height: 1.4; }
  #empresas .company-form-card { padding: 16px; }
  #monedas .currency-copy li { margin-block: 6px; font-size: 13px; }
  #preguntas { gap: 14px; }
  #preguntas details { padding-block: 10px; }
  #preguntas summary { font-size: 14px; }
  #preguntas details p { margin: 8px 0 2px; font-size: 13px; }
  .feedback-section { gap: 12px; padding-block: 25px 30px; }
  .feedback-card { padding: 15px; }
  .feedback-section h2 { margin-block: 7px; }
  .feedback-section p { margin-block: 6px; font-size: 13px; }
  .site-footer { padding-block: 25px !important; }
  .footer-grid { gap: 18px; }
  .footer-grid h3 { margin-bottom: 8px; }
  .footer-grid a:not(.brand), .footer-report { font-size: 12px; }
  .footer-bottom { gap: 8px; font-size: 10px; }
  .support-fab { right: 12px; bottom: 12px; min-height: 42px; padding: 9px 13px; font-size: 12px; }
}

@media (max-width: 390px) {
  .site-header.has-profile { padding-inline: 12px; column-gap: 4px; }
  .site-header.has-profile > .brand { min-width: 0; gap: 6px; font-size: 16px; letter-spacing: -.4px; }
  .site-header.has-profile > .brand img { width: 36px; height: 36px; }
  .site-header.has-profile > .account-identity { max-width: none; }
  .site-header.has-profile .account-avatar { width: 30px; height: 30px; flex-basis: 30px; }
  .site-header.has-profile .account-copy { max-width: 64px; }
  .site-header.has-profile .account-copy strong { max-width: 64px; font-size: 9px; }
  .site-header.has-profile .account-copy small { max-width: 64px; font-size: 7px; }
  .site-header.has-profile > .site-menu-button { min-width: 34px; height: 36px; }
  .hero { padding-inline: 13px; }
  #empresas .company-benefits { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  #catalogo .cards,
  #funciones .feature-grid,
  #instalar .install-grid,
  #como-funciona .step-grid,
  #para-vos .audience-grid,
  #planes .plan-grid { scroll-behavior: auto; }
}

/* Keep the mobile landing short while preserving every section behind disclosure rows. */
@media (max-width: 760px) {
  .mobile-compact-group {
    margin: 0 16px 12px;
    overflow: clip;
    border: 1px solid #ffffff20;
    border-radius: 16px;
    background: linear-gradient(120deg, #17223a, #141d31);
    box-shadow: 0 8px 22px #03081724;
  }
  .mobile-compact-group > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 68px;
    padding: 13px 16px;
    color: #f5f3ff;
    cursor: pointer;
    list-style: none;
  }
  .mobile-compact-group > summary::-webkit-details-marker { display: none; }
  .mobile-compact-group > summary::after { content: none; }
  .mobile-compact-group > summary > span { display: grid; gap: 3px; min-width: 0; }
  .mobile-compact-group > summary strong { font-size: 14px; line-height: 1.35; }
  .mobile-compact-group > summary small { color: #aebbd0; font-size: 11px; line-height: 1.35; }
  .mobile-compact-group > summary i {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid #a982e955;
    border-radius: 11px;
    background: #8053be22;
    color: #d7bbff;
    font-size: 19px;
    font-style: normal;
    transition: transform .2s;
  }
  .mobile-compact-group[open] > summary { border-bottom: 1px solid #ffffff15; }
  .mobile-compact-group[open] > summary i { transform: rotate(45deg); }
  .mobile-compact-content > section.wrap { padding: 25px 16px; }
  .mobile-compact-content > section.wrap:first-child { padding-top: 23px; }
  .mobile-compact-content > section.wrap:last-child { padding-bottom: 25px; }
}
