/* IBAN Validator Professional Redesign - v2.0 */
/* Built on Bootstrap 5 with custom enhancements */

/* ===== CSS Variables - Professional Finance Theme ===== */
:root {
  /* Primary Colors */
  --primary: #0051a2;        /* Trust Blue - Main brand color */
  --primary-dark: #003d7a;   /* Darker blue for hover states */
  --primary-light: #e8f1fb;  /* Light blue for backgrounds */

  /* Semantic Colors */
  --success: #00875a;        /* Valid IBAN - Professional green */
  --danger: #de350b;         /* Invalid IBAN - Clear red */
  --warning: #ff991f;        /* Warning - Amber */
  --info: #0065ff;           /* Information - Bright blue */

  /* Neutral Colors */
  --dark: #172b4d;           /* Main text color */
  --gray-900: #253858;       /* Headings */
  --gray-700: #42526e;       /* Secondary text */
  --gray-500: #6b778c;       /* Muted text */
  --gray-300: #dfe1e6;       /* Borders */
  --gray-100: #f4f5f7;       /* Light backgrounds */
  --white: #ffffff;          /* Pure white */

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #0051a2 0%, #0065ff 100%);
  --gradient-hero: linear-gradient(135deg, #003d7a 0%, #0051a2 50%, #0065ff 100%);

  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI Variable', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;

  /* Spacing */
  --spacing-unit: 8px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

/* ===== Global Styles ===== */
body {
  font-family: var(--font-primary);
  color: var(--dark);
  background-color: var(--gray-100);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 2rem; line-height: 1.3; }
h3 { font-size: 1.5rem; line-height: 1.4; }
h4 { font-size: 1.25rem; line-height: 1.4; }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ===== Navigation Header ===== */
.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary) !important;
}

.navbar {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
}

.nav-link {
  color: var(--gray-700) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary) !important;
}

.nav-link.active {
  color: var(--primary) !important;
  background-color: var(--primary-light);
  border-radius: var(--radius-md);
}

/* Language Selector */
.language-selector {
  display: flex;
  gap: 0.5rem;
}

.language-selector .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

/* ===== Hero Section ===== */
.hero-section {
  background: var(--gradient-hero);
  color: var(--white);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff10" d="M0,96L48,112C96,128,192,160,288,165.3C384,171,480,149,576,144C672,139,768,149,864,154.7C960,160,1056,160,1152,138.7C1248,117,1344,75,1392,53.3L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
  background-size: cover;
  z-index: -1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--white) !important;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

/* Trust Badges */
.trust-badges {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  opacity: 0.9;
  min-height: 48px; /* CLS fix: Reserve space to prevent layout shifts during DB queries */
  min-width: 120px; /* CLS fix: Reserve horizontal space for country count text */
}

.trust-badge i {
  font-size: 1.25rem;
}

/* ===== IBAN Validation Form ===== */
.validation-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2rem;
  margin: -3rem auto 3rem;
  position: relative;
  z-index: 10;
  max-width: 600px;
}

.form-label {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.iban-input-group {
  position: relative;
}

.iban-input {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  padding: 1rem 1rem 1rem 3.5rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.iban-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 81, 162, 0.1);
  outline: none;
}

.iban-input.is-valid {
  border-color: var(--success);
}

.iban-input.is-invalid {
  border-color: var(--danger);
}

/* Country Flag in Input */
.country-flag {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  line-height: 1;
  user-select: none;
}

/* Validation Button */
.btn-validate {
  background: var(--gradient-primary);
  color: var(--white);
  border: none;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

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

.btn-validate:active {
  transform: translateY(0);
}

/* Validation Results */
.validation-result {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  animation: slideIn var(--transition-base) ease-out;
  min-height: 120px; /* CLS fix: Reserve space to prevent layout shifts when validation results appear */
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.validation-result.success {
  background: var(--success);
  color: var(--white);
}

.validation-result.error {
  background: var(--danger);
  color: var(--white);
}

/* Bank Details Card */
.bank-details-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.bank-details-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-300);
}

