/* =============================================================
   main.css — Bondelånet
   Page-specific styles
   ============================================================= */

/* ── Page offset for fixed navbar ── */
body { padding-top: 72px; }

/* ── Hero ── */
.hero-section {
  background: url('../brand_assets/bild-bonde-aker.jpg') center center / cover no-repeat;
  position: relative;
  padding: 72px 24px 80px;
  text-align: center;
  color: #fff;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-h1 {
  font-size: 58px;
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 20px;
  color: #fff;
}
.hero-sub {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255,255,255,0.9);
  margin: 0 0 36px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: #2d7a26;
  font-weight: 700;
  font-size: 17px;
  padding: 16px 40px;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.2);
  color: #2d7a26;
  text-decoration: none;
}

/* ── Hero Calculator ── */
.hero-calc {
  max-width: 660px;
  margin: 0 auto;
  text-align: left;
}
.hero-calc-sliders {
  display: flex;
  gap: 40px;
  margin-bottom: 24px;
}
.hero-calc-col { flex: 1; }
.hero-calc-label {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.hero-calc-label-note {
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  font-size: 13px;
}
.hero-calc-value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.hero-slider {
  width: 100%;
  accent-color: #3da436;
  cursor: pointer;
  height: 6px;
  border-radius: 3px;
}
.hero-calc-results {
  display: flex;
  gap: 40px;
  margin-bottom: 12px;
}
.hero-calc-result-item { flex: 1; }
.hero-calc-result-label {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 4px;
}
.hero-calc-result-value {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}
.hero-calc-note {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin: 0 0 28px;
}
.hero-calc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #3da436;
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  padding: 16px 40px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: 'Poppins', sans-serif;
  transition: transform 0.15s, box-shadow 0.2s, background 0.15s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.hero-calc-btn:hover {
  background: #34912d;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}

/* ── How it works ── */
.how-section {
  padding: 72px 24px 80px;
  background: #fff;
}
.how-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}
.how-inner h2 {
  color: #3da436;
  margin-bottom: 16px;
  font-size: 34px;
}
.how-subtitle {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 56px;
}
.how-subtitle a { color: #3da436; }
.how-steps {
  display: flex;
  gap: 40px;
  justify-content: center;
}
.how-step {
  flex: 1;
  max-width: 280px;
}
.how-step-icon {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.how-step-icon img {
  height: 100px;
  width: auto;
  display: block;
  margin: 0 auto;
}
.how-step h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #3da436;
}
.how-step p {
  font-size: 14px;
  line-height: 24px;
  color: #555;
  margin: 0;
}

/* ── Loan form section ── */
.loan-apply-section {
  padding: 56px 24px 72px;
  background: #efefef;
}
.loan-apply-outer {
  max-width: 900px;
  margin: 0 auto;
}
.loan-apply-heading {
  color: #3da436;
  font-size: 30px;
  margin: 0 0 24px;
}

/* White card */
.loan-apply-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 48px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.07);
}

/* ── Sliders side by side ── */
.loan-sliders-row {
  display: flex;
  gap: 48px;
  margin-bottom: 36px;
  padding-bottom: 32px;
  border-bottom: 1px solid #e8e8e8;
}
.loan-slider-col { flex: 1; }
.loan-slider-label {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  margin-bottom: 12px;
}
.loan-slider-range-note {
  font-weight: 400;
  color: #666;
  font-size: 13px;
}
.loan-slider {
  width: 100%;
  accent-color: #3da436;
  cursor: pointer;
  height: 6px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.loan-slider-big-value {
  font-size: 32px;
  font-weight: 700;
  color: #222;
  margin-top: 6px;
}

/* ── Form fields grid ── */
.loan-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
  margin-bottom: 24px;
}
.loan-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.loan-field-group label {
  font-size: 13px;
  color: #555;
}
.loan-input {
  background: #f2f2f2;
  border: none;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  outline: none;
  transition: box-shadow 0.2s;
  width: 100%;
}
.loan-input:focus { box-shadow: 0 0 0 2px rgba(61,164,54,0.35); }

