/* Credit Flow Solutions — Single Page CI */
:root {
  --primary: #0052CC;
  --primary-dark: #003DA6;
  --navy: #001F3F;
  --navy-mid: #003D82;
  --accent: #007BFF;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --radius: 0.65rem;
  --shadow: 0 4px 24px rgba(0, 31, 63, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 31, 63, 0.12);
  --container: 1280px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans Thai', sans-serif;
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: rgba(0, 82, 204, 0.06); }

.btn-white {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.btn-white:hover { background: var(--gray-100); }

.btn-line {
  background: #00B900;
  color: var(--white);
  border-color: #00B900;
  width: 100%;
}
.btn-line:hover { background: #008C00; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.nav-logo img { height: 44px; width: auto; }

.nav-logo-text { display: none; }
@media (min-width: 480px) {
  .nav-logo-text { display: block; }
  .nav-logo-text .brand { font-weight: 700; font-size: 0.95rem; color: var(--primary); line-height: 1.2; }
  .nav-logo-text .sub { font-size: 0.65rem; color: var(--gray-500); letter-spacing: 0.08em; }
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.1rem;
}

@media (min-width: 768px) { .nav-links { display: flex; } }
@media (min-width: 1024px) { .nav-links { gap: 1.5rem; } }

.nav-links a {
  font-size: 0.82rem;
  color: var(--gray-600);
  transition: color 0.2s;
  white-space: nowrap;
}
@media (min-width: 1024px) {
  .nav-links a { font-size: 0.88rem; }
}
.nav-links a:hover { color: var(--primary); }

.nav-cta { display: none; }
@media (min-width: 768px) { .nav-cta { display: inline-flex; } }

.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
@media (min-width: 768px) { .menu-toggle { display: none; } }

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: 0.3s;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0 1rem;
  border-top: 1px solid var(--gray-100);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 0.65rem 0;
  color: var(--gray-700);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--gray-100);
}
.mobile-menu .btn { margin-top: 0.5rem; width: 100%; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4rem 0 5rem;
}

@media (min-width: 768px) { .hero { padding: 6rem 0 8rem; } }

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('images/hero.png') center/cover no-repeat;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(255,255,255,0.96) 40%, rgba(255,255,255,0.72) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero-logo { height: 80px; width: auto; margin-bottom: 1.5rem; }

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
  margin-bottom: 1rem;
}

.hero h1 .highlight { color: var(--primary); }

.hero-desc {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: var(--gray-700);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2.5rem; }
.hero-cta .btn { flex: 1 1 auto; min-width: 160px; }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
}

.trust-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.trust-icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.trust-item strong { display: block; font-size: 0.9rem; color: var(--navy); }
.trust-item span { font-size: 0.8rem; color: var(--gray-600); }

/* Sections */
.section { padding: 5rem 0; }
.section-gray { background: var(--gray-50); }
.section-navy { background: var(--navy); color: var(--white); }
.section-primary { background: var(--primary); color: var(--white); }

.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.75rem;
}
.section-navy .section-header h2,
.section-primary .section-header h2 { color: var(--white); }

.section-header p {
  color: var(--gray-600);
  max-width: 640px;
  margin: 0 auto;
}
.section-navy .section-header p,
.section-primary .section-header p { color: rgba(255,255,255,0.8); }

/* Cards */
.card-grid {
  display: grid;
  gap: 1.25rem;
}
.card-grid-2 { grid-template-columns: 1fr; }
.card-grid-3 { grid-template-columns: 1fr; }
.card-grid-4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .card-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .card-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--gray-200);
  transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.card-border-left { border-left: 4px solid var(--primary); }
.card-border-top { border-top: 4px solid var(--primary); }

.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.card p { font-size: 0.9rem; color: var(--gray-600); }

.card-icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

/* Audience lists */
.audience-grid {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 768px) { .audience-grid { grid-template-columns: 1fr 1fr; } }

.audience-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 1.25rem; }
.audience-title.yes { color: var(--primary); }
.audience-title.no { color: #dc2626; }

.audience-list { list-style: none; }
.audience-list li {
  display: flex;
  gap: 0.6rem;
  padding: 0.35rem 0;
  font-size: 0.95rem;
  color: var(--gray-700);
}
.audience-list.no li { color: var(--gray-500); }
.audience-list .dot { color: var(--primary); font-weight: 700; }

/* Service detail cards */
.service-card {
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  background: var(--white);
  transition: box-shadow 0.3s;
}
.service-card:hover { box-shadow: var(--shadow-lg); }
.service-card .svc-icon { color: var(--navy-mid); margin-bottom: 1rem; }
.service-card h3 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.service-card .svc-desc { margin-bottom: 1.25rem; }
.service-card ul { list-style: none; }
.service-card ul li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--gray-700);
  padding: 0.25rem 0;
}
.service-card ul li::before {
  content: '✓';
  color: var(--navy-mid);
  font-weight: 700;
}

/* Industry tags */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 640px) { .industry-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .industry-grid { grid-template-columns: repeat(4, 1fr); } }

