/* ==========================================================================
   QHItech Demo Site — Static ZIP (FASE 1 compatible) — GLOBAL CSS (LIGHT BLUE)
   - No external deps
   - Responsive
   - Works with header/footer partials via JS includes
   - Estilo objetivo: CLARO + AZULES (mockup), cards limpias, sombras suaves
   ========================================================================== */

:root{
  /* Base */
  --bg0:#F3F7FF;
  --bg1:#FFFFFF;

  --panel:#FFFFFF;
  --panel2:#F5F8FF;

  --text:#0B1B2B;
  --muted:#4E6078;
  --muted2:#6B7C93;

  --line:rgba(11,27,43,.10);

  /* Brand (azules) */
  --brand1:#2F6BFF;
  --brand2:#37D6FF;

  /* States */
  --ok:#0FB981;
  --warn:#E5A600;

  /* Shape */
  --radius:18px;
  --radius2:26px;
  --max:1100px;

  /* Shadow (suave, limpio) */
  --shadow: 0 18px 50px rgba(11,27,43,.12);
  --shadow2: 0 10px 26px rgba(11,27,43,.10);

  /* Focus */
  --focus: rgba(47,107,255,.35);

  /* Brand title (header/footer con PNG + texto) */
  --brandText:#1E3A63;

  /* ✅ Header fixed height + logo (otro +30% real) */
  --topbarH:72px;     /* alto fijo del header */
  --logoH:72px;       /* ⬅️ antes 71px -> ahora llena */
  --footerLogoH:72px; /* ⬅️ footer igual que header */

  /* ✅ Empuje extra (por si el PNG trae “aire” transparente) */
  --logoScale: 1.34;  /* ⬅️ antes 1.06 -> +30% real */
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 18% 2%, rgba(47,107,255,.18), transparent 60%),
    radial-gradient(900px 520px at 82% 10%, rgba(55,214,255,.16), transparent 62%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
  line-height:1.5;
  color-scheme: light;
}

img{ max-width:100%; height:auto; }

a{ color: var(--brand1); text-decoration:none; }
a:hover{ text-decoration:none; color: #2458D8; }

:focus{ outline:none; }
:focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 10px;
}

.container{
  width:min(var(--max), calc(100% - 48px));
  margin:0 auto;
}

/* Accesibilidad */
.skip-link{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:16px; top:16px; width:auto; height:auto; padding:10px 12px;
  background:rgba(255,255,255,.92);
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow: var(--shadow2);
  z-index:9999;
  color: var(--text);
}

/* ==========================================================================
   TOPBAR / NAV
   ========================================================================== */

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.78);
  border-bottom:1px solid var(--line);
  box-shadow: 0 8px 22px rgba(11,27,43,.06);
}

/* ✅ Header: altura fija (no crece), sin padding vertical */
.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  height: var(--topbarH);
  padding:0;
}

.brand{
  display:flex; align-items:center; gap:12px;
}

/* ✅ FIX REAL: neutro, NO define height */
.brand img{
  width:auto;
  display:block;
}

/* ✅ BRAND: PNG + texto (QHItech · Cloud) — HEADER */
.brand-link{
  display:flex;
  align-items:center;
  gap:14px;
}

/* ✅ Logo: ocupa TODO el alto posible y encima lo escalamos +30% */
.topbar .brand .brand-logo{
  height: var(--logoH);
  width:auto;
  display:block;
  max-height: calc(var(--topbarH) - 0px); /* ⬅️ sin margen vertical */
  margin:0;
  padding:0;
  line-height:0;
  transform: scale(var(--logoScale));
  transform-origin: left center;
}

.topbar .brand .brand-title{
  font-weight:800;
  font-size:16px;
  letter-spacing:-0.01em;
  color: var(--brandText);
  opacity: 1;
  white-space: nowrap;
  line-height: 1;
}

/* Ajuste responsive (header) */
@media (max-width: 560px){
  :root{ --topbarH:66px; --logoH:66px; --footerLogoH:66px; --logoScale:1.30; }
  .topbar .brand .brand-title{ font-size:15px; }
}
@media (max-width: 420px){
  :root{ --topbarH:62px; --logoH:62px; --footerLogoH:62px; --logoScale:1.26; }
  .topbar .brand .brand-title{ font-size:14px; }
}

.nav{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}

/* Pills limpias (aplica a <a.nav-link> y a <summary.nav-link>) */
.nav .nav-link{
  padding:10px 12px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  user-select:none;
}

/* summary necesita cursor + quitar marcador */
.nav summary.nav-link{
  cursor:pointer;
  list-style:none;
}
.nav summary.nav-link::-webkit-details-marker{ display:none; }