/* Terms row */
.loan-terms-row {
  margin-bottom: 24px;
  display: flex;
  justify-content: flex-end;
}
.loan-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
}
.loan-check-label input[type="checkbox"] {
  accent-color: #3da436;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}
.loan-terms-link { color: #3da436; }

/* ── Submit — full width ── */
.loan-submit-btn {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: #3da436;
  border: none;
  cursor: pointer;
  padding: 18px 24px;
  border-radius: 8px;
  width: 100%;
  display: block;
  transition: background 0.2s;
}
.loan-submit-btn:hover:not(:disabled) { background: #2d8026; }
.loan-submit-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.loan-error-wrapper {
  background: #fff5f5;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #b91c1c;
}
.loan-error-wrapper p { margin: 6px 0 0; color: #444; }
.loan-error-wrapper a { color: #3da436; }

/* ── Spinner ── */
.btn-spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ── Thank you step ── */
.loan-app-step h2 { margin-top: 0; color: #3da436; }
.inline-link { color: #3da436; }

/* ── Why Bondelånet — illustration + text ── */
.why-section {
  display: flex;
  align-items: center;
  background: #fff;
  overflow: hidden;
  min-height: 360px;
}
.why-illustration {
  flex: 0 0 42%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0 40px 40px;
  opacity: 0.35;
}
.why-illustration img {
  width: 100%;
  max-width: 480px;
  height: auto;
}
.why-text {
  flex: 1;
  padding: 56px 56px 56px 32px;
}
.why-text h2 {
  color: #3da436;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 28px;
}
.why-text p {
  font-size: 15px;
  line-height: 27px;
  color: #444;
  margin-bottom: 14px;
}

/* ── FAQ section ── */
.faq-section {
  padding: 64px 24px;
  background: #f8fdf7;
}
.faq-inner {
  max-width: 720px;
  margin: 0 auto;
}
.faq-inner h2 { margin-top: 0; text-align: center; margin-bottom: 32px; }

.accordion-item {
  border-bottom: 1px solid #dde8db;
}
.accordion-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 4px;
  cursor: pointer;
  user-select: none;
}
.accordion-q {
  font-size: 15px;
  font-weight: 600;
  color: #222;
}
.accordion-toggle {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: relative;
}
.accordion-toggle::before,
.accordion-toggle::after {
  content: '';
  position: absolute;
  background: #3da436;
  border-radius: 2px;
  transition: transform 0.25s;
}
.accordion-toggle::before { width: 12px; height: 2px; top: 9px; left: 4px; }
.accordion-toggle::after  { width: 2px; height: 12px; top: 4px; left: 9px; }
.accordion-item.open .accordion-toggle::after { transform: rotate(90deg); }

.accordion-body {
  display: none;
  padding: 0 4px 20px;
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}
.accordion-body p { margin: 0; }
.accordion-item.open .accordion-body { display: block; }

/* ── Contact CTA ── */
.contact-cta-section {
  padding: 56px 24px;
  background: #3da436;
  background-size: cover;
  text-align: center;
}
.contact-cta-section h3 {
  color: #fff;
  font-size: 22px;
  margin: 0 0 20px;
}
.contact-cta-btn {
  display: inline-block;
  background: #fff;
  color: #2d7a26;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 32px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
}
.contact-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  color: #2d7a26;
  text-decoration: none;
}

/* ── Loan calculator summary ── */
.loan-calc-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: #f8fdf7;
  border: 1px solid #d4ebd2;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 28px;
}
.loan-calc-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 12px;
  border-right: 1px solid #d4ebd2;
}
.loan-calc-item:last-child { border-right: none; }
.loan-calc-item--total { background: #edf7ec; }
.loan-calc-label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  line-height: 1.4;
}
.loan-calc-value {
  font-size: 20px;
  font-weight: 700;
  color: #3da436;
}
.loan-example-note {
  font-size: 11px;
  color: #999;
  line-height: 1.6;
  margin: -16px 0 24px;
  text-align: center;
}

/* ── News section (homepage) ── */
.news-section {
  padding: 72px 24px 80px;
  background: #fff;
}
.news-inner {
  max-width: 960px;
  margin: 0 auto;
}
.news-inner h2 {
  color: #3da436;
  font-size: 30px;
  margin: 0 0 36px;
  text-align: center;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}
.news-card {
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}
.news-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.10); }
.news-card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.news-card:hover .news-card-img img { transform: scale(1.03); }
.news-card-body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-card-date {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
  display: block;
}
.news-card-body h3 {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  margin: 0 0 10px;
  line-height: 1.4;
}
.news-card-body p {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 16px;
  flex: 1;
}
.news-read-more {
  font-size: 13px;
  font-weight: 600;
  color: #3da436;
  text-decoration: none;
}
.news-read-more:hover { color: #2d8026; text-decoration: underline; }
.news-all-link { text-align: center; }
.news-all-link .btn-primary {
  display: inline-block;
  background: #3da436;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 14px 36px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.news-all-link .btn-primary:hover { background: #2d8026; transform: translateY(-1px); }

/* ── Nyheter page ── */
.news-page-section {
  padding: 64px 24px 80px;
  background: #fff;
}
.news-page-inner {
  max-width: 960px;
  margin: 0 auto;
}
.news-page-h1 {
  font-size: 34px;
  color: #3da436;
  margin: 0 0 40px;
}
.news-page-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
.news-page-card {
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}
.news-page-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.10); }
.news-page-img-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.news-page-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.news-page-card:hover .news-page-img-wrap img { transform: scale(1.03); }
.news-page-body {
  padding: 20px 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-page-date {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
  display: block;
}
.news-page-title {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  margin: 0 0 10px;
  line-height: 1.4;
}
.news-page-excerpt {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 16px;
  flex: 1;
}

/* ── Artikel page ── */
.artikel-section {
  padding: 48px 24px 80px;
  background: #fff;
}
.artikel-inner {
  max-width: 720px;
  margin: 0 auto;
}
.artikel-back {
  display: inline-block;
  font-size: 13px;
  color: #3da436;
  text-decoration: none;
  margin-bottom: 32px;
  font-weight: 600;
}
.artikel-back:hover { text-decoration: underline; }
.artikel-hero-img {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 28px;
  aspect-ratio: 16 / 7;
}
.artikel-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.artikel-inner h1 {
  font-size: 30px;
  font-weight: 900;
  color: #222;
  margin: 12px 0 28px;
  line-height: 1.25;
}
.artikel-content { font-size: 15px; line-height: 1.8; color: #444; }
.artikel-content h2 { font-size: 22px; color: #3da436; margin: 28px 0 12px; }
.artikel-content h3 { font-size: 18px; color: #3da436; margin: 24px 0 10px; }
.artikel-content p { margin: 0 0 16px; }

/* ── Villkor / Integritetspolicy page ── */
.villkor-section {
  padding: 56px 24px 80px;
  background: #fff;
}
.villkor-inner {
  max-width: 760px;
  margin: 0 auto;
}
.villkor-inner h1 {
  font-size: 28px;
  font-weight: 900;
  color: #222;
  margin: 0 0 8px;
  line-height: 1.25;
}
.villkor-date {
  font-size: 13px;
  color: #999;
  margin: 0 0 40px;
}
.villkor-inner h2 {
  font-size: 18px;
  font-weight: 700;
  color: #3da436;
  margin: 36px 0 10px;
}
.villkor-inner h3 {
  font-size: 15px;
  font-weight: 700;
  color: #444;
  margin: 24px 0 8px;
}
.villkor-inner p {
  font-size: 14px;
  line-height: 1.8;
  color: #444;
  margin: 0 0 14px;
}
.villkor-inner ol, .villkor-inner ul {
  font-size: 14px;
  line-height: 1.8;
  color: #444;
  margin: 0 0 14px;
  padding-left: 24px;
}
.villkor-inner li { margin-bottom: 8px; }
.villkor-inner a { color: #3da436; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-h1 { font-size: 36px; }
  .hero-sub { font-size: 17px; }
  .hero-calc-sliders { flex-direction: column; gap: 24px; }
  .hero-calc-results { flex-direction: column; gap: 16px; }
  .hero-calc-result-value { font-size: 32px; }
  .how-steps { flex-direction: column; align-items: center; gap: 48px; }
  .loan-apply-card { padding: 28px 24px; }
  .loan-sliders-row { flex-direction: column; gap: 28px; }
  .loan-fields-grid { grid-template-columns: 1fr; }
  .loan-terms-row { justify-content: flex-start; }
  .why-section { position: relative; }
  .why-illustration { position: absolute; inset: 0; flex: none; width: 100%; height: 100%; padding: 0; opacity: 0.08; pointer-events: none; }
  .why-illustration img { width: 100%; height: 100%; object-fit: cover; }
  .why-text { position: relative; z-index: 1; padding: 40px 24px 48px; }
}
@media (max-width: 479px) {
  .hero-section { padding: 52px 20px 64px; }
  .hero-h1 { font-size: 30px; }
  .loan-apply-section { padding: 40px 16px 56px; }
  .loan-apply-card { padding: 24px 16px; }
  .loan-slider-big-value { font-size: 26px; }
  .loan-calc-value { font-size: 16px; }
}
@media (max-width: 768px) {
  .loan-calc-summary { grid-template-columns: repeat(2, 1fr); }
  .loan-calc-item { border-right: none; border-bottom: 1px solid #d4ebd2; }
  .loan-calc-item:nth-child(odd) { border-right: 1px solid #d4ebd2; }
  .loan-calc-item:last-child { border-bottom: none; }
  .loan-calc-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
  .news-grid { grid-template-columns: 1fr; }
  .news-page-grid { grid-template-columns: 1fr; }
}