.bank-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* CLS fix: Bank logo containers to prevent layout shifts */
.bank-logo-container {
  display: inline-block;
  min-width: 60px;
  min-height: 30px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  position: relative;
}

.bank-logo-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 500;
  color: var(--gray-700);
}

.detail-value {
  font-family: var(--font-mono);
  color: var(--gray-900);
  text-align: right;
}

/* ===== Features Section ===== */
.features-section {
  padding: 4rem 0;
  background: var(--white);
}

.feature-card {
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  height: 100%;
}

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

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1rem;
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.feature-description {
  color: var(--gray-700);
}

/* ===== Statistics Section ===== */
.stats-section {
  background: var(--gray-100);
  padding: 3rem 0;
}

.stat-card {
  text-align: center;
  min-height: 100px; /* CLS fix: Reserve space to prevent layout shifts during stat loading */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--gray-700);
  font-weight: 500;
}

/* ===== Footer ===== */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer h5, .footer h6 {
  color: var(--white);
}

.footer p {
  color: rgba(255, 255, 255, 0.7);
}

.footer .text-muted {
  color: rgba(255, 255, 255, 0.6) !important;
}

.footer-links a {
  color: var(--gray-300);
  margin: 0 1rem;
}

.footer-links a:hover {
  color: var(--white);
}

/* ===== Utility Classes ===== */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


.badge-pro {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 0;
  }

  .hero-title {
    font-size: 2rem;
  }

  .validation-card {
    margin: -2rem 1rem 2rem;
    padding: 1.5rem;
  }

  .trust-badges {
    justify-content: center;
  }

  /* CLS fixes for mobile - adjust minimum heights for smaller screens */
  .trust-badge {
    min-height: 40px;
    min-width: 100px;
  }

  .stat-card {
    min-height: 80px;
  }

  .validation-result {
    min-height: 100px;
  }

  /* Mobile-specific fixes for validation results */
  .detail-row {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }

  .detail-value {
    text-align: start;
    word-break: break-all;
    overflow-wrap: break-word;
    width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .detail-value .btn {
    margin-left: 0 !important;
    margin-top: 0.25rem;
    flex-shrink: 0;
  }

  /* Ensure IBAN text wraps properly */
  .detail-value[style*="font-family"] {
    font-size: 0.9rem;
    line-height: 1.4;
  }
}

.navbar .dropdown-menu .dropdown-item:hover {
    text-decoration: none;
}

:root {
  --surface: #ffffff;
  --surface-soft: #f7fbff;
  --surface-muted: #eef4fb;
  --line: rgba(23, 43, 77, 0.08);
  --line-strong: rgba(0, 81, 162, 0.16);
  --hero-glow: rgba(108, 172, 255, 0.26);
  --shadow-soft: 0 18px 45px rgba(10, 43, 87, 0.08);
  --shadow-card: 0 24px 54px rgba(11, 53, 105, 0.14);
  --radius-2xl: 24px;
}

