@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Primary Colors - Medical Blue */
  --color-primary-50: #eff6ff;
  --color-primary-100: #dbeafe;
  --color-primary-200: #bfdbfe;
  --color-primary-300: #93c5fd;
  --color-primary-400: #60a5fa;
  --color-primary-500: #3b82f6;
  --color-primary-600: #2563eb;
  --color-primary-700: #1d4ed8;
  --color-primary-800: #1e40af;
  --color-primary-900: #1e3a8a;

  /* Secondary Colors - Hope Green */
  --color-secondary-50: #f0fdf4;
  --color-secondary-100: #dcfce7;
  --color-secondary-200: #bbf7d0;
  --color-secondary-300: #86efac;
  --color-secondary-400: #4ade80;
  --color-secondary-500: #22c55e;
  --color-secondary-600: #16a34a;
  --color-secondary-700: #15803d;
  --color-secondary-800: #166534;
  --color-secondary-900: #14532d;

  /* Accent Colors - Trust Teal */
  --color-accent-50: #f0fdfa;
  --color-accent-100: #ccfbf1;
  --color-accent-200: #99f6e4;
  --color-accent-300: #5eead4;
  --color-accent-400: #2dd4bf;
  --color-accent-500: #14b8a6;
  --color-accent-600: #0d9488;
  --color-accent-700: #0f766e;
  --color-accent-800: #115e59;
  --color-accent-900: #134e4a;

  /* Neutral Colors */
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;

  /* Semantic Colors */
  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;

  /* Background */
  --background: #ffffff;
  --foreground: #111827;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

main {
  flex: 1;
}

/* Layout Utilities */
.container-custom {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container-custom {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    padding: 0 2rem;
  }
}

/* Header Styles */
header {
  background: white;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}

header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.header-content {
  display: flex;
  flex-direction: column;
  width: 100%;
}

@media (min-width: 768px) {
  .header-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

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

.logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: linear-gradient(135deg, var(--color-primary-600), var(--color-accent-600));
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
  transform: scale(1.05);
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gray-900);
  line-height: 1.2;
}

.logo-text p {
  font-size: 0.75rem;
  color: var(--color-gray-600);
}

.nav-links {
  display: none;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
    align-items: center;
  }
}

.nav-links a {
  font-weight: 500;
  color: var(--color-gray-700);
}

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

.mobile-nav {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem 0 0.5rem;
  margin-top: 1rem;
  scrollbar-width: none;
}

.mobile-nav::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none;
  }
}

.mobile-nav-link {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  background: var(--color-gray-50);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-700);
  white-space: nowrap;
}

.mobile-nav-link:active {
  background: var(--color-primary-50);
  color: var(--color-primary-600);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 85vh;
  padding: 8rem 0 5rem;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 10;
}

.hero .container-custom {
  position: relative;
  z-index: 30;
}

.badge-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-primary-50);
  color: var(--color-primary-700);
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.badge-pulse {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--color-primary-600);
  border-radius: 9999px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.5; }
  100% { transform: scale(0.95); opacity: 1; }
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  color: var(--color-gray-900);
  margin-bottom: 2rem;
  line-height: 1.05;
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 4rem;
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    font-size: 5rem;
  }
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary-600), var(--color-accent-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--color-gray-600);
  margin-bottom: 3rem;
  max-width: 48rem;
  line-height: 1.6;
}

/* Search Bar */
.search-container {
  max-width: 48rem;
  background: white;
  border-radius: 2.5rem;
  padding: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(30, 58, 138, 0.1);
  border: 1px solid var(--color-primary-50);
  margin-bottom: 2.5rem;
  transition: transform 0.3s ease;
}

.search-container:hover {
  transform: scale(1.01);
}

.search-bar {
  display: flex;
  gap: 1rem;
  flex-direction: column;
}

@media (min-width: 640px) {
  .search-bar {
    flex-direction: row;
  }
}

.search-input {
  flex: 1;
  position: relative;
}

.search-input input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border-radius: 1.5rem;
  border: 1px solid var(--color-gray-200);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.search-input input:focus {
  border-color: var(--color-primary-400);
}

