/*
 * ============================================================
 *  REAL SOLUTION — STRUCTURAL STYLES
 *  Layout, spacing, components, animations.
 *  Zero hex literals — all colours come from theme.css vars.
 * ============================================================
 */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-page);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ===== NAVIGATION ===== */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-nav);
  padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}

.nav-brand { display: flex; align-items: center; gap: 12px; }

.rs-logo {
  width: 46px; height: 46px;
  border-radius: var(--radius);
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

/* Footer logo — slightly larger */
footer .rs-logo { width: 50px; height: 50px; margin: 0 auto 10px; }

.nav-brand-text { line-height: 1.15; }
.nav-brand-text span { display: block; }
.nav-brand-text .name    { font-size: 1.1rem; font-weight: 700; color: var(--blue); }
.nav-brand-text .tagline { font-size: 0.65rem; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }

.nav-links { display: flex; gap: 28px; font-size: 0.85rem; font-weight: 600; }
.nav-links a { color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--blue); }

.nav-cta {
  background: var(--gold-gradient-h);
  color: var(--text-on-dark); font-weight: 700; font-size: 0.82rem;
  padding: 9px 20px; border-radius: 30px;
  transition: opacity 0.2s; white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.nav-cta:hover { opacity: 0.88; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--blue); border-radius: 2px; transition: all 0.3s;
}

/* Mobile menu — fixed so it sticks below the sticky nav at any scroll depth */
#mobileMenu {
  display: none;
  position: fixed;
  top: 70px;      /* matches nav height */
  left: 0; right: 0;
  z-index: 99;    /* just below nav (z-index: 100) */
  background: var(--bg-card);
  padding: 20px 5%;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
#mobileMenu a {
  display: block; padding: 10px 0;
  color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--border);
}
#mobileMenu a:last-child { border-bottom: none; }
#mobileMenu a:hover { color: var(--blue); }

/* ===== HERO ===== */
.hero {
  min-height: 92vh;
  background: var(--hero-gradient);
  display: flex; align-items: center;
  padding: 80px 5% 60px;
  position: relative; overflow: hidden;
}

/* Subtle dot pattern */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C8920C' fill-opacity='0.10'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Gold glow accent bottom-right */
.hero::after {
  content: '';
  position: absolute; bottom: -60px; right: -60px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(212, 160, 23, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

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

.hero-badge {
  display: inline-block;
  background: var(--accent-alpha-sm);
  border: 1px solid var(--accent-alpha-md);
  color: var(--green);
  font-size: 0.75rem; font-weight: 600;
  padding: 5px 14px; border-radius: 20px;
  margin-bottom: 22px; letter-spacing: 0.5px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800; line-height: 1.1;
  margin-bottom: 10px;
  color: var(--text);
}
.hero h1 .accent-blue  { color: var(--blue); }
.hero h1 .accent-green { color: var(--green); }

.hero-tamil {
  font-family: var(--font-tamil);
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: var(--muted); margin-bottom: 20px;
}

.hero-desc {
  font-size: 1rem; color: var(--muted);
  margin-bottom: 36px; max-width: 520px;
}
.hero-desc .tamil-sub {
  font-family: var(--font-tamil);
  font-size: 0.9rem; color: var(--muted);
  display: block; margin-top: 4px;
}

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-primary {
  background: var(--gold-gradient-h);
  color: var(--text-on-dark); font-weight: 700; font-size: 0.95rem;
  padding: 14px 30px; border-radius: 40px;
  box-shadow: 0 4px 16px var(--primary-alpha-lg);
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 160, 23, 0.50);
}

.btn-secondary {
  border: 2px solid var(--green);
  color: var(--green-dark); font-weight: 700; font-size: 0.95rem;
  padding: 12px 28px; border-radius: 40px;
  transition: background 0.2s, color 0.2s;
  background: transparent;
}
.btn-secondary:hover {
  background: var(--accent-alpha-sm);
  color: var(--green);
}

.hero-stats { display: flex; gap: 30px; margin-top: 48px; flex-wrap: wrap; }

.stat { border-left: 3px solid var(--green); padding-left: 14px; }
.stat .num { font-size: 1.7rem; font-weight: 800; color: var(--green); line-height: 1; }
.stat .lbl { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.stat .lbl .tamil-lbl { font-family: var(--font-tamil); font-size: 0.7rem; color: var(--muted); }

/* ===== SECTION COMMON ===== */
section { padding: 80px 5%; }

.section-header { text-align: center; margin-bottom: 50px; }

.section-header .pill {
  display: inline-block;
  background: var(--accent-alpha-sm);
  border: 1px solid var(--accent-alpha-md);
  color: var(--green); font-size: 0.72rem; font-weight: 600;
  padding: 4px 14px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700; line-height: 1.2;
  color: var(--text);
}
.section-header h2 .accent { color: var(--green); }

.section-header .sub {
  font-family: var(--font-tamil);
  color: var(--muted); font-size: 1rem; margin-top: 8px;
}

/* ===== SERVICES ===== */
#services { background: var(--bg-alt); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px; text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  cursor: default;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--green);
  box-shadow: var(--shadow-card);
}

.service-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--primary-alpha-sm), var(--accent-alpha-sm));
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px; font-size: 1.8rem;
}

