/* ==========================================
   VAYNHANH — MAIN STYLESHEET
   Theme: Indigo / Purple Premium
   ========================================== */

/* ---- CSS VARIABLES ---- */
:root {
  --primary:        #6366f1;
  --primary-dark:   #4f46e5;
  --primary-light:  #818cf8;
  --primary-xlight: #eef2ff;
  --secondary:      #7c3aed;
  --accent:         #a855f7;
  --gradient:       linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --gradient-hero:  linear-gradient(160deg, #1e1b4b 0%, #312e81 40%, #4c1d95 100%);
  --text-dark:      #1e1b4b;
  --text-body:      #374151;
  --text-muted:     #6b7280;
  --text-light:     #9ca3af;
  --bg-light:       #f8f7ff;
  --bg-white:       #ffffff;
  --border:         #e5e7eb;
  --border-focus:   #6366f1;
  --shadow-sm:      0 1px 3px rgba(99,102,241,0.08);
  --shadow-md:      0 4px 20px rgba(99,102,241,0.12);
  --shadow-lg:      0 10px 40px rgba(99,102,241,0.18);
  --shadow-xl:      0 20px 60px rgba(99,102,241,0.22);
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --transition:     all 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-light);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ---- TYPOGRAPHY ---- */
h1,h2,h3,h4,h5 {
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.25;
}
h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-xlight);
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* ---- CONTAINER ---- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.container-xs { max-width: 520px; margin: 0 auto; padding: 0 20px; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(99,102,241,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99,102,241,0.5);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }

.btn-white {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-md);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn-loading { opacity: 0.7; pointer-events: none; }

/* ---- HEADER / NAV ---- */
#header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(99,102,241,0.08);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--gradient);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.nav-desktop { display: flex; align-items: center; gap: 4px; }
.nav-desktop a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-body);
  transition: var(--transition);
}
.nav-desktop a:hover, .nav-desktop a.active {
  color: var(--primary);
  background: var(--primary-xlight);
}

.nav-cta { display: flex; align-items: center; gap: 10px; }

.btn-menu {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-light);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-body);
  font-size: 1.1rem;
  transition: var(--transition);
}
.btn-menu:hover { background: var(--primary-xlight); color: var(--primary); }

/* ---- MOBILE SIDEBAR ---- */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30,27,75,0.6);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.sidebar-overlay.active { opacity: 1; pointer-events: all; }

.sidebar {
  position: fixed;
  top: 0;
  left: -110%;
  width: min(85vw, 320px);
  height: 100%;
  background: white;
  z-index: 999;
  overflow-y: auto;
  transition: left 0.35s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
}
.sidebar.open { left: 0; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-nav { flex: 1; padding: 16px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: var(--text-body);
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 4px;
}
.sidebar-nav a:hover { background: var(--primary-xlight); color: var(--primary); }
.sidebar-nav a .icon {
  width: 36px;
  height: 36px;
  background: var(--bg-light);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--primary);
  flex-shrink: 0;
}

.sidebar-footer { padding: 20px; border-top: 1px solid var(--border); flex-shrink: 0; }

/* ---- HERO SECTION ---- */
.hero {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding: 60px 0 80px;
  min-height: 620px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139,92,246,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99,102,241,0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text { color: white; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c7d2fe;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}
.hero-badge .dot { width: 8px; height: 8px; background: #4ade80; border-radius: 50%; animation: pulse-dot 1.5s infinite; }

@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.3); }
}

.hero-text h1 {
  color: white;
  margin-bottom: 20px;
  line-height: 1.15;
}
.hero-text h1 span { color: #a5b4fc; }

.hero-text p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.hero-badges .badge-item {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
}
.hero-badges .badge-item i { color: #4ade80; }

/* ---- LOAN CARD ---- */
.loan-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-xl);
  position: relative;
}

.loan-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 24px;
  text-align: center;
}

.amount-display {
  text-align: center;
  margin-bottom: 8px;
}
.amount-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1;
  letter-spacing: -1px;
}
.amount-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-left: 4px;
}

