/* ===== CSS VARIABLES ===== */
:root {
  --primary: #0d4f4f;
  --primary-light: #1a6b6b;
  --primary-dark: #083838;
  --gold: #c9a84c;
  --gold-light: #e0c070;
  --white: #ffffff;
  --off-white: #f8fafb;
  --gray-100: #f1f5f5;
  --gray-200: #e2eaea;
  --gray-400: #8fa8a8;
  --gray-600: #4a6666;
  --gray-800: #1e3535;
  --text: #1a2e2e;
  --text-light: #4a6666;

  /* Chat widget colors — customizable */
  --chat-primary: #0d4f4f;
  --chat-user-bubble: #0d4f4f;
  --chat-bot-bubble: #f1f5f5;
  --chat-gold: #c9a84c;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgba(13, 79, 79, 0.08);
  --shadow-md: 0 4px 20px rgba(13, 79, 79, 0.12);
  --shadow-lg: 0 8px 40px rgba(13, 79, 79, 0.18);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { color: var(--text-light); }

/* ===== LAYOUT HELPERS ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { color: var(--primary); margin-bottom: 12px; }
.section-header p { font-size: 1.1rem; max-width: 560px; margin: 0 auto; }
.gold-bar {
  width: 60px; height: 4px;
  background: var(--gold);
  border-radius: 2px;
  margin: 16px auto 0;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(13, 79, 79, 0.97);
  backdrop-filter: blur(10px);
  padding: 16px 0;
  box-shadow: var(--shadow-md);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo .logo-icon {
  width: 38px; height: 38px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.nav-logo span { color: var(--white); font-size: 1.2rem; font-weight: 700; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { color: rgba(255,255,255,0.85); font-size: 0.95rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  background: var(--gold); color: var(--primary-dark);
  padding: 10px 24px; border-radius: 50px;
  font-weight: 700; font-size: 0.9rem;
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: var(--gold-light); transform: translateY(-1px); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 24px; height: 2px; background: white; border-radius: 2px; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; max-width: 800px; }
.hero-badge {
  display: inline-block;
  background: rgba(201, 168, 76, 0.2);
  border: 1px solid rgba(201, 168, 76, 0.5);
  color: var(--gold-light);
  padding: 6px 20px; border-radius: 50px;
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero h1 span { color: var(--gold); }
.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255,255,255,0.8);
  margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--gold); color: var(--primary-dark);
  padding: 14px 32px; border-radius: 50px;
  font-weight: 700; font-size: 1rem;
  transition: all 0.2s; border: none; cursor: pointer; display: inline-block;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201, 168, 76, 0.4); }
.btn-outline {
  background: transparent; color: var(--white);
  padding: 14px 32px; border-radius: 50px;
  font-weight: 600; font-size: 1rem;
  border: 2px solid rgba(255,255,255,0.4);
  transition: all 0.2s; cursor: pointer; display: inline-block;
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); transform: translateY(-2px); }
.hero-stats {
  display: flex; gap: 40px; justify-content: center; flex-wrap: wrap;
  margin-top: 60px; padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.stat { text-align: center; }
.stat-number { font-size: 2.2rem; font-weight: 800; color: var(--gold); }
.stat-label { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-top: 4px; }

/* ===== SERVICES ===== */
.services { background: var(--off-white); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.service-card {
  background: var(--white);
  padding: 32px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: all 0.3s;
  border-bottom: 3px solid transparent;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--gold);
}
.service-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; font-size: 28px;
}
.service-card h3 { color: var(--primary); margin-bottom: 10px; font-size: 1.15rem; }
.service-card p { font-size: 0.9rem; line-height: 1.6; }
.service-price {
  display: inline-block;
  margin-top: 16px;
  background: var(--gray-100);
  color: var(--primary);
  padding: 4px 16px; border-radius: 50px;
  font-size: 0.85rem; font-weight: 700;
}

/* ===== DOCTORS ===== */
.doctors { background: var(--white); }
.doctors-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.doctor-card {
  background: var(--off-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}
.doctor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.doctor-avatar {
  width: 100%; height: 220px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
}
.doctor-info { padding: 28px; }
.doctor-info h3 { color: var(--primary); margin-bottom: 6px; }
.doctor-specialty { color: var(--gold); font-weight: 600; font-size: 0.9rem; margin-bottom: 12px; }
.doctor-info p { font-size: 0.9rem; line-height: 1.6; }
.doctor-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.doctor-tag {
  background: var(--gray-100);
  color: var(--primary);
  padding: 4px 12px; border-radius: 50px;
  font-size: 0.78rem; font-weight: 600;
}

/* ===== TESTIMONIALS ===== */
.testimonials { background: var(--primary-dark); }
.testimonials .section-header h2 { color: var(--white); }
.testimonials .section-header p { color: rgba(255,255,255,0.7); }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.testimonial-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: all 0.3s;
}
.testimonial-card:hover { background: rgba(255,255,255,0.1); transform: translateY(-4px); }
.stars { color: var(--gold); font-size: 1.2rem; margin-bottom: 16px; letter-spacing: 2px; }
.testimonial-text { color: rgba(255,255,255,0.85); font-style: italic; line-height: 1.7; margin-bottom: 24px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.author-avatar {
  width: 48px; height: 48px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--primary-dark); font-size: 1.2rem;
}
.author-name { color: var(--white); font-weight: 600; }
.author-location { color: rgba(255,255,255,0.5); font-size: 0.85rem; }

