
/* =============================
   PREMIUM DESIGN — CIELO N TIERRA
   - Glass header
   - Gradient primary button
   - Better typography & spacing
   - Drawer animation
   - Mobile bottom bar
============================= */

/* Variables */
:root{
  --max: 1120px;
  --r: 18px;
  --r2: 24px;
  --shadow: 0 18px 55px rgba(0,0,0,.28);
  --shadow2: 0 8px 24px rgba(0,0,0,.20);
  --ease: cubic-bezier(.2,.8,.2,1);
}

/* Dark */
html[data-theme="dark"]{
  --bg:#0b0f14;
  --bg2:#070a0f;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.035);
  --line: rgba(255,255,255,.12);
  --text:#eef3fb;
  --muted:#a6b0c3;
  --btn: rgba(255,255,255,.10);
  --btn2: rgba(255,255,255,.05);
  --ring: rgba(125,211,252,.26);
  --accent1:#7dd3fc;
  --accent2:#a78bfa;
  --accent3:#34d399;
  --heroGlow: rgba(125,211,252,.14);
  --heroGlow2: rgba(167,139,250,.14);
}

/* Light */
html[data-theme="light"]{
  --bg:#f6f7fb;
  --bg2:#ffffff;
  --card: rgba(0,0,0,.045);
  --card2: rgba(0,0,0,.028);
  --line: rgba(0,0,0,.10);
  --text:#0b1220;
  --muted:#4f5b6b;
  --btn: rgba(0,0,0,.06);
  --btn2: rgba(0,0,0,.03);
  --ring: rgba(37,99,235,.16);
  --accent1:#2563eb;
  --accent2:#7c3aed;
  --accent3:#059669;
  --heroGlow: rgba(37,99,235,.10);
  --heroGlow2: rgba(124,58,237,.10);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 520px at 10% 0%, var(--heroGlow), transparent 60%),
    radial-gradient(900px 520px at 90% 10%, var(--heroGlow2), transparent 60%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg2) 16%, transparent), transparent 40%),
    var(--bg);
  line-height:1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img{max-width:100%; height:auto; display:block}
a{color:inherit; text-decoration:none}
.container{max-width:var(--max); margin:0 auto; padding:0 18px}
.muted{color:var(--muted)}
.small{font-size:.92rem}
.no-scroll{overflow:hidden}
::selection{background: color-mix(in srgb, var(--accent2) 35%, transparent)}
:focus-visible{outline: none; box-shadow: 0 0 0 4px var(--ring); border-radius: 12px}

/* Skip link */
.skip{position:absolute; left:-999px}
.skip:focus{left:16px; top:16px; background:var(--bg2); color:var(--text); padding:10px 12px; border-radius:12px; z-index:9999; border:1px solid var(--line)}

/* Header */
.header{
  position:sticky; top:0; z-index:50;
  background: color-mix(in srgb, var(--bg2) 78%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; padding:10px 0;
}

/* Logo card (makes white-logo backgrounds look intentional) */
.brand{
  display:flex; align-items:center; gap:12px;
}
.brand--image{
  padding: 8px 10px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--bg2) 92%, transparent);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.brand--image img{
  max-height: 52px;
  width:auto;
  display:block;
  border-radius: 12px;
}
@media (min-width: 860px){
  .brand--image img{max-height: 64px;}
}


/* Mobile meta row (pill + install + menu) */
.header__meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 0 0 12px;
}
.header__pill{
  display:inline-flex;
  padding:8px 12px;
  border-radius:999px;
  background: var(--btn2);
  border:1px solid var(--line);
  color: var(--muted);
  font-weight:600;
  font-size:.92rem;
  white-space:nowrap;
}
.header__metaActions{
  display:flex;
  align-items:center;
  gap:10px;
}

