/* ==========================================
   MedHope Hospital - Main Stylesheet
   Pure CSS3 - No Frameworks
   ========================================== */

/* ==========================================
   CSS VARIABLES
   ========================================== */
:root {
  /* Colors */
  --primary-color: #007BFF;
  --primary-dark: #0056b3;
  --primary-light: #4da3ff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  
  /* Blood Bank Theme */
  --blood-red: #E31E24;
  --blood-light: #ff4d4d;
  
  /* Neutral Colors */
  --white: #ffffff;
  --light-bg: #f8f9fa;
  --light-blue-bg: #e7f3ff;
  --dark-text: #212529;
  --gray-text: #6c757d;
  --light-gray: #dee2e6;
  --border-color: #e0e0e0;
  
  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-xxl: 4rem;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-round: 50%;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--dark-text);
  background-color: var(--white);
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--dark-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-sm);
  color: var(--gray-text);
}

/* ==========================================
   LAYOUT UTILITIES
   ========================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--spacing-md);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(var(--spacing-sm) * -1);
}

.col {
  flex: 1;
  padding: 0 var(--spacing-sm);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

/* Spacing Utilities */
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.py-1 { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); }
.py-2 { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }
.py-3 { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }
.py-4 { padding-top: var(--spacing-xl); padding-bottom: var(--spacing-xl); }

.text-center { text-align: center; }
.text-right { text-align: right; }

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
.header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: var(--spacing-sm) 0;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo-icon {
  width: 40px;
  height: 40px;
}

.nav-menu {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-link {
  color: var(--dark-text);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

.nav-actions {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.user-welcome {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--dark-text);
  font-weight: 500;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-round);
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 600;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark-text);
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-white {
  background-color: var(--white);
  color: var(--primary-color);
  border: 2px solid var(--white);
}

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

.btn-danger {
  background-color: var(--blood-red);
  color: var(--white);
}

.btn-danger:hover {
  background-color: #c21920;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-block {
  display: block;
  width: 100%;
}


/* ==========================================
   FORM ELEMENTS
   ========================================== */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--dark-text);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  background-color: var(--white);
  color: var(--dark-text);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-input::placeholder {
  color: var(--gray-text);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-text);
  font-size: 1.2rem;
}

/* ==========================================
   CARDS
   ========================================== */
.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition-base);
}

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

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: var(--spacing-md);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
  color: var(--dark-text);
}

.card-text {
  color: var(--gray-text);
  margin-bottom: var(--spacing-sm);
}

/* Service Card */
.service-card {
  background-color: var(--white);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition-base);
  border: 1px solid var(--light-gray);
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.service-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto var(--spacing-sm);
  background-color: var(--light-blue-bg);
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 2rem;
}

/* Doctor Card */
.doctor-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  text-align: center;
  transition: var(--transition-base);
}

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

.doctor-img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.doctor-info {
  padding: var(--spacing-md);
}

.doctor-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.doctor-specialty {
  color: var(--gray-text);
  margin-bottom: var(--spacing-sm);
}

.doctor-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: #ffc107;
}

/* Testimonial Card */
.testimonial-card {
  background-color: var(--light-blue-bg);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary-color);
}

.testimonial-text {
  font-style: italic;
  margin-bottom: var(--spacing-md);
  color: var(--dark-text);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-round);
  object-fit: cover;
}

.testimonial-name {
  font-weight: 600;
  color: var(--dark-text);
}

.testimonial-role {
  font-size: 0.9rem;
  color: var(--gray-text);
}

/* ==========================================
   MODAL / DIALOG
   ========================================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-md);
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--white);
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--light-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--gray-text);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.modal-close:hover {
  background-color: var(--light-bg);
  color: var(--dark-text);
}

.modal-body {
  padding: var(--spacing-lg);
}

.modal-footer {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--light-gray);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
  background: linear-gradient(135deg, #e7f3ff 0%, #ffffff 100%);
  padding: var(--spacing-xxl) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background-color: rgba(0, 123, 255, 0.05);
  border-radius: 50%;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  color: var(--dark-text);
}

.hero-text p {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-lg);
}

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

.hero-image img {
  width: 100%;
  border-radius: var(--radius-xl);
}

/* ==========================================
   SECTION STYLES
   ========================================== */
.section {
  padding: var(--spacing-xxl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--dark-text);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray-text);
  max-width: 600px;
  margin: 0 auto;
}

