/* ==========================================================================
   DEMO MPCS - MODERN CO-OPERATIVE PORTAL STYLESHEET
   Design System: Modern Civic & Financial Tech (Emerald, Amber & Slate)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Sinhala:wght@400;500;600;700;800&family=Noto+Sans+Tamil:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root,
html[data-theme="light"] {
  /* Brand Color Palette */
  --primary-900: #022c22;
  --primary-800: #064e3b;
  --primary-700: #047857;
  --primary-600: #059669;
  --primary-500: #10b981;
  --primary-400: #34d399;
  --primary-100: #d1fae5;
  --primary-50:  #ecfdf5;

  --accent-amber: #d97706;
  --accent-gold:  #f59e0b;
  --accent-light: #fef3c7;

  --secondary-navy: #1e3a8a;
  --secondary-blue: #2563eb;
  --secondary-light: #eff6ff;

  /* Light Theme Surfaces & Backgrounds (Default) */
  --bg-body:      #f8fafc;
  --bg-card:      #ffffff;
  --bg-elevated:  #ffffff;
  --bg-subtle:    #f1f5f9;
  --bg-input:     #ffffff;

  --border-color: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-strong: #cbd5e1;

  --text-heading: #0f172a;
  --text-main:    #0f172a;
  --text-body:    #334155;
  --text-muted:   #64748b;

  /* Global variables */
  --white:        #ffffff;
  --dark-900:     #0f172a;
  --dark-800:     #1e293b;
  --dark-700:     #334155;
  --dark-600:     #475569;
  --dark-500:     #64748b;
  --gray-200:     #e2e8f0;
  --gray-100:     #f1f5f9;
  --gray-50:      #f8fafc;

  --header-bg:    rgba(255, 255, 255, 0.96);
  --header-border: #e2e8f0;
  --drawer-bg:    #ffffff;
  --footer-bg:    #09131f;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', 'Noto Sans Sinhala', 'Noto Sans Tamil', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sinhala: 'Noto Sans Sinhala', 'Plus Jakarta Sans', sans-serif;
  --font-tamil: 'Noto Sans Tamil', 'Plus Jakarta Sans', sans-serif;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.08);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.12), 0 8px 10px -6px rgb(0 0 0 / 0.08);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.25);

  /* Borders & Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="dark"] {
  /* Brand Color Palette */
  --primary-900: #022c22;
  --primary-800: #064e3b;
  --primary-700: #047857;
  --primary-600: #059669;
  --primary-500: #10b981;
  --primary-400: #34d399;
  --primary-100: rgba(16, 185, 129, 0.22);
  --primary-50:  rgba(16, 185, 129, 0.12);

  --accent-amber: #f59e0b;
  --accent-gold:  #fbbf24;
  --accent-light: rgba(245, 158, 11, 0.18);

  --secondary-navy: #1e3a8a;
  --secondary-blue: #3b82f6;
  --secondary-light: rgba(59, 130, 246, 0.18);

  /* Dark Theme Surfaces & Backgrounds */
  --bg-body:      #070d18;
  --bg-card:      #0f1929;
  --bg-elevated:  #14233a;
  --bg-subtle:    #0a1322;
  --bg-input:     #131f32;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text-heading: #f8fafc;
  --text-main:    #f1f5f9;
  --text-body:    #cbd5e1;
  --text-muted:   #94a3b8;

  /* In dark mode, --white remains #ffffff so buttons, tags, badges, and dark surfaces keep crisp white text */
  --white:        #ffffff;
  --dark-900:     #f8fafc;
  --dark-800:     #e2e8f0;
  --dark-700:     #cbd5e1;
  --dark-600:     #94a3b8;
  --dark-500:     #94a3b8;
  --gray-200:     rgba(255, 255, 255, 0.08);
  --gray-100:     #0c1524;
  --gray-50:      #070d18;

  --header-bg:    rgba(7, 13, 24, 0.94);
  --header-border: rgba(255, 255, 255, 0.08);
  --drawer-bg:    #0b1424;
  --footer-bg:    #040810;

  /* Shadows in Dark Mode */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 14px 28px rgba(0, 0, 0, 0.55);
  --shadow-xl: 0 22px 45px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.35);
}

/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Multi-language font adjustments */
html[lang="si"] body {
  font-family: var(--font-sinhala);
  line-height: 1.7;
}

