/*
  Eczane24 – Medical white theme
  Design system: clean, medical, iOS-optimized
*/

:root {
  /* EMERGENCY THEME - ACİL DURUM TASARİM */
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-emergency: #fff5f5;
  --bg-danger: #fee2e2;
  --card: #ffffff;
  --card-soft: #fefefe;
  --card-emergency: #fff1f2;
  
  /* Emergency Color System */
  --text: #1f2937;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  
  /* EMERGENCY COLORS - ACİL DURUM */
  --emergency: #ef4444;
  --emergency-dark: #dc2626;
  --emergency-darker: #b91c1c;
  --emergency-light: #fecaca;
  --emergency-lighter: #fef2f2;
  
  /* AMBULANCE/MEDICAL COLORS */
  --medical-red: #ef4444;
  --medical-white: #ffffff;
  --medical-gray: #f3f4f6;
  --rescue-orange: #fb923c;
  
  /* SYSTEM COLORS */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --info: #3b82f6;
  --info-light: #dbeafe;
  
  /* BORDERS & EFFECTS */
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --border-strong: #d1d5db;
  --border-emergency: #fca5a5;
  
  /* SHADOWS - EMERGENCY STYLE */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 12px rgba(239,68,68,.1), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 24px rgba(239,68,68,.15), 0 4px 8px rgba(0,0,0,.08);
  --shadow-xl: 0 16px 40px rgba(239,68,68,.2), 0 8px 16px rgba(0,0,0,.1);
  --shadow-emergency: 0 0 0 0 rgba(239,68,68,.4);
  
  /* RADIUS - CLEAN & FAST */
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-emergency: 8px;
}

/* Dark mode override (optional - keeping white theme as default) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --text: #1e293b;
    /* Force white theme even in dark mode preference */
  }
}

* { box-sizing: border-box; }

/* iOS Safari optimizations */
html { 
  height: 100%; 
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { 
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 16px;
  font-weight: 400;
  /* iOS optimization */
  -webkit-overflow-scrolling: touch;
  /* Emergency fast rendering */
  text-rendering: optimizeSpeed;
}

/* EMERGENCY TYPOGRAPHY - FAST & CLEAR */
h1, h2, h3, h4, h5, h6 { 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-weight: 700; 
  letter-spacing: -0.025em; 
  color: var(--text-primary);
  margin: 0;
  line-height: 1.1;
}

/* Emergency Hierarchy - BIG & BOLD */
h1 { 
  font-size: clamp(2rem, 6vw, 4rem); 
  font-weight: 800; 
  color: var(--emergency-dark);
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

h2 { 
  font-size: clamp(1.5rem, 4vw, 2.5rem); 
  font-weight: 700;
  color: var(--text-primary);
}

h3 { 
  font-size: 1.5rem; 
  font-weight: 700;
  color: var(--text-primary);
}

h4 { font-size: 1.25rem; font-weight: 700; }
h5 { font-size: 1.125rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

/* Emergency Text Styles */
strong, b { font-weight: 700; color: var(--text-primary); }
p { color: var(--text-secondary); line-height: 1.6; margin: 0; font-size: 16px; }
small { color: var(--text-muted); font-size: 14px; }
label { 
  font-weight: 600; 
  color: var(--text-primary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

a { color: var(--emergency); text-decoration: none; font-weight: 600; }
a:hover { color: var(--emergency-dark); }

/* Emergency text utilities */
.text-emergency { color: var(--emergency); font-weight: 700; }
.text-urgent { color: var(--emergency-dark); font-weight: 800; text-transform: uppercase; }
.text-large { font-size: 18px; font-weight: 600; }
.text-huge { font-size: clamp(24px, 5vw, 32px); font-weight: 800; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -40px;
  background: var(--card);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 8px; }

/* EMERGENCY HEADER - 112 / AMBULANS STİLİ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--medical-white);
  border-bottom: 4px solid var(--emergency);
  box-shadow: var(--shadow-lg);
  /* iOS Safari support */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--emergency-light), var(--emergency), var(--emergency-light));
  animation: emergencyPulse 2s ease-in-out infinite;
}

@keyframes emergencyPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  min-height: 70px;
  padding: 0;
}

/* EMERGENCY BRAND - 112 AMBULANS STİLİ */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: all 0.2s ease;
}