.nav .nav-link:hover{
  color: var(--text);
  border-color: rgba(47,107,255,.20);
  background: rgba(47,107,255,.06);
  box-shadow: 0 8px 18px rgba(47,107,255,.10);
}

.nav a.is-active{
  color: var(--text);
  border-color: rgba(47,107,255,.30);
  background: linear-gradient(90deg, rgba(47,107,255,.14), rgba(55,214,255,.10));
  box-shadow: 0 10px 22px rgba(47,107,255,.12);
}

/* =========================================================
   Language menu (header) — dropdown absoluto (NO rompe topbar)
   ========================================================= */
.qhi-lang-menu{
  position:relative;
}

/* en nav, el details debe comportarse como item inline */
.qhi-lang-menu--nav{
  display:inline-flex;
  align-items:center;
}

/* dropdown: siempre por debajo del botón */
.qhi-lang-dropdown{
  position:absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 180px;
  padding: 8px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: var(--shadow2);
  z-index: 200;
  display:flex;
  flex-direction:column;
  gap:6px;
}

/* items */
.qhi-lang-item{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--text);
  border:1px solid transparent;
  background: transparent;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.qhi-lang-item:hover{
  border-color: rgba(47,107,255,.20);
  background: rgba(47,107,255,.06);
  box-shadow: 0 8px 18px rgba(47,107,255,.10);
}

/* estado abierto: el botón se ve “activo” */
.qhi-lang-menu[open] > summary.nav-link{
  color: var(--text);
  border-color: rgba(47,107,255,.28);
  background: rgba(47,107,255,.06);
  box-shadow: 0 8px 18px rgba(47,107,255,.10);
}

/* ========================================================================== */

.actions{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px;
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.72);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(11,27,43,.08);
  cursor:pointer;
  transition: transform .08s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.btn:hover{
  background: rgba(255,255,255,.92);
  box-shadow: 0 12px 26px rgba(11,27,43,.10);
}
.btn:active{ transform: translateY(1px); }

/* CTA azul */
.btn.primary{
  border-color: rgba(47,107,255,.30);
  background: linear-gradient(90deg, rgba(47,107,255,.92), rgba(55,214,255,.82));
  color: #FFFFFF;
  box-shadow: 0 14px 30px rgba(47,107,255,.22);
}
.btn.primary:hover{
  background: linear-gradient(90deg, rgba(47,107,255,.98), rgba(55,214,255,.90));
  box-shadow: 0 18px 36px rgba(47,107,255,.26);
}

/* ==========================================================================
   HERO (claro + azules, con “cielo” suave)
   ========================================================================== */

.hero{
  position:relative;
  padding:64px 0 30px;
  overflow:hidden;
}

/* Fondo del hero tipo mockup: claro, azul, profundidad */
.hero::before{
  content:"";
  position:absolute;
  inset: -40px -40px auto -40px;
  height: 460px;
  background:
    radial-gradient(900px 260px at 30% 46%, rgba(47,107,255,.20), transparent 70%),
    radial-gradient(720px 340px at 78% 26%, rgba(55,214,255,.18), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(243,247,255,.85)),
    url("../img/hero-stars.svg");
  background-size: auto, auto, auto, cover;
  background-position: center, center, center, center;
  border-bottom:1px solid var(--line);
  filter: saturate(1.05) contrast(1.02);
  opacity: 1;
}

/* “Horizon” sutil para dar look de mockup sin imagen */
.hero::after{
  content:"";
  position:absolute;
  left:-40px; right:-40px;
  top: 310px;
  height: 160px;
  background:
    radial-gradient(600px 120px at 50% 0%, rgba(47,107,255,.10), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0), rgba(243,247,255,1));
  pointer-events:none;
}

.hero-inner{
  position:relative;
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:24px;
  align-items:end;
}
@media (max-width: 900px){
  .hero-inner{ grid-template-columns:1fr; }
}

.h-title{
  font-size: clamp(30px, 3.2vw, 48px);
  line-height:1.12;
  margin:0 0 14px;
  letter-spacing: -0.02em;
}

.h-sub{
  margin:0 0 18px;
  color: var(--muted);
  font-size: 16px;
  max-width: 62ch;
}

.hero-cta{
  display:flex; gap:12px; flex-wrap:wrap; align-items:center;
}

.kpi{
  margin-top:18px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}
@media (max-width: 520px){
  .kpi{ grid-template-columns:1fr; }
}