html[lang="ta"] body {
  font-family: var(--font-tamil);
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

ul {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   TOP NOTIFICATION BAR
   ========================================================================== */
.top-bar {
  background: linear-gradient(90deg, var(--primary-900) 0%, #064030 100%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.825rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.top-bar-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.top-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-info-item svg {
  color: var(--accent-gold);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switcher {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 2px 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.775rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.lang-btn:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
}

.lang-btn.active {
  background: var(--primary-500);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.emergency-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(217, 119, 6, 0.25);
  border: 1px solid var(--accent-amber);
  color: #fef08a;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.75rem;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  background: var(--header-bg);
}

.site-header .nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 20px;
  max-width: 1560px;
  width: 100%;
  padding-left: 24px;
  padding-right: 24px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
  max-width: 250px;
}

.brand-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: #ffffff;
  padding: 2px;
  border: 1px solid var(--gray-200);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary-800);
  line-height: 1.15;
  white-space: nowrap;
}

.brand-tag {
  font-size: 0.675rem;
  font-weight: 600;
  color: var(--accent-amber);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-meta {
  font-size: 0.625rem;
  color: var(--dark-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Navigation Links */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  margin: 0 16px;
  min-width: max-content;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--dark-700);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  position: relative;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.nav-link:hover {
  color: var(--primary-700);
  background: var(--primary-50);
}

.nav-link.active {
  color: var(--primary-800);
  background: var(--primary-100);
  font-weight: 700;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(4, 120, 87, 0.4);
  color: #ffffff !important;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-heading);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--primary-50);
  border-color: var(--primary-500);
  color: var(--primary-500);
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-amber) 0%, #b45309 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-amber) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.4);
  color: #ffffff !important;
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.btn-outline-white:hover {
  background: var(--white);
  color: var(--primary-900) !important;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.825rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

/* Mobile Controls */
.mobile-nav-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  color: var(--text-heading);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.mobile-toggle:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--primary-500);
  color: var(--primary-500);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 320px;
  max-width: 85%;
  height: 100vh;
  background: var(--drawer-bg);
  border-left: 1px solid var(--border-color);
  z-index: 2000;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  padding: 24px;
  transition: right var(--transition-normal);
  overflow-y: auto;
}

.mobile-drawer.open {
  right: 0;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-close {
  background: transparent;
  border: none;
  font-size: 1.75rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.drawer-close:hover {
  color: var(--text-heading);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0;
}

.drawer-nav a {
  padding: 11px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-body);
  border-radius: var(--radius-md);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.drawer-nav a.active, .drawer-nav a:hover {
  background: var(--primary-50);
  color: var(--primary-500);
}

/* ==========================================================================
   HERO SECTION - SHADED PHOTO & FLOATING DIAMONDS (SRI LANKAN MPCS STYLE)
   ========================================================================== */
.hero-section {
  position: relative;
  background: var(--bg-card);
  min-height: 600px;
  display: flex;
  align-items: center;
  padding: 60px 0 70px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Background photo shaded/faded across right half with emerald gradient */
.hero-overlay-pattern {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 65%;
  background-image: 
    linear-gradient(135deg, rgba(6, 78, 59, 0.5) 0%, rgba(16, 185, 129, 0.2) 100%),
    url('../images/headquarters.jpg');
  background-size: cover;
  background-position: center right;
  mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.12) 18%, rgba(0,0,0,0.65) 55%, rgba(0,0,0,1) 100%);
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.12) 18%, rgba(0,0,0,0.65) 55%, rgba(0,0,0,1) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-100);
  border: 1px solid var(--primary-500);
  color: var(--primary-900);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-badge svg {
  color: var(--accent-amber);
}

.hero-title {
  font-size: 2.85rem;
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.025em;
  margin-bottom: 18px;
  color: var(--text-heading);
}

.hero-title .brand-highlight {
  color: var(--primary-800);
  display: block;
}

.hero-motto {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--dark-800);
  display: block;
  margin-top: 8px;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--dark-600);
  margin-bottom: 24px;
  max-width: 580px;
}

/* Inline Stats Matching Reference Image */
.hero-inline-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 18px 0;
  margin-bottom: 28px;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.hero-stat-box {
  text-align: left;
}

.hero-stat-box h5 {
  font-size: 0.725rem;
  color: var(--dark-500);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.hero-stat-box .stat-val {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary-800);
  line-height: 1;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Floating Diamond Photo Cluster (Right Side) */
.hero-diamond-cluster {
  position: relative;
  width: 100%;
  height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diamond-frame {
  position: absolute;
  transform: rotate(45deg);
  border-radius: 26px;
  border: 5px solid #ffffff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  background: #ffffff;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
  cursor: pointer;
}

.diamond-frame:hover {
  transform: rotate(45deg) scale(1.06);
  box-shadow: 0 24px 45px rgba(6, 78, 59, 0.3);
  z-index: 10 !important;
}

.diamond-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: rotate(-45deg) scale(1.48);
  transition: transform 0.4s ease;
  display: block;
}

.diamond-frame:hover .diamond-img {
  transform: rotate(-45deg) scale(1.6);
}

/* Three Diamond Positions Matching Reference */
.diamond-top {
  top: 15px;
  right: 120px;
  width: 180px;
  height: 180px;
  z-index: 2;
}

.diamond-middle {
  top: 150px;
  right: 10px;
  width: 175px;
  height: 175px;
  z-index: 4;
}

.diamond-bottom {
  bottom: 15px;
  right: 135px;
  width: 170px;
  height: 170px;
  z-index: 3;
}

/* Floating Decorative Nodes */
.cluster-node {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-700);
  border: 2px solid var(--primary-100);
  z-index: 5;
  animation: floatSlow 4s ease-in-out infinite alternate;
}