/* Mobile header layout: full-width logo */
@media (max-width: 859px){
  .header__inner{
    flex-direction:column;
    align-items:stretch;
    gap:10px;
    padding:12px 0 8px;
  }
  .brand--image{
    width:100%;
    justify-content:center;
  }
  .brand--image img{
    max-height: 78px;
    max-width: 100%;
  }
}
@media (min-width: 860px){
  .header__meta{display:none;}
  }

/* Nav */
.nav{display:none; gap:16px; align-items:center}
.nav a{
  color:var(--muted);
  font-weight:600;
  letter-spacing:.01em;
  padding:10px 10px;
  border-radius: 14px;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav a:hover{color:var(--text); background: var(--btn2)}

/* Mobile actions */
.header__actions{display:flex; align-items:center; gap:10px}

/* Desktop nav — premium underline */
.nav__link{position:relative}
.nav__link::after{
  content:"";
  position:absolute;
  left:14px;
  right:14px;
  bottom:6px;
  height:2px;
  border-radius:2px;
  background: linear-gradient(135deg, rgba(125,211,252,.95), rgba(167,139,250,.95));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s var(--ease);
  opacity:.95;
}
.nav__link:hover::after,
.nav__link:focus-visible::after{ transform: scaleX(1); }

.nav__link:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px var(--ring);
}

/* Header shadow on scroll */
.header.header--scrolled{
  box-shadow: 0 10px 30px rgba(0,0,0,.20);
}


/* Icon button */
.iconbtn{
  width:42px; height:42px;
  border-radius:999px;
  border:1px solid var(--line);
  background: var(--btn2);
  display:grid; place-items:center;
  cursor:pointer;
  transition: transform .15s var(--ease), background .15s var(--ease);
}
.iconbtn:hover{background: var(--btn); transform: translateY(-1px)}
.iconbtn__dot{
  width:16px; height:16px; border-radius:999px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
}

/* Hamburger */
.burger{
  display:inline-flex; flex-direction:column; gap:6px;
  border:0; background:transparent; padding:10px; cursor:pointer;
}
.burger span{
  width:26px; height:2px;
  background: color-mix(in srgb, var(--text) 74%, transparent);
  border-radius:10px;
  transition: transform .18s var(--ease), opacity .18s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1){transform: translateY(8px) rotate(45deg)}
.burger[aria-expanded="true"] span:nth-child(2){opacity:0}
.burger[aria-expanded="true"] span:nth-child(3){transform: translateY(-8px) rotate(-45deg)}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 16px;
  border-radius:999px;
  border:1px solid var(--line);
  font-weight:750;
  letter-spacing:.01em;
  background: var(--btn);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s var(--ease);
}
.btn:hover{transform: translateY(-1px); box-shadow: var(--shadow2)}
.btn:active{transform: translateY(0px)}
.btn--ghost{background:transparent}
.btn--small{padding:10px 14px; font-size:.95rem}

/* Primary gradient */
.btn--primary{
  border: 0;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #0b0f14;
}
html[data-theme="light"] .btn--primary{color:#fff}
.btn--primary:hover{box-shadow: 0 18px 40px rgba(125,211,252,.18)}

/* Desktop breakpoint */
@media (min-width: 860px){
  .nav{display:flex}
  .header__actions{display:none}
}

/* Drawer */

/* =============================
   HOSTINGER-STYLE MOBILE NAV (Drawer)
============================= */
.hnav{
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,.48);
  justify-content: flex-end;
  padding-top: env(safe-area-inset-top);
}

.hnav__panel{
  width: min(420px, 92vw);
  height: 100%;
  background: var(--bg2);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  transform: translateX(100%);
  animation: hnavIn .22s var(--ease) forwards;
}

@keyframes hnavIn{
  to { transform: translateX(0); }
}

.hnav__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 6px 2px 12px;
  border-bottom: 1px solid var(--line);
}

.hnav__title{
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 1.05rem;
}

.hnav__close{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--btn2);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
}

.hnav__close:hover{ background: var(--btn); }

