/*
 * Расположение на сервере: /home/exezine.az/public_html/assets/css/app.css
 *
 * Дизайн-система E-Xezine. Фирменные цвета (navy + тёплый градиент лого).
 * Две темы переключаются атрибутом на <html>:
 *   data-theme="light"  — светлая (по умолчанию)
 *   data-theme="dark"   — тёмная
 */

/* ===== Фирменная палитра E-Xezine (из логотипа) ===== */
:root {
  --ex-lime:   #aacb1a;   /* лайм-зелёный (внешний слой знака) */
  --ex-yellow: #f7b500;   /* жёлтый */
  --ex-orange: #f5821f;   /* оранжевый (основной акцент) */
  --ex-red:    #ef4e23;   /* красно-оранжевый */
  --ex-navy:   #16213e;   /* тёмно-синий (текст логотипа) */
  --ex-gradient: linear-gradient(120deg, #aacb1a 0%, #f7b500 38%, #f5821f 68%, #ef4e23 100%);

  --radius:    16px;
  --radius-sm: 11px;
  --radius-lg: 22px;
  --maxw: 1200px;
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ===== Светлая тема ===== */
:root, [data-theme="light"] {
  --bg: #f5f7fb;
  --bg-soft: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f4f6fb;
  --border: #e6eaf2;
  --border-strong: #d6dce8;
  --text: #16213e;
  --text-dim: #69728c;
  --primary: #ef6c1a;
  --primary-ink: #ffffff;
  --primary-soft: #fff1e6;
  --shadow-sm: 0 1px 2px rgba(22,33,62,.06), 0 2px 8px rgba(22,33,62,.05);
  --shadow: 0 8px 28px -12px rgba(22,33,62,.22);
  --shadow-lg: 0 24px 60px -28px rgba(22,33,62,.32);
  --ring: 0 0 0 4px rgba(245,130,31,.18);
  --success: #16a06a; --success-soft:#e4f6ee;
  --danger: #e23a52;  --danger-soft:#fdecef;
  --warn: #d68a0c;    --warn-soft:#fdf2dc;
}

/* ===== Тёмная тема ===== */
[data-theme="dark"] {
  --bg: #0c1322;
  --bg-soft: #0a0f1b;
  --surface: #131c30;
  --surface-2: #1a2540;
  --border: #243150;
  --border-strong: #30406a;
  --text: #eaf0ff;
  --text-dim: #93a0c0;
  --primary: #ff8a3d;
  --primary-ink: #14203b;
  --primary-soft: #2a2013;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 12px 36px -16px rgba(0,0,0,.7);
  --shadow-lg: 0 30px 70px -30px rgba(0,0,0,.8);
  --ring: 0 0 0 4px rgba(255,138,61,.22);
  --success:#2dd391; --success-soft:#0f2b22;
  --danger:#ff5d73;  --danger-soft:#2a1620;
  --warn:#f0b341;    --warn-soft:#2a2210;
}

/* ===== База ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); color: var(--text); background: var(--bg);
  min-height: 100vh; line-height: 1.55; -webkit-font-smoothing: antialiased;
  transition: background .35s var(--ease), color .35s var(--ease);
}
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.grad-text { background: var(--ex-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ===== Логотип ===== */
.logo { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 21px; letter-spacing: -.02em; color: var(--text); }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo b { font-weight: 800; }

/* ===== Шапка ===== */
.header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 16px; }
.header__nav { display: flex; align-items: center; gap: 10px; }

/* Переключатель темы */
.theme-toggle { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); cursor: pointer; display: grid; place-items: center;
  transition: .2s var(--ease); }
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.btn-ghost { padding: 11px 18px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; transition: .2s var(--ease); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ===== HERO ===== */
.hero { position: relative; padding: 96px 0 64px; text-align: center; overflow: hidden; }
.hero::before { content: ""; position: absolute; top: -180px; left: 50%; transform: translateX(-50%);
  width: 760px; height: 480px; background: var(--ex-gradient); opacity: .14; filter: blur(90px); border-radius: 50%; z-index: 0; }
[data-theme="dark"] .hero::before { opacity: .22; }
.hero > .container { position: relative; z-index: 1; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); font-size: 13px; font-weight: 600;
  margin-bottom: 26px; box-shadow: var(--shadow-sm); }
.hero__badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.hero h1 { font-size: clamp(36px, 6vw, 66px); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; }
.hero p { max-width: 600px; margin: 22px auto 0; color: var(--text-dim); font-size: clamp(16px, 2.1vw, 19px); }
.hero__stats { display: flex; gap: 48px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.hero__stat b { display: block; font-size: 30px; font-weight: 800; }
.hero__stat span { color: var(--text-dim); font-size: 14px; }

/* ===== Поиск ===== */
.search-wrap { max-width: 540px; margin: 40px auto 0; position: relative; }
.search-wrap input { width: 100%; font: inherit; font-size: 16px; color: var(--text); padding: 16px 18px 16px 52px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border); outline: none;
  box-shadow: var(--shadow-sm); transition: .2s var(--ease); }
