/* =========================================================
   Flash Dating — base.css (shared styles)
   ========================================================= */

:root{
  /* Warm modern base */
  --bg: #fff7f0;
  --bg2:#ffe8d7;
  --text:#1a1333;
  --muted:#6b5c72;
  --line: rgba(26,19,51,.10);

  /* Brand accents (cherry + sunset) */
  --blue:#4c6fff;          /* оставим как контраст */
  --pink:#ff4d8a;          /* cherry pink */
  --cherry:#ff2f5d;        /* cherry red */
  --sun:#ffb15b;           /* warm sun */
  --gold:#f6c453;

  /* Surfaces */
  --card: rgba(255,255,255,.78);
  --card-solid:#ffffff;
  --shadow: 0 18px 55px rgba(26,19,51,.10);
  --shadow-2: 0 10px 30px rgba(26,19,51,.08);
  --radius: 20px;

  --container: 1120px;
}


*{ box-sizing:border-box; }
html,body{ height:100%; }
html{ scroll-behavior:smooth; }

body{
  margin:0;

  display:flex;
  flex-direction:column;

  min-height:100vh;
  min-height:100dvh; /* iPhone fix */

  background:
    radial-gradient(1200px 700px at 20% 0%, rgba(255,177,91,.35) 0%, rgba(255,177,91,0) 55%),
    radial-gradient(900px 600px at 80% 10%, rgba(255,47,93,.22) 0%, rgba(255,47,93,0) 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);

  color:var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Links */
a{ color:var(--blue); text-decoration:none; }
a:hover{ text-decoration:underline; }

/* Container */
.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* Helpers */
.muted{ color: var(--muted); }
.small{ font-size: 13px; }
.divider{
  height: 1px;
  background: var(--line);
  margin: 14px 0;
}

/* Make anchors not hide behind sticky header */
#how{ scroll-margin-top: 90px; }

/* =========================
   HEADER / NAV
   ========================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgb(255 255 255 / 52%);
    backdrop-filter: blur(40px);
    border-bottom: 1px solid var(--line);
    box-shadow: inset 0px -4px 20px 0px rgb(255 255 255 / 79%);
}

.header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 0;
}

.header-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-shrink: 0;
}

.brand {
    font-weight: 900;
    letter-spacing: .2px;
    color: #ff4c84;
    text-decoration: none;
    white-space: nowrap;
    font-family: "Iowan Old Style", "Apple Garamond", Baskerville, "Times New Roman", "Droid Serif", Times, serif;
    font-style: italic;
}

.nav{
  display:flex;
  flex-wrap: wrap;
  justify-content:flex-end;
  gap: 8px;
}

.nav a{
  color: var(--muted);
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 10px;
}

.nav a:hover{
  color: var(--text);
  text-decoration:none;
  background: #ff4d851c;
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .75);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 23px;
    font-weight: 500;
    color: #780975;
    cursor: pointer;
}

.lang-switch{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:4px;
  border:1px solid var(--line);
  border-radius:14px;
  background: rgba(255,255,255,.68);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 10px rgba(255,255,255,.65);
}

.lang-btn{
  border:none;
  background: transparent;
  color: var(--muted);
  min-width: 44px;
  height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .4px;
  cursor:pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.lang-btn:hover{
  color: var(--text);
  background: rgba(255,255,255,.72);
}

.lang-btn.is-active{
  color: #fff;
  background: linear-gradient(135deg, var(--cherry), var(--pink));
  box-shadow: 0 10px 24px rgba(255,47,93,.24);
}

.lang-btn:active{
  transform: translateY(1px);
}
.footer-links{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

/* =========================
   Mobile nav — clean dropdown panel
   ========================= */

.nav-overlay{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 40; /* ниже хедера, выше контента */
}

/* меню-панель (используем твой .nav как панель) */
@media (max-width: 720px){
  .nav-toggle{ display:inline-flex; }

  /* ВАЖНО: header-row НЕ делаем колонкой, чтобы не ломался хедер */
  .header-row{
    flex-direction: row;
    align-items: center;
  }

  .nav{
    display: flex; /* оставляем flex, но прячем через opacity/transform */
    flex-direction: column;
    gap: 6px;

    position: fixed;
    left: 12px;
    right: 12px;
    top: 68px; /* примерно высота header */
    z-index: 60;

    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(26,19,51,.12);
    background: rgb(237 190 177 / 72%);
    backdrop-filter: blur(14px);
    box-shadow: inset 0px 1px 16px rgb(255 255 255);

    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;

    max-height: calc(100vh - 90px);
    overflow: auto;
  }

  /* ссылки как кнопки */
    .nav a {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 12px;
        border-radius: 14px;
        border: 1px solid rgba(26, 19, 51, .10);
        background: rgb(255 255 255 / 80%);
        color: #8d0f00;
        font-weight: 850;
        box-shadow: inset 0px 1px 16px rgb(255 255 255);
    }

  .nav a:hover{
    background: rgba(231,241,255,.75);
  }

  body.nav-open .nav{
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open .nav-overlay{
    opacity: 1;
    pointer-events: auto;
  }

  /* блокируем прокрутку страницы, когда меню открыто */
  body.nav-open{
    overflow: hidden;
  }
}


/* Main / Footer */
.main{
  flex: 1;
  padding: 18px 0 44px;
}
.site-footer {
    margin-top: auto;
    padding: 33px;
    border-top: 1px solid var(--line);
    backdrop-filter: blur(10px);
    background: rgb(255 255 255 / 19%);
}

.footer-row{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================
   UI ATOMS
   ========================= */
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;

  padding: 8px 12px;
  border-radius: 999px;

  background: #ffffff4d;
  border: 1px solid var(--line);

  color: #ffffff;
  font-weight: 800;
  font-size: 13px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;

  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;

  font-weight: 900;
  cursor:pointer;
  user-select:none;
  text-decoration:none;
}

.btn:hover{ text-decoration:none; }

.btn.primary{
  background: linear-gradient(135deg, var(--cherry), var(--pink));
  color:#fff;
  box-shadow: 0 18px 45px rgba(255,47,93,.28);
  border: 1px solid rgba(255,255,255,.22);
}
.btn.primary:hover{
  transform: translateY(-1px);
}


.btn, .card, .nav a, .seg-btn, .dd-btn, .faq-item{
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}


.btn.ghost {
    background: #ffffffbf;
    color: #000000;
    border-color: rgb(255 255 255 / 10%);
}

.btn.wide{ width: auto; }

/* Card */
.card{
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(10px);
}
.card.soft{
  background: rgb(255 255 255 / 42%);
  box-shadow: var(--shadow-2);
}

.card-title{
  font-weight: 950;
  margin-bottom: 10px;
}

/* Lists */
.list{
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
  font-weight: 650;
}

.ticks{
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.9;
  font-weight: 700;
}

/* Forms (shared) */
.field{ display:grid; gap: 6px; }

.label{
  font-weight: 850;
  color: var(--text);
  font-size: 13px;
}

.input{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  outline: none;
  font-weight: 700;
}

.input:focus{
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 6px rgba(37,99,235,.10);
}

/* Mobile rules that must always win */
@media (max-width: 520px){
  .header-row{
    gap: 10px;         /* просто расстояние */
    padding: 12px 14px;
  }
  .main{ padding: 0; }
}

  .header-actions{
    gap:8px;
  }

  .lang-switch{
    padding:3px;
    border-radius:12px;
  }

  .lang-btn{
    min-width: 40px;
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

/* =========================
   Custom Select UI (shared)
   ========================= */
.native-select-hidden{
  position:absolute !important;
  left:-9999px !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
}

/* segmented buttons */
.seg{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
}

.seg-btn{
  padding: 10px 12px;              /* was 12px 14px */
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;

  font-weight: 900;
  font-size: 14px;                 /* ✅ smaller text */
  line-height: 1.15;               /* ✅ tighter */
  letter-spacing: .1px;

  color: var(--text);
  cursor:pointer;
  user-select:none;

  min-height: 42px;                /* ✅ consistent height */
  white-space: nowrap;             /* ✅ prevent weird wrapping */
}

.seg-btn:hover{
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  transition: transform .12s ease, box-shadow .12s ease;
}

.seg-btn.is-active{
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 6px rgba(37,99,235,.10);
}

/* dropdown */
.dd{ position: relative; }

.dd-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;

  padding: 10px 12px;              /* was 12px 12px */
  border-radius: 12px;
  border: 1px solid var(--line);
  background:#fff;

  font-weight: 850;
  font-size: 14px;                 /* ✅ smaller text */
  line-height: 1.2;                /* ✅ tighter */
  cursor:pointer;

  min-height: 44px;                /* ✅ stable control height */
}

.dd-btn:focus{
  outline:none;
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 6px rgba(37,99,235,.10);
}

.dd-btn > span:first-child{
  overflow: hidden;
  text-overflow: ellipsis;         /* ✅ if text ever gets long */
  white-space: nowrap;
}

.dd-caret{
  opacity:.7;
  font-weight: 950;
  font-size: 14px;                 /* ✅ match */
  flex: 0 0 auto;
}

.dd-panel{
  position:absolute;
  top: calc(100% + 8px);
  left:0;
  right:0;
  z-index: 30;

  background:#fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;                    /* was 8px */

  max-height: 280px;
  overflow:auto;

  display:none;
}

.dd.is-open .dd-panel{ display:block; }

.dd-item{
  padding: 9px 10px;               /* was 10px 10px */
  border-radius: 12px;
  cursor:pointer;

  font-weight: 850;
  font-size: 14px;                 /* ✅ smaller text */
  line-height: 1.2;                /* ✅ tighter */
}

.dd-item:hover{ background:#f6f8ff; }
.dd-item.is-active{ background: rgba(37,99,235,.08); }

/* Extra tightening on small screens so layout never “swims” */
@media (max-width: 520px){
  .seg-btn{
    padding: 9px 11px;
    font-size: 13px;
    min-height: 40px;
  }

  .dd-btn{
    padding: 9px 11px;
    font-size: 13px;
    min-height: 42px;
  }

  .dd-caret{ font-size: 13px; }

  .dd-item{
    font-size: 13px;
    padding: 8px 10px;
  }
}
/* =========================
   Legal pages
   ========================= */
.legal { padding: 18px 0; }

.legal-card { padding: 18px; }

.legal-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}

.legal-title{ margin: 0 0 6px; font-size: 26px; line-height: 1.2; }

.legal-body h2{
  margin: 18px 0 8px;
  font-size: 16px;
  line-height: 1.25;
}

.legal-body p{ margin: 0 0 10px; }

.legal-note{
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(37,99,235,.04);
  margin-bottom: 14px;
}

.legal-list{
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
}

.legal-list li{ margin: 6px 0; }

.legal-placeholder{
  display:inline-block;
  padding: 2px 8px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}