.hnav__section{ padding: 14px 0 0; }

.hnav__sectionLabel{
  color: var(--muted);
  font-size: .92rem;
  padding: 0 2px 10px;
}

.hnav__item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 16px;
  background: var(--btn2);
  border: 1px solid var(--line);
  margin-bottom: 10px;
  font-weight: 650;
}

.hnav__item:hover{ background: var(--btn); }

.hnav__chev{
  color: color-mix(in srgb, var(--muted) 75%, transparent);
  font-size: 22px;
  line-height: 1;
}

.hnav__cta{
  margin-top: auto;
  display:flex;
  flex-direction:column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.hnav__foot{
  padding-top: 10px;
  font-size: .9rem;
  text-align: center;
}

/* Ensure content isn't hidden behind bottom bar */
main{ padding-bottom: 86px; }

@media (min-width: 860px){
  main{ padding-bottom: 0; }
}

.drawer{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.42);
  display:grid;
  place-items:start end;
  padding: 76px 16px 16px;
}
.drawer[hidden]{display:none}
.drawer__panel{
  width:min(380px, 94vw);
  background: color-mix(in srgb, var(--bg2) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 16px;
  transform: translateY(-6px);
  animation: panelIn .22s var(--ease) both;
}
@keyframes panelIn{
  from{opacity:.0; transform: translateY(-10px) scale(.98)}
  to{opacity:1; transform: translateY(0) scale(1)}
}
.drawer__links{
  display:flex; flex-direction:column;
  gap:10px;
}
.drawer__links a{
  padding:12px 12px;
  border-radius:16px;
  background: var(--btn2);
  border:1px solid var(--line);
  color: var(--text);
  font-weight:650;
}
.drawer__links a:hover{background: var(--btn)}
.drawer__cta{display:flex; flex-direction:column; gap:10px; margin-top:12px}

/* Hero */
.hero{padding:34px 0 12px}
.hero__grid{display:grid; gap:18px}
.pill{
  display:inline-flex; padding:9px 14px; border-radius:999px;
  background: color-mix(in srgb, var(--btn2) 85%, transparent);
  border:1px solid var(--line);
  color:var(--muted);
  font-size:.92rem;
  font-weight:650;
  letter-spacing:.01em;
}
h1{
  font-size: clamp(2.1rem, 7vw, 3.2rem);
  line-height:1.06;
  margin:14px 0 10px;
  letter-spacing:-.02em;
}
.lead{
  color:var(--muted);
  margin:0 0 14px;
  font-size: 1.06rem;
}
.hero__cta{display:flex; gap:10px; flex-wrap:wrap; margin:10px 0 16px}
.hero__trust{display:grid; grid-template-columns:1fr; gap:10px; margin-top:12px}
.trust{
  padding:14px 16px; border-radius: 20px;
  background: var(--card);
  border:1px solid var(--line);
}
.trust strong{display:block; font-weight:800}
.hero__media{
  border-radius: calc(var(--r) + 10px);
  overflow:hidden;
  border:1px solid var(--line);
  background: var(--card2);
}
.hero__media img{transform: scale(1.01)}
@media (min-width: 860px){
  .hero__grid{grid-template-columns: 1.05fr .95fr; align-items:center; gap:22px}
  .hero__trust{grid-template-columns:1fr 1fr 1fr}
}

/* Sections */
.section{padding:56px 0}
.section--alt{
  background: color-mix(in srgb, var(--bg2) 60%, transparent);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section__head{margin-bottom:18px}
.section__head h2{
  margin:0 0 8px;
  font-size: clamp(1.4rem, 3.6vw, 1.7rem);
  letter-spacing:-.01em;
}
.section__head p{margin:0}

/* Cards */
.cards{display:grid; gap:14px}
.card{
  padding:18px;
  border-radius: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.card:hover{transform: translateY(-2px); box-shadow: var(--shadow2); background: color-mix(in srgb, var(--card) 88%, transparent)}
.card h3{margin:0 0 8px; font-weight:800}
.card ul{margin:10px 0 0; padding-left:18px; color:var(--muted)}

/* Project grid */
.grid{display:grid; gap:14px; grid-template-columns:1fr}
.tile{
  border-radius: 26px;
  overflow:hidden;
  border:1px solid var(--line);
  background: var(--card2);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.tile:hover{transform: translateY(-2px); box-shadow: var(--shadow2)}
.tile__cap{padding:12px 14px; border-top:1px solid var(--line); background: color-mix(in srgb, var(--bg2) 80%, transparent)}
.tile__cap strong{display:block; font-weight:800}

/* Split */
.split{display:grid; gap:14px}
.ticks{margin:12px 0 0; padding-left:18px; color:var(--muted)}
.contactbox{
  padding:18px;
  border-radius: 28px;
  background: var(--card);
  border:1px solid var(--line);
  display:flex; flex-direction:column; gap:10px;
}

/* Steps */
.steps{margin:0; padding:0; list-style:none; display:grid; gap:10px}
.steps li{
  padding:16px 16px;
  border-radius: 22px;
  background: var(--card);
  border:1px solid var(--line);
}
.steps strong{display:block; margin-bottom:4px; font-weight:850}

/* Alerts & form */
.flash{padding:12px 14px; border-radius: 16px; margin: 12px 0 14px; border:1px solid var(--line)}
.flash--success{background: rgba(34,197,94,.10)}
.flash--error{background: rgba(239,68,68,.10)}

.form{
  padding:18px; border-radius: 28px;
  background: var(--card);
  border:1px solid var(--line);
}
.form__grid{display:grid; grid-template-columns:1fr; gap:12px}
label span{display:block; margin-bottom:6px; color:var(--muted); font-size:.95rem; font-weight:650}
input, select, textarea{
  width:100%; padding:12px 12px; border-radius:16px;
  border:1px solid var(--line);
  background: color-mix(in srgb, var(--bg2) 70%, transparent);
  color:var(--text);
  outline:none;
}
input:focus, select:focus, textarea:focus{box-shadow: 0 0 0 4px var(--ring)}
.form__actions{display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-top:12px}
.hp{position:absolute; left:-9999px; width:1px; height:1px; opacity:0}

@media (min-width: 860px){
  .cards{grid-template-columns:1fr 1fr 1fr}
  .grid{grid-template-columns:1fr 1fr 1fr}
  .split{grid-template-columns:1.1fr .9fr; align-items:start}
  .form__grid{grid-template-columns:1fr 1fr}
  .form__grid .full{grid-column:1 / -1}
}

/* Footer */
.footer{
  padding: 40px 0 90px; /* extra for bottom bar */
  border-top:1px solid var(--line);
  background: color-mix(in srgb, var(--bg2) 92%, transparent);
}
.connect{
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:16px;
}
.connect__title{margin:0; font-size: 1.35rem; font-weight:850; letter-spacing:-.01em}
.social{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}
.social__btn{
  width:56px; height:56px;
  border-radius:999px;
  display:grid;
  place-items:center;
  overflow:hidden;
  background: var(--btn2);
  border:1px solid var(--line);
  transition: transform .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
.social__btn:hover{transform: translateY(-2px); background: var(--btn); box-shadow: var(--shadow2)}
.social__icon{
  width:26px !important;
  height:26px !important;
  display:block !important;
  max-width:26px !important;
  max-height:26px !important;
  fill: color-mix(in srgb, var(--text) 86%, transparent);
}
.footer__copy{margin:0; color:var(--muted); font-size: .98rem;}

/* Mobile bottom bar */
.bottombar{
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 10px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg2) 78%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow2);
}
.bottombar__item{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 12px 10px;
  border-radius: 18px;
  background: var(--btn2);
  border: 1px solid var(--line);
  font-weight: 800;
}
.bottombar__item--primary{
  border:0;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #0b0f14;
}
html[data-theme="light"] .bottombar__item--primary{color:#fff}
.bottombar__icon{font-size: 1.1rem}
.bottombar__text{font-size: .98rem}
@media (min-width: 860px){
  .bottombar{display:none}
  .footer{padding-bottom: 40px}
}


/* =============================
   HERO META (pill + install) - Premium
============================= */
.hero__metaRow{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  flex-wrap:wrap;
  margin: 0 0 14px;
}
.hero__pill{
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--btn2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}
.hero__install{
  padding: 10px 14px;
}

/* =============================
   Section head row (Gallery/Admin)
============================= */
.section__head--row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.section__actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* =============================
   Gallery Grid
============================= */
.galleryGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
.gItem{
  border-radius: 20px;
  overflow:hidden;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
}
.gItem img{
  width:100%;
  height: 190px;
  object-fit: cover;
  display:block;
}
@media (min-width: 860px){
  .galleryGrid{ grid-template-columns: 1fr 1fr 1fr; gap:14px; }
  .gItem img{ height: 240px; }
}

/* =============================
   Premium close button for mobile nav
============================= */
.hnav__close{
  width:40px;
  height:40px;
  border-radius:999px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  background: var(--btn2);
  font-size:22px;
  line-height:1;
}
.hnav__close:active{ transform: translateY(1px); }

/* Keep mobile nav items stacked cleanly */
.hnav__item{
  display:flex;
  align-items:center;
  justify-content:space-between;
}


/* ===== Premium Mobile Header ===== */
@media (max-width: 859px){
  .header__inner{padding: 10px 0;}
  .brand--image{
    width:100%;
    display:flex;
    justify-content:center;
  }
  .brand--image img{
    max-height: 86px;
    width: 100%;
    max-width: 520px;
    object-fit: contain;
  }
}

/* ===== HERO meta row actions ===== */
.hero__metaRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:nowrap;
  margin-bottom: 14px;
}
.hero__metaActions{
  display:flex;
  align-items:center;
  gap:10px;
}
.hero__pill{
  padding:10px 14px;
  border-radius:999px;
  background: var(--btn2);
  border:1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  white-space:nowrap;
}
.hero__install{padding:10px 14px;}
.hero__theme{width:40px;height:40px;}
.hero__burger{margin:0;}

/* ===== Premium Hostinger-style drawer (no CTA) ===== */
.hnav{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
  z-index: 999;
  display:flex;
  justify-content:flex-end;
  padding: env(safe-area-inset-top) 14px 14px;
}
.hnav__panel{
  width:min(390px, 92vw);
  height: calc(100dvh - 28px - env(safe-area-inset-top));
  background: var(--bg2);
  border:1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  animation: slideIn .18s ease-out;
}
.hnav__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 14px;
  border-bottom:1px solid var(--line);
}
.hnav__title{
  font-weight:800;
  letter-spacing:.2px;
  font-size:1.06rem;
}
.hnav__close{
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid var(--line);
  background: var(--btn2);
  color: var(--text);
  font-size:24px;
  line-height:1;
  display:grid;
  place-items:center;
}
.hnav__section{padding:12px;}
.hnav__sectionLabel{
  font-size:.85rem;
  color: var(--muted);
  margin: 4px 2px 10px;
}
.hnav__item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 14px;
  border-radius: 18px;
  background: var(--btn2);
  border:1px solid var(--line);
  font-weight: 650;
  margin-bottom: 10px;
}
.hnav__item:active{transform: scale(.99);}
.hnav__chev{opacity:.7; font-size:20px;}

/* ===== Mobile sticky bottom actions ===== */
.bottombar{
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 998;
  display: none;
  gap:10px;
  padding: 10px;
  border-radius: 22px;
  background: color-mix(in srgb, var(--bg2) 82%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.bottombar__btn{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 12px 10px;
  border-radius: 18px;
  background: var(--btn2);
  border: 1px solid var(--line);
  font-weight: 750;
}
.bottombar__btn--primary{
  background: linear-gradient(135deg, rgba(59,130,246,.95), rgba(167,139,250,.95));
  border: 1px solid rgba(255,255,255,.14);
}
@media (max-width: 859px){
  .bottombar{display:flex;}
  body{padding-bottom: 96px;}
}


/* =============================
   FIXES: Unified header controls + drawer hidden handling
============================= */

/* Always respect the [hidden] attribute for the drawer */
.hnav{ display:none; }
.hnav:not([hidden]){ display:flex; }
.hnav[hidden]{ display:none !important; }

/* Unified header controls */

.header__inner{ flex-wrap: wrap; }

/* Quick actions bar:
   - Desktop: visually sits on the same header line (pulled up)
   - Mobile: sits between header and hero/content as a premium pill bar
*/
.quickbar{
  position: relative;
  z-index: 30;
}
.quickbar__inner{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
}

/* Desktop: pull the bar up to align with the header row */
@media (min-width: 860px){
  .quickbar{
    margin-top: -62px;
    padding-bottom: 10px;
    pointer-events: none; /* allow only buttons to be clickable */
  }
  .quickbar__inner{
    pointer-events: auto;
  }
}

/* Mobile: show as a pill between header and content */
@media (max-width: 859px){
  .quickbar{
    margin-top: 6px;
    margin-bottom: 10px;
  }
  .quickbar__inner{
    justify-content: center;
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 12px;
    box-shadow: var(--shadow);
  }
  .quickbar .btn--ghost{
    padding-left: 14px;
    padding-right: 14px;
  }
}
}

/* Mobile: controls as premium bar between header and hero/content */
@media (max-width: 859px){
  .nav{ display:none; }
  }

/* Footer social icons via SVG files */
.social__img{
  display:block;
  width:22px;
  height:22px;
  color: var(--text);
  opacity:.92;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.18));
}
.social__btn:hover .social__img{ opacity:1; transform: translateY(-1px); }

