/* ФинГид — Custom Styles */
:root {
  --primary:   #1e3a5f;
  --accent:    #2563eb;
  --accent2:   #10b981;
  --card-bg:   #ffffff;
  --bg:        #f0f4f8;
  --border:    #d1dce8;
  --text:      #1e293b;
  --muted:     #64748b;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
}

/* ─── Navbar ─── */
.site-navbar {
  background: var(--primary) !important;
  border-bottom: 3px solid var(--accent);
  padding: 10px 0;
}
.site-navbar .navbar-brand {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff !important;
  letter-spacing: -1px;
}
.site-navbar .navbar-brand span { color: #60a5fa; }
.site-navbar .nav-link {
  color: #cbd5e1 !important;
  font-weight: 500;
  transition: color .15s;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active { color: #60a5fa !important; }

/* ─── Hero ─── */
.hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 60%, #0f172a 100%);
  color: #fff;
  padding: 56px 0 48px;
}
.hero h1 { font-size: 2.2rem; font-weight: 800; }
.hero p  { font-size: 1.1rem; color: #bfdbfe; max-width: 600px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-btns .btn-hero {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: all .2s;
}
.btn-hero-primary { background: var(--accent); color: #fff; }
.btn-hero-primary:hover { background: #1d4ed8; color: #fff; }
.btn-hero-outline { border: 2px solid #60a5fa; color: #60a5fa; }
.btn-hero-outline:hover { background: #60a5fa; color: #1e3a5f; }

/* ─── Stats row ─── */
.stats-row {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.stat-item { text-align: center; }
.stat-item .val { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.stat-item .lbl { font-size: .78rem; color: var(--muted); }

/* ─── Section headings ─── */
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}
.section-sub {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.btn-see-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: 1.5px solid var(--accent);
  border-radius: 20px;
  padding: 5px 16px;
  transition: all .2s;
}
.btn-see-all:hover { background: var(--accent); color: #fff; }

/* ─── Calculator ─── */
.calc-ad-row { align-items: flex-start; }
.calc-section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(30,58,95,.08);
  padding: 12px 16px;
  margin-bottom: 0;
  width: 100%;
  height: 250px;
  max-height: 250px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  overflow: hidden;
}
.calc-section h2 { font-size: 1.05rem; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.calc-label {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 0;
}
.calc-label span { font-weight: 700; color: var(--primary); font-size: .85rem; }
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 4px;
  background: #dbeafe;
  outline: none;
  margin: 2px 0 4px;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(37,99,235,.4);
}
.calc-result {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 8px;
  padding: 6px 12px;
  margin-top: 4px;
}
.calc-result .row > div {
  text-align: center;
  padding: 2px 4px;
}
.calc-result .r-val {
  font-size: .95rem;
  font-weight: 800;
  color: var(--primary);
}
.calc-result .r-lbl { font-size: .7rem; color: var(--muted); }
.btn-calc-action {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  text-align: center;
  text-decoration: none;
  transition: background .2s;
}
.btn-calc-action:hover { background: #1d4ed8; color: #fff; }

/* ─── Offer cards ─── */
.offer-card {
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  padding: 22px 20px 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, border-color .2s;
  position: relative;
  overflow: hidden;
}
.offer-card:hover {
  box-shadow: 0 8px 32px rgba(37,99,235,.12);
  border-color: var(--accent);
}
.offer-logo {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 12px;
  flex-shrink: 0;
}
.offer-logo-img {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.offer-logo-img img {
  max-height: 48px;
  max-width: 140px;
  width: auto;
  object-fit: contain;
}
.offer-name { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 2px; }
.offer-org  { font-size: .78rem; color: var(--muted); margin-bottom: 10px; }
.offer-features { flex: 1; }
.offer-feature {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: .82rem;
  color: var(--text);
  margin-bottom: 5px;
}
.offer-feature .ico { color: var(--accent2); font-size: .9rem; flex-shrink: 0; }
.offer-highlight {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--accent);
  margin: 10px 0 4px;
  line-height: 1;
}
.offer-highlight small { font-size: .7rem; font-weight: 500; color: var(--muted); }
.badge-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
  margin-right: 4px;
  margin-bottom: 4px;
}
.tag-green { background: #d1fae5; color: #065f46; }
.tag-blue  { background: #dbeafe; color: #1e40af; }
.tag-orange{ background: #fef3c7; color: #92400e; }
.tag-purple{ background: #ede9fe; color: #4c1d95; }
.tag-yellow{ background: #fef9c3; color: #854d0e; }
.btn-offer {
  display: block;
  text-align: center;
  background: var(--accent);
  color: #fff !important;
  border-radius: 8px;
  padding: 9px 0;
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  margin-top: 14px;
  transition: background .2s;
}
.btn-offer:hover { background: #1d4ed8; }
.card-badge-top {
  position: absolute;
  top: 14px; right: 14px;
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.badge-top-green { background: #10b981; color: #fff; }
.badge-top-blue  { background: #2563eb; color: #fff; }
.badge-top-red   { background: #ef4444; color: #fff; }
.badge-top-approval { background: #f59e0b; color: #fff; }
.badge-top-purple  { background: #8b5cf6; color: #fff; }
.badge-top-yellow { background: #ffdd2d; color: #1a1a1a; }

/* Карточки-хиты — синяя рамка в стиле сайта */
.offer-card-top-approval,
.offer-card-top-tinkoff {
  border: 1px solid #93c5fd;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.12);
}
.offer-card-top-approval:hover,
.offer-card-top-tinkoff:hover {
  border-color: #60a5fa;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.18);
}

/* ─── Category page header ─── */
.cat-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
  color: #fff;
  padding: 36px 0 32px;
}
.cat-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cat-header-icon {
  font-size: 1.4rem;
  color: #93c5fd;
  opacity: .95;
}
.cat-header-sub {
  color: #bfdbfe;
  font-size: .95rem;
  line-height: 1.55;
  max-width: 520px;
  margin: 0;
}
.section-icon {
  font-size: 1.2rem;
  color: var(--accent);
  margin-right: 6px;
  vertical-align: -0.15em;
}

/* ─── Filter bar ─── */
.filter-bar { background: #fff; border-radius: 10px; padding: 14px 20px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.filter-bar .form-select { border-radius: 8px; border-color: var(--border); font-size: .85rem; }

/* ─── FAQ ─── */
.faq-section { background: #fff; }
.accordion-button {
  font-weight: 600;
  color: var(--primary);
  background: #fff;
}
.accordion-button:not(.collapsed) {
  color: var(--accent);
  background: #eff6ff;
  box-shadow: none;
}
.accordion-button::after {
  filter: none;
}
.accordion-item { border-color: var(--border); }
.accordion-body { font-size: .9rem; color: var(--muted); }
.faq-expand-btn { font-weight: 600; }

/* ─── Ad banners ─── */
.ad-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
}
.ad-banner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  background: #e8eef5;
  border: 1px dashed #b0c0d0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.ad-banner .banner-rotator { flex: 1; min-width: 0; min-height: 0; }
.ad-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-rotator { width: 100%; height: 100%; position: relative; }
.banner-item { width: 100%; height: 100%; display: block; }
.banner-item .banner-img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; display: block; }
.ad-leaderboard { width: 728px; height: 90px; max-width: 100%; }
.ad-leaderboard .banner-rotator { height: 90px; }
.ad-rectangle   { width: 300px; height: 250px; max-width: 100%; }
.calc-side-banner { flex-shrink: 0; }
.ad-rectangle .banner-rotator { height: 250px; }
.ad-rectangle .banner-img { object-fit: contain; }
.ad-halfpage    { width: 300px; height: 600px; }
.ad-label {
  position: absolute;
  top: 2px; left: 6px;
  font-size: 9px;
  color: #94a3b8;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ─── Footer ─── */
footer {
  background: var(--primary);
  color: #94a3b8;
  padding: 28px 0 24px;
  font-size: .85rem;
}
footer .footer-inner { }
footer .footer-logo { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
footer .footer-logo span { color: #60a5fa; }
footer .footer-content-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
footer .footer-text-row {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
footer .footer-disclaimer {
  font-size: .82rem;
  line-height: 1.5;
  color: #94a3b8;
  margin: 0;
  max-width: 480px;
}
footer .footer-recommend {
  font-size: .82rem;
  line-height: 1.5;
  color: #bfdbfe;
  margin: 0 0 0 48px;
  max-width: 300px;
  flex-shrink: 0;
}
footer .footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
footer .footer-nav a { color: #93c5fd; text-decoration: none; }
footer .footer-nav a:hover { text-decoration: underline; }
footer a { color: #93c5fd; text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ─── Utilities ─── */
.section-divider { border-color: var(--border); margin: 0; }
.text-accent { color: var(--accent); }
.bg-accent   { background: var(--accent); }

@media (max-width: 768px) {
  .hero h1 { font-size: 1.5rem; text-align: center; }
  .hero p { text-align: center; margin-left: auto; margin-right: auto; }
  .hero .container { display: flex; flex-direction: column; align-items: center; }
  .hero-btns {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 320px;
  }
  .hero-btns .btn-hero {
    width: 100%;
    text-align: center;
  }
  .section-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .section-header .section-title { justify-content: center; }
  .section-header .section-sub { text-align: center; margin-left: auto; margin-right: auto; margin-bottom: 12px; }
  .section-header .btn-see-all {
    margin: 12px 0;
    white-space: nowrap;
    order: 3;
  }
  .cat-header h1 { justify-content: center; }
  .cat-header-sub { margin-left: auto; margin-right: auto; text-align: center; }
  footer .footer-content-row { flex-direction: column; }
  footer .footer-text-row { flex-direction: column; gap: 12px; }
  footer .footer-disclaimer { max-width: none; }
  footer .footer-recommend { max-width: none; margin-left: 0; }
  footer .footer-nav { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .calc-section {
    padding: 16px 14px;
    height: auto;
    min-height: 250px;
    max-height: none;
    overflow: visible;
  }
  .calc-side-banner,
  .ad-rectangle { margin-left: auto; margin-right: auto; }
  .calc-ad-row .col-lg-auto { display: flex; justify-content: center; }
  .offer-card {
    padding: 16px 14px;
    text-align: center;
  }
  .offer-card .offer-logo-img { justify-content: center; }
  .offer-card .offer-feature { justify-content: center; }
}