/* ---- RANGE SLIDER ---- */
.slider-wrap { margin: 12px 0 6px; }

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, var(--primary) var(--pct, 8%), #e5e7eb var(--pct, 8%));
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  transition: background 0.1s;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary);
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
  cursor: grab;
  transition: var(--transition);
}
.range-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.2); }
.range-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary);
  box-shadow: 0 2px 8px rgba(99,102,241,0.4);
  cursor: grab;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.loan-info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
.loan-info-box {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 14px;
}
.loan-info-box label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.loan-info-box .value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.loan-info-box .sub {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 2px;
}

.phone-input-wrap { position: relative; margin-bottom: 14px; }
.phone-input-wrap .flag {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  line-height: 1;
}
.phone-input {
  width: 100%;
  padding: 14px 14px 14px 44px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--text-dark);
  transition: var(--transition);
  outline: none;
  background: white;
}
.phone-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99,102,241,0.12); }
.phone-input.error { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239,68,68,0.1); }

.phone-error {
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: -8px;
  margin-bottom: 10px;
  display: none;
}

.form-note {
  text-align: center;
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.form-note i { color: #4ade80; }

/* ---- STATS SECTION ---- */
.stats-section {
  background: white;
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item {}
.stat-number {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1;
  margin-bottom: 6px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.87rem;
  color: var(--text-muted);
}

/* ---- HOW IT WORKS ---- */
.how-section {
  padding: 80px 0;
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 12px auto 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 38px;
  left: calc(16.66% + 24px);
  right: calc(16.66% + 24px);
  height: 2px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  z-index: 0;
}

.step-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(99,102,241,0.08);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}
.step-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99,102,241,0.2);
}

.step-number {
  width: 72px;
  height: 72px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin: 0 auto 20px;
  box-shadow: 0 6px 20px rgba(99,102,241,0.35);
}

.step-card h3 { margin-bottom: 10px; }
.step-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }

/* ---- FEATURES SECTION ---- */
.features-section {
  padding: 80px 0;
  background: white;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 0;
}

.feature-card {
  padding: 28px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  text-align: center;
  transition: var(--transition);
}
.feature-card:hover {
  border-color: var(--primary-light);
  background: var(--primary-xlight);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: white;
  margin: 0 auto 16px;
  box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}

.feature-card h3 { font-size: 1rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.85rem; color: var(--text-muted); }

/* ---- PURPOSES SECTION ---- */
.purposes-section {
  padding: 80px 0;
  background: var(--bg-light);
}

.purposes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.purpose-item {
  background: white;
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  border: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.purpose-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}
.purpose-item i {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 10px;
  display: block;
}
.purpose-item span { font-size: 0.85rem; font-weight: 500; color: var(--text-body); }

/* ---- TESTIMONIALS ---- */
.testimonials-section {
  padding: 80px 0;
  background: white;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid rgba(99,102,241,0.08);
  position: relative;
  transition: var(--transition);
}
.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(99,102,241,0.2);
}
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 12px;
  right: 20px;
  font-size: 4rem;
  color: var(--primary-light);
  opacity: 0.3;
  line-height: 1;
  font-family: Georgia, serif;
}

.stars { display: flex; gap: 3px; margin-bottom: 14px; color: #f59e0b; font-size: 0.9rem; }
.stars .empty { color: var(--border); }

.testimonial-text {
  font-style: italic;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 16px;
  font-size: 0.92rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.author-name { font-weight: 700; font-size: 0.9rem; }

/* ---- CTA SECTION ---- */
.cta-section {
  padding: 80px 0;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168,85,247,0.2) 0%, transparent 70%);
}

.cta-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}
.cta-inner h2 { color: white; margin-bottom: 16px; }
.cta-inner p { color: rgba(255,255,255,0.75); margin-bottom: 32px; font-size: 1.05rem; max-width: 520px; margin-left: auto; margin-right: auto; }

