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

:root {
  --cta:         #f783ad;
  --cta-dark:    #e05c8a;
  --brand:       #16a34a;
  --brand-light: #dcfce7;
  --brand-dark:  #15803d;
  --bg:          #f3f4f6;
  --card-bg:     #ffffff;
  --text:        #1e293b;
  --muted:       #64748b;
  --border:      #f0c8d8;
  --white:       #ffffff;
  --radius:      14px;
  --shadow:      0 2px 12px rgba(0,0,0,.07);
  --shadow-hover:0 6px 24px rgba(0,0,0,.13);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(15, 23, 42, .08);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 20px;
  color: var(--cta);
  letter-spacing: -0.5px;
}
.logo img { height: 36px; width: auto; display: block; }
.badge-nbu {
  font-size: 11px;
  background: var(--brand-light);
  color: var(--brand-dark);
  border-radius: 20px;
  padding: 3px 10px;
  font-weight: 600;
  white-space: nowrap;
}
.logo-catalog-tag {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-top: 8px;
}
.header-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #4fc772;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .15s, transform .15s, box-shadow .15s;
  animation: cta-pulse 1.8s ease-in-out infinite;
}
.header-nav-btn:hover {
  background: #39b862;
  transform: translateY(-1px);
  animation: none;
}
.more-companies-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}
.more-companies-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #4fc772;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  padding: 13px 28px;
  border-radius: 999px;
  transition: background .15s, transform .15s, box-shadow .15s;
  animation: cta-pulse 1.8s ease-in-out infinite;
}
.more-companies-btn:hover {
  background: #39b862;
  transform: translateY(-1px);
  animation: none;
}

/* ── Banner Slider ── */
.banner-section {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.main-banner-swiper {
  max-width: 1200px;
  margin: 0 auto;
}
.main-banner-swiper .swiper-slide {
  line-height: 0;
}
.banner-link {
  display: block;
}
.banner-link img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  object-position: center top;
}
.swiper-button-prev,
.swiper-button-next {
  color: var(--cta) !important;
}
.swiper-pagination-bullet-active {
  background: var(--cta) !important;
}

/* Хедер + банер на 15% компактніші на ПК (mobile лишається без змін) */
@media (min-width: 1024px) {
  .header-inner { height: 51px; }
  .logo img { height: 31px; }
  .main-banner-swiper { max-width: 1020px; }
}

/* ── Offers section ── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}
.section-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}
.arrow-anim {
  display: inline-block;
  font-size: 22px;
  color: var(--cta);
  animation: bounce-arrow 1s ease-in-out infinite;
  line-height: 1;
}

/* ── Offer Card ── */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.offer-card {
  background: var(--card-bg);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
  border: 1px solid #e5e7eb;
  overflow: visible;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}
.offer-card:hover:not(:has(.card-info[open])) {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .12);
}