/* ===== CONTACT ===== */
.contact { background: var(--off-white); }
.contact-wrapper { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: start; }
.contact-info h3 { color: var(--primary); font-size: 1.8rem; margin-bottom: 20px; }
.contact-info p { margin-bottom: 32px; line-height: 1.8; }
.contact-detail { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.contact-icon {
  width: 44px; height: 44px; min-width: 44px;
  background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.contact-detail-text strong { color: var(--primary); display: block; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.contact-detail-text span { color: var(--text-light); font-size: 0.95rem; }
.whatsapp-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #25D366; color: white;
  padding: 14px 28px; border-radius: 50px;
  font-weight: 700; font-size: 1rem;
  margin-top: 24px;
  transition: all 0.2s; box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}
.whatsapp-btn:hover { background: #1ebe5d; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4); }
.contact-form-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.85rem; font-weight: 600;
  color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif; font-size: 0.95rem;
  color: var(--text); background: var(--off-white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13, 79, 79, 0.1); background: white; }
.form-group textarea { height: 120px; resize: vertical; }
.form-submit { width: 100%; padding: 14px; font-size: 1rem; cursor: pointer; border: none; }
.form-message { margin-top: 12px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.9rem; display: none; }
.form-message.success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.form-message.error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ===== FOOTER ===== */
.footer { background: var(--gray-800); color: rgba(255,255,255,0.7); padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand .logo-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand .logo-icon { width: 36px; height: 36px; background: var(--gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.footer-brand .logo-name { color: white; font-weight: 700; font-size: 1.1rem; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; max-width: 300px; }
.footer h4 { color: white; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 20px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a { font-size: 0.9rem; transition: color 0.2s; }
.footer ul li a:hover { color: var(--gold); }
.hours-row { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 8px; }
.hours-row span:last-child { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 0.85rem;
}
.footer-bottom a { color: var(--gold); }

/* ===== CHAT WIDGET ===== */
.chat-fab {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 60px; height: 60px;
  background: var(--chat-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(13, 79, 79, 0.45);
  transition: all 0.25s;
  border: none;
}
.chat-fab:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(13, 79, 79, 0.55); }
.chat-fab svg { width: 26px; height: 26px; fill: white; }
.chat-fab .close-icon { display: none; }
.chat-fab.open .chat-icon { display: none; }
.chat-fab.open .close-icon { display: block; }
.chat-fab .badge {
  position: absolute; top: -4px; right: -4px;
  width: 20px; height: 20px;
  background: var(--gold); border-radius: 50%;
  font-size: 10px; font-weight: 700; color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.chat-window {
  position: fixed; bottom: 100px; right: 28px; z-index: 998;
  width: 360px; max-height: 540px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: scale(0.9) translateY(20px);
  opacity: 0; pointer-events: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom right;
}
.chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1; pointer-events: all;
}

.chat-header {
  background: var(--chat-primary);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
}
.chat-avatar {
  width: 40px; height: 40px;
  background: rgba(201, 168, 76, 0.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.chat-header-info { flex: 1; }
.chat-header-name { color: white; font-weight: 700; font-size: 0.95rem; }
.chat-header-status { color: rgba(255,255,255,0.7); font-size: 0.78rem; }
.chat-header-status::before { content: '●'; color: #4ade80; margin-right: 5px; font-size: 0.7rem; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
  min-height: 0;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 2px; }

.chat-msg { max-width: 85%; }
.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }
.chat-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.9rem; line-height: 1.55;
}
.bot .chat-bubble {
  background: var(--chat-bot-bubble);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.user .chat-bubble {
  background: var(--chat-user-bubble);
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-msg-time { font-size: 0.7rem; color: var(--gray-400); margin-top: 4px; }
.user .chat-msg-time { text-align: right; }

.typing-indicator {
  align-self: flex-start;
  display: flex; align-items: center; gap: 4px;
  background: var(--chat-bot-bubble);
  padding: 12px 16px; border-radius: 16px; border-bottom-left-radius: 4px;
}
.typing-dot {
  width: 8px; height: 8px;
  background: var(--gray-400); border-radius: 50%;
  animation: typing 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.chat-input-area {
  padding: 14px 16px;
  border-top: 1px solid var(--gray-200);
  display: flex; gap: 10px; align-items: flex-end;
}
.chat-input {
  flex: 1; border: 1.5px solid var(--gray-200); border-radius: 20px;
  padding: 10px 16px; font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
  color: var(--text); outline: none; resize: none;
  max-height: 100px; overflow-y: auto;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--chat-primary); }
.chat-send {
  width: 40px; height: 40px; min-width: 40px;
  background: var(--chat-primary); border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
}
.chat-send:hover { background: var(--primary-light); transform: scale(1.05); }
.chat-send svg { width: 18px; height: 18px; fill: white; }
.chat-send:disabled { background: var(--gray-200); cursor: not-allowed; transform: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .contact-wrapper { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .chat-window { width: calc(100vw - 32px); right: 16px; bottom: 90px; }
  .chat-fab { right: 16px; bottom: 16px; }
  .hero-stats { gap: 24px; }
}

@media (max-width: 480px) {
  .section { padding: 56px 0; }
  .services-grid { grid-template-columns: 1fr; }
}
