/* =============================================
   BILAL SURGICAL CLINIC — GLOBAL STYLES
   ============================================= */

/* Fonts are loaded via preconnected <link> tags in <head> for faster first paint
   (an @import here would block rendering until the CSS is fetched). */

/* CSS Variables */
:root {
  --navy:       #0B1F3A;
  --navy-mid:   #122848;
  --teal:       #1A9C8A;
  --teal-light: #22BBA6;
  --teal-pale:  #E6F7F5;
  --silver:     #8A9BB0;
  --off-white:  #F5F8FA;
  --white:      #FFFFFF;
  --text-dark:  #0D1B2A;
  --text-mid:   #3D5166;
  --text-light: #6B8095;
  --border:     #D8E4EE;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 12px rgba(11, 31, 58, 0.07);
  --shadow-md: 0 8px 32px rgba(11, 31, 58, 0.12);
  --shadow-lg: 0 20px 60px rgba(11, 31, 58, 0.18);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1160px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Accessible focus outlines (kept visible for keyboard users only) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--teal-light);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 2000;
  background: var(--teal);
  color: var(--white);
  padding: 0.85rem 1.5rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* ===== Urdu bilingual text ===== */
.ur {
  display: block;
  font-family: 'Noto Nastaliq Urdu', serif;
  direction: rtl;
  unicode-bidi: isolate;
  line-height: 2;
  font-weight: 500;
}

/* Muted/secondary variant, used under headings that already carry their own color */
.ur-sub {
  opacity: 0.75;
  font-size: 0.85em;
  margin-top: 0.3em;
}

/* =============================================
   NAVIGATION
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 31, 58, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

.nav-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav-brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.01em;
}

.nav-brand-sub {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--teal-light);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--teal-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-cta {
  background: var(--teal) !important;
  color: var(--white) !important;
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em !important;
  transition: background var(--transition) !important;
}

.nav-cta:hover {
  background: var(--teal-light) !important;
}

.nav-cta::after { display: none !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  -webkit-tap-highlight-color: transparent;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--navy);
  padding: 1.5rem 2rem 2rem;
  flex-direction: column;
  gap: 1.5rem;
  z-index: 999;
  border-top: 1px solid rgba(255,255,255,0.08);
  animation: slideDown 0.25s ease;
}

.mobile-nav a {
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mobile-nav a.active,
.mobile-nav a:hover { color: var(--teal-light); }

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

/* =============================================
   HERO (Shared)
   ============================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--navy);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 80% 50%, rgba(26, 156, 138, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 10% 80%, rgba(26, 156, 138, 0.08) 0%, transparent 60%),
    linear-gradient(145deg, #0B1F3A 0%, #0D2645 50%, #0A1E35 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,156,138,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,156,138,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
  width: 100%;
}

/* =============================================
   PAGE HERO (sub-pages)
   ============================================= */
.page-hero {
  padding: 140px 2rem 80px;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 90% 50%, rgba(26, 156, 138, 0.12) 0%, transparent 60%),
    linear-gradient(145deg, #0B1F3A 0%, #0D2645 100%);
}

.page-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,156,138,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,156,138,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.page-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 1.2rem;
}

.page-label::before {
  content: '';
  width: 24px;
  height: 1.5px;
  background: var(--teal-light);
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.page-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  line-height: 1.75;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--off-white);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  width: 20px;
  height: 1.5px;
  background: var(--teal);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-mid);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 560px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

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

.btn-primary:hover {
  background: var(--teal-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(26, 156, 138, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.35);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.6);
}

/* Divider */
.divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), transparent);
  margin: 1.5rem 0;
}

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--teal-pale);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--teal);
  font-size: 1.3rem;
}

/* =============================================
   STAT BADGE
   ============================================= */
.stat-badge {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  text-align: center;
  backdrop-filter: blur(4px);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--teal-light);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

/* =============================================
   TAG
   ============================================= */
.tag {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  background: var(--teal-pale);
  color: var(--teal);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* =============================================
   FORMS
   ============================================= */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mid);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(26, 156, 138, 0.12);
}

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

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.65);
  padding: 64px 0 28px;
}

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

.footer-brand-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.3rem;
}

.footer-brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 1.2rem;
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.75;
  max-width: 300px;
}

.footer-heading {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
}

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

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.88rem;
}

.footer-contact-item .icon {
  color: var(--teal-light);
  font-size: 1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

/* =============================================
   ANIMATIONS
   ============================================= */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }

/* =============================================
   FLOATING ACTION BUTTONS (Call / WhatsApp)
   ============================================= */
.fab-stack {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.fab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 52px;
  border-radius: 100px;
  padding: 0 1.1rem;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}

.fab:hover {
  transform: translateY(-2px) scale(1.02);
}

.fab-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab-call { background: var(--teal); }
.fab-whatsapp { background: #25D366; }

.fab-label {
  display: inline-block;
}

/* Collapse to icon-only circles on small screens to avoid covering content */
@media (max-width: 640px) {
  .fab-stack {
    right: 1rem;
    bottom: 1rem;
    gap: 0.65rem;
  }

  .fab {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .fab-label { display: none; }
}

/* =============================================
   BACK TO TOP
   ============================================= */
.back-to-top {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 1500;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition), background var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover { background: var(--teal); }

@media (max-width: 640px) {
  .back-to-top { left: 1rem; bottom: 1rem; width: 40px; height: 40px; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-grid > *:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .section { padding: 70px 0; }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