.offer-card-wrap {
  position: relative;
  padding-top: 14px;
}
.card-badge {
  position: absolute;
  top: 2px;
  right: 10px;
  z-index: 3;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: .3px;
}
.badge-top   { background: var(--cta); color: white; }
.badge-new   { background: #0ea5e9; color: white; }
.badge-promo { background: #8b5cf6; color: white; }
.badge-best  { background: #f59e0b; color: white; }

.card-logo {
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  padding: 22px 18px 16px;
  border-bottom: none;
}
.card-logo img {
  width: 100%;
  height: 100%;
  max-height: 76px;
  max-width: none;
  object-fit: contain;
}
.card-logo-text {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.card-body {
  padding: 0 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
  position: relative;
}

.card-name {
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  line-height: 1.2;
}

.card-stats {
  border-top: 1px solid #eef2f7;
  padding-top: 14px;
  display: grid;
  gap: 4px;
}

.card-stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #475569;
  font-size: 15px;
  line-height: 1.35;
  text-align: left;
}

.card-stat-row strong {
  color: #0f2342;
  font-size: 15px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.val-pink {
  color: var(--cta);
  font-weight: 800;
}

.card-doc-link {
  font-size: 11px;
  color: #2563eb;
  text-decoration: underline;
  line-height: 1.4;
}
.card-doc-link:hover { color: #1d4ed8; }

.card-actions {
  display: flex;
  align-items: stretch;
  gap: 14px;
}

.card-info {
  position: relative;
  flex: 0 0 28px;
  align-self: center;
}

.card-info-button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #334155;
  border-radius: 7px;
  background: var(--white);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  list-style: none;
  transition: border-color .15s, color .15s, box-shadow .15s, background .15s;
}

.card-info-button::-webkit-details-marker {
  display: none;
}

.card-info-button:hover,
.card-info[open] .card-info-button {
  border-color: #16a34a;
  color: #16a34a;
  background: #f0fdf4;
  box-shadow: 0 2px 8px rgba(22,163,74,.18);
}

.card-info::details-content {
  transition: none !important;
}

.card-info-popover {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: min(250px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid #f0d0de;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(30,41,59,.18);
  color: var(--text);
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.card-info-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.card-info-close:hover {
  border-color: #16a34a;
  color: #16a34a;
}

.card-info-popover::after {
  content: "";
  position: absolute;
  left: 15px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  border-bottom: 1px solid #f0d0de;
  border-right: 1px solid #f0d0de;
  background: var(--white);
}

.card-info-title {
  margin-bottom: 2px;
  font-weight: 800;
}

.card-info-popover .card-doc-link {
  display: block;
  margin-top: 6px;
  font-size: 11px;
}

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 10px 20px rgba(34,197,94,.24), 0 0 0 0 rgba(34,197,94,.35); }
  50%       { box-shadow: 0 10px 20px rgba(34,197,94,.24), 0 0 0 7px rgba(34,197,94,0); }
}

/* Каталог kredify.online — жовті кнопки (тільки ця сторінка, головна лишається зеленою) */
@keyframes cta-pulse-yellow {
  0%, 100% { box-shadow: 0 10px 20px rgba(245,158,11,.28), 0 0 0 0 rgba(245,158,11,.4); }
  50%       { box-shadow: 0 10px 20px rgba(245,158,11,.28), 0 0 0 7px rgba(245,158,11,0); }
}
body.catalog-page .card-cta,
body.catalog-page .header-nav-btn,
body.catalog-page .more-companies-btn {
  background: #fbbf24;
  color: #fff;
  animation-name: cta-pulse-yellow;
}
body.catalog-page .card-cta:hover,
body.catalog-page .header-nav-btn:hover,
body.catalog-page .more-companies-btn:hover {
  background: #f59e0b;
}
.card-cta {
  display: block;
  flex: 1 1 auto;
  background: #4fc772;
  color: white;
  font-weight: 800;
  font-size: 15px;
  text-align: center;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
  animation: cta-pulse 1.8s ease-in-out infinite;
}
.card-cta:hover {
  background: #39b862;
  transform: translateY(-1px);
  animation: none;
  box-shadow: 0 12px 24px rgba(34,197,94,.28);
}

/* ── Legal sections ── */
.legal-section {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 40px 16px;
}
.legal-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.legal-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--text);
}
.legal-block {
  margin-bottom: 20px;
}
.legal-block h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.legal-block p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  line-height: 1.7;
}
.legal-block ul {
  padding-left: 20px;
}
.legal-block li {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.legal-block a { color: var(--cta); text-decoration: underline; }

/* ── Про кредиторів ── */
.lenders-section {
  background: #fff5f8;
  padding: 40px 40px 48px;
  scroll-margin-top: 72px;
}

.lenders-section .legal-inner {
  max-width: 1420px;
}

.lenders-section .legal-title {
  margin-bottom: 30px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0;
}

.lenders-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.lender-card {
  background: var(--white);
  border: 1px solid #ffe4e6;
  border-radius: 16px;
  box-shadow: 0 4px 24px -8px rgba(15, 23, 42, .12);
  overflow: hidden;
}

.lender-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 20px 14px;
}

.lender-head h3 {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--text);
}

