/* ============================================================
   Krystal Clinic & Diabetes Center — Main Stylesheet
   File: css/styles.css
   ============================================================ */

/* ── Google Fonts are loaded in index.html via <link> ── */

/* ── CSS Custom Properties (Design Tokens) ── */
:root {
  --navy:        #0d1b6e;
  --navy-light:  #1a2b8a;
  --teal:        #0e9d97;
  --teal-light:  #1bbdb6;
  --teal-pale:   #e6f7f7;
  --text:        #1a1a2e;
  --muted:       #6b7280;
  --bg:          #f8fafc;
}

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html  { scroll-behavior: smooth; }
body  {
  font-family: 'Jost', sans-serif;
  color: var(--text);
  background: #fff;
  overflow-x: hidden;
}

/* ============================================================
  TOP BAR (removed)
  ============================================================ */
/* Topbar markup removed from HTML; keeping this section as a note for
  possible future use. Previously the topbar used a navy background. */

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: all 0.4s ease;
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 24px rgba(13, 27, 110, 0.1);
}
.navbar.scrolled .nav-link       { color: var(--navy) !important; }
.navbar.scrolled .nav-logo-text  { color: var(--navy) !important; }
.navbar.scrolled .book-btn       { background: var(--navy) !important; }

.nav-link {
  position: relative;
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.3s;
  letter-spacing: 0.03em;
}

/* Default nav link color (mobile / hero-overlay state) */
.navbar .nav-link { color: white; }

/* Desktop: ensure navbar has a white background and dark links by default */
@media (min-width: 1024px) {
  .navbar { background: #fff; }
  .navbar .nav-link { color: var(--navy) !important; }
  .navbar .book-btn { background: var(--navy); color: #fff; }
  .navbar .book-btn:hover { background: var(--navy-light); }
}
.nav-link::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--teal);
  transition: width 0.3s;
}
.nav-link:hover::after { width: 100%; }

/* ── Dropdown ── */
.dropdown-menu {
  display: none;
  position: absolute; top: 110%; left: -16px;
  background: white;
  border-radius: 14px;
  min-width: 220px;
  box-shadow: 0 16px 48px rgba(13, 27, 110, 0.15);
  border: 1px solid #e5e9f5;
  z-index: 200;
  padding: 8px 0;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 0.875rem;
  color: var(--text);
  transition: background 0.2s, color 0.2s;
}
.dropdown-menu a:hover { background: var(--teal-pale); color: var(--teal); }

/* ── Mobile Menu ── */
#mobile-menu {
  transition: max-height 0.4s ease, opacity 0.4s ease;
  max-height: 0; opacity: 0; overflow: hidden;
}
#mobile-menu.open { max-height: 600px; opacity: 1; }

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, #162080 40%, #0d6b80 100%);
  position: relative;
  overflow: hidden;
}
.hero-section::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%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}
.blob1 { width: 500px; height: 500px; background: var(--teal);  top: -100px; right: -100px; }
.blob2 { width: 350px; height: 350px; background: #4fc3f7; bottom: 50px;  left: -80px; }

.hero-stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
}
.accent-line {
  width: 56px; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--navy));
  border-radius: 2px;
}

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.service-card {
  border: 1px solid #e5e9f5;
  border-radius: 20px;
  padding: 32px 28px;
  transition: all 0.35s ease;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--navy));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(13, 27, 110, 0.12); }
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--teal-pale);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  transition: background 0.3s;
}
.service-card:hover .service-icon          { background: var(--teal); }
.service-card:hover .service-icon svg      { color: white; }

/* Replace small icon with full-width image inside service cards */
.service-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 18px;
}
@media (max-width: 1024px) {
  .service-image { height: 180px; }
}
@media (max-width: 640px) {
  .service-image { height: 160px; }
}

/* ============================================================
   DOCTOR CARD
   ============================================================ */