.service-card h3    { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; color: var(--blue); }
.service-card .tamil { font-family: var(--font-tamil); font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.service-card p     { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

/* ===== LOAN OFFERS ===== */
#offers { background: var(--bg-page); }

.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}

.offer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s;
}
.offer-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.offer-badge-strip {
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.offer-body { padding: 22px 22px 18px; }

.offer-bank {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 1.5px;
  color: var(--green); text-transform: uppercase; margin-bottom: 6px;
}

.offer-type { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; color: var(--text); }

.offer-details { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

.offer-detail-chip {
  background: var(--primary-alpha-sm);
  border: 1px solid var(--primary-alpha-md);
  border-radius: 20px; padding: 5px 12px;
  font-size: 0.78rem; color: var(--blue);
}
.offer-detail-chip strong {
  display: block; font-size: 0.65rem; color: var(--muted); font-weight: 400;
}

.offer-note { font-size: 0.78rem; color: var(--muted); line-height: 1.45; margin-bottom: 16px; }

.offer-validity {
  font-size: 0.7rem; color: var(--muted);
  border-top: 1px solid var(--border); padding-top: 12px;
  display: flex; align-items: center; gap: 6px;
}
.offer-validity span { color: var(--green); font-weight: 600; }

.offer-cta {
  display: block; width: 100%;
  background: var(--gold-gradient-h);
  color: var(--text-on-dark); font-weight: 700; font-size: 0.82rem;
  padding: 11px; text-align: center; border-radius: 8px;
  margin-top: 14px; transition: opacity 0.2s;
  border: none; cursor: pointer; font-family: var(--font-main);
}
.offer-cta:hover { opacity: 0.88; }

.no-offers {
  grid-column: 1 / -1; text-align: center;
  color: var(--muted); font-size: 0.9rem; padding: 40px;
}

/* ===== WHY US ===== */
#why { background: var(--bg-alt); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 22px;
}

.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px; text-align: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.why-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}

.why-icon { font-size: 2.4rem; margin-bottom: 14px; }
.why-card h4    { font-size: 0.95rem; font-weight: 700; color: var(--blue); margin-bottom: 6px; }
.why-card .tamil { font-family: var(--font-tamil); font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; }
.why-card p     { font-size: 0.8rem; color: var(--muted); }

/* ===== CONTACT ===== */
#contact { background: var(--bg-page); }

.contact-wrap {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 40px; align-items: start;
}

.contact-info h3        { font-size: 1.5rem; font-weight: 700; color: var(--blue); margin-bottom: 8px; }
.contact-info .tamil-h3 { font-family: var(--font-tamil); font-size: 1rem; color: var(--muted); margin-bottom: 22px; }

.contact-item { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }

.contact-ico {
  width: 42px; height: 42px;
  background: var(--primary-alpha-sm);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}

.contact-item-text .label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.contact-item-text .value { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.contact-item-text .value a { color: var(--green); }
.contact-item-text .value a:hover { color: var(--green-dark); }

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-card);
}
.contact-form h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; color: var(--blue); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  color: var(--text); font-family: var(--font-main); font-size: 0.9rem;
  padding: 11px 14px; 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(--blue);
  box-shadow: 0 0 0 3px var(--primary-alpha-sm);
}