.brand:hover {
  transform: scale(1.05);
  color: var(--emergency);
}

.brand .brand-mark { 
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--medical-white);
  border-radius: var(--radius);
  background: var(--emergency);
  border: 2px solid var(--emergency-dark);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.brand:hover .brand-mark {
  background: var(--emergency-dark);
  box-shadow: var(--shadow-lg);
  animation: emergencyFlash 0.5s ease;
}

@keyframes emergencyFlash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.brand .brand-text { 
  font-size: 24px; 
  font-weight: 900;
  color: var(--emergency-dark);
  text-transform: uppercase;
  letter-spacing: -0.05em;
}

/* EMERGENCY NAVIGATION - FAST ACCESS */
.primary-nav { 
  display: none; 
  gap: 4px;
  align-items: center;
}

.primary-nav a { 
  color: var(--text-muted); 
  text-decoration: none; 
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.primary-nav a:hover { 
  color: var(--emergency);
  background: var(--emergency-lighter);
  transform: translateY(-1px);
}

.primary-nav a.active {
  color: var(--emergency);
  background: var(--emergency-light);
  font-weight: 700;
}

@media (min-width: 900px) { 
  .primary-nav { display: inline-flex; } 
}

/* EMERGENCY ACTIONS - BIG TOUCH BUTTON */
.nav-actions { 
  display: inline-flex; 
  gap: 8px;
  align-items: center;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: var(--bg-soft);
  color: var(--accent);
}

@media (max-width: 899px) {
  .mobile-menu-toggle { display: block; }
  .nav-actions { order: 1; }
  .primary-nav { order: 2; }
}

/* EMERGENCY BUTTON SYSTEM - BIG & FAST */
.btn {
  appearance: none;
  border: 0;
  border-radius: var(--radius-emergency);
  padding: 16px 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px; /* iOS zoom prevention */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  text-align: center;
  min-height: 48px;
  white-space: nowrap;
  user-select: none;
  border: 2px solid transparent;
}

.btn:focus-visible { 
  outline: 3px solid var(--emergency-light); 
  outline-offset: 2px; 
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.2);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* PRIMARY BUTTON - EMERGENCY ACİL DURUM */
.btn-primary {
  background: var(--emergency);
  color: var(--medical-white);
  border: 2px solid var(--emergency-dark);
  box-shadow: var(--shadow-lg);
  font-weight: 800;
  font-size: 18px;
  padding: 20px 32px;
  min-height: 56px;
  animation: emergencyGlow 2s ease-in-out infinite;
}

@keyframes emergencyGlow {
  0%, 100% { 
    box-shadow: var(--shadow-lg), 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% { 
    box-shadow: var(--shadow-xl), 0 0 0 8px rgba(239, 68, 68, 0.2);
  }
}

.btn-primary:hover {
  background: var(--emergency-dark);
  border-color: var(--emergency-darker);
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-xl), 0 0 0 4px rgba(239, 68, 68, 0.3);
  animation: none;
}

.btn-primary:active {
  transform: translateY(-1px) scale(1);
  box-shadow: var(--shadow);
}

/* SECONDARY BUTTON - FAST ACCESS */
.btn-secondary { 
  background: var(--medical-white); 
  color: var(--text-primary); 
  border: 2px solid var(--border-strong); 
  box-shadow: var(--shadow);
  font-weight: 700;
}

.btn-secondary:hover {
  background: var(--bg-emergency);
  border-color: var(--emergency);
  color: var(--emergency);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* OUTLINE BUTTON - MEDICAL INFO */
.btn-outline { 
  background: transparent; 
  color: var(--info); 
  border: 2px solid var(--info); 
  font-weight: 700;
}

.btn-outline:hover {
  background: var(--info);
  color: var(--medical-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* GHOST BUTTON - SUBTLE ACTIONS */
.btn-ghost { 
  background: transparent; 
  color: var(--text-muted); 
  border: 2px solid var(--border); 
  font-weight: 600;
}

.btn-ghost:hover {
  background: var(--medical-gray);
  color: var(--text-primary);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* SUCCESS BUTTON - MEDICAL ACTIONS */
.btn-success {
  background: var(--success);
  color: var(--medical-white);
  border: 2px solid var(--success);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.btn-success:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Blog Button - Corporate Green */
.btn-blog {
  background: linear-gradient(135deg, var(--medical-green) 0%, var(--success-hover) 100%);
  color: white;
  border: 2px solid var(--medical-green);
  padding: 12px 20px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow);
}

.btn-blog:hover {
  background: linear-gradient(135deg, var(--success-hover) 0%, #166534 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-blog .label { 
  color: white; 
  font-weight: 600;
}

/* Button Sizes */
.btn-sm { 
  padding: 10px 16px; 
  font-size: 14px; 
  min-height: 36px;
}

.btn-lg { 
  padding: 18px 32px; 
  font-size: 16px; 
  min-height: 52px;
  font-weight: 700;
}

/* Button with Icons */
.btn .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-sm .icon {
  width: 16px;
  height: 16px;
}

.btn-lg .icon {
  width: 20px;
  height: 20px;
}

/* EMERGENCY HERO - ACİL DURUM ARAMA */
.hero {
  padding: 60px 0 80px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-emergency) 100%);
  position: relative;
  border-bottom: 3px solid var(--emergency-light);
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--emergency), transparent);
  opacity: 0.6;
}

.hero::after {
  content: "⚡";
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 48px;
  opacity: 0.1;
  animation: emergencyPulse 2s ease-in-out infinite;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; align-items: center; }
}
/* EMERGENCY HERO TEXT */
.hero-copy h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 1;
  letter-spacing: -0.05em;
  margin: 0 0 16px 0;
  color: var(--emergency-dark);
  text-transform: uppercase;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.highlight { 
  color: var(--emergency); 
  background: var(--emergency-lighter);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-shadow: none;
}

.lead { 
  color: var(--text-secondary); 
  font-size: 20px; 
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 24px;
}
/* EMERGENCY TRUST INDICATORS */
.trust-list { 
  display: grid; 
  grid-template-columns: 1fr; 
  gap: 12px; 
  padding: 20px; 
  margin: 24px 0 0; 
  list-style: none; 
  background: var(--emergency-lighter);
  border: 2px solid var(--emergency-light);
  border-radius: var(--radius);
}

.trust-list li { 
  display: inline-flex; 
  align-items: center; 
  gap: 12px; 
  font-weight: 700; 
  color: var(--text-primary);
  font-size: 16px;
}

.trust-list .icon { 
  width: 24px; 
  height: 24px; 
  color: var(--emergency); 
  background: var(--medical-white);
  padding: 4px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 640px) {
  .trust-list { 
    grid-template-columns: repeat(2, 1fr); 
  }
}

/* EMERGENCY SEARCH CARD - FAST ACCESS */
.hero-card {
  background: var(--medical-white);
  border: 4px solid var(--emergency);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
  /* Emergency highlight frame */
  outline: 2px solid var(--emergency-light);
  outline-offset: 2px;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--accent), var(--medical-green), var(--accent));
  border-radius: calc(var(--radius-xl) + 2px);
  z-index: -1;
  opacity: 0.1;
}