.node-1 { top: 90px; left: 60px; }
.node-2 { bottom: 90px; left: 100px; animation-delay: 2s; }
.node-3 { top: 220px; right: 230px; animation-delay: 1.2s; }

@keyframes floatSlow {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* Service Card Photo Headers */
.service-card-photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  transition: transform var(--transition-normal);
}

.service-card:hover .service-card-photo {
  transform: scale(1.03);
}

/* ==========================================================================
   STATS COUNTER BAR
   ========================================================================== */
.stats-bar-wrapper {
  margin-top: -50px;
  position: relative;
  z-index: 10;
  margin-bottom: 60px;
}

.stats-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 32px 40px;
  border: 1px solid var(--border-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item {
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background-color: var(--gray-200);
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary-800);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.stat-number span {
  color: var(--accent-amber);
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-500);
}

/* ==========================================================================
   SECTION HEADINGS & LAYOUTS
   ========================================================================== */
.section-padding {
  padding: 70px 0;
}

.section-header {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 50px auto;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-700);
  background: var(--primary-100);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   SERVICES CARDS
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 30px 24px;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-400));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-500);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--primary-50);
  color: var(--primary-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 12px;
  line-height: 1.35;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.service-card .card-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary-700);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.service-card .card-link:hover {
  color: var(--accent-amber);
  gap: 10px;
}

/* ==========================================================================
   RATES & FINANCIAL PREVIEW SECTION
   ========================================================================== */
.rates-section-bg {
  background: linear-gradient(180deg, var(--gray-100) 0%, var(--bg-card) 100%);
}

.rates-table-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.modern-table th {
  background: var(--primary-800);
  color: var(--white);
  padding: 16px 20px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.modern-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.925rem;
  color: var(--dark-800);
}

.modern-table tr:hover td {
  background-color: var(--primary-50);
}

.rate-badge {
  display: inline-block;
  background: var(--primary-100);
  color: var(--primary-800);
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
}

.rate-badge.gold {
  background: var(--accent-light);
  color: #92400e;
}

/* ==========================================================================
   CALCULATOR COMPONENT
   ========================================================================== */
.calc-wrapper {
  background: linear-gradient(135deg, #064e3b 0%, #042e23 100%);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 44px;
  box-shadow: var(--shadow-xl);
  margin-top: 40px;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.calc-form-group {
  margin-bottom: 24px;
}

.calc-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
}

.calc-slider-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.calc-range {
  flex: 1;
  accent-color: var(--accent-gold);
  height: 8px;
  cursor: pointer;
}

.calc-input-box {
  width: 140px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  color: var(--white);
  font-weight: 700;
  text-align: right;
}

.calc-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
}

.calc-select option {
  background: #0f172a;
  color: #ffffff;
}

.calc-result-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  text-align: center;
}

.calc-result-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.calc-result-val {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1.1;
  margin-bottom: 20px;
}

.calc-subresults {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
}

.calc-sub-item h5 {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  margin-bottom: 4px;
}

.calc-sub-item p {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
}

/* Rates Page - Modern Financial Calculator Result Cards */
.calc-result-card {
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin-top: 24px;
  transition: all var(--transition-normal);
}

.calc-result-card.deposit-result-card {
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
}

.calc-result-card.loan-result-card {
  background: var(--accent-light);
  border: 1px solid #fde68a;
}

.calc-card-label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-body);
}

.calc-card-label.loan-label {
  color: #92400e;
}

.calc-card-value {
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.calc-card-value.deposit-val {
  color: var(--primary-700);
}

.calc-card-value.loan-val {
  color: #d97706;
}

.calc-card-subgrid {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--primary-100);
  margin-top: 16px;
  padding-top: 14px;
}

.calc-card-sublabel {
  font-size: 0.775rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
}

.calc-card-subval {
  font-size: 1.05rem;
  font-weight: 800;
}

.calc-card-subval.deposit-sub {
  color: var(--primary-700);
}

.calc-card-subval.payout-sub {
  color: var(--accent-amber);
}

.calc-card-footer {
  border-top: 1px solid #fde68a;
  margin-top: 16px;
  padding-top: 14px;
  font-size: 0.875rem;
  color: #78350f;
}

.calc-card-footer .loan-sub {
  color: #92400e;
  font-weight: 800;
}

/* ==========================================================================
   MEMBER WELFARE SECTION
   ========================================================================== */
.welfare-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.welfare-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.welfare-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-gold);
}

.welfare-badge-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-amber);
  background: var(--accent-light);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  align-self: flex-start;
}