.kpi .box{
  border:1px solid var(--line);
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding:12px 12px;
  box-shadow: 0 10px 24px rgba(11,27,43,.08);
}
.kpi .n{
  font-weight:800;
  font-size:16px;
}
.kpi .l{
  color: var(--muted);
  font-size:12px;
}

/* Panel del hero (glass limpio) */
.panel{
  border:1px solid var(--line);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(12px);
  border-radius: var(--radius2);
  box-shadow: var(--shadow);
  padding:18px;
}
.panel h3{
  margin:0 0 10px;
  font-size:16px;
  letter-spacing:.02em;
}
.panel p{ margin:0; color: var(--muted); }

/* ==========================================================================
   SECTIONS + GRID
   ========================================================================== */

.section{
  padding: 26px 0 56px;
}

.section-head{
  display:flex; align-items:end; justify-content:space-between; gap:18px;
  margin-bottom:18px;
}

.section-title{
  font-size: 20px;
  margin:0;
}

.section-note{
  margin:0;
  color: var(--muted);
  font-size:14px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:16px;
}
@media (max-width: 980px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .grid{ grid-template-columns: 1fr; }
}

/* Cards limpias (mockup) */
.card{
  border:1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius2);
  overflow:hidden;
  box-shadow: 0 14px 40px rgba(11,27,43,.10);
  display:flex;
  flex-direction:column;
  min-height: 100%;
  transition: transform .10s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 52px rgba(11,27,43,.14);
  border-color: rgba(47,107,255,.18);
}

.card img{
  width:100%;
  height: 160px;
  object-fit:cover;
  display:block;
  background: rgba(11,27,43,.04);
}

.card .body{
  padding:14px 14px 16px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.card h4{ margin:0; font-size:16px; color: var(--text); }
.card p{ margin:0; color: var(--muted); font-size:13px; }

.card .meta{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-top:auto;
}

.price{
  display:flex; flex-direction:column;
}
.price .from{ font-size:11px; color: var(--muted2); }
.price .val{ font-weight:800; letter-spacing:-0.01em; }

/* Badge estilo “chip” limpio */
.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  color: var(--text);
  background: rgba(47,107,255,.06);
  font-size:12px;
}

.dot{
  width:8px; height:8px; border-radius:99px;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  box-shadow: 0 0 0 4px rgba(47,107,255,.12);
}

/* ==========================================================================
   FOOTER (claro)
   ========================================================================== */

.footer{
  border-top:1px solid var(--line);
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(10px);
  padding: 30px 0;
}

.footer-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
}
@media (max-width: 860px){
  .footer-grid{ grid-template-columns:1fr; }
}

.footer .small{ color: var(--muted); font-size:13px; }
.footer a{ color: var(--muted); }
.footer a:hover{ color: var(--text); }

/* ✅ FOOTER brand (PNG + texto) */
.footer .brand-link{
  display:flex;
  align-items:center;
  gap:14px;
}

/* ✅ Footer logo: MISMO +30% que header */
.footer .brand .brand-logo{
  height: var(--footerLogoH);
  width:auto;
  display:block;
  max-height: var(--footerLogoH);
  margin:0;
  padding:0;
  line-height:0;
  transform: scale(var(--logoScale));
  transform-origin: left center;
}

.footer .brand .brand-title{
  font-weight:800;
  font-size:15px;
  letter-spacing:-0.01em;
  color: var(--brandText);
  opacity: 1;
  white-space: nowrap;
  line-height: 1;
}

/* Responsive footer */
@media (max-width: 560px){
  .footer .brand .brand-logo{ transform: scale(1.28); }
}
@media (max-width: 420px){
  .footer .brand .brand-logo{ transform: scale(1.24); }
}

/* ==========================================================================
   SUBPAGES
   ========================================================================== */

.subpage-hero{
  padding: 34px 0 12px;
}
.subpage-hero h1{
  margin:0 0 10px;
  font-size: clamp(24px, 2.4vw, 34px);
}
.subpage-hero p{
  margin:0;
  color: var(--muted);
  max-width: 70ch;
}

.feature-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
  margin-top: 18px;
}
@media (max-width: 900px){
  .feature-grid{ grid-template-columns:1fr; }
}

.feature{
  border:1px solid var(--line);
  background: var(--panel);
  border-radius: 18px;
  padding:14px;
  box-shadow: 0 10px 24px rgba(11,27,43,.08);
}
.feature .t{ font-weight:800; margin-bottom:6px; color: var(--text); }
.feature .d{ color: var(--muted); font-size:13px; }

/* ==========================================================================
   MOTION SAFE
   ========================================================================== */

@media (prefers-reduced-motion: reduce){
  *{
    transition:none !important;
    scroll-behavior:auto !important;
  }
}
