/* FintechPaa — sitewide layout rhythm, page shell, and content structure */

:root {
  --fp-nav-height: 4.5rem;
  --fp-section-y: clamp(3rem, 5vw, 4.75rem);
  --fp-content-width: 42rem;
  --fp-page-width: 72rem;
}

/* ---- Page shell (sticky footer) ---- */
html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  width: 100%;
}

main.pt-5 {
  padding-top: var(--fp-nav-height) !important;
}

/* ---- Containers & grid ---- */
@media (min-width: 1200px) {
  .container {
    max-width: var(--fp-page-width);
  }
}

@media (max-width: 575px) {
  .container {
    padding-left: 1.125rem;
    padding-right: 1.125rem;
  }
}

.row.g-4 {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 1.5rem;
}

.row.g-4 > [class*="col-"] > .card-fp,
.row.g-4 > [class*="col-"] > .fp-trust-card,
.row.g-4 > [class*="col-"] > .card {
  height: 100%;
}

/* ---- Section rhythm ---- */
main > section:not(.hero):not(.fp-trust-strip):not(.fp-proof-section),
main > article {
  padding-top: var(--fp-section-y);
  padding-bottom: var(--fp-section-y);
}

main > section:not(.hero):not(.fp-trust-strip):not(.fp-proof-section).py-5,
main > article.py-5 {
  padding-top: var(--fp-section-y);
  padding-bottom: var(--fp-section-y);
}

main > section.bg-fp-light:not(.hero),
main > section.fp-cta-band {
  border-top: 1px solid rgba(15, 118, 110, 0.09);
  border-bottom: 1px solid rgba(15, 118, 110, 0.09);
}

main > section.fp-cta-band {
  border: none;
}

main > section.fp-trust-strip,
main > section.fp-proof-section {
  border: none;
}

main > section.fp-trust-strip {
  padding-top: 0.85rem !important;
  padding-bottom: 0.85rem !important;
}

main > section.fp-proof-section {
  padding-top: 1.25rem !important;
  padding-bottom: 1.5rem !important;
}

main > section.fp-trust-strip + section:not(.hero),
main > section.fp-proof-section + section:not(.hero) {
  border-top: none;
}

/* Section headers */
main .section-title {
  margin-bottom: 0.85rem;
}

main .text-center.mb-5:has(.section-title),
main .text-center.mb-4:has(.section-title) {
  margin-bottom: 2.75rem !important;
}

main .section-title + .text-secondary,
main .section-title + p.text-secondary {
  max-width: var(--fp-content-width);
  margin-left: auto;
  margin-right: auto;
}

/* ---- Hero & page headers ---- */
.hero,
main > header.hero {
  padding: clamp(2rem, 4vw, 3.25rem) 0 clamp(2.25rem, 4vw, 3.5rem);
}

