
/* assets/styles.css */
:root{
  --bg: #0b0e12;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.10);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.68);
  --muted2: rgba(255,255,255,0.52);
  --accent: #35d07f;   /* временно "kAccent"-ish */
  --accent2: #62a8ff;
  --shadow: 0 18px 48px rgba(0,0,0,0.55);
  --radius: 16px;
  --maxw: 1080px;
  /* Typography scale */
  --fs-brand: 40px;
  --fs-h1: 36px;
  --fs-h2: 22px;
  --fs-body: 20px;
  --fs-small: 18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(53,208,127,0.10), transparent 60%),
    radial-gradient(800px 500px at 85% 15%, rgba(98,168,255,0.10), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(255,255,255,0.04), transparent 60%),
    var(--bg);
  line-height:1.55;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; text-underline-offset:3px; }

.wrap{
  max-width:var(--maxw);
  margin:0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(40px + env(safe-area-inset-bottom));
}

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; padding:14px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border:1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  position: sticky; top: calc(10px + env(safe-area-inset-top)); backdrop-filter: blur(10px);
  z-index: 10;
}

.brand{
  display:flex; align-items:center; gap:12px; min-width: 200px;
}

.logo{
  width:34px;
  height:34px;
  border-radius: 8px;
  object-fit: cover;
  display:block;
  background:#000;
  box-shadow: 0 8px 22px rgba(0,0,0,0.5);
}

.brand .name{
  font-weight: 650;
  letter-spacing: 0.5px;
  font-size: var(--fs-brand);
  line-height: 1.05;
}

.nav{
  display:flex; gap:10px; flex-wrap: wrap; justify-content:flex-end;
}
.nav a{
  padding:10px 12px;
  border-radius: 12px;
  color: var(--muted);
  border:1px solid transparent;
  min-height: 40px;          /* по-добър touch target */
  display:inline-flex;
  align-items:center;
}
.nav a:hover{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  text-decoration:none;
}
.nav a.active{
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
}

.hero{
  margin-top: 22px;
  display:grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 18px;
}

/* Allow grid children to shrink (prevents horizontal overflow on mobile zoom) */
.hero > *{
  min-width: 0;
}

@media (max-width: 900px){
  .hero{ grid-template-columns: 1fr; }
  .brand{ min-width: unset; }
}

.hero .h1 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.3px;
}

.card{
  /* more solid to prevent background/footer bleed-through */
  background: linear-gradient(180deg, rgba(17,22,28,0.96), rgba(13,17,22,0.96));
  border:1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  padding: 22px;
}

.h1{
  font-size: var(--fs-h1);
  line-height: 1.08;
  margin: 0 0 12px;
  letter-spacing: -0.4px;
}

.lead{
  margin: 0 0 12px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.6;
}

.p{
  margin: 0 0 12px;
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.6;
}

.badges{
  display:flex; flex-wrap: wrap; gap:10px; margin-top: 10px;
}
.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding: 10px 12px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.12);
  color: var(--muted);
  font-size: var(--fs-small);
}
.dot{
  width: 9px; height: 9px; border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(53,208,127,0.12);
}

.ctaRow{ display:flex; flex-wrap: wrap; gap:12px; margin-top: 18px; }
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding: 12px 14px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-weight: 650;
}
.btn:hover{ background: rgba(255,255,255,0.08); text-decoration:none; }
.btn.primary{
  border-color: rgba(53,208,127,0.55);
  background: linear-gradient(135deg, rgba(53,208,127,0.22), rgba(98,168,255,0.16));
}
.btn.small{ padding: 10px 12px; font-weight: 600; }

.grid2{
  margin-top: 18px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* Same fix for inner grid cards */
.grid2 > *{
  min-width: 0;
}

@media (max-width: 900px){
  .grid2{ grid-template-columns: 1fr; }
}

.kicker{
  font-size: var(--fs-small);
  color: var(--muted2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.h2{
  margin: 0 0 8px;
  font-size: var(--fs-h2);
  letter-spacing: -0.2px;
}

hr.sep{
  border:0;
  height:1px;
  background: rgba(255,255,255,0.10);
  margin: 18px 0;
}

.preline { white-space: pre-line; }

.pageTitle{
  margin-top: 22px;
  margin-bottom: 0;
  font-size: var(--fs-h2);
  letter-spacing: -0.2px;
}

.pageSub{
  margin: 8px 0 0;
  color: var(--muted);
}

.content{
  margin-top: 14px;
}
.content p, .content li{
  color: var(--muted);
}

.content h3{
  margin: 18px 0 8px;
  font-size: var(--fs-h2);
  letter-spacing: -0.2px;
}

.content code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
  padding: 0.12em 0.4em;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.10);
}

.footer{
  margin-top: 22px;
  color: var(--muted2);
  font-size: var(--fs-small);
  display:flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer a{ color: var(--muted2); }

@media (max-width: 420px){
  .topbar{ padding: 12px; }
  .logo{ width:30px; height:30px; border-radius: 9px; }
  :root{
    --fs-brand: 20px;
    --fs-h1: 30px;
    --fs-h2: 20px;
    --fs-body: 18px;
  }

  .h1{ font-size: var(--fs-h1); }
  .lead{ font-size: var(--fs-body); }

  .btn{ width: 100%; }                 /* CTA стават на пълен ред – по-удобно на телефон */
  .ctaRow{ gap: 10px; }
}

/* Dark select styling (best effort across browsers) */
select.btn {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.14);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Language picker: prevent text clipping on small screens (Android/Chrome) */
#langSelect{
  min-width: 50px;
  padding: 10px 10px;      /* малко повече вдясно */
  line-height: 1;          /* помага на някои мобилни рендери */
  text-align: center;
  text-align-last: center; /* важно за <select> */
}

@media (max-width: 420px){
  #langSelect{
    min-width: 46px;
    padding: 10px 10px;    /* още малко “въздух” вдясно */
  }
}