.hero-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
  opacity: 0.08;
  border-radius: 0 var(--radius-xl) 0 0;
}

/* Professional Search Form */
.search-form { 
  display: grid; 
  gap: 24px;
}

.search-form-header {
  text-align: center;
  margin-bottom: 8px;
}

.search-form-header h3 {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.search-form-header p {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}

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

@media (min-width: 768px) { 
  .form-row { grid-template-columns: 1fr 1fr; } 
}

.form-field { 
  display: grid; 
  gap: 8px; 
  position: relative;
}

.form-field label { 
  font-weight: 600; 
  font-size: 14px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

/* Corporate Form Controls */
select, input[type="text"] {
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text-primary);
  border: 2px solid var(--border);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px; /* iOS zoom prevention */
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  min-height: 54px;
}

select:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light), var(--shadow);
  transform: translateY(-1px);
  background: var(--card-elevated);
}

select:hover, input[type="text"]:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

/* Custom Select Styling */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 48px;
}

/* Field Icons */
.form-field.has-icon {
  position: relative;
}

.form-field.has-icon .field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
  margin-top: 12px;
}

.form-field.has-icon input,
.form-field.has-icon select {
  padding-left: 48px;
}

.help { 
  color: var(--text-muted); 
  font-size: 13px; 
  font-weight: 500;
  margin-top: 4px;
}