body {
  background:
    radial-gradient(circle at top left, rgba(126, 187, 255, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(0, 81, 162, 0.08), transparent 26%),
    linear-gradient(180deg, #f7fbff 0%, #f2f7fb 38%, #edf2f8 100%);
}

.navbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(23, 43, 77, 0.06);
  box-shadow: 0 10px 30px rgba(15, 38, 71, 0.05);
  position: relative;
  z-index: 1030;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  letter-spacing: -0.02em;
}

.nav-link {
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.active {
  box-shadow: inset 0 0 0 1px rgba(0, 81, 162, 0.08);
}

.navbar .dropdown-menu {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.5rem;
  box-shadow: var(--shadow-soft);
}

.navbar .dropdown-item {
  border-radius: 12px;
}

.hero-section {
  background:
    linear-gradient(135deg, #063768 0%, #08529a 48%, #1a77d2 100%),
    radial-gradient(circle at 18% 22%, var(--hero-glow), transparent 28%),
    radial-gradient(circle at 82% 14%, rgba(255, 255, 255, 0.12), transparent 22%);
  padding: 3.6rem 0 3rem;
}

.hero-section::before {
  opacity: 0.42;
}

.hero-section::after {
  content: '';
  position: absolute;
  inset: auto -8% -20% 42%;
  height: 360px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 66%);
  pointer-events: none;
}

.hero-section-results {
  padding: 2.4rem 0 2rem;
}

.hero-section.py-4 {
  padding: 2.35rem 0 !important;
}

.hero-shell {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 35rem;
  text-align: start;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.5rem, 4.4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  max-width: 11ch;
  margin-bottom: 1rem;
}

.hero-subtitle {
  max-width: 33rem;
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
}

.hero-content-compact .hero-title {
  font-size: clamp(2rem, 3.6vw, 3rem);
  max-width: 13ch;
}

.hero-content-compact .hero-subtitle {
  max-width: 30rem;
}

.trust-badges {
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.trust-badge {
  min-height: 0;
  min-width: 0;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.trust-badge span {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

.validation-card {
  max-width: none;
  margin: 0;
  padding: 1.5rem;
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 255, 0.95) 100%);
  box-shadow: var(--shadow-card);
}

.validation-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.validation-card-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.validation-card-title {
  margin: 0.35rem 0 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.validation-card-meta {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.form-label {
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.iban-input {
  min-height: 64px;
  border-color: rgba(0, 81, 162, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.iban-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(0, 81, 162, 0.12);
}

.country-flag {
  left: 1.1rem;
  font-size: 1.25rem;
}

.btn-validate {
  min-height: 56px;
  border-radius: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-validate:hover {
  color: var(--white);
}

.validation-results-container {
  margin-top: 1.2rem;
}

.result-summary-card {
  position: relative;
  overflow: hidden;
  margin-top: 1.25rem;
  padding: 1.3rem;
  border-radius: 22px;
  border: 1px solid transparent;
}

.result-summary-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.result-summary-card > * {
  position: relative;
  z-index: 1;
}

.result-summary-card.is-valid {
  border-color: rgba(0, 135, 90, 0.14);
  background: linear-gradient(135deg, rgba(0, 135, 90, 0.08), rgba(255, 255, 255, 0.96));
}

.result-summary-card.is-valid::before {
  background: radial-gradient(circle at top right, rgba(0, 135, 90, 0.12), transparent 30%);
}

.result-summary-card.is-invalid {
  border-color: rgba(222, 53, 11, 0.14);
  background: linear-gradient(135deg, rgba(222, 53, 11, 0.08), rgba(255, 255, 255, 0.96));
}

.result-summary-card.is-invalid::before {
  background: radial-gradient(circle at top right, rgba(222, 53, 11, 0.12), transparent 30%);
}

.result-summary-main {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.result-status-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.is-valid .result-status-icon {
  background: rgba(0, 135, 90, 0.12);
  color: var(--success);
}

.is-invalid .result-status-icon {
  background: rgba(222, 53, 11, 0.12);
  color: var(--danger);
}

.result-status-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.result-status-title {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.result-status-text {
  margin: 0;
  color: var(--gray-700);
}

.result-summary-code {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.95rem;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(23, 43, 77, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: var(--gray-900);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.result-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.result-chip {
  min-width: 160px;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(23, 43, 77, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.result-chip-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.result-chip-value {
  display: block;
  color: var(--gray-900);
  font-weight: 600;
}

.result-detail-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.result-detail-grid > .bank-details-card {
  grid-column: span 6;
  margin-top: 0;
  height: 100%;
}

.result-detail-grid > .bank-details-card-primary,
.result-detail-grid > .bank-details-card-highlight {
  grid-column: span 12;
}

.bank-details-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem;
}

.bank-details-card-primary {
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
}

.bank-details-card-highlight {
  background: linear-gradient(180deg, #fbfdff 0%, #f2f8ff 100%);
}

.bank-details-header {
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid rgba(23, 43, 77, 0.08);
}

.bank-details-header i {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 14px;
  background: var(--primary-light);
}

.bank-details-header p {
  font-size: 0.92rem;
}

.bank-logo-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  margin-bottom: 1rem;
  border-radius: 18px;
  border: 1px dashed rgba(0, 81, 162, 0.18);
  background: linear-gradient(180deg, rgba(0, 81, 162, 0.04), rgba(255, 255, 255, 0.96));
}

.detail-row {
  align-items: flex-start;
  gap: 1rem;
  padding: 0.95rem 0;
}

.detail-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.detail-value {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex: 1;
  flex-wrap: wrap;
  font-family: var(--font-primary);
  font-weight: 600;
  text-align: right;
}

.detail-value code {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary-dark);
}

.copy-action,
.detail-value .btn-outline-secondary {
  border-radius: 12px;
  border-color: rgba(0, 81, 162, 0.18);
  color: var(--primary-dark);
  background: #ffffff;
}

.copy-action:hover,
.detail-value .btn-outline-secondary:hover {
  border-color: rgba(0, 81, 162, 0.28);
  background: var(--primary-light);
  color: var(--primary-dark);
}

.features-section {
  padding: 3.6rem 0 2.8rem;
  background: transparent;
}

.section-intro {
  max-width: 42rem;
  margin-inline: auto;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 81, 162, 0.08);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.section-title {
  margin-bottom: 0.75rem;
  letter-spacing: -0.04em;
}

.section-subtitle {
  margin: 0;
  color: var(--gray-700);
  font-size: 1.02rem;
}

.feature-card {
  position: relative;
  overflow: hidden;
  text-align: start;
  padding: 1.55rem;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: var(--shadow-soft);
}

.feature-card::after {
  content: '';
  position: absolute;
  right: -2rem;
  bottom: -3.5rem;
  width: 9rem;
  height: 9rem;
  background: radial-gradient(circle, rgba(0, 101, 255, 0.12), transparent 68%);
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-6px);
}

.feature-icon {
  margin: 0 0 1.15rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0, 81, 162, 0.12), rgba(255, 255, 255, 0.95));
  box-shadow: inset 0 0 0 1px rgba(0, 81, 162, 0.08);
}

.feature-title {
  letter-spacing: -0.02em;
}

.feature-description {
  margin-bottom: 0;
}

.stats-section {
  padding: 0 0 4rem;
  background: transparent;
}

.stats-shell {
  position: relative;
  overflow: hidden;
  padding: 1.35rem;
  border-radius: 28px;
  background: linear-gradient(135deg, #093765 0%, #0b5cad 48%, #257ed6 100%);
  box-shadow: var(--shadow-card);
}

.stats-shell::before {
  content: '';
  position: absolute;
  inset: auto auto -40% -10%;
  width: 22rem;
  height: 22rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 66%);
  pointer-events: none;
}

.stat-card {
  position: relative;
  min-height: 0;
  padding: 1.4rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.stat-number {
  color: var(--white);
}

.stat-label {
  color: rgba(255, 255, 255, 0.82);
}

.card {
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.card-header {
  padding: 1.1rem 1.3rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%);
}

.card-header.bg-light {
  background: linear-gradient(180deg, #f7fbff 0%, #ffffff 100%) !important;
}

.card-header.bg-dark {
  background: linear-gradient(135deg, #123969 0%, #0b5cad 100%) !important;
}

.card-body {
  padding: 1.35rem 1.4rem;
}

.table-responsive {
  border-radius: 18px;
}

.card .table-responsive,
.featured-content .table-responsive,
.how-to-guide .table-responsive {
  border: 1px solid var(--line);
  background: #ffffff;
}

.table {
  margin-bottom: 0;
  color: var(--gray-900);
}

.table thead th {
  padding: 0.85rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  background: #f4f9ff !important;
  border-bottom-color: var(--line);
}

.table tbody td {
  padding: 0.95rem 1rem;
  font-size: 0.97rem;
  vertical-align: middle;
  border-color: rgba(23, 43, 77, 0.06);
}

.table .text-success i,
.table .text-muted i {
  font-size: 0.95rem;
}

.table-hover > tbody > tr:hover > * {
  background-color: rgba(0, 81, 162, 0.035);
}

.table-borderless > :not(caption) > * > * {
  border-bottom: 1px solid rgba(23, 43, 77, 0.06);
}

.table-borderless > tbody > tr:last-child > * {
  border-bottom: 0;
}

.alert {
  border: 0;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(0, 81, 162, 0.08);
}

.alert-info {
  background: linear-gradient(180deg, rgba(0, 101, 255, 0.08) 0%, rgba(255, 255, 255, 0.96) 100%);
  color: var(--gray-900);
}

.badge {
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  font-weight: 700;
}

.featured-content,
.how-to-guide {
  padding: 1.55rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.homepage-education-section {
  margin-top: 4rem !important;
}

.homepage-affiliate-section .homepage-callout-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 249, 255, 0.94) 100%);
}

#faqAccordion {
  max-width: 54rem;
  margin: 0 auto;
}

.accordion-item {
  border: 1px solid var(--line);
  border-radius: 18px !important;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  margin-bottom: 0.9rem;
}

.accordion-button {
  font-weight: 600;
  color: var(--gray-900);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.accordion-button:not(.collapsed) {
  color: var(--primary-dark);
  background: linear-gradient(180deg, rgba(0, 81, 162, 0.08) 0%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: none;
}

.accordion-body {
  background: rgba(255, 255, 255, 0.96);
}

.list-group-item {
  border-color: var(--line);
  border-radius: 16px !important;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
}

.list-group-numbered > .list-group-item::before {
  color: var(--primary);
  font-weight: 700;
}

.breadcrumb {
  gap: 0.35rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.55);
}

.footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #102f57 0%, #0a213f 100%);
}

.footer::before {
  content: '';
  position: absolute;
  inset: -30% auto auto -10%;
  width: 24rem;
  height: 24rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 66%);
  pointer-events: none;
}

.footer .container {
  position: relative;
  z-index: 1;
}

.footer .list-unstyled a {
  display: inline-flex;
  align-items: center;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.footer .list-unstyled a:hover {
  transform: translateX(2px);
  color: var(--white) !important;
  text-decoration: none;
}

@media (max-width: 991.98px) {
  .hero-section,
  .hero-section-results {
    padding: 2.8rem 0 2.4rem;
  }

  .hero-content,
  .hero-content-compact {
    max-width: none;
    text-align: center;
  }

  .hero-title,
  .hero-content-compact .hero-title,
  .hero-subtitle,
  .hero-content-compact .hero-subtitle {
    max-width: none;
  }

  .hero-eyebrow {
    margin-inline: auto;
  }

  .trust-badges {
    justify-content: center;
  }

  .result-detail-grid {
    grid-template-columns: 1fr;
  }

  .result-detail-grid > .bank-details-card,
  .result-detail-grid > .bank-details-card-primary,
  .result-detail-grid > .bank-details-card-highlight {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .hero-section.py-4 {
    padding: 1.8rem 0 !important;
  }

  .validation-card {
    padding: 1.2rem;
  }

  .validation-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .validation-card-meta {
    justify-content: center;
  }

  .result-summary-main {
    flex-direction: column;
  }

  .result-chip {
    width: 100%;
    min-width: 0;
  }

  .bank-details-card,
  .card-body,
  .featured-content,
  .how-to-guide {
    padding: 1.1rem;
  }

  .table thead th {
    font-size: 0.7rem;
  }

  .stats-shell {
    padding: 1rem;
  }
}

.result-summary-code span,
.detail-value,
.detail-value a,
.detail-value code {
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .hero-section,
  .hero-section-results {
    padding: 1.7rem 0 2rem;
  }

  .hero-title,
  .hero-content-compact .hero-title {
    font-size: clamp(1.95rem, 8vw, 2.35rem);
    line-height: 1.08;
    margin-bottom: 0.75rem;
  }

  .hero-subtitle,
  .hero-content-compact .hero-subtitle {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .hero-eyebrow {
    padding: 0.4rem 0.75rem;
    font-size: 0.7rem;
    margin-bottom: 0.85rem;
  }

  .trust-badges {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-top: 1rem;
  }

  .hero-section-results .trust-badges {
    display: none;
  }

  .hero-section-results .hero-content {
    display: none;
  }

  .hero-section-results .hero-shell {
    gap: 0.4rem;
  }

  .trust-badge {
    justify-content: center;
    padding: 0.7rem 0.85rem;
    font-size: 0.82rem;
  }

  .validation-card {
    padding: 1rem;
    border-radius: 20px;
  }

  .validation-card-head {
    gap: 0.7rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.8rem;
  }

  .validation-card-title {
    font-size: 1.08rem;
  }

  .validation-card-meta {
    width: 100%;
    justify-content: center;
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
  }

  .iban-input {
    min-height: 56px;
    padding: 0.9rem 0.95rem 0.9rem 3rem;
    font-size: 1rem;
    letter-spacing: 0.03em;
  }

  .country-flag {
    left: 0.95rem;
    font-size: 1.1rem;
  }

  .btn-validate {
    min-height: 52px;
    font-size: 1rem;
  }

  .result-summary-card {
    padding: 1rem;
  }

  .result-summary-main {
    gap: 0.75rem;
  }

  .result-status-icon {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }

  .result-status-title {
    font-size: 1.18rem;
  }

  .result-summary-code {
    width: 100%;
    font-size: 0.84rem;
  }

  .result-chip-list {
    gap: 0.55rem;
  }

  .result-chip {
    padding: 0.7rem 0.75rem;
  }

  .result-chip-label,
  .detail-label,
  .table thead th {
    font-size: 0.68rem;
  }

  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .detail-value {
    width: 100%;
    justify-content: flex-start;
    text-align: start;
    word-break: normal;
  }

  .section-kicker {
    font-size: 0.72rem;
  }

  .section-subtitle,
  .feature-description,
  .accordion-body,
  .homepage-affiliate-section p,
  .homepage-education-section p,
  .homepage-education-section li {
    font-size: 0.95rem;
  }

  .feature-card {
    padding: 1.15rem;
  }

  .stats-shell {
    padding: 0.85rem;
  }

  .stat-card {
    padding: 1rem 0.85rem;
  }

  .stat-number {
    font-size: 1.85rem;
  }

  .homepage-affiliate-section {
    margin-block: 2.5rem !important;
  }

  .homepage-affiliate-section .homepage-callout-card .card-body {
    padding: 1.2rem 1rem !important;
  }

  .homepage-education-section {
    margin-top: 2.5rem !important;
  }

  .how-to-guide .list-group-item {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.6rem;
  }

  .how-to-guide .badge {
    align-self: flex-start;
  }

  .iban-education-table thead,
  .responsive-stack-table thead {
    display: none;
  }

  .iban-education-table,
  .iban-education-table tbody,
  .iban-education-table tr,
  .iban-education-table td,
  .responsive-stack-table table,
  .responsive-stack-table tbody,
  .responsive-stack-table tr,
  .responsive-stack-table td {
    display: block;
    width: 100%;
  }

  .iban-education-table tbody,
  .responsive-stack-table tbody {
    display: grid;
    gap: 0.8rem;
  }

  .iban-education-table tr,
  .responsive-stack-table tr {
    padding: 0.95rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
  }

  .iban-education-table td,
  .responsive-stack-table td {
    padding: 0.3rem 0;
    border: 0;
    text-align: start !important;
  }

  .iban-education-table td::before,
  .responsive-stack-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-500);
  }

  .iban-education-table td:first-child,
  .responsive-stack-table td:first-child {
    padding-top: 0;
  }

  .responsive-stack-table .badge {
    margin-top: 0.3rem;
    margin-left: 0 !important;
  }

  .responsive-stack-table img {
    display: block;
    margin-bottom: 0.35rem;
  }

  .responsive-stack-table .fs-4 {
    font-size: 1.3rem !important;
  }

  .accordion-button {
    padding: 0.95rem 1rem;
    font-size: 0.95rem;
    line-height: 1.45;
  }
}