.doctor-card {
  background: linear-gradient(135deg, var(--navy) 0%, #162080 100%);
  border-radius: 28px;
  overflow: hidden;
}

/* Founder card redesign */
.founder-card {
  background: linear-gradient(180deg,#ffffff,#fbfdff);
  border-radius: 20px;
  border: 1px solid rgba(13,27,110,0.04);
  box-shadow: 0 18px 40px rgba(13,27,110,0.06);
}
.founder-photo {
  width: 468px; /* increased 20% */
  height: 624px; /* increased 20% */
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(13,27,110,0.08);
  display: block;
}

/* Responsive adjustments: slightly smaller on medium screens */
@media (max-width: 1024px) {
  .founder-photo { width: 384px; height: 504px; }
}

/* Mobile: make circular and center */
@media (max-width: 640px) {
  .founder-photo {
    width: 360px;
    height: 360px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
}

/* Photo wrapper for animated border and glow */
.founder-photo-wrap { position: relative; display: inline-block; border-radius: 20px; }
.founder-photo-wrap::after {
  content: '';
  position: absolute; inset: -8px;
  border-radius: inherit;
  z-index: -1;
  /* soft glow */
  box-shadow: 0 18px 40px rgba(14,157,151,0.08), 0 6px 30px rgba(13,27,110,0.04);
  animation: pulseGlow 3.6s ease-in-out infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 12px 32px rgba(14,157,151,0.06), 0 4px 18px rgba(13,27,110,0.03); }
  50% { box-shadow: 0 28px 64px rgba(14,157,151,0.10), 0 10px 40px rgba(13,27,110,0.05); }
  100% { box-shadow: 0 12px 32px rgba(14,157,151,0.06), 0 4px 18px rgba(13,27,110,0.03); }
}

.founder-card .credential-badge { background: rgba(14,157,151,0.12); border-color: rgba(14,157,151,0.24); color: #0d6b80; }
.credential-badge {
  background: rgba(14, 157, 151, 0.2);
  border: 1px solid rgba(14, 157, 151, 0.4);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: #5ecfcb;
  font-weight: 500;
}

/* About section single image card */
.about-image-card {
  background: linear-gradient(180deg, rgba(230,247,247,0.6), #ffffff);
  border: 1px solid rgba(14,157,151,0.08);
  box-shadow: 0 18px 40px rgba(13,27,110,0.06);
  display: flex; align-items: center; justify-content: center;
  height: 420px;
  position: relative;
}

.about-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  will-change: transform;
}

.about-image-card:hover img { transform: translateY(-6px) scale(1.02); box-shadow: 0 28px 60px rgba(13,27,110,0.12); }

/* Decorative ring */
.about-image-card::before {
  content: '';
  position: absolute; right: -36px; top: 20px;
  width: 92px; height: 92px; border-radius: 50%;
  border: 6px solid rgba(14,157,151,0.12);
  filter: blur(0.5px);
  pointer-events: none;
}

/* Floating animation for image */
@keyframes aboutFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.about-image-card .animated-img { animation: aboutFloat 6s ease-in-out infinite; }

@media (max-width: 1024px) {
  .about-image-card { height: 360px; }
}

@media (max-width: 640px) {
  .about-image-card { height: 300px; }
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonial-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  border: 1px solid #e5e9f5;
  box-shadow: 0 4px 24px rgba(13, 27, 110, 0.06);
  transition: box-shadow 0.3s;
}
.testimonial-card:hover { box-shadow: 0 12px 48px rgba(13, 27, 110, 0.12); }
.stars { color: #f59e0b; font-size: 1.1rem; letter-spacing: 2px; }

/* Ensure name/place text has no background and inherits card text color */
.testimonial-card footer,
.testimonial-card footer div,
.testimonials-track .testimonial-card footer { background: transparent !important; }
.testimonial-card footer { color: inherit !important; }
.testimonial-card footer .font-semibold { color: var(--navy) !important; background: transparent !important; }
.testimonial-card footer .text-gray-400 { color: var(--muted) !important; background: transparent !important; }

/* Testimonials carousel */
.testimonials-wrap { position: relative; overflow: hidden; }
.testimonials-track { display: flex; gap: 24px; transition: transform 0.6s cubic-bezier(.22,.9,.32,1); }
.testimonials-track .testimonial-card { min-width: 100%; box-sizing: border-box; }

.test-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px; background: rgba(255,255,255,0.9); border: 1px solid rgba(13,27,110,0.06); display:flex; align-items:center; justify-content:center; font-size:20px; cursor:pointer; box-shadow:0 6px 20px rgba(13,27,110,0.06); }
.test-prev { left: 12px; }
.test-next { right: 12px; }
.test-nav:hover { transform: translateY(-50%) scale(1.03); }

.test-dots { position: absolute; left: 50%; transform: translateX(-50%); bottom: 12px; display:flex; gap:8px; }
.test-dots button { width:10px; height:10px; border-radius:50%; background: rgba(13,27,110,0.12); border: none; cursor:pointer; }
.test-dots button.active { background: var(--teal); box-shadow: 0 6px 18px rgba(14,157,151,0.14); }

@media (min-width: 768px) {
  .testimonials-track { gap: 32px; }
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-grid { margin-top: 8px; }
.gallery-item { background: #fff; border: 1px solid #eef2f7; }
.gallery-image {
  width: 100%; height: 220px; object-fit: cover; display: block; transition: transform 0.35s ease, filter 0.35s ease; 
}
.gallery-item:hover .gallery-image { transform: scale(1.04); filter: saturate(1.06); }

@media (max-width: 1024px) {
  .gallery-image { height: 180px; }
}
@media (max-width: 640px) {
  .gallery-image { height: 140px; }
}

/* ============================================================
   LIGHTBOX / GALLERY MODAL
   ============================================================ */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 2000; display:flex; align-items:center; justify-content:center;
  background: rgba(2,6,23,0.75); backdrop-filter: blur(6px);
}
.lightbox-overlay.hidden { display: none; }
.lightbox-content { max-width: 92%; max-height: 86%; display:flex; flex-direction:column; align-items:center; justify-content:center; position:relative; }
.lightbox-img { max-width: 100%; max-height: 80vh; border-radius: 8px; box-shadow: 0 30px 60px rgba(2,6,23,0.6); }
.lightbox-caption { margin-top: 12px; color: #e6f7f7; font-size: 0.95rem; text-align:center; }
.lightbox-close { position: absolute; top: 18px; right: 18px; width:44px; height:44px; border-radius:999px; background: rgba(255,255,255,0.06); color: #fff; border: none; font-size:22px; cursor:pointer; z-index:2010; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width:48px; height:48px; border-radius:999px; background: rgba(255,255,255,0.06); color:#fff; border:none; font-size:28px; display:flex; align-items:center; justify-content:center; cursor:pointer; z-index:2010; }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-close:hover, .lightbox-nav:hover { transform: scale(1.04); background: rgba(255,255,255,0.12); }

@media (max-width: 640px) {
  .lightbox-img { max-height: 68vh; border-radius: 6px; }
  .lightbox-nav { width:40px; height:40px; font-size:22px; }
}

/* ============================================================
   STATS
   ============================================================ */
.stat-card {
  text-align: center;
  padding: 28px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f0f4ff, #e6f7f7);
  border: 1px solid rgba(14, 157, 151, 0.15);
}

/* ============================================================
   PACKAGES
   ============================================================ */
.package-card {
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid #e5e9f5;
  transition: all 0.35s ease;
}
.package-card:hover { transform: translateY(-6px); box-shadow: 0 24px 56px rgba(13, 27, 110, 0.12); }
.package-card.popular { border-color: var(--teal); }
.package-popular-badge {
  background: linear-gradient(90deg, var(--teal), #0d6b80);
  color: white;
  text-align: center;
  padding: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

/* ============================================================
   BOOKING / CONTACT FORM
   ============================================================ */
.booking-section {
  background: linear-gradient(135deg, var(--navy) 0%, #0d6b80 100%);
}
.form-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 14px 18px;
  color: white;
  width: 100%;
  font-size: 0.9rem;
  transition: border-color 0.3s, background 0.3s;
  font-family: 'Jost', sans-serif;
}
.form-input::placeholder { color: rgba(255, 255, 255, 0.5); }
.form-input:focus {
  outline: none;
  border-color: var(--teal);
  background: rgba(255, 255, 255, 0.15);
}
.form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
  display: block;
  letter-spacing: 0.05em;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer { background: #060d35; }
.footer-link {
  color: #8b95c4;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--teal-light); }

/* ============================================================
   ANIMATIONS
   ============================================================ */

/* Floating hero badge */
.floating-badge { animation: floatBadge 3s ease-in-out infinite; }
@keyframes floatBadge {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

/* Scroll indicator */
.scroll-line { animation: scrollDown 1.8s ease-in-out infinite; }
@keyframes scrollDown {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

/* Pulse ring on CTA */
.pulse-ring { animation: pulseRing 2s ease-in-out infinite; }
@keyframes pulseRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14, 157, 151, 0.4); }
  50%       { box-shadow: 0 0 0 14px rgba(14, 157, 151, 0); }
}

/* Scroll-reveal base states */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}

/* ── Accessibility: Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