/* Some browsers allow styling the option list */
select.btn option {
  background: #0b0e12;
  color: rgba(255,255,255,0.92);
}

.topbarRight{
  display:flex;
  align-items:center;
  gap:10px;
}

/* Hamburger button */
.menuBtn{
  display:none;
  min-height: 40px;
  padding: 10px 12px;
}

/* Mobile nav panel */
.navPanel{
  display:none;
  margin-top: 10px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.30);
  backdrop-filter: blur(10px);

  /* overlay behavior */
  position: fixed;
  z-index: 50;
  left: 16px;
  right: 16px;
  top: calc(64px + env(safe-area-inset-top)); /* fallback; JS ще го override-не */
  margin-top: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);

  /* да не излиза извън екрана */
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.navPanel a{
  display:block;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--muted);
}
.navPanel a:hover{
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
  text-decoration:none;
}
.navPanel a.active{
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
}

/* Responsive behavior */
@media (max-width: 760px){
  /* Hide inline nav, show hamburger */
  .topbar .nav{ display:none; }
  .menuBtn{ display:inline-flex; align-items:center; justify-content:center; gap:10px; }

  /* Make header less cramped */
  .topbar{ padding: 12px; }
}

/* Consistent spacing under the topbar on all pages */
.pageCard {
  margin-top: 22px;
}

/* --- Carousel (custom, no libs) --- */
.carousel{
  position: relative;
  margin-top: 10px;
}

.carouselViewport{
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.18);

  /* Fallback height stabilization (JS may override with real aspect ratio) */
  aspect-ratio: 9 / 19.5;
}

.carouselTrack{
  display: flex;
  height: 100%;                 /* IMPORTANT */
  transition: transform 260ms ease;
  will-change: transform;
  touch-action: pan-y;          /* allow vertical scroll, we handle horizontal swipe */
}

.carouselSlide{
  flex: 0 0 100%;
  height: 100%;                 /* IMPORTANT */
  margin: 0;
}

/* CONTAIN (no crop) + stable viewport usage */
.carouselSlide img{
  width: 100%;
  height: 100%;                 /* now has a definite height chain */
  object-fit: contain;
  display: block;
}

/* arrows */
.carouselBtn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  backdrop-filter: blur(10px);
}

.carouselBtn:hover{
  background: rgba(0,0,0,0.55);
}

.carouselBtn.prev{ left: 10px; }
.carouselBtn.next{ right: 10px; }

/* dots */
.carouselDots{
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

/* reset for button dots */
.carouselDot{
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  margin: 0;

  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.12);
  cursor: pointer;
}

.carouselDot.active{
  background: rgba(255,255,255,0.75);
  border-color: rgba(255,255,255,0.40);
}

.carouselDot:focus-visible{
  outline: 2px solid rgba(255,255,255,0.22);
  outline-offset: 4px;
}

/* On small screens keep arrows, but a bit smaller */
@media (max-width: 420px){
  .carouselBtn{
    width: 34px;
    height: 34px;
  }
}

.carousel:focus{
  outline: 2px solid rgba(255,255,255,0.22);
  outline-offset: 6px;
  border-radius: 18px;
}

/* ============================
   Page typography (consistent across Index / Privacy / Support)
   ============================ */

/* Title on static pages uses the same scale (no fixed px) */
.pageCard .pageTitle{
  font-size: var(--fs-h2);
  line-height: 1.15;
  letter-spacing: -0.2px;
}

/* Subtitle matches body scale */
.pageCard .pageSub{
  font-size: var(--fs-body);
  color: var(--muted);
  margin-top: 10px;
}

/* Body text matches global body scale */
.pageCard .content p,
.pageCard .content li{
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--muted);
}

/* Section headings match global h2 scale */
.pageCard .content h3{
  font-size: var(--fs-h2);
}

/* WHY IT EXISTS section typography refinement */
section.card > .content > .pageCard .h2 {
  font-size: var(--fs-h2);
}
section.card > .content > .pageCard .p {
  font-size: var(--fs-body);
  line-height: 1.6;
}
section.card > .content > .pageCard .kicker {
  font-size: var(--fs-small);
}