.industry-tag {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--gray-700);
  transition: border-color 0.2s;
}
.industry-tag:hover { border-color: var(--primary); }

/* Why us */
.why-card {
  text-align: center;
  padding: 1.5rem;
}
.why-dot {
  width: 48px;
  height: 48px;
  background: rgba(0, 82, 204, 0.1);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.why-dot span {
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 50%;
  display: block;
}

/* Stats bar */
.stats-bar { padding: 2.5rem 0; }
.stats-single { text-align: center; }
.stats-single .stat-num { font-size: 3rem; font-weight: 700; margin-bottom: 0.25rem; }
.stats-single .stat-label { font-size: 1.05rem; opacity: 0.9; }

/* Stats grid (legacy) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-num { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.stat-label { font-size: 0.9rem; opacity: 0.85; }

/* Process steps */
.process-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (min-width: 768px) { .process-grid { grid-template-columns: repeat(4, 1fr); } }

.process-step { text-align: center; }
.step-num {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 auto 1rem;
}
.section-navy .step-num { background: var(--white); color: var(--navy); }

/* About */
.about-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 768px) { .about-grid { grid-template-columns: 1fr 1fr; } }

.about-stat-box {
  background: linear-gradient(135deg, rgba(0,31,63,0.08), rgba(0,61,130,0.08));
  border-radius: 1rem;
  padding: 3rem;
  text-align: center;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.about-stat-box .big { font-size: 4rem; font-weight: 700; color: var(--navy); }

.mission-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) { .mission-grid { grid-template-columns: 1fr 1fr; } }

/* Team */
.team-card { text-align: center; padding: 2rem; }
.team-avatar {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  border-radius: 50%;
  margin: 0 auto 1rem;
}
.team-role { color: var(--navy-mid); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; }

/* Blog */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.blog-search {
  max-width: 560px;
  margin: 0 auto 2rem;
  position: relative;
}
.blog-search input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  outline: none;
}
.blog-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,82,204,0.12); }
.blog-search svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--gray-400);
}

.blog-card .blog-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}
.blog-card .blog-cat {
  color: var(--primary);
  font-weight: 600;
}
.blog-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.blog-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.75rem;
}

/* Forms */
.form-section { max-width: 640px; margin: 0 auto; }

.form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,82,204,0.1);
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 0.5rem;
  font-weight: 400;
}
.radio-group label:hover { background: var(--gray-50); }

.warning-box {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: #854d0e;
  margin-bottom: 1rem;
}

.success-box {
  text-align: center;
  padding: 2.5rem;
  background: #f0fdf4;
  border: 2px solid #86efac;
  border-radius: var(--radius);
}
.success-box .check { font-size: 3rem; color: #22c55e; margin-bottom: 1rem; }

.form-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.progress-bar {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.progress-bar span {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--gray-200);
  transition: background 0.3s;
}
.progress-bar span.active { background: var(--primary); }

/* Contact */
.contact-grid {
  display: grid;
  gap: 3rem;
}
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.contact-info-card {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}
.contact-info-card svg { width: 24px; height: 24px; color: var(--navy-mid); flex-shrink: 0; }
.contact-info-card a { color: var(--gray-600); }
.contact-info-card a:hover { color: var(--primary); }

/* CTA banner */
.cta-banner {
  text-align: center;
  padding: 5rem 0;
}
.cta-banner h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 1rem; }
.cta-banner p { color: var(--gray-600); max-width: 560px; margin: 0 auto 2rem; }

/* Footer */
.footer {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 0 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }

.footer-brand img { height: 40px; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.85rem; color: rgba(255,255,255,0.7); }

.footer h4 { font-weight: 700; margin-bottom: 1rem; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.5rem; }
.footer ul a { font-size: 0.85rem; color: rgba(255,255,255,0.7); transition: color 0.2s; }
.footer ul a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Page hero (inner sections) */
.page-hero {
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  color: var(--white);
  padding: 4rem 0;
}
.page-hero h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); margin-bottom: 0.75rem; }
.page-hero p { color: rgba(255,255,255,0.8); font-size: 1.05rem; max-width: 640px; }

.alert-box {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--white);
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  text-align: center;
  font-weight: 600;
  color: var(--navy);
}

.hidden { display: none !important; }

/* Qualifications */
.qual-card h3 { color: var(--primary); margin-bottom: 0.5rem; }

/* BLP-style lead form */
.lead-form-card { box-shadow: var(--shadow-lg); }
.lead-form-card .form-sub {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-full { grid-column: 1 / -1; }
.req { color: #dc2626; }
.form-pdpa {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin: 1rem 0 0.75rem;
}
.form-callback {
  font-size: 0.85rem;
  color: var(--gray-600);
  text-align: center;
  margin-top: 1rem;
  line-height: 1.6;
}
.form-msg {
  margin-top: 0.75rem;
  min-height: 1.25rem;
  font-size: 0.9rem;
  text-align: center;
}
.form-msg.success { color: #067647; }
.form-msg.error { color: #b42318; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-full { grid-column: auto; }
}