.lender-head a {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  border: none;
  border-radius: 8px;
  background: #f8fafc;
  color: #8aa0bd;
  font-size: 14px;
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}

.lender-head a:hover {
  background: #fff0f5;
  color: var(--cta);
}

.lender-body {
  padding: 0 20px 20px;
}

.lender-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 7px;
  font-size: 14px;
  line-height: 1.35;
}

.lender-row span {
  color: #94a3b8;
  font-weight: 500;
}

.lender-row strong {
  color: #334155;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.lender-row:last-child strong {
  font-size: 13px;
  line-height: 1.35;
}

/* ── Footer ── */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.footer a { color: var(--cta); text-decoration: underline; }

/* ── Mobile ── */
@media (max-width: 640px) {
  .offers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .offer-card {
    border-radius: 18px;
  }
  .card-logo {
    height: 86px;
    padding: 16px 12px 10px;
  }
  .card-logo img {
    width: 100%;
    height: 100%;
    max-height: 60px;
    max-width: none;
  }
  .card-badge { top: 2px; }
  .card-name { font-size: 13px; }
  .card-body { padding: 0 12px 12px; gap: 12px; }
  .card-stats {
    padding-top: 10px;
    gap: 3px;
  }
  .card-stat-row,
  .card-stat-row strong {
    font-size: 12px;
  }
  .card-stat-row {
    gap: 6px;
  }
  .card-actions { gap: 8px; }
  .card-info {
    position: relative;
    flex-basis: 26px;
  }
  .card-info-button {
    width: 26px;
    height: 26px;
    font-size: 14px;
  }
  .card-info-popover {
    position: fixed;
    left: 50%;
    right: auto;
    top: 50%;
    bottom: auto;
    z-index: 1001;
    width: min(330px, calc(100vw - 32px));
    max-height: calc(100vh - 96px);
    overflow: auto;
    transform: translate(-50%, -50%);
    padding: 18px 16px 16px;
    border-color: #bbf7d0;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
    font-size: 13px;
  }
  .card-info[open]::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(2px);
  }
  .card-info-popover::after { display: none; }
  .card-info-title {
    padding-right: 32px;
    font-size: 14px;
  }
  .card-info-popover .card-doc-link {
    margin-top: 8px;
    font-size: 12px;
  }
  .card-cta {
    font-size: 12px;
    padding: 9px 8px;
    min-width: 0;
    white-space: nowrap;
  }
  .lenders-section {
    padding: 40px 16px 48px;
  }
  .lenders-section .legal-title {
    font-size: 28px;
    margin-bottom: 28px;
  }
  .lenders-grid {
    grid-template-columns: 1fr;
  }
  .lender-head {
    padding: 20px 20px 14px;
  }
  .lender-row {
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
  }
  .swiper-button-prev,
  .swiper-button-next { display: none; }
}

.telegram-fab {
  position: fixed;
  bottom: 20px;
  right: 16px;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #229ed9;
  transition: background .2s, transform .2s;
  animation: telegram-pulse 2.2s ease-in-out infinite;
}
.telegram-fab.is-visible { display: flex; }
.telegram-fab:hover { background: #1e8ec1; transform: scale(1.05); }
.telegram-fab svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  animation: telegram-fly 3.4s ease-in-out infinite;
}
@keyframes telegram-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,158,217,.45); }
  50%       { box-shadow: 0 0 0 10px rgba(34,158,217,0); }
}
@keyframes telegram-fly {
  0%, 18%, 100% { transform: translate(0, 0) rotate(0deg); }
  32%            { transform: translate(3px, -3px) rotate(12deg); }
  46%            { transform: translate(0, 0) rotate(0deg); }
}
@media (min-width: 640px) {
  .telegram-fab { bottom: 24px; right: 24px; }
}

@media (min-width: 1024px) {
  .offers-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }
}
