/* ============================================================
   Займы 8 — zaim8.online
   ============================================================ */

:root {
  --bg: #edeff9;
  --card: #ffffff;
  --text: #1d1d1b;
  --muted: #6b6b68;
  --green: #3f9923;
  --green-hover: #38cb0c;
  --green-btn: #57a035;
  --green-btn-hover: #4a8f2c;
  --green-soft: #dcefd2;
  --green-tint: #eef7ea;
  --badge-bg: #fdeee0;
  --badge-text: #bd6f3a;
  --input-bg: #eceef8;
  --border: #e6e8f2;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 2px 10px rgba(29, 29, 27, .04);
  --font-head: 'Playfair Display', 'PT Serif', Georgia, serif;
  --font-body: 'PT Serif', Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

img, svg { display: block; max-width: 100%; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-hover); }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-title {
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 20px;
}

/* ============================ Buttons ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 15px 32px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.btn-primary {
  background: var(--green-btn);
  color: #fff;
}
.btn-primary:hover { background: var(--green-btn-hover); color: #fff; }

.btn-block { width: 100%; }

/* ============================ Header ============================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(29, 29, 27, .05);
}

section[id] { scroll-margin-top: 80px; }

.header-inner {
  display: flex;
  align-items: center;
  gap: 48px;
  min-height: 66px;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: .5px;
  color: var(--text);
  white-space: nowrap;
}
.logo:hover { color: var(--text); }

.logo-badge {
  border: 3px solid var(--green);
  border-radius: 10px 14px 12px 15px / 14px 10px 15px 12px;
  padding: 1px 8px 2px;
  margin-right: 6px;
  transform: none;
}

.logo-num { color: var(--green); font-size: 30px; }

.main-nav {
  display: flex;
  gap: 34px;
}

.main-nav a {
  color: var(--text);
  font-size: 16.5px;
}
.main-nav a:hover { color: var(--green); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  margin-left: auto;
  cursor: pointer;
}
.burger span {
  width: 24px;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
}

/* ============================ Hero ============================ */

main { display: block; }
main > .container { margin-top: 20px; }

.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 48px 56px;
}

.hero h1 {
  font-family: var(--font-head);
  font-size: 58px;
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 24px;
}

.hero h1 .accent { color: var(--green); display: block; }

.hero p { max-width: 640px; font-size: 16.5px; }

.hero-features {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 34px;
}

.hero-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.32;
  flex: none;
  white-space: nowrap;
}

.feat-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #d9dbe3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feat-icon svg { width: 24px; height: 24px; fill: #3a3a37; }

.hero-art svg { width: 100%; height: auto; }

/* ============================ Search ============================ */

.search-card { padding: 36px 40px; }

.search-form {
  display: flex;
  gap: 16px;
}

.search-form input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--input-bg);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 16px 22px;
  outline: none;
  transition: border-color .18s ease;
}
.search-form input::placeholder { color: #9a9aa5; }
.search-form input:focus { border-color: var(--green); }

.search-form .btn { padding: 15px 44px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.chip {
  font-family: var(--font-body);
  font-size: 15.5px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 22px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.chip:hover { border-color: var(--green); color: var(--green); }
.chip.active {
  background: var(--green-btn);
  border-color: var(--green-btn);
  color: #fff;
}

/* ============================ Offers ============================ */

.offers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.offer-card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
}

.offer-card.hidden { display: none; }

.offer-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.offer-logo {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.offer-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  box-sizing: border-box;
  border-radius: 50%;
}

.offer-head h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 6px;
}

.offer-badge {
  display: inline-block;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--badge-text);
  background: var(--badge-bg);
  border-radius: 8px;
  padding: 4px 9px;
}

.offer-rows {
  margin: 16px 0 20px;
  display: grid;
  gap: 8px;
}

.offer-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px;
}

.offer-rows dt { color: #a3a3a8; }
.offer-rows dd { text-align: right; }
.offer-rows .strong { font-weight: 700; }

.offer-card .btn { margin-top: auto; font-size: 16px; padding: 14px 10px; }

.show-more {
  width: 100%;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  background: var(--card);
  border: none;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
  cursor: pointer;
  transition: color .18s ease;
}
.show-more:hover { color: var(--green); }
.show-more svg { transition: transform .2s ease; }
.show-more.open svg { transform: rotate(180deg); }

/* ============================ FAQ ============================ */

.faq-card, .text-card { padding: 44px 56px; }

.faq-item { border-top: 1px solid var(--border); padding: 18px 0; }
.faq-item:first-of-type { border-top: none; padding-top: 0; }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 700;
  color: var(--green);
  padding: 4px 0;
}
.faq-q:hover { color: var(--green-hover); }