main > header.hero:first-child,
main > .hero:first-child {
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.hero.hero-with-bg {
  min-height: 300px;
  display: flex;
  align-items: center;
}

.hero.hero-with-bg .container {
  width: 100%;
}

/* Compact inner-page hero (blog, contact, etc.) */
main .hero:not(.hero-with-bg) {
  background:
    radial-gradient(800px 320px at 8% 0%, rgba(6, 182, 212, 0.1), transparent 58%),
    linear-gradient(180deg, #f0fdfa 0%, #fff 100%);
  border-bottom: 1px solid rgba(15, 118, 110, 0.1);
  margin-bottom: 0;
}

main .hero:not(.hero-with-bg) h1 {
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  max-width: 48rem;
}

main .hero:not(.hero-with-bg) .lead {
  max-width: var(--fp-content-width);
}

/* ---- Breadcrumbs ---- */
.breadcrumb {
  margin-bottom: 0.75rem;
  padding: 0;
}

.breadcrumb-item {
  font-size: 0.8125rem;
  font-weight: 500;
}

.breadcrumb-item.active {
  color: #64748b;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Breadcrumbs ---- */
.card-fp .card-body {
  padding: 1.35rem;
}

.card-fp h3.h5,
.card-fp .h5 {
  margin-bottom: 0.65rem;
}

.icon-box {
  font-size: 1.35rem;
}

/* Number / stat blocks */
section .rounded-3.bg-fp-light {
  border: 1px solid rgba(15, 118, 110, 0.08);
}

/* ---- Blog & long-form article layout ---- */
main article .col-lg-8,
main article .col-lg-8.text-secondary {
  font-size: 1.0625rem;
  line-height: 1.78;
  color: #475569 !important;
}

main article .col-lg-8 > p,
main article .col-lg-8 > ul,
main article .col-lg-8 > ol {
  margin-bottom: 1.25rem;
}

main article .col-lg-8 h2,
main article .col-lg-8 h2.h4 {
  font-size: 1.35rem;
  color: var(--fp-dark, #0f172a);
  margin-top: 2.5rem;
  margin-bottom: 0.85rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
  line-height: 1.35;
}

main article .col-lg-8 h2:first-of-type,
main article .col-lg-8 h2.h4:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

main article .col-lg-8 ul,
main article .col-lg-8 ol {
  padding-left: 1.35rem;
}

main article .col-lg-8 li + li {
  margin-top: 0.35rem;
}

/* Blog meta line under hero */
main .hero .text-muted.small {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.72rem !important;
  color: var(--fp-secondary, #0e7490) !important;
}

/* ---- Forms (contact, get-started) ---- */
main .card-fp .form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}

main .card-fp .form-control,
main .card-fp .form-select {
  padding: 0.625rem 0.875rem;
}

/* Two-column contact layout balance */
@media (min-width: 992px) {
  main .row.g-4 > .col-lg-6:first-child .card-fp,
  main .row.g-4 > .col-lg-6 + .col-lg-6 .card-fp:first-child {
    min-height: 100%;
  }
}

/* ---- Footer layout ---- */
.footer {
  flex-shrink: 0;
  margin-top: auto;
}

.footer-main {
  row-gap: 2rem;
}

@media (min-width: 768px) and (max-width: 991px) {
  .footer-main > [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .footer-main > .col-12.col-lg-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ---- Scroll reveal (paired with main.js) ---- */
.fp-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  will-change: opacity, transform;
}

.fp-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Keep legacy fade-in-up on homepage hero without double animation */
header.hero.fade-in-up.fp-reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .fp-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---- Accordion / FAQ spacing ---- */
main .accordion {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Blog listing cards ---- */
main .card-fp .badge.bg-primary {
  background: rgba(15, 118, 110, 0.12) !important;
  color: var(--fp-primary-dark, #0d5c56);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
}

main .card-fp .card-title {
  line-height: 1.35;
  min-height: 2.7em;
}

main .card-fp .card-body > a.small.text-primary {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  margin-top: 0.5rem;
}

/* ---- Blog table of contents ---- */
.fp-blog-row,
main article .row:has(.fp-blog-content) {
  align-items: flex-start;
}

.fp-blog-toc-col {
  position: relative;
}

.fp-blog-toc {
  position: sticky;
  top: calc(var(--fp-nav-height, 4.5rem) + 1.25rem);
  padding: 1.15rem 1.1rem;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #f8fffe 0%, #fff 100%);
  box-shadow: 0 8px 28px -20px rgba(15, 118, 110, 0.25);
}

.fp-blog-toc__title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fp-primary, #0f766e);
  margin: 0 0 0.85rem;
}

.fp-blog-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fp-blog-toc__list li + li {
  margin-top: 0.35rem;
}

.fp-blog-toc__list a {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #475569;
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 0.4rem;
  border-left: 2px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.fp-blog-toc__list a:hover {
  color: var(--fp-primary, #0f766e);
  background: rgba(15, 118, 110, 0.06);
}

.fp-blog-toc__list a.is-active {
  color: var(--fp-primary-dark, #0d5c56);
  font-weight: 600;
  border-left-color: var(--fp-primary, #0f766e);
  background: rgba(15, 118, 110, 0.08);
}

.fp-blog-toc-mobile {
  margin-bottom: 1.5rem;
}

.fp-blog-toc-mobile__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 0.65rem;
  background: #f0fdfa;
  color: var(--fp-primary-dark, #0d5c56);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.fp-blog-toc-mobile__toggle svg {
  transition: transform 0.2s ease;
}

.fp-blog-toc-mobile__toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.fp-blog-toc-mobile__list {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  background: #fff;
}

main article .fp-blog-content.col-lg-8 {
  flex: 0 0 auto;
  width: 100%;
}

@media (min-width: 992px) {
  main article .fp-blog-toc-col {
    flex: 0 0 auto;
    width: 28%;
  }

  main article .fp-blog-content.col-lg-8 {
    width: 72%;
    max-width: 72%;
  }
}

@media (min-width: 1200px) {
  main article .fp-blog-toc-col {
    width: 25%;
  }

  main article .fp-blog-content.col-lg-8 {
    width: 75%;
    max-width: 75%;
  }
}

/* ---- Utility: prose width for centered copy blocks ---- */
.fp-prose {
  max-width: var(--fp-content-width);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 575px) {
  main > section,
  main > article {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .hero,
  main > header.hero {
    padding-bottom: 2rem;
  }
}
