/* 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: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', 'Consolas', 'Monaco', 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;
}

.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;
}

.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;
}

@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;
}

.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;
}

.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;
  }
  
  /* Mobile-specific fixes for validation results */
  .detail-row {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }
  
  .detail-value {
    text-align: left;
    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;
}