.form-group select option { background: var(--bg-card); color: var(--text); }
.form-group textarea { resize: vertical; min-height: 80px; }

.form-submit {
  width: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  color: var(--text-on-dark); font-weight: 700; font-size: 0.95rem;
  padding: 13px; border-radius: 30px; border: none;
  cursor: pointer; transition: opacity 0.2s, transform 0.2s;
  font-family: var(--font-main);
}
.form-submit:hover { opacity: 0.9; transform: translateY(-1px); }

.form-success {
  display: none;
  background: var(--accent-alpha-sm);
  border: 1px solid var(--accent-alpha-md);
  border-radius: 8px; padding: 14px; text-align: center;
  color: var(--green); font-size: 0.9rem; margin-top: 14px;
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg-footer);
  padding: 40px 5% 20px; text-align: center;
}

footer p { font-size: 0.78rem; color: rgba(255, 255, 255, 0.5); }

/* Map link — contact section */
.map-link {
  color: var(--green);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.map-link:hover { color: var(--green-dark); }

/* Map link — footer (inherits light text) */
.footer-map-link {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.footer-map-link:hover { color: rgba(255, 255, 255, 0.9); }

footer .admin-link {
  display: inline-block; margin-top: 20px;
  font-size: 0.65rem; color: rgba(255, 255, 255, 0.15);
  cursor: pointer; user-select: none; transition: color 0.3s;
}
footer .admin-link:hover { color: rgba(255, 255, 255, 0.35); }

/* ===== WHATSAPP FAB ===== */
.wa-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  width: 56px; height: 56px;
  background: #25d366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s; text-decoration: none;
}
.wa-fab:hover { transform: scale(1.1); }
.wa-fab svg { width: 30px; height: 30px; }

/* ===== MODAL BASE ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: var(--bg-modal);
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; padding: 30px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2);
}
.modal h3 { font-size: 1.2rem; font-weight: 700; color: var(--blue); margin-bottom: 20px; }

.modal-close {
  float: right; background: none; border: none;
  color: var(--muted); font-size: 1.4rem; cursor: pointer;
  line-height: 1; margin-top: -4px;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }

/* ===== ADMIN PANEL ===== */
.admin-section { margin-bottom: 28px; }

.admin-section h4 {
  font-size: 0.9rem; font-weight: 700; color: var(--green-dark);
  margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}

.admin-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.admin-input,
.admin-select,
.admin-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-mid); border-radius: 8px;
  color: var(--text); font-family: var(--font-main); font-size: 0.85rem;
  padding: 10px 12px; outline: none; margin-bottom: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-input:focus,
.admin-select:focus,
.admin-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--primary-alpha-sm);
}

.admin-select option { background: var(--bg-card); color: var(--text); }
.admin-textarea { resize: vertical; min-height: 70px; }
.admin-label { font-size: 0.75rem; color: var(--muted); display: block; margin-bottom: 4px; font-weight: 600; }

.admin-btn {
  background: var(--gold-gradient-h);
  color: var(--text-on-dark); font-weight: 700; font-size: 0.85rem;
  padding: 10px 20px; border-radius: 8px; border: none;
  cursor: pointer; transition: opacity 0.2s; display: inline-block;
  font-family: var(--font-main);
}
.admin-btn:hover { opacity: 0.88; }

.admin-btn.danger {
  background: linear-gradient(90deg, #7f1d1d, #dc2626);
  font-size: 0.75rem; padding: 7px 14px;
}

.admin-btn.muted {
  background: var(--bg-alt);
  color: var(--muted); border: 1px solid var(--border);
  font-size: 0.75rem;
}
.admin-btn.muted:hover { background: var(--border); opacity: 1; }

.admin-offers-list { margin-top: 8px; }

.admin-offer-item {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px; margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap;
}
.admin-offer-item .info { flex: 1; }
.admin-offer-item .info .bank { font-size: 0.7rem; color: var(--green); font-weight: 700; text-transform: uppercase; }
.admin-offer-item .info .type { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.admin-offer-item .info .rate { font-size: 0.78rem; color: var(--muted); }

.admin-msg {
  font-size: 0.82rem; padding: 10px 14px; border-radius: 8px;
  margin-bottom: 14px; display: none;
}
.admin-msg.success {
  background: var(--accent-alpha-sm);
  border: 1px solid var(--accent-alpha-md);
  color: var(--green);
}
.admin-msg.error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #dc2626;
}

/* ===== LOGIN MODAL ===== */
#loginModal input {
  width: 100%; margin-bottom: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-mid); border-radius: 8px;
  color: var(--text); font-family: var(--font-main); font-size: 0.95rem;
  padding: 12px 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