.section-bg-light {
  background-color: var(--light-bg);
}

.section-bg-blue {
  background: linear-gradient(135deg, #e7f3ff 0%, #ffffff 100%);
}

/* ==========================================
   STATS SECTION
   ========================================== */
.stats {
  background-color: var(--primary-color);
  color: var(--white);
  padding: var(--spacing-xl) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  text-align: center;
}

.stat-item h3 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.stat-item p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background-color: #1a1a1a;
  color: var(--white);
  padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
}

.footer-about h3,
.footer-links h4 {
  margin-bottom: var(--spacing-md);
  color: var(--white);
}

.footer-about p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-md);
}

.footer-social {
  display: flex;
  gap: var(--spacing-sm);
}

.social-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: var(--transition-base);
}

.social-icon:hover {
  background-color: var(--primary-color);
}

.footer-links ul li {
  margin-bottom: var(--spacing-xs);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition-base);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* ==========================================
   TABLE
   ========================================== */
.table-wrapper {
  overflow-x: auto;
  margin: var(--spacing-lg) 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table thead {
  background-color: var(--primary-color);
  color: var(--white);
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
}

.table tbody tr {
  border-bottom: 1px solid var(--light-gray);
}

.table tbody tr:last-child {
  border-bottom: none;
}

.table tbody tr:hover {
  background-color: var(--light-bg);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
}

.status-available {
  background-color: #d4edda;
  color: #155724;
}

.status-low {
  background-color: #fff3cd;
  color: #856404;
}

.status-urgent {
  background-color: #f8d7da;
  color: #721c24;
}

/* ==========================================
   AUTH PAGES (Split Layout)
   ========================================== */
.auth-container {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-form-side {
  padding: var(--spacing-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.auth-form-wrapper {
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  margin-bottom: var(--spacing-xl);
}

.auth-title {
  font-size: 2rem;
  margin-bottom: var(--spacing-xs);
  text-align: center;
}

.auth-subtitle {
  text-align: center;
  color: var(--gray-text);
  margin-bottom: var(--spacing-lg);
}

.auth-image-side {
  background-size: cover;
  background-position: center;
  position: relative;
}

.auth-image-side::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.2), rgba(0, 123, 255, 0.4));
}


.auth-link {
  text-align: center;
  margin-top: var(--spacing-md);
  color: var(--gray-text);
}

.auth-link a {
  color: var(--primary-color);
  font-weight: 600;
}

.auth-link a:hover {
  text-decoration: underline;
}

/* OTP Input */
.otp-inputs {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  margin: var(--spacing-lg) 0;
}

.otp-input {
  width: 60px;
  height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
}

.otp-input:focus {
  border-color: var(--primary-color);
  outline: none;
}

/* Success Message */
.success-message {
  text-align: center;
  padding: var(--spacing-xxl);
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-md);
  background-color: var(--success-color);
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 3rem;
}

/* ==========================================
   BLOOD BANK SPECIFIC
   ========================================== */
.blood-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--spacing-md);
}

.donor-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-md);
  background-color: var(--primary-color);
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 3rem;
}

/* ==========================================
   UTILITIES
   ========================================== */
.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

.text-primary {
  color: var(--primary-color);
}

.bg-primary {
  background-color: var(--primary-color);
}

.shadow {
  box-shadow: var(--shadow-md);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Tablets (768px and below) */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-text h1 {
    font-size: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .auth-container {
    grid-template-columns: 1fr;
  }
  
  .auth-image-side {
    display: none;
  }
}

/* Mobile (576px and below) */
@media (max-width: 576px) {
  h1 { font-size: 1.75rem; }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .btn {
    padding: 0.65rem 1.25rem;
  }
  
  .modal-content {
    margin: var(--spacing-sm);
  }
  
  .otp-input {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  .stat-item h3 {
    font-size: 2rem;
  }
}

/* Large Desktops (1200px and above) */
@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
  }
}

/* ==========================================
   404 ERROR PAGE
   ========================================== */
.error-page {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xxl) 0;
  background: linear-gradient(135deg, #e7f3ff 0%, #ffffff 100%);
}

.error-content {
  text-align: center;
  max-width: 600px;
  padding: var(--spacing-xl);
}

.error-icon {
  font-size: 5rem;
  margin-bottom: var(--spacing-md);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

.error-code {
  font-size: 8rem;
  font-weight: 800;
  color: var(--primary-color);
  margin: 0;
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0, 123, 255, 0.2);
}