.cta-stats {
  display: inline-flex;
  gap: 32px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 16px 32px;
  border-radius: var(--radius-lg);
  margin-top: 40px;
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
  justify-content: center;
}
.cta-stat { text-align: center; }
.cta-stat .n { font-size: 1.4rem; font-weight: 800; color: white; display: block; }
.cta-stat .l { font-size: 0.78rem; color: rgba(255,255,255,0.7); }

/* ---- FAQ SECTION ---- */
.faq-section {
  padding: 80px 0;
  background: var(--bg-light);
}

.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
}
.faq-item.open {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  gap: 16px;
  user-select: none;
  transition: var(--transition);
}
.faq-question:hover { color: var(--primary); }

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-xlight);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.faq-item.open .faq-icon { background: var(--primary); color: white; transform: rotate(180deg); }

.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1), padding 0.3s;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 24px 20px;
}

/* ---- ABOUT SECTION ---- */
.about-section {
  padding: 80px 0;
  background: white;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.about-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(99,102,241,0.08);
  text-align: center;
}
.about-card .icon {
  font-size: 2rem;
  margin-bottom: 12px;
  color: var(--primary);
}
.about-card .num { font-size: 1.6rem; font-weight: 800; color: var(--primary-dark); }
.about-card .lbl { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.about-card:first-child {
  grid-column: 1 / -1;
  background: var(--gradient);
  color: white;
}
.about-card:first-child .icon, .about-card:first-child .num, .about-card:first-child .lbl { color: white; }

/* ---- OFFERS PAGE ---- */
.offers-page { padding: 40px 0 80px; }

.offers-header {
  background: var(--gradient-hero);
  padding: 48px 0 60px;
  text-align: center;
  color: white;
  margin-bottom: -24px;
}
.offers-header h1 { color: white; margin-bottom: 10px; }
.offers-header p { color: rgba(255,255,255,0.8); }

.offers-summary {
  background: white;
  border-radius: var(--radius-xl);
  padding: 20px 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
}

.offers-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.offers-count strong { color: var(--primary-dark); font-size: 1.2rem; font-weight: 800; }

.offers-list { display: flex; flex-direction: column; gap: 16px; }

.offer-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 20px;
  align-items: center;
  transition: var(--transition);
}
.offer-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99,102,241,0.2);
}

.offer-logo {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  object-fit: contain;
  padding: 8px;
  background: white;
}
.offer-logo-fallback {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
}

.offer-info h3 { font-size: 1.05rem; margin-bottom: 6px; }
.offer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag-green { background: #dcfce7; color: #16a34a; }
.tag-purple { background: var(--primary-xlight); color: var(--primary); }
.tag-orange { background: #fff7ed; color: #ea580c; }

.offer-desc { font-size: 0.84rem; color: var(--text-muted); }

.offer-action { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.offer-rate {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* ---- MODAL ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30,27,75,0.65);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }

.modal-box {
  background: white;
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(20px);
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.modal-backdrop.open .modal-box { transform: scale(1) translateY(0); }

.modal-icon {
  width: 64px;
  height: 64px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: white;
  margin: 0 auto 20px;
  box-shadow: 0 6px 20px rgba(99,102,241,0.35);
}

.modal-box h3 { text-align: center; margin-bottom: 8px; }
.modal-box p { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }

.modal-error {
  text-align: center;
  color: #ef4444;
  font-size: 0.83rem;
  margin-top: 8px;
  min-height: 20px;
}

.modal-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-cancel {
  background: var(--bg-light);
  color: var(--text-body);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-cancel:hover { background: var(--border); }

/* ---- BLOG PAGE ---- */
.blog-header {
  background: var(--gradient-hero);
  padding: 64px 0;
  text-align: center;
}
.blog-header h1 { color: white; margin-bottom: 12px; }
.blog-header p { color: rgba(255,255,255,0.75); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 60px 0;
}

.blog-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99,102,241,0.2);
}

.blog-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.blog-img-placeholder {
  width: 100%;
  height: 200px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.4);
}

.blog-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.blog-date { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px; }
.blog-card h3 { margin-bottom: 10px; }
.blog-card h3 a { color: var(--text-dark); transition: var(--transition); }
.blog-card h3 a:hover { color: var(--primary); }
.blog-excerpt { font-size: 0.88rem; color: var(--text-muted); flex: 1; margin-bottom: 16px; }

.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 0;
  color: var(--text-muted);
}
.blog-empty i { font-size: 3rem; margin-bottom: 16px; color: var(--border); }