#loginModal input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--primary-alpha-sm);
}
#loginError { font-size: 0.82rem; color: #dc2626; margin-bottom: 12px; display: none; }

/* ===== SCROLL ANIMATION ===== */
.fade-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */

/* ── Very wide screens (1400px+): cap content width ── */
@media (min-width: 1400px) {
  nav,
  .hero,
  section,
  .breadcrumb,
  .loan-hero,
  .lp-section,
  .metrics-strip,
  .apply-banner,
  footer {
    padding-left:  max(5%, calc(50% - 700px));
    padding-right: max(5%, calc(50% - 700px));
  }
}

/* ── Tablet landscape (≤ 1024px) ── */
@media (max-width: 1024px) {
  .hero { padding-top: 70px; padding-bottom: 50px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid     { grid-template-columns: repeat(2, 1fr); }
  .subtype-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tablet portrait (≤ 768px) ── */
@media (max-width: 768px) {
  /* nav */
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-cta { font-size: 0.75rem; padding: 8px 14px; }

  /* hero */
  .hero { padding-top: 50px; padding-bottom: 40px; min-height: auto; }

  /* sections */
  section { padding-top: 60px; padding-bottom: 60px; }

  /* contact & admin */
  .contact-wrap  { grid-template-columns: 1fr; }
  .admin-form-row { grid-template-columns: 1fr; }

  /* rate bar */
  .rate-bar-label { flex-wrap: wrap; gap: 4px; }

  /* loan pages */
  .loan-hero        { padding-top: 44px; padding-bottom: 36px; }
  .lp-section       { padding-top: 44px; padding-bottom: 44px; }
  .apply-banner     { padding-top: 44px; padding-bottom: 44px; }
  .apply-banner h2  { font-size: 1.5rem; }
  .metrics-strip    { flex-direction: column; }
  .metric-item      { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.12); padding: 14px 20px; }
  .metric-item:last-child { border-bottom: none; }
  .loan-hero-chips  { flex-direction: column; align-items: flex-start; }
}

/* ── Mobile (≤ 480px) ── */
@media (max-width: 480px) {
  /* nav: hide CTA to avoid crowding, hide tagline */
  .nav-cta { display: none; }
  .nav-brand-text .tagline { display: none; }
  nav { height: 60px; }
  #mobileMenu { top: 60px; } /* track reduced nav height */

  /* hero */
  .hero { padding-top: 36px; padding-bottom: 32px; }
  .hero-stats { gap: 18px; flex-wrap: wrap; }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .btn-primary,
  .btn-secondary { width: 100%; justify-content: center; text-align: center; }

  /* sections */
  section { padding-top: 48px; padding-bottom: 48px; }

  /* service grid: 2 columns on mobile */
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .service-card  { padding: 20px 12px; }
  .service-icon  { width: 50px; height: 50px; font-size: 1.5rem; }
  .service-card h3 { font-size: 0.9rem; }
  .service-card p  { font-size: 0.78rem; }

  /* offers: single column */
  .offers-grid { grid-template-columns: 1fr; }

  /* why grid: 2 columns on mobile */
  .why-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .why-card  { padding: 18px 12px; }
  .why-icon  { font-size: 2rem; }
  .why-card h4 { font-size: 0.85rem; }

  /* contact / form */
  .contact-form { padding: 20px; }

  /* modals */
  .modal { padding: 20px 16px; }

  /* loan pages */
  .loan-hero     { padding-top: 32px; padding-bottom: 28px; }
  .lp-section    { padding-top: 36px; padding-bottom: 36px; }
  .metrics-strip { padding-top: 16px; padding-bottom: 16px; }
  .metric-item   { padding: 10px 16px; }
  .metric-item .m-val { font-size: 1.25rem; }

  .apply-banner { padding-top: 36px; padding-bottom: 36px; }
  .apply-banner h2 { font-size: 1.3rem; }
  .apply-banner-btns { flex-direction: column; align-items: center; }
  .btn-white,
  .btn-outline-white { width: 100%; max-width: 320px; justify-content: center; }

  .subtype-grid { grid-template-columns: 1fr; }
  .doc-grid     { grid-template-columns: 1fr; }
  .lp-title     { font-size: 1.2rem; }

  /* rate bar: stack label + range on small screens */
  .rate-bar-label { flex-direction: column; align-items: flex-start; gap: 2px; }
  .rate-bar-range { flex-direction: column; gap: 3px; }

  /* WhatsApp FAB: slightly smaller */
  .wa-fab { bottom: 16px; right: 16px; width: 50px; height: 50px; }
  .wa-fab svg { width: 26px; height: 26px; }
}

/* ── Very small phones (≤ 360px) ── */
@media (max-width: 360px) {
  .services-grid { grid-template-columns: 1fr; }
  .why-grid      { grid-template-columns: 1fr; }
  .hero h1       { font-size: 1.85rem; }
  .section-header h2 { font-size: 1.5rem; }
}

/* ── Landscape mobile: prevent oversized hero ── */
@media (max-height: 560px) and (orientation: landscape) {
  .hero      { min-height: 0; padding-top: 28px; padding-bottom: 28px; }
  .loan-hero { padding-top: 24px; padding-bottom: 20px; }
}


/* ============================================================
   LOAN DETAIL PAGES
   Shared styles for home-loan, personal-loan,
   business-loan and car-loan pages.
 ============================================================ */

/* ── Breadcrumb ── */
.breadcrumb {
  padding: 14px 5%;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.breadcrumb a { color: var(--blue); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--blue-dark); }
.breadcrumb .sep { opacity: 0.4; }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* ── Loan page hero ── */
.loan-hero {
  padding: 64px 5% 56px;
  background: var(--hero-gradient);
  position: relative; overflow: hidden;
}
.loan-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C8920C' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.loan-hero-inner { position: relative; max-width: 680px; }
.loan-hero-icon {
  width: 64px; height: 64px;
  background: var(--gold-gradient);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(212, 160, 23, 0.28);
}
.loan-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800; line-height: 1.15;
  color: var(--text); margin-bottom: 8px;
}
.loan-hero h1 .accent { color: var(--green); }
.loan-hero .tamil-title {
  font-family: var(--font-tamil);
  font-size: 1.05rem; color: var(--muted); margin-bottom: 16px;
}
.loan-hero .tagline {
  font-size: 1rem; color: var(--muted); max-width: 520px; margin-bottom: 28px;
}
.loan-hero-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.loan-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 30px; padding: 6px 16px;
  font-size: 0.78rem; font-weight: 600; color: var(--blue);
  box-shadow: var(--shadow-sm);
}

