/* ============================================
   YAWTEEF - GLOBAL STYLES v2.1
   Modern, high-contrast, futuristic design
   ============================================ */

/* === ROOT VARIABLES === */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary: #0f172a;
  --accent: #06b6d4;
  --accent-dark: #0891b2;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --bg-gradient-start: #1e3a8a;
  --bg-gradient-end: #0891b2;
  --text-dark: #0f172a;
  --text-medium: #334155;
  --text-light: #64748b;
  --border: #e2e8f0;
  --border-medium: #cbd5e1;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  
  --max-width: 1200px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2.5rem;
  --spacing-xl: 4rem;
  
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.18);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.25);
}

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--secondary);
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
  text-align: center;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-medium);
  line-height: 1.7;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* === LAYOUT === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

.section-bg {
  background-color: var(--bg-white);
}

.section-dark {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: white;
}

.section-dark h2,
.section-dark h3 {
  color: white;
}

.section-dark p {
  color: rgba(255, 255, 255, 0.9);
}

/* === HEADER === */
.site-header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-logo {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.site-logo:hover {
  opacity: 0.8;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
  align-items: center;
}

.main-nav > ul > li > a {
  color: var(--text-dark);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  display: block;
}

.main-nav > ul > li > a:hover {
  background-color: var(--bg-light);
  color: var(--primary);
  text-decoration: none;
}

/* === CRITICAL FIX: DROPDOWN NAVIGATION === */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
  user-select: none;
  color: var(--text-dark);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  display: block;
}

.nav-dropdown-toggle:hover {
  background-color: var(--bg-light);
  color: var(--primary);
}

/* CRITICAL: Default state is HIDDEN */
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  margin-top: var(--spacing-xs);
  padding: var(--spacing-xs) 0;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

/* CRITICAL: Only show on parent hover */
.nav-dropdown:hover > .nav-dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu li {
  display: block;
  list-style: none;
}

.nav-dropdown-menu a {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 0;
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-dropdown-menu a:hover {
  background-color: var(--bg-light);
  color: var(--primary);
  text-decoration: none;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
}

/* === HERO SECTION === */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #0891b2 100%);
  color: white;
  padding: var(--spacing-xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.95);
  max-width: 700px;
  margin: 0 auto var(--spacing-md);
  line-height: 1.6;
}

/* === CARDS - COMPLETELY REDESIGNED === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
}

.card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

.card-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  font-size: 2rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.card h3 {
  color: var(--secondary);
  margin-bottom: var(--spacing-md);
  font-size: 1.375rem;
  font-weight: 700;
}

.card p {
  color: var(--text-medium);
  font-size: 1rem;
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

.card-link {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  gap: 0.5rem;
  transition: gap 0.2s ease;
}

.card-link:hover {
  gap: 0.75rem;
  text-decoration: none;
}

/* === REGION CARDS - ENHANCED === */
.region-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
  position: relative;
}

.region-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.region-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.region-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.region-flag {
  font-size: 2.5rem;
  line-height: 1;
}

.region-card h3 {
  margin-bottom: 0;
  color: var(--secondary);
  font-size: 1.5rem;
}

.region-card p {
  color: var(--text-medium);
  line-height: 1.7;
  margin-bottom: var(--spacing-sm);
}

.region-stats {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border);
}

.stat-item {
  flex: 1;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
}

/* === CALCULATOR INTERFACE === */
.calculator-wrapper {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin: var(--spacing-lg) 0;
  box-shadow: var(--shadow-lg);
}

.calculator-form {
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--spacing-xs);
  font-size: 1.0625rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: var(--spacing-md);
  font-size: 1.125rem;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius);
  background-color: var(--bg-white);
  color: var(--text-dark);
  transition: all 0.2s ease;
  font-weight: 500;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
  color: var(--text-light);
}

.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  font-size: 1.125rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  width: 100%;
  padding: var(--spacing-md);
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

/* === CALCULATOR RESULT === */
.calculator-result {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-xl);
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: 3px solid var(--primary);
  border-radius: var(--radius-lg);
  text-align: center;
  display: none;
  box-shadow: var(--shadow-md);
}

.calculator-result.show {
  display: block;
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--spacing-xs);
}

.result-label {
  font-size: 1.125rem;
  color: var(--text-dark);
  margin-bottom: var(--spacing-md);
  font-weight: 600;
}

.result-note {
  font-size: 0.9375rem;
  color: var(--text-medium);
  font-style: italic;
}

/* Error message */
.error-message {
  display: none;
  padding: var(--spacing-md);
  background-color: #fee;
  border: 2px solid var(--error);
  border-radius: var(--radius);
  color: var(--error);
  font-size: 1rem;
  margin-top: var(--spacing-sm);
  font-weight: 600;
}

.error-message.show {
  display: block;
}

/* === TABLES === */
.table-wrapper {
  overflow-x: auto;
  margin: var(--spacing-lg) 0;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-white);
}

thead {
  background: linear-gradient(135deg, var(--secondary) 0%, #1e293b 100%);
  color: white;
}

th {
  padding: var(--spacing-md);
  text-align: left;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  color: var(--text-dark);
  font-weight: 500;
}

tbody tr:hover {
  background-color: #f0f9ff;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* === FOOTER - ENHANCED CONTRAST === */
.site-footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  padding: var(--spacing-xl) 0 var(--spacing-md);
  margin-top: var(--spacing-xl);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
  color: #ffffff;
  font-size: 1.125rem;
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: var(--spacing-sm);
}

.footer-section a {
  color: #cbd5e1;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
}

.footer-section a:hover {
  color: #ffffff;
  padding-left: 4px;
  text-decoration: none;
}

.footer-section p {
  color: #cbd5e1;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--spacing-md);
  text-align: center;
  font-size: 0.875rem;
  color: #94a3b8;
}

/* === FAQ SECTION === */
.faq-item {
  background-color: var(--bg-white);
  border: 2px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  transition: all 0.2s ease;
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
  border-left-width: 6px;
}

.faq-question {
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: var(--spacing-sm);
  font-size: 1.125rem;
}

.faq-answer {
  color: var(--text-medium);
  line-height: 1.8;
  font-size: 1rem;
}

/* === UTILITY CLASSES === */
.text-center {
  text-align: center;
}

.mt-lg {
  margin-top: var(--spacing-lg);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.disclaimer {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-left: 5px solid var(--warning);
  padding: var(--spacing-lg);
  margin: var(--spacing-lg) 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.disclaimer p {
  color: var(--text-dark);
  font-size: 1rem;
  margin-bottom: 0;
  line-height: 1.7;
  font-weight: 500;
}

/* === CONTENT SECTIONS === */
.content-section {
  max-width: 800px;
  margin: 0 auto;
}

.content-section p {
  font-size: 1.0625rem;
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
}

.content-section ol {
  color: var(--text-medium);
  line-height: 1.9;
  margin-left: 1.5rem;
  margin-bottom: var(--spacing-md);
}

.content-section li {
  margin-bottom: var(--spacing-xs);
  font-size: 1.0625rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .main-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .calculator-wrapper {
    padding: var(--spacing-lg);
  }
  
  .result-value {
    font-size: 2rem;
  }
  
  .region-stats {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
}

@media (max-width: 480px) {
  html {
    font-size: 15px;
  }
  
  .section {
    padding: var(--spacing-lg) 0;
  }
  
  .hero {
    padding: var(--spacing-lg) 0;
  }
}