/* =========================================================
   QUICKBAR: Install + Theme + Menu in ONE LINE (all sizes)
   Paste at END of style.css so it overrides older rules
========================================================= */

.quickbar{
  position: relative;
  z-index: 40;
  margin-top: 8px;
  margin-bottom: 10px;
}

.quickbar__inner{
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;

  /* premium pill */
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 12px;
  box-shadow: var(--shadow);

  /* never overflow */
  max-width: 100%;
  overflow: hidden;
}

/* Make buttons stay compact and inline */
.quickbar__inner .btn,
.quickbar__inner .iconbtn,
.quickbar__inner .burger{
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center;
  justify-content: center;
}

/* Install must NEVER wrap into two lines */
#installBtn{
  white-space: nowrap;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
}

/* Round theme toggle always */
#themeToggle.iconbtn{
  width: 44px;
  height: 44px;
  border-radius: 999px;
}

/* Burger size consistent */
#menuToggle.burger{
  width: 48px;
  height: 44px;
  border-radius: 999px;
}

/* Desktop: place quickbar visually on header line (right side) */
@media (min-width: 860px){
  .quickbar{
    margin-top: -62px;   /* pulls it into header row */
    margin-bottom: 0;
    pointer-events: none; /* so it doesn't block header clicks */
  }
  .quickbar__inner{
    pointer-events: auto;
    margin-left: auto;   /* move to right */
    justify-content: flex-end !important;
    width: fit-content;
  }
}

/* Mobile: keep it between header and hero/content */
@media (max-width: 859px){
  .quickbar__inner{
    justify-content: flex-start !important;
  }
}

/* Mobile drawer MUST respect [hidden] */
.hnav { display: none !important; }
.hnav:not([hidden]) { display: flex !important; }