/* ── Key metrics strip ── */
.metrics-strip {
  background: var(--bg-stats);
  padding: 28px 5%;
  display: flex; gap: 0; flex-wrap: wrap;
}
.metric-item {
  flex: 1; min-width: 150px;
  padding: 12px 24px;
  border-right: 1px solid rgba(255,255,255,0.12);
  text-align: center;
}
.metric-item:last-child { border-right: none; }
.metric-item .m-val {
  font-size: 1.5rem; font-weight: 800;
  color: var(--text-on-dark); line-height: 1;
}
.metric-item .m-val em {
  font-size: 0.9rem; font-style: normal;
  color: var(--green-light); margin-left: 2px;
}
.metric-item .m-lbl {
  font-size: 0.72rem; color: rgba(255,255,255,0.55);
  margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px;
}

/* ── Section titles on loan pages ── */
.lp-section { padding: 60px 5%; }
.lp-section.alt { background: var(--bg-alt); }
.lp-title {
  font-size: 1.4rem; font-weight: 700; color: var(--text);
  margin-bottom: 6px;
}
.lp-title .accent { color: var(--green); }
.lp-sub {
  font-family: var(--font-tamil);
  font-size: 0.9rem; color: var(--muted); margin-bottom: 28px;
}

/* ── Subtype grid (home loan variants) ── */
.subtype-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.subtype-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
  display: flex; flex-direction: column; gap: 10px;
}
.subtype-card:hover {
  transform: translateY(-4px);
  border-color: var(--green);
  box-shadow: var(--shadow-card);
}
.subtype-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary-alpha-sm), var(--accent-alpha-sm));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.subtype-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--blue); }
.subtype-card .st-tamil { font-family: var(--font-tamil); font-size: 0.78rem; color: var(--muted); }
.subtype-card p { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.subtype-tag {
  display: inline-block;
  background: var(--accent-alpha-sm);
  border: 1px solid var(--accent-alpha-md);
  border-radius: 20px; padding: 3px 10px;
  font-size: 0.68rem; font-weight: 600; color: var(--green);
  align-self: flex-start;
}

/* ── Rate visualiser ── */
.rate-bar-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.rate-bar-label {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.rate-bar-label .lbl { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.rate-bar-label .val { font-size: 1rem; font-weight: 700; color: var(--blue); }
.rate-bar-track {
  height: 10px; border-radius: 10px;
  background: var(--bg-alt);
  overflow: hidden;
  position: relative;
}
.rate-bar-fill {
  height: 100%; border-radius: 10px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}
.rate-bar-range {
  display: flex; justify-content: space-between;
  margin-top: 6px;
}
.rate-bar-range span { font-size: 0.72rem; color: var(--muted); }

.rate-note {
  font-size: 0.8rem; color: var(--muted);
  margin-top: 14px; padding: 12px 16px;
  background: var(--primary-alpha-sm);
  border-left: 3px solid var(--blue);
  border-radius: 0 8px 8px 0;
}

/* ── Documents checklist ── */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.doc-item {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s;
}
.doc-item:hover { border-color: var(--green); }
.doc-check {
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--accent-alpha-sm);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.doc-item-text .doc-name { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.doc-item-text .doc-detail { font-size: 0.77rem; color: var(--muted); line-height: 1.4; }

/* ── Apply CTA banner ── */
.apply-banner {
  background: var(--gold-gradient);
  padding: 56px 5%; text-align: center;
}
.apply-banner h2 { font-size: 1.8rem; font-weight: 800; color: var(--text-on-dark); margin-bottom: 8px; }
.apply-banner .tamil { font-family: var(--font-tamil); color: rgba(255,255,255,0.65); margin-bottom: 28px; font-size: 1rem; }
.apply-banner-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn-white {
  background: var(--text-on-dark); color: var(--blue);
  font-weight: 700; font-size: 0.95rem;
  padding: 13px 28px; border-radius: 40px;
  transition: opacity 0.2s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-white:hover { opacity: 0.9; }
.btn-outline-white {
  background: transparent; /* reset button default */
  font-family: var(--font-main); cursor: pointer;
  border: 2px solid rgba(255,255,255,0.5);
  color: var(--text-on-dark); font-weight: 600; font-size: 0.95rem;
  padding: 11px 26px; border-radius: 40px;
  transition: border-color 0.2s, background 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline-white:hover { border-color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.08); }

/* ── Info box (general tips) ── */
.info-box {
  background: var(--primary-alpha-sm);
  border: 1px solid var(--primary-alpha-md);
  border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 28px;
}
.info-box h4 { font-size: 0.9rem; font-weight: 700; color: var(--blue); margin-bottom: 8px; }
.info-box ul { padding-left: 18px; }
.info-box ul li { font-size: 0.83rem; color: var(--muted); line-height: 1.7; }

/* Loan page responsive rules are consolidated in the RESPONSIVE section above. */

/* ── Tamil inline helpers ── */
/* Used inside <li> items and doc cards for bilingual display */
.li-tamil {
  display: block;
  font-family: var(--font-tamil);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.5;
}

.doc-tamil {
  font-family: var(--font-tamil);
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed var(--border);
  line-height: 1.45;
}