.error-title {
  font-size: 2rem;
  color: var(--dark-text);
  margin: var(--spacing-sm) 0;
}

.error-message {
  font-size: 1.1rem;
  color: var(--gray-text);
  margin-bottom: var(--spacing-lg);
  line-height: 1.8;
}

.error-actions {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-xl);
}

.error-suggestions {
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--light-gray);
}

.error-suggestions p {
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: var(--spacing-sm);
}

.error-suggestions ul {
  display: flex;
  gap: var(--spacing-lg);
  justify-content: center;
  flex-wrap: wrap;
}

.error-suggestions a {
  color: var(--primary-color);
  font-weight: 500;
}

.error-suggestions a:hover {
  text-decoration: underline;
}

/* ==========================================
   LOADING SPINNER
   ========================================== */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xxl);
  min-height: 200px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--light-gray);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner p {
  margin-top: var(--spacing-md);
  color: var(--gray-text);
  font-weight: 500;
}

/* Skeleton loading for cards */
.skeleton-card {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-lg);
  height: 300px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==========================================
   ERROR STATE UI
   ========================================== */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  text-align: center;
  min-height: 200px;
  background-color: var(--light-bg);
  border-radius: var(--radius-lg);
  border: 2px dashed var(--light-gray);
}

.error-state-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.7;
}

.error-state h3 {
  color: var(--dark-text);
  margin-bottom: var(--spacing-xs);
}

.error-state p {
  color: var(--gray-text);
  margin-bottom: var(--spacing-md);
  max-width: 400px;
}

.error-state .btn {
  margin-top: var(--spacing-sm);
}

/* Inline loading for buttons */
.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Toast notification for errors */
.toast-error {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--danger-color);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  animation: slideUp 0.3s ease;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.toast-error .toast-icon {
  font-size: 1.2rem;
}

.toast-error .toast-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0 0 0 1rem;
  opacity: 0.8;
}

.toast-error .toast-close:hover {
  opacity: 1;
}

/* Responsive adjustments for error page */
@media (max-width: 576px) {
  .error-code {
    font-size: 5rem;
  }
  
  .error-title {
    font-size: 1.5rem;
  }
  
  .error-suggestions ul {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
}

/* ==========================================
   PREMIUM MICRO-ANIMATIONS
   ========================================== */

/* Smooth hover transitions for all interactive elements */
.btn, .card, .service-card, .doctor-card, .nav-link {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fade-in animation for page sections */
.section {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtle scale on card hover */
.doctor-card:hover,
.service-card:hover {
  transform: translateY(-8px) scale(1.02);
}

/* Button press effect */
.btn:active {
  transform: scale(0.98);
}

/* ==========================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================== */

/* Focus states for keyboard navigation */
.btn:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.nav-link:focus-visible {
  outline: 3px solid var(--primary-light);
  outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================
   VISUAL PREMIUM ENHANCEMENTS
   ========================================== */

/* Glassmorphism effect for modals */
.modal-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Improved input focus glow */
.form-input:focus,
.form-select:focus {
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.15);
  border-color: var(--primary-color);
}

/* Text shadow for contrast on hero */
.hero-text h1 {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ==========================================
   RESPONSIVE FIXES
   ========================================== */

/* Mobile hero buttons stacking */
@media (max-width: 576px) {
  .hero-text > div[style*="display: flex"],
  .hero-text > div {
    flex-direction: column;
    gap: 0.75rem !important;
    align-items: center;
  }
  
  .hero-text .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
  
  /* Footer contact overflow fix */
  .footer-links li {
    font-size: 0.875rem;
    word-break: break-word;
  }
  
  /* Error actions stacking */
  .error-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .error-actions .btn {
    width: 100%;
    max-width: 280px;
  }
}

/* Tablet grid adjustment */
@media (max-width: 768px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Mobile menu z-index fix */
  .nav-menu {
    z-index: 1002;
  }
  
  /* Hero image spacing */
  .hero-image {
    margin-top: 2rem;
  }
  
  /* User welcome in mobile */
  .user-welcome {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* User welcome text truncation for long names */
.user-welcome span:first-child {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .user-welcome span:first-child {
    max-width: 120px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .user-welcome span:first-child {
    max-width: 100px;
    font-size: 0.85rem;
  }
  
  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
}

/* Fix for clinic detail page layout on tablet */
@media (max-width: 992px) {
  [style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