/* ---- CONTACT PAGE ---- */
.contact-hero {
  background: var(--gradient-hero);
  padding: 64px 0;
  text-align: center;
}
.contact-hero h1 { color: white; margin-bottom: 12px; }
.contact-hero p { color: rgba(255,255,255,0.75); }

.contact-content { padding: 60px 0; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}

.contact-info h2 { margin-bottom: 16px; }
.contact-info p { color: var(--text-muted); margin-bottom: 28px; font-size: 0.93rem; }

.contact-items { display: flex; flex-direction: column; gap: 16px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  border: 1px solid rgba(99,102,241,0.08);
}
.contact-item .icon {
  width: 44px;
  height: 44px;
  background: var(--gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-item-text label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 2px; }
.contact-item-text a, .contact-item-text span { font-weight: 600; color: var(--text-dark); font-size: 0.95rem; }

.contact-form-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(99,102,241,0.08);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.93rem;
  color: var(--text-dark);
  background: white;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99,102,241,0.1); }
textarea.form-control { resize: vertical; min-height: 130px; }

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }

/* ---- FOOTER ---- */
#footer {
  background: var(--gradient-hero);
  color: rgba(255,255,255,0.85);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.6);
  margin-top: 16px;
  max-width: 280px;
}

.footer-col h4 {
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.03em;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 0.87rem;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}
.footer-col ul li a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.82rem; color: rgba(255,255,255,0.5); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.82rem; color: rgba(255,255,255,0.5); transition: var(--transition); }
.footer-links a:hover { color: white; }

/* ---- SINGLE POST ---- */
.post-hero { background: var(--gradient-hero); padding: 60px 0; text-align: center; }
.post-hero h1 { color: white; max-width: 720px; margin: 0 auto 16px; }
.post-hero .meta { color: rgba(255,255,255,0.7); font-size: 0.9rem; }

.post-body {
  background: white;
  border-radius: var(--radius-xl);
  padding: 48px 56px;
  box-shadow: var(--shadow-md);
  margin: -30px auto 60px;
  position: relative;
  z-index: 2;
  max-width: 800px;
  line-height: 1.9;
}
.post-body img { border-radius: var(--radius-md); margin: 24px 0; }
.post-body h2 { margin: 32px 0 12px; }
.post-body h3 { margin: 24px 0 10px; }
.post-body p { margin-bottom: 16px; color: var(--text-body); }

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: white;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  max-width: 340px;
}
.toast.show { transform: translateX(0); }
.toast-icon { font-size: 1.2rem; color: var(--primary); }
.toast-text { font-size: 0.88rem; font-weight: 500; }

/* ---- UTILITY ---- */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-text { order: 2; }
  .loan-card { max-width: 480px; margin: 0 auto; order: 1; }
  .hero-badges { justify-content: center; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-inner { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-desktop, .nav-cta { display: none; }
  .btn-menu { display: flex; }

  .hero { padding: 40px 0 60px; min-height: auto; }
  .steps-grid { grid-template-columns: 1fr; gap: 16px; }
  .steps-grid::before { display: none; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .purposes-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .offer-card { grid-template-columns: 64px 1fr; }
  .offer-action { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .post-body { padding: 28px 20px; }
  .cta-stats { gap: 20px; }
  .modal-buttons { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .loan-card { padding: 24px 20px; }
  .amount-number { font-size: 2rem; }
}