.welfare-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 10px;
  line-height: 1.35;
}

.welfare-card p {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.55;
  flex-grow: 1;
}

/* Welfare Pillar & Benefit Cards */
.welfare-pillar-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 36px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.welfare-pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-500);
}

.welfare-note-green {
  background: var(--primary-50);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--primary-800);
}

html[data-theme="dark"] .welfare-note-green {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.welfare-note-red {
  background: #fef2f2;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: #991b1b;
}

html[data-theme="dark"] .welfare-note-red {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.welfare-badge-tag.red {
  background: #fee2e2;
  color: #b91c1c;
}

html[data-theme="dark"] .welfare-badge-tag.red {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.welfare-badge-tag.blue {
  background: var(--secondary-light);
  color: var(--secondary-navy);
}

html[data-theme="dark"] .welfare-badge-tag.blue {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.welfare-badge-tag.purple {
  background: #f3e8ff;
  color: #7e22ce;
}

html[data-theme="dark"] .welfare-badge-tag.purple {
  background: rgba(168, 85, 247, 0.2);
  color: #d8b4fe;
}

.welfare-step-card {
  background: var(--bg-card);
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  position: relative;
  transition: all var(--transition-normal);
}

.welfare-step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.welfare-step-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary-100);
  position: absolute;
  top: 12px;
  right: 16px;
}

html[data-theme="dark"] .welfare-step-num {
  color: rgba(16, 185, 129, 0.25);
}

/* ==========================================================================
   BRANCH LOCATOR & DIRECTORY
   ========================================================================== */
.branch-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-heading);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background: var(--primary-50);
  color: var(--primary-700);
  border-color: var(--primary-500);
}

.filter-btn.active {
  background: var(--primary-700);
  color: #ffffff !important;
  border-color: var(--primary-700);
  box-shadow: var(--shadow-sm);
}

.branch-search-box {
  max-width: 480px;
  margin: 0 auto 30px auto;
  position: relative;
}

.branch-search-input {
  width: 100%;
  padding: 12px 20px 12px 44px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.branch-search-input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.branch-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dark-500);
}

.branch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.branch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.branch-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-500);
}

.branch-cat-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  display: inline-block;
  align-self: flex-start;
}

.branch-cat-badge.crb { background: var(--primary-100); color: var(--primary-800); }
.branch-cat-badge.retail { background: var(--secondary-light); color: var(--secondary-navy); }
.branch-cat-badge.fuel { background: #fee2e2; color: #991b1b; }
.branch-cat-badge.commercial { background: #fef3c7; color: #92400e; }

.branch-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 10px;
}

.branch-info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-body);
  margin-bottom: 8px;
}

.branch-info-row svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--primary-700);
}

.branch-actions {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   NEWS & TENDERS SECTION
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-500);
}

.tender-banner {
  background: linear-gradient(135deg, var(--secondary-navy) 0%, #1e40af 100%);
  color: var(--white);
  padding: 14px 20px;
  font-size: 0.825rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tender-deadline-chip {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.725rem;
}

.news-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--dark-500);
  margin-bottom: 8px;
}

.news-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 12px;
  line-height: 1.4;
}

.news-card p {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.55;
  margin-bottom: 18px;
  flex-grow: 1;
}

/* Careers Notice Banner */
.careers-cta-banner {
  background: linear-gradient(135deg, #022c22 0%, #064e3b 55%, #0f2d24 100%);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
}

.careers-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}

.careers-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 10px 0;
  line-height: 1.25;
}

.careers-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   CONTACT & GRIEVANCE FORM
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 40px;
}

.contact-info-card {
  background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-800) 100%);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-xl);
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.contact-form-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  background: var(--bg-input);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-600);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* ==========================================================================
   FOOTER - Consistent Rich Dark Obsidian in Both Light & Dark Modes
   ========================================================================== */
.site-footer {
  background: #09131f !important;
  color: rgba(255, 255, 255, 0.78) !important;
  padding: 70px 0 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] .site-footer {
  background: #040810 !important;
  color: rgba(255, 255, 255, 0.75) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff !important;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75) !important;
  margin-bottom: 20px;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff !important;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.72) !important;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-gold) !important;
  padding-left: 4px;
}

.footer-contact-item {
  color: rgba(255, 255, 255, 0.75) !important;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.825rem;
  color: rgba(255, 255, 255, 0.55) !important;
}

/* Back to Top Floating Button */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--primary-700);
  color: var(--white);
  border: none;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-normal);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--primary-600);
  transform: translateY(-3px);
}