.search-wrap input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.search-wrap input::placeholder { color: var(--text-dim); }
.search-wrap svg { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-dim); }

/* ===== Сетка мерчантов ===== */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 60px 0 22px; }
.section-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.section-head span { color: var(--text-dim); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 18px; padding-bottom: 90px; }

.card { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 28px 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s var(--ease); cursor: pointer; }
.card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; border-radius: var(--radius) var(--radius) 0 0;
  background: var(--ex-gradient); opacity: 0; transition: opacity .28s var(--ease); }
.card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.card:hover::after { opacity: 1; }
.card__logo { width: 80px; height: 80px; border-radius: 18px; background: #fff; padding: 12px; display: grid; place-items: center;
  margin-bottom: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.card__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.card__name { font-weight: 700; font-size: 16px; }
.card__pay { margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px; transition: .2s var(--ease); }
.card:hover .card__pay { color: var(--primary); gap: 9px; }

/* Аватар-заглушка (буква) */
.av { width: 100%; height: 100%; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 26px; color: #fff; background: var(--ex-gradient); }

/* ===== Страница оплаты ===== */
.pay { max-width: 480px; margin: 56px auto 90px; }
.pay__card { border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); overflow: hidden; }
.pay__head { padding: 38px 32px 26px; text-align: center; border-bottom: 1px solid var(--border); position: relative; }
.pay__head::before { content:""; position:absolute; inset:0 0 auto 0; height:4px; background:var(--ex-gradient); }
.pay__logo { width: 92px; height: 92px; border-radius: 22px; background: #fff; padding: 14px; margin: 0 auto 18px; display: grid; place-items: center; box-shadow: var(--shadow); border: 1px solid var(--border); }
.pay__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pay__head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.pay__head p { color: var(--text-dim); font-size: 14px; margin-top: 6px; }
.pay__body { padding: 28px 32px 32px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 8px; }
.field input { width: 100%; font: inherit; font-size: 16px; color: var(--text); padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border); outline: none; transition: .2s var(--ease); }
.field input:focus { border-color: var(--primary); box-shadow: var(--ring); background: var(--surface); }
.field input::placeholder { color: var(--text-dim); }
.amount-field { position: relative; }
.amount-field .cur { position: absolute; right: 16px; top: 41px; font-size: 22px; font-weight: 800; color: var(--text-dim); pointer-events: none; }
.amount-field input { font-size: 30px; font-weight: 800; padding-right: 48px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.quick button { font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; padding: 9px 15px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim); transition: .2s var(--ease); }
.quick button:hover { color: var(--primary); border-color: var(--primary); }

.btn-pay { width: 100%; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; color: var(--primary-ink);
  padding: 17px; border: 0; border-radius: var(--radius-sm); margin-top: 8px; background: var(--ex-gradient); background-size: 160% 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px; transition: transform .15s var(--ease), background-position .4s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 10px 26px -10px rgba(245,130,31,.6); }
.btn-pay:hover { transform: translateY(-2px); background-position: 100% 0; }
.btn-pay:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.btn-pay .spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: none; }
.btn-pay.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.methods { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.methods span.lbl { font-size: 12px; color: var(--text-dim); }
.method-badge { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim); }
.secure-note { text-align: center; margin-top: 18px; font-size: 12px; color: var(--text-dim); display: flex; align-items: center; justify-content: center; gap: 6px; }

.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; margin-bottom: 18px; display: none; }
.alert.show { display: block; }
.alert--error { background: var(--danger-soft); border: 1px solid var(--danger); color: var(--danger); }

/* ===== Результат ===== */
.result { max-width: 460px; margin: 76px auto; text-align: center; }
.result__icon { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 24px; display: grid; place-items: center; }
.result__icon svg { width: 46px; height: 46px; }
.result--success .result__icon { background: var(--success-soft); color: var(--success); }
.result--fail .result__icon { background: var(--danger-soft); color: var(--danger); }
.result h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.result p { color: var(--text-dim); margin-top: 12px; }
.btn-back { display: inline-flex; margin-top: 28px; padding: 14px 28px; border-radius: 999px; font-weight: 700; color: var(--primary-ink); background: var(--ex-gradient); box-shadow: 0 10px 26px -10px rgba(245,130,31,.6); }

/* ===== Подвал ===== */
.footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer__inner { padding: 44px 0; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; color: var(--text-dim); font-size: 14px; }
.footer__col h4 { color: var(--text); font-size: 14px; margin-bottom: 12px; }
.footer__col p { margin-bottom: 6px; }
.footer a:hover { color: var(--primary); }
.footer__bottom { text-align: center; padding: 18px 0; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 13px; }

.empty { text-align: center; color: var(--text-dim); padding: 60px 0; grid-column: 1/-1; }

@media (max-width: 720px) {
  .footer__inner { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 40px; }
  .pay { margin: 28px auto 60px; }
}