.search-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-gray-400);
}

.search-btn {
  padding: 1rem 2rem;
  background: var(--color-primary-600);
  color: white;
  border: none;
  border-radius: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-btn:hover {
  background: var(--color-primary-700);
}

/* Quick Links */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-quick {
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--color-gray-700);
  border-radius: 1rem;
  font-weight: 700;
  font-size: 0.875rem;
  border: 1px solid var(--color-gray-100);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.btn-emergency {
  background: var(--color-error);
  color: white;
  border: none;
  box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.2);
}

.btn-emergency:hover {
  background: #dc2626;
}

/* Stats Section */
.stats {
  margin-top: -3rem;
  margin-bottom: 5rem;
}

.stats-grid {
  background: white;
  border-radius: 3rem;
  padding: 2rem;
  display: grid;
  grid-template-cols: 1fr;
  gap: 2rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-gray-100);
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-cols: repeat(3, 1fr);
    padding: 3rem;
  }
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .stat-item:not(:last-child) {
    border-right: 1px solid var(--color-gray-100);
  }
}

.stat-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-blue { background: var(--color-primary-50); color: var(--color-primary-600); }
.stat-icon-green { background: var(--color-secondary-50); color: var(--color-secondary-600); }
.stat-icon-amber { background: #fffbeb; color: #d97706; }

.stat-content p:first-child {
  font-size: 1.875rem;
  font-weight: 900;
  color: var(--color-gray-900);
  line-height: 1.2;
}

.stat-content p:last-child {
  color: var(--color-gray-500);
  font-weight: 500;
}

/* Sections */
section {
  padding: 6rem 0;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 4rem;
}

@media (min-width: 1024px) {
  .section-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
}

.section-title p {
  font-size: 1.25rem;
  color: var(--color-gray-600);
  max-width: 48rem;
}

.section-link {
  color: var(--color-primary-600);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.section-link:hover {
  transform: translateX(4px);
}

/* Cards */
.grid-cards {
  display: grid;
  grid-template-cols: 1fr;
  gap: 2rem;
}

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

@media (min-width: 1024px) {
  .grid-cards {
    grid-template-cols: repeat(4, 1fr);
  }
}

.card-specialty {
  background: white;
  padding: 2rem;
  border-radius: 2.5rem;
  border: 1px solid var(--color-gray-100);
  box-shadow: var(--shadow-sm);
  transition: all 0.5s ease;
}

.card-specialty:hover {
  box-shadow: var(--shadow-xl);
  border-color: var(--color-primary-100);
  transform: translateY(-4px);
}

.card-icon {
  width: 4rem;
  height: 4rem;
  background: var(--color-primary-50);
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--color-primary-600);
  transition: all 0.3s ease;
}

.card-specialty:hover .card-icon {
  background: var(--color-primary-600);
  color: white;
}

.card-specialty h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.card-specialty p {
  color: var(--color-gray-500);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Featured Doctors Section */
.featured-doctors {
  background: #111827;
  border-radius: 4rem;
  padding: 4rem 2rem;
  margin-bottom: 6rem;
  position: relative;
  overflow: hidden;
}

.bg-blur {
  position: absolute;
  width: 24rem;
  height: 24rem;
  background: var(--color-primary-600);
  border-radius: 9999px;
  filter: blur(120px);
  opacity: 0.2;
  z-index: 0;
}

.bg-blur-1 { top: 0; right: 0; transform: translate(50%, -50%); }
.bg-blur-2 { bottom: 0; left: 0; transform: translate(-50%, 50%); background: var(--color-accent-600); }

.featured-doctors .container-custom {
  position: relative;
  z-index: 10;
}

.featured-doctors h2 {
  color: white;
}

.featured-doctors p {
  color: rgba(255, 255, 255, 0.6);
}

.doctor-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3rem;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.5s ease;
}

.doctor-card:hover {
  border-color: rgba(59, 130, 246, 0.5);
}

.doctor-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.doctor-avatar {
  width: 5rem;
  height: 5rem;
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-700));
  border-radius: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.875rem;
  font-weight: 900;
  box-shadow: 0 10px 15px -3px rgba(30, 58, 138, 0.4);
  transition: transform 0.3s ease;
}