/* Page Header Banner (for subpages) - Modern Shaded Photo Style */
.page-banner {
  position: relative;
  background: linear-gradient(135deg, #022c22 0%, #064e3b 55%, #0d5f47 100%);
  color: var(--white);
  padding: 55px 0 65px 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Shaded photo background overlay on right side (Matching Main Hero) */
.page-banner::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 58%;
  background-size: cover;
  background-position: center right;
  opacity: 0.35;
  mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.12) 18%, rgba(0,0,0,0.65) 55%, rgba(0,0,0,1) 100%);
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,0.12) 18%, rgba(0,0,0,0.65) 55%, rgba(0,0,0,1) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Page specific background photos */
.banner-about::before { background-image: url('../images/headquarters.jpg'); }
.banner-services::before { background-image: url('../images/supermarket.jpg'); }
.banner-rates::before { background-image: url('../images/banking.jpg'); }
.banner-welfare::before { background-image: url('../images/community-hands.jpg'); }
.banner-branches::before { background-image: url('../images/building.jpg'); }
.banner-news::before { background-image: url('../images/headquarters.jpg'); }
.banner-contact::before { background-image: url('../images/banking.jpg'); }

.page-banner-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 36px;
  position: relative;
  z-index: 2;
}

.page-banner-content {
  text-align: left;
}

.page-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.page-banner-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 12px;
  letter-spacing: -0.025em;
  color: var(--white);
  line-height: 1.18;
}

.page-banner-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 620px;
  line-height: 1.65;
  margin: 0 0 18px 0;
}

.breadcrumb-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.825rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.breadcrumb-nav a {
  color: var(--accent-gold);
  font-weight: 600;
}

.breadcrumb-nav span {
  color: rgba(255, 255, 255, 0.85);
}

/* Floating Banner Visual Card (Right side) */
.page-banner-visual {
  display: flex;
  justify-content: flex-end;
  position: relative;
}

.banner-photo-card {
  position: relative;
  width: 320px;
  height: 195px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  background: #09131f;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.banner-photo-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.45);
  border-color: var(--primary-500);
}

.banner-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.banner-photo-card:hover .banner-photo-img {
  transform: scale(1.08);
}

.banner-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 44, 34, 0.92) 0%, rgba(2, 44, 34, 0.25) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.banner-photo-tag {
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.banner-photo-caption {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.25;
}

.banner-diamond-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent-gold);
  color: #0f172a;
  font-size: 0.725rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 4px;
}

@media (max-width: 900px) {
  .page-banner-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .page-banner-visual {
    justify-content: flex-start;
  }
  .banner-photo-card {
    width: 100%;
    max-width: 360px;
    height: 180px;
  }
}

/* Leadership & Governance Person Cards */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 50px;
}

.leader-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 26px 20px;
  text-align: center;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.leader-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-700), var(--accent-gold));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.leader-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(6, 78, 59, 0.12);
  border-color: rgba(6, 78, 59, 0.25);
}

.leader-card:hover::before {
  opacity: 1;
}

.leader-photo-wrap {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0 auto 18px auto;
  flex-shrink: 0;
}

.leader-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transition: transform var(--transition-normal);
  background: var(--gray-100);
}

.leader-card:hover .leader-photo-img {
  transform: scale(1.05);
}

.leader-badge-icon {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 28px;
  height: 28px;
  background: var(--primary-700);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.leader-badge-icon.gold {
  background: var(--accent-gold);
  color: #0f172a;
}

.leader-badge-icon.blue {
  background: var(--secondary-blue);
  color: var(--white);
}

.leader-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 6px;
  line-height: 1.3;
}

.leader-role {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
  line-height: 1.3;
}

.leader-role.role-chair {
  background: var(--primary-50);
  color: var(--primary-800);
  border: 1px solid var(--primary-200);
}

.leader-role.role-vice {
  background: var(--accent-light);
  color: #92400e;
  border: 1px solid #fde68a;
}

.leader-role.role-sec {
  background: var(--secondary-light);
  color: var(--secondary-navy);
  border: 1px solid #bfdbfe;
}

.leader-role.role-treas {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.leader-role.role-exec {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.leader-desc {
  font-size: 0.825rem;
  color: var(--dark-600);
  line-height: 1.55;
  margin-top: 4px;
}

@media (max-width: 1024px) {
  .leadership-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .leadership-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  padding: 32px;
  box-shadow: var(--shadow-xl);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--dark-500);
}

/* Toast alert notification */
.toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 14px 24px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xl);
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 4000;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: all var(--transition-normal);
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Theme Toggle Controls */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

html[data-theme="light"] .theme-toggle-btn {
  background: var(--gray-100);
  border-color: var(--gray-200);
  color: var(--dark-800);
}

.theme-toggle-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--primary-500);
  color: var(--primary-500);
  transform: translateY(-1px);
}

.theme-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.theme-toggle-btn:hover .theme-icon {
  transform: rotate(20deg) scale(1.1);
}