.muted { 
  color: var(--text-muted);
  font-weight: 500;
}

/* Professional Action Row */
.action-row { 
  display: flex; 
  gap: 16px; 
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

@media (max-width: 640px) {
  .action-row {
    flex-direction: column;
  }
  
  .action-row .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Form Validation States */
.form-field.error select,
.form-field.error input[type="text"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-field.success select,
.form-field.success input[type="text"] {
  border-color: var(--success);
  box-shadow: 0 0 0 3px var(--success-light);
}

.error-message {
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
}

.success-message {
  color: var(--success);
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
}

/* Corporate AI Assistant */
.ai-hint {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 500;
}

.ai-chip {
  display: inline-flex; 
  align-items: center; 
  gap: 8px;
  padding: 8px 12px; 
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent) 0%, var(--professional-blue) 100%);
  color: white; 
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-sm);
}

.ai-chip .icon { 
  width: 16px; 
  height: 16px; 
  color: white;
}

.ai-hint-text { 
  color: var(--text-secondary); 
  font-weight: 500;
  font-style: italic;
}

.results { padding: 28px 0 10px; }
.section-head { display: grid; gap: 6px; margin-bottom: 14px; }
.sub { color: var(--muted); }
.section-head h2 { font-weight: 500; color: var(--text); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 14px;
}
@media (min-width: 720px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Always-single-row for first 3 featured cards */
.featured-row { display: flex; gap: 14px; align-items: stretch; }
.featured-row .card { flex: 1 1 0; min-width: 0; height: 100%; }
@media (max-width: 720px) { .featured-row { gap: 10px; } }

/* Carousel for remaining pharmacy cards */
.carousel { margin-top: 16px; }
.carousel-viewport { overflow: hidden; width: 100%; }
.carousel-track { display: flex; gap: 14px; transition: transform .6s ease; will-change: transform; align-items: stretch; }
/* Show exactly 3 cards per view on desktop */
.carousel-slide { flex: 0 0 calc((100% - 28px) / 3); display: flex; }
@media (max-width: 1024px) { .carousel-slide { flex-basis: calc((100% - 14px) / 2); } }
@media (max-width: 640px) { .carousel-slide { flex-basis: 100%; } }
.carousel-slide .card { width: 100%; }

/* EMERGENCY PHARMACY CARDS - FAST ACCESS */
.card {
  background: var(--medical-white);
  border: 3px solid var(--border);
  border-left: 6px solid var(--emergency);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-lg);
  transition: all 0.2s ease;
  min-height: 280px;
  position: relative;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  border-color: var(--emergency);
  border-left-color: var(--emergency-dark);
}