.faq-toggle {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--green-soft);
  position: relative;
  transition: transform .2s ease;
}
.faq-toggle::before,
.faq-toggle::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 2.6px;
  border-radius: 2px;
  background: var(--green);
  transform: translate(-50%, -50%);
}
.faq-toggle::after { transform: translate(-50%, -50%) rotate(90deg); transition: opacity .2s ease; }

.faq-item.open .faq-toggle { transform: rotate(180deg); }
.faq-item.open .faq-toggle::after { opacity: 0; }

.faq-a {
  display: none;
  padding-top: 10px;
  color: #4c4c49;
}
.faq-item.open .faq-a { display: block; }

/* ============================ Text sections ============================ */

.text-card h2 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  margin: 34px 0 14px;
}
.text-card h2:first-child { margin-top: 0; }

.text-card h3 {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 700;
  margin: 26px 0 12px;
}

.text-card p { margin-bottom: 12px; color: #33332f; }

.text-card ul, .text-card ol { margin: 0 0 14px 22px; }
.text-card li { margin-bottom: 7px; color: #33332f; }

.text-card .steps li { margin-bottom: 9px; }

/* ============================ Expert ============================ */

.expert {
  background: var(--green-tint);
  border-radius: var(--radius);
  padding: 30px 40px;
  display: flex;
  gap: 36px;
  align-items: flex-start;
}

.expert-photo {
  flex: none;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  overflow: hidden;
}

.expert-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.expert-info h3 {
  font-family: var(--font-head);
  font-size: 24px;
  margin-bottom: 6px;
}

.expert-role { margin-bottom: 14px; }

.expert-updated { color: #9a9a95; font-size: 14.5px; margin-top: 6px; }

/* ============================ Journal ============================ */

.journal-head {
  display: flex;
  align-items: baseline;
  gap: 28px;
  margin-bottom: 20px;
}
.journal-head .section-title { margin-bottom: 0; }

.journal-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}
.journal-all svg { transition: transform .18s ease; }
.journal-all:hover svg { transform: translate(2px, -2px); }

.journal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.journal-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.journal-thumb { display: block; }
.journal-thumb svg { width: 100%; height: auto; }

.journal-body { padding: 18px 20px 22px; }

.journal-body h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 12px;
}
.journal-body h3 a { color: var(--text); }
.journal-body h3 a:hover { color: var(--green); }

.journal-body time { color: #a3a3a8; font-size: 14.5px; }

/* ============================ Footer ============================ */

.site-footer {
  margin-top: 20px;
  background: #f7f8fc;
  border-top: 1px solid var(--border);
  padding: 36px 0 46px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}

.footer-nav a { color: var(--text); font-size: 16.5px; }
.footer-nav a:hover { color: var(--green); }

.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  font-size: 15px;
  color: #55554f;
}

.footer-left p { margin-bottom: 22px; }

.footer-left a {
  display: block;
  margin-bottom: 12px;
}

.footer-right p { margin-bottom: 16px; }

/* ============================ To top ============================ */

.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--green-btn);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(63, 153, 35, .35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.to-top.visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--green-btn-hover); }

/* ============================ Responsive ============================ */

@media (max-width: 1100px) {
  .offers-grid, .journal-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 48px; }
}

@media (max-width: 920px) {
  .offers-grid { grid-template-columns: repeat(2, 1fr); }
  .journal-grid { grid-template-columns: repeat(2, 1fr); }

  .hero {
    grid-template-columns: 1fr;
    padding: 36px 32px;
  }
  .hero-art { max-width: 480px; }

  .faq-card, .text-card { padding: 32px 30px; }

  .expert { flex-direction: column; padding: 28px; }
  .expert-photo { width: 130px; height: 130px; }

  .footer-cols { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 640px) {
  .header-inner { gap: 20px; }

  .burger { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 10px 20px 16px;
    z-index: 50;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .main-nav a:last-child { border-bottom: none; }

  .hero { padding: 28px 22px; }
  .hero h1 { font-size: 34px; }
  .hero-features { gap: 18px; margin-top: 24px; }

  .search-card { padding: 24px 20px; }
  .search-form { flex-direction: column; }
  .search-form .btn { width: 100%; }

  .offers-grid, .journal-grid { grid-template-columns: 1fr; }

  .section-title { font-size: 24px; }
  .faq-q { font-size: 17px; }
  .faq-card, .text-card { padding: 26px 20px; }
  .text-card h2 { font-size: 22px; }
  .text-card h3 { font-size: 19px; }

  .footer-nav { gap: 20px; }
  .to-top { right: 16px; bottom: 16px; }
}