.topbar-theme-btn {
  padding: 3px 10px;
  font-size: 0.725rem;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.mobile-theme-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.drawer-theme-box {
  margin: 16px 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.drawer-section-title {
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.theme-switch-pill {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  padding: 3px;
  border-radius: var(--radius-full);
  gap: 4px;
  border: 1px solid var(--border-color);
}

html[data-theme="light"] .theme-switch-pill {
  background: var(--gray-100);
}

.theme-pill-opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-pill-opt.active {
  background: var(--primary-700);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Dark theme specific component overrides */
html[data-theme="dark"] .brand-title {
  color: #34d399;
}
html[data-theme="dark"] .brand-tag {
  color: var(--accent-gold);
}
html[data-theme="dark"] .brand-meta {
  color: var(--text-muted);
}
html[data-theme="dark"] .brand-logo-img {
  background: #ffffff;
  border-radius: 6px;
  padding: 2px;
}
html[data-theme="dark"] .mobile-toggle {
  border-color: rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
}
html[data-theme="dark"] .nav-link {
  color: #cbd5e1;
}
html[data-theme="dark"] .nav-link:hover {
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
}
html[data-theme="dark"] .nav-link.active {
  color: #34d399;
  background: rgba(16, 185, 129, 0.2);
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background-color: #131f32;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}
html[data-theme="dark"] .rates-table th,
html[data-theme="dark"] .modern-table th {
  background: #064e3b;
  color: #34d399;
  border-bottom: 2px solid rgba(16, 185, 129, 0.4);
}
html[data-theme="dark"] .rates-table td,
html[data-theme="dark"] .modern-table td {
  background: #0f1929;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .rates-table tbody tr:nth-child(even) td,
html[data-theme="dark"] .modern-table tbody tr:nth-child(even) td {
  background: #0b1422;
}
html[data-theme="dark"] .rates-table tbody tr:hover td,
html[data-theme="dark"] .modern-table tbody tr:hover td {
  background: rgba(16, 185, 129, 0.12);
}
html[data-theme="dark"] .calc-wrapper {
  background: linear-gradient(135deg, #042f24 0%, #021a14 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #ffffff !important;
}
html[data-theme="dark"] .calc-result-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Dark Mode Calculator Result Cards - High Visibility */
html[data-theme="dark"] .calc-result-card.deposit-result-card {
  background: rgba(6, 78, 59, 0.42);
  border: 1.5px solid rgba(52, 211, 153, 0.5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), inset 0 0 20px rgba(16, 185, 129, 0.1);
}

html[data-theme="dark"] .calc-result-card.deposit-result-card .calc-card-label {
  color: #f1f5f9;
  font-weight: 600;
  font-size: 0.9rem;
}

html[data-theme="dark"] .calc-result-card.deposit-result-card .calc-card-value.deposit-val {
  color: #34d399;
  text-shadow: 0 0 18px rgba(52, 211, 153, 0.5);
}

html[data-theme="dark"] .calc-result-card.deposit-result-card .calc-card-subgrid {
  border-top-color: rgba(255, 255, 255, 0.14);
}

html[data-theme="dark"] .calc-result-card.deposit-result-card .calc-card-sublabel {
  color: #94a3b8;
  font-size: 0.8rem;
}

html[data-theme="dark"] .calc-result-card.deposit-result-card .calc-card-subval.deposit-sub {
  color: #6ee7b7;
  font-weight: 800;
}

html[data-theme="dark"] .calc-result-card.deposit-result-card .calc-card-subval.payout-sub {
  color: #fbbf24;
  font-weight: 800;
}

html[data-theme="dark"] .calc-result-card.loan-result-card {
  background: rgba(120, 53, 15, 0.38);
  border: 1.5px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45), inset 0 0 20px rgba(245, 158, 11, 0.1);
}

html[data-theme="dark"] .calc-result-card.loan-result-card .calc-card-label.loan-label {
  color: #fef3c7;
  font-weight: 600;
  font-size: 0.9rem;
}

html[data-theme="dark"] .calc-result-card.loan-result-card .calc-card-value.loan-val {
  color: #fbbf24;
  text-shadow: 0 0 18px rgba(251, 191, 36, 0.5);
}

html[data-theme="dark"] .calc-result-card.loan-result-card .calc-card-footer {
  border-top-color: rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
  font-size: 0.9rem;
}

html[data-theme="dark"] .calc-result-card.loan-result-card .calc-card-footer .loan-sub {
  color: #fde68a;
  font-weight: 800;
}
html[data-theme="dark"] .calc-select option {
  background: #0b1422;
  color: #f8fafc;
}
html[data-theme="dark"] .top-bar {
  background: linear-gradient(90deg, #021a14 0%, #04251c 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .section-tag {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
}
html[data-theme="dark"] .breadcrumb-nav {
  color: rgba(255, 255, 255, 0.7);
}
html[data-theme="dark"] .rates-section-bg {
  background: linear-gradient(180deg, var(--bg-subtle) 0%, var(--bg-body) 100%);
}
html[data-theme="dark"] .hero-section {
  background: radial-gradient(circle at 18% 25%, rgba(6, 78, 59, 0.45) 0%, transparent 60%),
              radial-gradient(circle at 85% 70%, rgba(4, 120, 87, 0.22) 0%, transparent 55%),
              linear-gradient(180deg, #070d18 0%, #0a1322 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
html[data-theme="dark"] .hero-overlay-pattern {
  opacity: 0.22;
  background-image: 
    linear-gradient(135deg, rgba(2, 44, 34, 0.9) 0%, rgba(6, 78, 59, 0.45) 100%),
    url('../images/headquarters.jpg');
}
html[data-theme="dark"] .hero-title {
  color: #f8fafc;
}
html[data-theme="dark"] .hero-title .brand-highlight {
  color: #34d399;
}
html[data-theme="dark"] .hero-motto {
  color: #f1f5f9;
}
html[data-theme="dark"] .hero-subtitle {
  color: #cbd5e1;
}
html[data-theme="dark"] .hero-inline-stats {
  border-top-color: rgba(255, 255, 255, 0.1);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
html[data-theme="dark"] .hero-stat-box .stat-val {
  color: #34d399;
}
html[data-theme="dark"] .hero-stat-box h5 {
  color: #94a3b8;
}
html[data-theme="dark"] .diamond-frame {
  border-color: rgba(16, 185, 129, 0.55);
  background: #0f1929;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 20px rgba(16, 185, 129, 0.2);
}
html[data-theme="dark"] .cluster-node {
  background: #0f1929;
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .stat-number {
  color: #34d399;
}
html[data-theme="dark"] .filter-btn {
  background: #0f1929;
  border-color: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}
html[data-theme="dark"] .filter-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: #10b981;
}
html[data-theme="dark"] .filter-btn.active {
  background: #047857;
  color: #ffffff !important;
  border-color: #047857;
}
html[data-theme="dark"] .theme-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f1f5f9;
}
html[data-theme="dark"] .theme-switch-pill {
  background: rgba(0, 0, 0, 0.4);
}
html[data-theme="dark"] .theme-pill-opt {
  color: #94a3b8;
}
html[data-theme="dark"] .theme-pill-opt.active {
  background: #047857;
  color: #ffffff;
}

html[data-theme="dark"] .hero-badge {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}
html[data-theme="dark"] .rate-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
html[data-theme="dark"] .rate-badge.gold {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}
html[data-theme="dark"] .branch-cat-badge.crb {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}
html[data-theme="dark"] .branch-cat-badge.retail {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}
html[data-theme="dark"] .branch-cat-badge.fuel {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}
html[data-theme="dark"] .branch-cat-badge.commercial {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}
html[data-theme="dark"] .welfare-badge-tag {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

/* Dark Mode Leadership & Board Roles */
html[data-theme="dark"] .leader-role.role-chair {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.15);
}

html[data-theme="dark"] .leader-role.role-vice {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.15);
}

html[data-theme="dark"] .leader-role.role-sec {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.45);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

html[data-theme="dark"] .leader-role.role-treas {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.45);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

html[data-theme="dark"] .leader-role.role-exec {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.12);
}

html[data-theme="dark"] .leader-desc {
  color: #cbd5e1;
}

html[data-theme="dark"] .leader-photo-img {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .careers-cta-banner {
  background: radial-gradient(circle at 15% 30%, rgba(6, 78, 59, 0.45) 0%, transparent 60%),
              linear-gradient(135deg, #041f17 0%, #0b1928 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 24px rgba(16, 185, 129, 0.08);
}

html[data-theme="dark"] .careers-tag {
  color: #fbbf24;
}

html[data-theme="dark"] .careers-title {
  color: #f8fafc;
}

html[data-theme="dark"] .careers-desc {
  color: #cbd5e1;
}

/* Responsive Breakpoints */
@media (max-width: 1400px) and (min-width: 1181px) {
  .site-header .nav-container {
    padding-left: 16px;
    padding-right: 16px;
    gap: 12px;
  }
  .brand-wrapper {
    max-width: 210px;
    gap: 8px;
  }
  .brand-title {
    font-size: 1.15rem;
  }
  .brand-tag {
    font-size: 0.625rem;
  }
  .brand-meta {
    display: none;
  }
  .main-nav {
    margin: 0 8px;
  }
  .nav-list {
    gap: 2px;
  }
  .nav-link {
    font-size: 0.775rem;
    padding: 5px 8px;
  }
  .nav-actions {
    gap: 8px;
  }
  .nav-actions .btn {
    padding: 7px 14px;
    font-size: 0.8rem;
  }
}

@media (max-width: 1180px) {
  .main-nav, .nav-actions {
    display: none !important;
  }
  .mobile-nav-actions {
    display: flex !important;
  }
  .mobile-toggle {
    display: flex !important;
  }
}

@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .welfare-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .branch-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .stat-item:nth-child(3)::after {
    display: none;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .hero-diamond-cluster {
    height: 360px;
    margin: 20px auto 0 auto;
    max-width: 360px;
  }
  .diamond-top {
    width: 135px;
    height: 135px;
    right: 90px;
  }
  .diamond-middle {
    width: 130px;
    height: 130px;
    right: 0px;
    top: 110px;
  }
  .diamond-bottom {
    width: 125px;
    height: 125px;
    right: 100px;
    bottom: 10px;
  }
  .cluster-node {
    display: none;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   ADVANCED MOBILE PHONE RESPONSIVE ENHANCEMENTS (<= 640px and <= 480px)
   ========================================================================== */
@media (max-width: 640px) {
  html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
  }

  /* Compact Top Bar on Mobile */
  .top-bar {
    padding: 6px 0;
  }
  .top-bar-info .top-info-item:not(.top-info-phone) {
    display: none;
  }
  .top-bar-inner {
    justify-content: space-between;
    gap: 8px;
  }
  .emergency-tag {
    font-size: 0.725rem;
    padding: 2px 7px;
  }
  .lang-switcher .lang-btn {
    padding: 3px 6px;
    font-size: 0.725rem;
  }
  .topbar-theme-btn .theme-btn-text {
    display: none;
  }
  .topbar-theme-btn {
    padding: 3px 6px;
  }

  /* Header on Mobile */
  .site-header {
    height: 64px;
  }
  .site-header .nav-container {
    height: 64px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .brand-logo-img {
    width: 36px;
    height: 36px;
  }
  .brand-title {
    font-size: 1.1rem;
  }
  .brand-tag {
    font-size: 0.6rem;
    max-width: 120px;
  }
  .brand-meta {
    display: none;
  }

  /* Hero Section on Mobile */
  .hero-section {
    padding: 40px 0 50px 0;
    min-height: auto;
  }
  .hero-title {
    font-size: 1.85rem !important;
    line-height: 1.25;
  }
  .hero-motto {
    font-size: 1.25rem !important;
  }
  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 24px;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
  }

  /* Stats Grid on Mobile - Clean 2x2 grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px 10px !important;
    padding: 16px !important;
  }
  .stat-item::after {
    display: none !important;
  }
  .stat-number {
    font-size: 1.75rem !important;
  }
  .stat-label {
    font-size: 0.75rem !important;
  }

  /* Warakapola Hero Diamond Cluster on Mobile */
  .hero-diamond-cluster {
    height: 270px !important;
    max-width: 280px !important;
    margin: 24px auto 0 auto !important;
  }
  .diamond-top {
    width: 100px !important;
    height: 100px !important;
    right: 65px !important;
  }
  .diamond-middle {
    width: 95px !important;
    height: 95px !important;
    right: 0px !important;
    top: 80px !important;
  }
  .diamond-bottom {
    width: 90px !important;
    height: 90px !important;
    right: 75px !important;
    bottom: 5px !important;
  }

  /* Subpage Page Banner on Mobile */
  .page-banner {
    padding: 38px 0 42px 0;
  }
  .page-banner-title {
    font-size: 1.75rem !important;
  }
  .page-banner-subtitle {
    font-size: 0.9rem;
  }
  .banner-photo-card {
    height: 160px !important;
    max-width: 100% !important;
  }

  /* Grids to Single Column on Mobile */
  .services-grid, .welfare-grid, .branch-grid, .news-grid {
    grid-template-columns: 1fr;
  }
  .hero-card-stack {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Section Padding */
  .section-padding {
    padding: 45px 0;
  }
  .section-title {
    font-size: 1.6rem !important;
  }
  .section-subtitle {
    font-size: 0.875rem;
  }

  /* Financial Calculators on Mobile */
  .calc-card {
    padding: 20px 16px;
  }
  .calc-result-box {
    padding: 20px 16px;
  }
  .calc-result-value {
    font-size: 1.8rem;
  }

  /* Table Horizontal Scrolling on Mobile */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
  }
  .rates-table {
    min-width: 580px;
  }

  /* Branch Filter Pills on Mobile */
  .branch-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .branch-filters::-webkit-scrollbar {
    display: none;
  }
  .filter-pill {
    flex-shrink: 0;
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  /* Modals on Mobile */
  .modal-dialog {
    padding: 24px 18px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
  }

  /* Touch-friendly inputs: 16px to prevent iOS auto-zoom */
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important;
    min-height: 44px;
  }

  /* Floating Back to Top Button */
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  .careers-cta-banner {
    padding: 28px 20px;
    flex-direction: column;
    text-align: center;
    gap: 18px;
  }
  .careers-cta-banner .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: 1.55rem !important;
  }
  .brand-title {
    font-size: 1rem;
  }
  .brand-tag {
    display: none;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 12px !important;
  }
  .stat-number {
    font-size: 1.5rem !important;
  }
}