/* EMERGENCY STATUS BADGE */
.badge {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: var(--emergency);
  color: var(--medical-white);
  border: 2px solid var(--emergency-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  box-shadow: var(--shadow);
  animation: emergencyBadgePulse 1.5s ease-in-out infinite;
}

@keyframes emergencyBadgePulse {
  0%, 100% { 
    opacity: 1;
    transform: scale(1);
  }
  50% { 
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes pulse {
  0%, 100% { 
    opacity: 1;
    transform: scale(1);
  }
  50% { 
    opacity: 0.9;
    transform: scale(1.02);
  }
}

.badge::before {
  content: "●";
  margin-right: 4px;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

/* Corporate Card Header */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.card-header .pharmacy-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* EMERGENCY CARD TITLE */
.title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.2;
  text-transform: uppercase;
}

/* EMERGENCY INFO GRID */
.kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  flex: 1;
  margin-top: 8px;
}

.kv .key {
  color: var(--emergency);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.kv .value {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
  font-size: 15px;
  margin-bottom: 12px;
}

/* Emergency stacked layout */
.kv-stack {
  grid-template-columns: 1fr;
}

.kv-stack .key {
  margin-bottom: 4px;
}

.kv-stack .key + div {
  margin-bottom: 16px;
}

/* Professional Action Buttons */
.card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}
/* Corporate Card Buttons */
.card .btn { 
  padding: 10px 16px; 
  font-weight: 600; 
  border-radius: var(--radius-sm);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card .btn-secondary { 
  background: var(--bg-soft); 
  color: var(--text-primary); 
  border: 2px solid var(--border-strong); 
  box-shadow: var(--shadow-sm);
}

.card .btn-secondary:hover {
  background: var(--card-elevated);
  border-color: var(--accent);
  color: var(--accent);
}

.card .btn-outline { 
  color: var(--accent); 
  border: 2px solid var(--accent);
  background: transparent;
  font-weight: 600;
}

.card .btn-outline:hover {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow);
}

.card .btn-success {
  background: var(--success);
  color: white;
  border: 2px solid var(--success);
  font-weight: 600;
}

.card .btn-success:hover {
  background: var(--success-hover);
  border-color: var(--success-hover);
  box-shadow: var(--shadow);
}

.card .fav { 
  background: transparent; 
  color: var(--text-muted); 
  border: 2px dashed var(--border-strong); 
  font-weight: 500;
}

.card .fav:hover {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success);
  border-style: solid;
  font-weight: 600;
}

/* Phone Link Styling */
.card .phone-link { 
  color: var(--accent); 
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.card .phone-link:hover { 
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Enhanced Card Variants */
.card-animated {
  border-left: 6px solid var(--accent);
}

.card-animated:hover {
  border-left-color: var(--medical-green);
}

.card-featured {
  border: 3px solid var(--accent-light);
  background: linear-gradient(135deg, var(--card-elevated) 0%, var(--bg-soft) 100%);
}

.card-premium {
  border: 3px solid var(--medical-green);
  background: var(--success-light);
}

.card-premium .badge {
  background: linear-gradient(135deg, var(--medical-green) 0%, var(--success-hover) 100%);
}

/* Compact card variant for minimalist grid */
.card-compact {
  padding: 14px;
  border-radius: 14px;
  gap: 10px;
  min-height: 260px;
}
.card-compact .title { font-size: 16px; }
.card-compact .kv { grid-template-columns: 16ch 1fr; gap: 6px 10px; }
.card-compact .btn { padding: 7px 10px; border-radius: 9px; }

/* Text clamp utilities for equal heights */
.clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Stack layout for metadata under title */
.kv-stack { grid-template-columns: 1fr; gap: 2px; }
.kv-stack .key { font-size: 11px; color: var(--muted); margin-top: 8px; letter-spacing: .04em; }
.kv-stack .key:first-child { margin-top: 0; }
.kv-stack .key + div { margin-bottom: 2px; }

/* Simple medical badge */
.card .badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  font-size: 11px;
  background: var(--emergency-red);
  color: white;
  border: 0;
  border-radius: 20px;
  font-weight: 600;
  box-shadow: var(--shadow);
  /* No animation for iOS compatibility */
}

/* Phone link color inside cards */
.card .phone-link { color: var(--text); text-decoration: none; }
.card .phone-link:hover { text-decoration: underline; }

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--border);
  border-radius: 8px;
}
.skeleton::after {
  content: ""; position: absolute; inset: 0; translate: -100% 0;
  background: linear-gradient(90deg, transparent, #ffffff22, transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

.map-wrap { margin: 18px 0 0; }
.map-placeholder { position: relative; border-radius: 16px; overflow: hidden; background: var(--bg-soft); border: 1px dashed var(--border); min-height: 220px; display: grid; place-items: center; color: var(--muted); }
.map-grid { position: absolute; inset: 0; background-image: linear-gradient(0deg, var(--border-light) 1px, transparent 1px), linear-gradient(90deg, var(--border-light) 1px, transparent 1px); background-size: 40px 40px; }

.ai-callout { padding: 36px 0 64px; background: var(--bg-soft); }
.ai-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 980px) { .ai-grid { grid-template-columns: 1fr 1fr; align-items: center; } }
.ai-demo { display: grid; gap: 10px; }
.chat-bubble {
  max-width: 560px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}
.chat-bubble.user { border-top-right-radius: 4px; }
.chat-bubble.ai { border-top-left-radius: 4px; background: linear-gradient(180deg, var(--bg-section), var(--bg-soft)); border-color: var(--medical-blue); }

.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 24px 0; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; } }
.brand-footer .brand-mark { 
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--medical-white);
  border-radius: var(--radius-sm);
  background: var(--emergency);
  border: 2px solid var(--emergency-dark);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.brand-footer:hover .brand-mark {
  background: var(--emergency-dark);
  box-shadow: var(--shadow);
  animation: emergencyFlash 0.5s ease;
}
.brand-footer .brand-text { 
  font-size: 18px; 
  font-weight: 800; 
  color: var(--emergency-dark);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
.api-box { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.footer-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0 24px; font-size: 14px; color: var(--muted); }
.site-footer nav a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-weight: 400; }
.site-footer nav a:hover { color: var(--text); }