.doctor-card:hover .doctor-avatar {
  transform: rotate(6deg);
}

.doctor-info h4 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.doctor-info p {
  color: var(--color-primary-400);
  font-weight: 500;
}

.doctor-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  flex-grow: 1;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: white;
}

.detail-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-profile {
  width: 100%;
  padding: 1.25rem;
  background: white;
  color: var(--color-gray-900);
  border-radius: 2rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

/* Footer Section */
footer {
  background: #0f172a;
  color: white;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-cols: 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-cols: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-cols: repeat(4, 1fr);
  }
}

.footer-brand p {
  color: var(--color-gray-400);
  font-size: 0.875rem;
  margin-top: 1.5rem;
  line-height: 1.6;
}

.footer-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-title span {
  width: 0.25rem;
  height: 1.25rem;
  border-radius: 9999px;
}

.title-blue span { background: var(--color-primary-500); }
.title-teal span { background: var(--color-accent-500); }
.title-purple span { background: #a855f7; }

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--color-gray-400);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.footer-join {
  background: rgba(30, 41, 59, 0.5);
  padding: 1.5rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(51, 65, 85, 0.5);
}

.footer-join h5 {
  font-weight: 700;
  color: var(--color-accent-400);
  margin-bottom: 0.5rem;
}

.footer-join p {
  font-size: 0.75rem;
  color: var(--color-gray-400);
  margin-bottom: 1rem;
}

.btn-join {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: var(--color-accent-600);
  color: white;
  text-align: center;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
}

.footer-bottom {
  border-top: 1px solid rgba(51, 65, 85, 0.5);
  padding-top: 2rem;
}

.disclaimer {
  background: rgba(30, 41, 59, 0.3);
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.75rem;
  color: var(--color-gray-500);
  text-align: justify;
}

.disclaimer strong {
  color: var(--color-gray-400);
}

.copyright {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--color-gray-500);
}

@media (min-width: 768px) {
  .copyright {
    flex-direction: row;
  }
}

/* Page Headers (for internal pages) */
.page-header {
  background: var(--color-primary-50);
  padding: 4rem 0;
  margin-bottom: 4rem;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-gray-900);
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.125rem;
  color: var(--color-gray-600);
}

/* Listings Grid */
.directory-container {
  display: grid;
  grid-template-cols: 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}

@media (min-width: 1024px) {
  .directory-container {
    grid-template-cols: 300px 1fr;
  }
}

.filters-sidebar {
  background: white;
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid var(--color-gray-100);
  height: fit-content;
  position: sticky;
  top: 6rem;
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group h4 {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  color: var(--color-gray-500);
}

.listing-card {
  background: white;
  border-radius: 1.5rem;
  border: 1px solid var(--color-gray-100);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: all 0.3s ease;
}

@media (min-width: 640px) {
  .listing-card {
    flex-direction: row;
  }
}

.listing-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-100);
}

.listing-img {
  width: 100%;
  height: 12rem;
  background: var(--color-primary-50);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-600);
  font-size: 3rem;
  font-weight: 900;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .listing-img {
    width: 12rem;
  }
}

.listing-content {
  flex: 1;
}

.listing-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tag {
  padding: 0.25rem 0.5rem;
  background: var(--color-primary-50);
  color: var(--color-primary-700);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.listing-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.listing-metadata {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--color-gray-500);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.listing-metadata span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.listing-actions {
  display: flex;
  gap: 1rem;
}

.btn-call {
  flex: 1;
  padding: 0.75rem;
  background: var(--color-primary-600);
  color: white;
  text-align: center;
  border-radius: 0.75rem;
  font-weight: 700;
}

.btn-whatsapp {
  flex: 1;
  padding: 0.75rem;
  background: #25d366;
  color: white;
  text-align: center;
  border-radius: 0.75rem;
  font-weight: 700;
}
