/* ===== CSS Reset & Variables ===== */
:root {
  --primary: #1a56db;
  --primary-light: #e8f0fe;
  --primary-dark: #0f3a8a;
  --accent: #0ea5e9;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  line-height: 1.3;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h3 { font-size: 1.2rem; font-family: 'Inter', sans-serif; font-weight: 600; }

/* ===== Header & Navigation ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

header.scrolled {
  box-shadow: var(--shadow);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.3rem;
}

.logo i {
  font-size: 1.5rem;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--primary);
  color: white !important;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: var(--primary-dark) !important;
  color: white !important;
}

/* Hamburger */
.menu-toggle { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: var(--transition);
}

/* ===== Hero Section ===== */
#hero {
  padding: 8rem 2rem 4rem;
  background: linear-gradient(135deg, var(--primary-light) 0%, #f0f7ff 50%, var(--bg) 100%);
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-tag {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.hero-text h1 {
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(26, 86, 219, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 86, 219, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.hero-badges {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.badge i {
  color: var(--primary);
}

.hero-image {
  display: flex;
  justify-content: center;
}

.doctor-photo {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid white;
  box-shadow: var(--shadow-lg), 0 0 0 12px var(--primary-light);
}

.doctor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Sections ===== */
.section {
  padding: 5rem 2rem;
}

.section-alt {
  background: var(--bg-alt);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-tag {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.05rem;
  margin-top: -0.5rem;
}

.section-intro {
  text-align: center;
  color: var(--text-light);
  margin-top: -1.5rem;
  margin-bottom: 2.5rem;
}

/* ===== About Grid ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.about-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.about-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.about-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.about-icon i {
  font-size: 1.3rem;
  color: var(--primary);
}

.about-card h3 {
  margin-bottom: 0.8rem;
  color: var(--text);
}

.about-card ul {
  list-style: none;
  padding: 0;
}

.about-card ul li {
  padding: 0.3rem 0;
  padding-left: 1.2rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--text-light);
}

.about-card ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* ===== Services Grid ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-card.emergency {
  border-left: 4px solid #ef4444;
}

.service-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.service-icon i {
  font-size: 1.3rem;
  color: var(--primary);
}

.service-card.emergency .service-icon {
  background: #fef2f2;
}

.service-card.emergency .service-icon i {
  color: #ef4444;
}

.service-card h3 {
  margin-bottom: 1rem;
}

.service-card ul {
  list-style: none;
  padding: 0;
}

.service-card ul li {
  padding: 0.35rem 0;
  padding-left: 1.2rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-light);
}

.service-card ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* ===== Conditions Grid ===== */
.conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.condition-card {
  background: white;
  padding: 1.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
  text-align: center;
}

.condition-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary);
}

.condition-card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.condition-card h3 {
  margin-bottom: 0.5rem;
}

.condition-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ===== Reviews Section ===== */
.reviews-summary {
  text-align: center;
  margin-bottom: 3rem;
}

.rating-big {
  margin-bottom: 1.5rem;
}

.rating-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text);
  font-family: 'Playfair Display', serif;
}

.stars {
  color: #f59e0b;
  font-size: 1.4rem;
  margin: 0.5rem 0;
}

.stars i {
  margin: 0 2px;
}

.rating-big p {
  color: var(--text-light);
  font-size: 0.95rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.review-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.review-card:hover {
  box-shadow: var(--shadow-lg);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.reviewer-avatar i {
  font-size: 2.5rem;
  color: var(--text-light);
}

.review-header h4 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.review-stars {
  color: #f59e0b;
  font-size: 0.8rem;
}

.review-card p {
  font-size: 0.95rem;
  color: var(--text-light);
  font-style: italic;
  line-height: 1.6;
}

/* ===== Resources Grid ===== */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.resource-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  text-align: center;
  transition: var(--transition);
}

.resource-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary);
}

.resource-card i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.resource-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.resource-card p {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== Contact Grid ===== */
.contact-primary {
  margin-bottom: 3rem;
}

.primary-clinic-card {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius);
  border: 2px solid var(--primary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.primary-clinic-card .contact-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.2rem;
}

.primary-clinic-card .contact-icon i {
  font-size: 1.8rem;
}

.primary-clinic-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.clinic-name {
  font-weight: 600;
  color: var(--text);
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.clinic-address {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.time-row.highlight {
  background: var(--primary-light);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--primary);
}

.affiliations-heading {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.affiliations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-bottom: 3rem;
}

.affiliation-card {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.affiliation-card h4 {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.affiliation-card p {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
}

.affiliation-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.affiliation-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.contact-bottom-grid {
  max-width: 450px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.contact-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
}

.contact-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.contact-icon i {
  font-size: 1.5rem;
  color: var(--primary);
}

.contact-card h3 {
  margin-bottom: 0.3rem;
}

.contact-card > p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.opd-times {
  margin-top: 1rem;
}

.time-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.time-row:last-child {
  border-bottom: none;
}

.appointment-note span {
  color: var(--primary);
  font-style: italic;
  width: 100%;
  text-align: center;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  background: var(--bg-alt);
  transition: var(--transition);
}

.contact-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.contact-link.whatsapp:hover {
  background: #dcfce7;
  color: #16a34a;
}

.contact-link.maps:hover {
  background: #fef3c7;
  color: #d97706;
}

.contact-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* ===== Privacy ===== */
.privacy-content {
  max-width: 750px;
  margin: 0 auto;
}

.privacy-content h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.privacy-content p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* ===== FAQ Page ===== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.faq-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.faq-item p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
}

.faq-item a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.faq-item a:hover {
  text-decoration: underline;
}

/* ===== Footer ===== */
footer {
  background: var(--text);
  color: white;
  padding: 3rem 2rem;
}

.footer-content {
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-brand i {
  color: var(--accent);
}

.footer-tagline {
  color: #9ca3af;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.copyright {
  font-size: 0.85rem;
  color: #9ca3af;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .services-grid,
  .contact-grid,
  .reviews-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
  }

  .menu-toggle:checked ~ .nav-links {
    right: 0;
  }

  .menu-toggle:checked + .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }

  .menu-toggle:checked + .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle:checked + .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-desc {
    margin: 0 auto 2rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-badges {
    justify-content: center;
  }

  .doctor-photo {
    width: 240px;
    height: 240px;
  }

  .about-grid,
  .services-grid,
  .contact-grid,
  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .affiliations-grid {
    grid-template-columns: 1fr 1fr;
  }

  .conditions-grid {
    grid-template-columns: 1fr 1fr;
  }

  #hero {
    padding: 6rem 1.5rem 3rem;
    min-height: auto;
  }

  .section {
    padding: 3.5rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .conditions-grid,
  .resources-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== Animations ===== */
@media (prefers-reduced-motion: no-preference) {
  .about-card,
  .service-card,
  .condition-card,
  .review-card,
  .resource-card,
  .contact-card,
  .affiliation-card,
  .primary-clinic-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .about-card.visible,
  .service-card.visible,
  .condition-card.visible,
  .review-card.visible,
  .resource-card.visible,
  .contact-card.visible,
  .affiliation-card.visible,
  .primary-clinic-card.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Floating WhatsApp Button ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: all 0.3s ease;
  animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-10px);
}

.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  background: #333;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid #333;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

@keyframes whatsapp-pulse {
  0% { box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6), 0 0 0 8px rgba(37, 211, 102, 0.1); }
  100% { box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4); }
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    width: 54px;
    height: 54px;
    font-size: 1.6rem;
  }
}