/* EMERGENCY REFERANS SECTION */
.referans-section {
  margin-top: 16px;
}

.referans-section h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--emergency);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.referans-section h5::before {
  content: "🔗";
  font-size: 12px;
}

.referans-section nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.referans-section nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  transition: all 0.2s ease;
}

.referans-section nav a:hover {
  color: var(--emergency);
  transform: translateX(4px);
}

.referans-section nav a .icon {
  color: var(--emergency);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.icon { inline-size: 1em; block-size: 1em; width: 1em; height: 1em; }

/* Theme toggle (simple) */
[data-theme="light"] body { background: var(--bg); color: var(--text); }

/* Loading animations */
.search-form-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  font-size: 24px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.no-results-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.error-message {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: 12px;
  padding: 16px;
  color: var(--primary-600);
  margin: 20px 0;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.loading-icon {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top: 4px solid var(--medical-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: var(--muted);
  font-weight: 500;
}

/* EMERGENCY MOBILE - CRITICAL OPTIMIZATIONS */
@media (max-width: 768px) {
  /* Hero section - emergency focused */
  .hero {
    padding: 40px 0 60px;
  }
  
  .hero-copy h1 {
    font-size: clamp(2rem, 10vw, 3.5rem);
    line-height: 0.9;
    margin-bottom: 20px;
  }
  
  .hero-card {
    padding: 32px 20px;
    margin: 0;
    border-width: 3px;
    outline-width: 1px;
    outline-offset: 1px;
  }
  
  /* Emergency cards - mobile optimized */
  .card {
    padding: 20px;
    min-height: 240px;
    border-left-width: 4px;
  }
  
  /* BIG TOUCH BUTTONS - Emergency */
  .btn {
    padding: 18px 24px;
    font-size: 17px; /* iOS zoom prevention + readability */
    min-height: 54px;
    font-weight: 800;
  }
  
  .btn-primary {
    padding: 22px 32px;
    font-size: 19px;
    min-height: 60px;
  }
  
  .trust-list {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 16px;
  }
  
  .trust-list li {
    font-size: 17px;
    font-weight: 800;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  /* Emergency form inputs - BIG */
  select, input[type="text"] {
    font-size: 17px;
    padding: 20px 16px;
    border-radius: var(--radius);
    min-height: 56px;
    border-width: 3px;
    -webkit-appearance: none;
    appearance: none;
  }
  
  /* Remove hover effects on touch */
  .card:hover {
    transform: none;
  }
  
  .nav {
    grid-template-columns: 1fr auto;
    gap: 16px;
    min-height: 64px;
  }
  
  .primary-nav {
    display: none;
  }
  
  .hero-grid {
    gap: 40px;
  }
  
  .container {
    padding: 0 16px;
  }
  
  /* Emergency brand - mobile */
  .brand .brand-text {
    font-size: 20px;
  }
  
  .brand .brand-mark {
    width: 40px;
    height: 40px;
  }
}

/* EXTRA EMERGENCY - Very small screens */
@media (max-width: 480px) {
  .hero {
    padding: 30px 0 40px;
  }
  
  .hero-card {
    padding: 24px 16px;
  }
  
  .btn-primary {
    width: 100%;
    padding: 24px 16px;
    font-size: 18px;
    min-height: 64px;
  }
  
  .action-row {
    flex-direction: column;
    gap: 16px;
  }
  
  .action-row .btn {
    width: 100%;
  }
  
  .card {
    padding: 16px;
    min-height: 220px;
  }
}

