:root {
  --bg-light: #f7f8fc;
  --bg-white: #ffffff;
  --text-dark: #1a202c;
  --text-muted: #718096;
  --accent-blue: #3d52d5;
  --accent-yellow: #ffd500;
  --border-color: #e2e8f0;
  --shadow: 0 10px 20px rgba(61, 82, 213, 0.1);
  --radius: 16px;
  --font-family: "Manrope", sans-serif;
  --transition: all 0.3s ease-in-out;
  --container: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-family);
  line-height: 1.6;
  background-color: var(--bg-light);
  color: var(--text-dark);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
dl,
dd,
ul {
  margin: 0;
}

.container {
  width: 90%;
  max-width: var(--container);
  margin: 0 auto;
}

.header {
  background: var(--bg-white);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  width: 120px;
}

.navigation {
  display: flex;
  gap: 2rem;
}

.navigation a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.navigation a:hover,
.navigation a:focus-visible {
  color: var(--accent-blue);
}

.burger {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-white);
  cursor: pointer;
}

.burger span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--text-dark);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.main-content {
  padding: 3rem 0;
}

.hero {
  text-align: center;
  margin-bottom: 3.5rem;
}

.main-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.main-title .highlight {
  color: var(--accent-blue);
  background: linear-gradient(to top, var(--accent-yellow) 50%, transparent 50%);
}

.subtitle {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 600px;
}

.anchor {
  display: block;
  position: relative;
  top: -100px;
  visibility: hidden;
}

.offers-section {
  margin-bottom: 2rem;
}

.offers-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.offer-card {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.offer-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(61, 82, 213, 0.15);
}

.offer-badge {
  position: absolute;
  z-index: 3;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.offer-badge--top {
  top: 12px;
  left: 12px;
  color: var(--bg-white);
  background: var(--accent-blue);
}

.offer-badge--low {
  bottom: 12px;
  left: 12px;
  color: var(--text-dark);
  background: var(--accent-yellow);
}

.card-top {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  position: relative;
  background-color: #fafbff;
}

.card-top::after {
  content: "";
  position: absolute;
  bottom: -30px;
  left: 0;
  width: 150%;
  height: 60px;
  background: var(--bg-white);
  transform: rotate(-5deg);
  transform-origin: top left;
}

.offer-logo {
  width: 180px;
  flex-shrink: 0;
  z-index: 2;
  margin: 0 auto;
}

.offer-logo a {
  display: block;
}

.offer-logo img {
  width: 100%;
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.offer-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
  width: 100%;
  margin-bottom: 1.5rem;
}

.info-item .info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.info-item .value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
}

.info-item .value span {
  font-weight: 500;
  font-size: 0.9rem;
}

.approval-chance {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.rating-bar {
  flex-grow: 1;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.rating-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd500, #fca500);
  border-radius: 4px;
}

.offer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.offer-links a {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-blue);
  text-decoration: none;
}

.offer-links a:hover {
  text-decoration: underline;
}

.cta-button {
  margin-top: auto;
  padding: 16px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--bg-white);
  background-color: var(--accent-blue);
  border-radius: 12px;
  text-decoration: none;
  text-align: center;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.cta-button:hover,
.cta-button:focus-visible {
  background-color: #2e41b5;
  transform: scale(1.03);
}

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.tags-section {
  margin: 2.5rem 0;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.tag-link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.tag-link:hover,
.tag-link--active {
  color: var(--bg-white);
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.content-section {
  margin-top: 3.5rem;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
  line-height: 1.2;
}

.lender-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.lender-details-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

.lender-details-card:hover,
.lender-details-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent-blue);
}

.lender-details-card__name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.lender-details-card__rows {
  display: grid;
  gap: 0.5rem;
}

.lender-details-card__row {
  display: grid;
  grid-template-columns: minmax(90px, 0.9fr) minmax(0, 1.1fr);
  gap: 0.5rem;
  font-size: 0.85rem;
}

.lender-details-card__row span {
  color: var(--text-muted);
}

.lender-details-card__row strong {
  font-weight: 600;
  color: var(--text-dark);
}

.lender-details-card__row a {
  color: var(--accent-blue);
  text-decoration: none;
}

.lender-details-card__row--full {
  grid-template-columns: 1fr;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-white);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.faq-item__summary {
  cursor: pointer;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  font-size: 1.05rem;
  font-weight: 700;
}

.faq-item__summary::-webkit-details-marker {
  display: none;
}

.faq-item__summary::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text-dark);
  border-bottom: 2px solid var(--text-dark);
  transform: rotate(45deg);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item[open] .faq-item__summary::after {
  transform: rotate(225deg);
}

.faq-item__content {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
}

.faq-item__content p {
  line-height: 1.65;
}

.seo-text {
  max-width: 860px;
  margin: 3.5rem auto 0;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.seo-text h2,
.seo-text h3 {
  font-weight: 800;
  line-height: 1.25;
  margin: 1.5rem 0 0.75rem;
}

.seo-text h2 {
  font-size: 1.5rem;
  margin-top: 0;
}

.seo-text h3 {
  font-size: 1.2rem;
}

.seo-text p,
.seo-text li {
  color: var(--text-muted);
  line-height: 1.65;
}

.seo-text ol {
  margin: 0;
  padding-left: 1.25rem;
}

.footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-info {
  flex-basis: 60%;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-contact {
  flex-basis: 35%;
  text-align: right;
}

.footer-contact span {
  display: block;
  color: var(--text-muted);
}

.footer-contact a {
  color: var(--accent-blue);
  font-weight: 700;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  margin-top: 2rem;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--accent-blue);
}

.policy-page {
  padding-bottom: 2rem;
}

.policy-hero {
  margin-bottom: 2rem;
}

.policy-hero__card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.policy-hero__card h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-top: 0.75rem;
}

.policy-hero__subtitle {
  margin-top: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.policy-hero__label {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue);
  background: rgba(61, 82, 213, 0.08);
}

.policy-grid {
  display: grid;
  gap: 1rem;
}

.policy-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.policy-card .section-title {
  text-align: left;
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.policy-card p {
  color: var(--text-muted);
  line-height: 1.65;
}

.policy-card p + p {
  margin-top: 0.75rem;
}

.button-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.6rem 1.25rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--bg-white);
  background: var(--accent-blue);
  text-decoration: none;
  transition: var(--transition);
}

.button-back:hover {
  background: #2e41b5;
}

@media (max-width: 768px) {
  .navigation {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.75rem;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .navigation.active {
    display: flex;
  }

  .navigation a {
    padding: 0.75rem;
    border-radius: 8px;
  }

  .burger {
    display: block;
  }

  .offers-list,
  .lender-details-grid {
    grid-template-columns: 1fr;
  }

  .footer-content,
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-contact {
    text-align: center;
  }

  .seo-text {
    padding: 1.25rem;
  }
}
