/* ================================================================
   VISWAS HOSPITAL — COMPREHENSIVE MOBILE RESPONSIVE FIXES
   Fixes: button text wrapping, image cropping, form layout,
          hero sections, counters, cards, footer, and overflow.
   No design changes — only layout, spacing, and responsive fixes.
   ================================================================ */

/* --- GLOBAL PREMIUM HERO BUTTON STYLE --- */
.hero-btn {
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(135deg, #9d2a6a 0%, #c026d3 100%) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  box-shadow: 0 20px 40px rgba(157,42,106,0.3), inset 0 1px 1px rgba(255,255,255,0.3) !important;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1rem !important;
  color: white !important;
  padding: 1.25rem 3rem !important;
  border-radius: 3rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.15em !important;
  font-size: 14px !important;
}

.hero-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: rotate(45deg);
  animation: shimmer 4s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-150%) rotate(45deg); }
  100% { transform: translateX(150%) rotate(45deg); }
}

.hero-btn:hover {
  transform: translateY(-5px) scale(1.02) !important;
  box-shadow: 0 25px 50px rgba(157,42,106,0.5) !important;
  background: linear-gradient(135deg, #861f59 0%, #9d2a6a 100%) !important;
}

.hero-btn:active {
  transform: scale(0.98) !important;
}

/* ---------------------------------------------------------------
   CRITICAL GLOBAL FIX: bg-clip-text breaking on mobile browsers
   Problem: text-transparent + bg-clip-text shows a dark navy 
   block behind text on Android/iOS WebKit when unsupported.
   Fix: Override ALL gradient text spans to solid brand pink #9d2a6a
   This applies on ALL screen sizes for reliability.
--------------------------------------------------------------- */
span.text-transparent,
h1 span.text-transparent,
h2 span.text-transparent,
h3 span.text-transparent,
h4 span.text-transparent,
.text-gradient,
[class*="bg-clip-text"],
[class*="text-transparent"][class*="bg-gradient"] {
  /* Force solid dark pink instead of broken transparent+clip */
  color: #9d2a6a !important;
  -webkit-text-fill-color: #9d2a6a !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  /* Ensure no background color box shows */
  background-color: transparent !important;
  padding-bottom: 0.1em;
  line-height: 1.3 !important;
  display: inline !important;
  overflow: visible !important;
}

/* Also fix the h2 line-height so the span text doesn't get visually cut */
#specialized-services h2,
section h2,
section h1 {
  line-height: 1.25 !important;
  overflow: visible !important;
}



/* ---------------------------------------------------------------
   CRITICAL FIX: "Specialized Medical Care" cards — image cut
   Cards have fixed h-[320px] which is too tall on mobile.
   On mobile, reduce to a proportional height with full image.
--------------------------------------------------------------- */
@media (max-width: 767px) {
  #specialized-services .grid .relative.h-\[320px\] {
    height: auto !important;
    min-height: 220px !important;
  }
  #specialized-services .grid .relative.h-\[320px\] img {
    position: relative !important;
    width: 100% !important;
    height: 240px !important;
    object-fit: cover !important;
    object-position: center top !important;
  }
  /* Keep overlay visible */
  #specialized-services .grid .absolute.inset-0 {
    position: absolute !important;
  }
  /* Fix section margin-bottom so heading has room */
  #specialized-services .mb-16 {
    margin-bottom: 1.5rem !important;
  }
}



/* ---------------------------------------------------------------
   GLOBAL SAFETY RAILS (All Screens)
--------------------------------------------------------------- */
html, body {
  overflow-x: hidden !important;
  max-width: 100% !important;
}
img {
  max-width: 100% !important;
  height: auto;
}
* {
  box-sizing: border-box;
}

/* ---------------------------------------------------------------
   DESKTOP HERO RESTORE (768px and above)
   On desktop, restore the original premium left-to-right gradient
   so the hero content text area stays clear and the image shows
   beautifully on the right side.
--------------------------------------------------------------- */
@media (min-width: 768px) {
  /* Restore original side gradient on desktop hero slides */
  .swiper-slide .absolute.inset-0[style*="gradient"] {
    background: linear-gradient(90deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.80) 40%, rgba(255,255,255,0.50) 65%, rgba(255,255,255,0.10) 100%) !important;
  }
  /* Restore navbar top spacing on desktop */
  nav#navbar {
    top: 1.5rem !important;
  }
}

/* ---------------------------------------------------------------
   TABLET FIXES (768px – 1023px)
--------------------------------------------------------------- */
@media (max-width: 1023px) {
  /* Appointment section layout */
  .lg\:flex-row {
    flex-direction: column !important;
  }
  .lg\:w-2\/5, .lg\:w-3\/5 {
    width: 100% !important;
  }

  /* Hero slider adjustments */
  .lg\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  /* Doctor section image height */
  .h-\[600px\] {
    height: 380px !important;
  }

  /* Reduce section padding */
  .py-32 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }
  .py-24 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* Footer grid */
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Appointment card */
  .rounded-\[5rem\] {
    border-radius: 2rem !important;
  }
}

/* ---------------------------------------------------------------
   MOBILE FIXES (max 767px)
--------------------------------------------------------------- */
@media (max-width: 767px) {

  /* --- TYPOGRAPHY SCALING --- */
  .text-7xl { font-size: 2.5rem !important; line-height: 1.1 !important; }
  .text-6xl { font-size: 2.25rem !important; line-height: 1.1 !important; }
  .text-5xl { font-size: 2rem !important; line-height: 1.15 !important; }
  .text-4xl { font-size: 1.75rem !important; line-height: 1.2 !important; }

  /* --- HERO SECTION --- */
  /* Make hero slides more compact on mobile */
  .swiper-slide,
  .min-h-\[90vh\],
  .lg\:min-h-\[100vh\] {
    min-height: 75vh !important;
  }

  /* Hero text content padding */
  .pt-28 { padding-top: 5.5rem !important; }
  .pb-16 { padding-bottom: 2rem !important; }

  /* On mobile hero: the overlay is lighter so text must be clearly dark/readable */
  /* Hero h1 stays navy, description stays slate */
  .swiper-slide h1 {
    text-shadow: 0 2px 15px rgba(255,255,255,1), 0 0 30px rgba(255,255,255,0.5) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em !important;
  }
  .swiper-slide p {
    color: #334155 !important; /* Darker slate-700 for better contrast */
    text-shadow: 0 1px 10px rgba(255,255,255,1) !important;
    font-weight: 600 !important;
  }
  /* Add a subtle highlight effect to the gradient text */
  .text-gradient {
    position: relative;
    z-index: 1;
  }
  .text-gradient::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 100%;
    height: 12px;
    background: #9d2a6a;
    opacity: 0.1;
    z-index: -1;
    border-radius: 4px;
  }

  /* Space between hero content items */
  .swiper-slide .space-y-12 {
    gap: 1.25rem !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .swiper-slide .space-y-12 > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /* --- PREMIUM HERO BUTTONS --- */
  .hero-btn {
    display: none !important; /* Hidden on Mobile */
  }

  /* Glass backdrop for hero text on mobile - optimized for transparency */
  .swiper-slide .space-y-12 {
    background: rgba(255,255,255,0.05) !important; /* Extremely subtle */
    backdrop-filter: blur(4px) !important; /* Reduced blur */
    -webkit-backdrop-filter: blur(4px) !important;
    padding: 1rem !important;
    border-radius: 1.5rem !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    box-shadow: none !important; /* Remove shadow to clear image */
    margin-bottom: 2rem !important;
  }

  /* --- SECTION PADDING --- */
  .py-32 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
  .py-24 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
  .py-20 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
  .p-12, .p-16, .p-24 { padding: 1.5rem !important; }
  .px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }

  /* --- GRIDS: Stack to single column on mobile --- */
  .grid.md\:grid-cols-2,
  .grid.md\:grid-cols-3,
  .grid.md\:grid-cols-4,
  .grid.lg\:grid-cols-2,
  .grid.lg\:grid-cols-4 {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
  
  /* Exceptions: keep 2-col for smaller card grids */
  .grid.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  /* --- DOCTOR SECTION --- */
  /* Reduce the doctor card image height */
  .h-\[600px\] {
    height: 300px !important;
    object-fit: cover !important;
    object-position: top !important;
  }
  /* Remove the huge border on doctor image card */
  .border-\[12px\] {
    border-width: 4px !important;
  }
  /* Doctor info card padding */
  .p-12.md\:p-16 {
    padding: 1.25rem !important;
  }

  /* --- FIX "BOOK DOCTOR CONSULTATION" BUTTON --- */
  /* This is the wide button with tracking-[0.3em] in the doctor section */
  a.w-full[class*="tracking-\[0\.3em\]"],
  button.w-full[class*="tracking-\[0\.3em\]"],
  a[class*="py-6"][class*="rounded-3xl"][class*="tracking"],
  button[class*="py-6"][class*="rounded-3xl"][class*="tracking"] {
    letter-spacing: 0.08em !important;
    font-size: 11px !important;
    padding: 0.875rem 1rem !important;
    white-space: normal !important;
    line-height: 1.5 !important;
    gap: 0.5rem !important;
  }

  /* --- HOSPITAL STATS / FACADE --- */
  /* Fix the huge image card that overflows on mobile */
  .h-\[550px\] {
    height: 320px !important;
  }
  .h-\[750px\] {
    height: 420px !important;
  }
  /* Stats overlay — make it 2x2 on mobile */
  .grid.grid-cols-2.md\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
  /* Rounded corners on mobile stats card */
  .rounded-\[3rem\].md\:rounded-\[5rem\] {
    border-radius: 1.25rem !important;
  }

  /* Stats number sizes */
  .text-4xl.md\:text-5xl {
    font-size: 1.875rem !important;
  }

  /* --- APPOINTMENT SECTION --- */
  /* Collapse the horizontal appointment card */
  .flex.flex-col.lg\:flex-row {
    flex-direction: column !important;
  }
  .lg\:w-2\/5, .lg\:w-3\/5 {
    width: 100% !important;
  }
  /* Left pink panel */
  .lg\:p-24 { padding: 1.5rem !important; }
  /* Phone numbers */
  .text-2xl { font-size: 1.125rem !important; }

  /* Form fields */
  .grid.md\:grid-cols-2.gap-8 {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  input, select, textarea {
    font-size: 16px !important; /* Prevents iOS zoom on focus */
    padding: 0.875rem 1rem !important;
    border-radius: 1rem !important;
  }
  select {
    padding-right: 2.5rem !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }
  /* "Confirm Appointment Request" button */
  .md\:col-span-2 {
    grid-column: span 1 / span 1 !important;
  }
  button.w-full.bg-brand-500,
  button[class*="py-6"][class*="rounded-3xl"] {
    letter-spacing: 0.08em !important;
    font-size: 12px !important;
    padding: 1rem !important;
    white-space: normal !important;
    line-height: 1.5 !important;
  }

  /* --- CARDS --- */
  /* Service / facility image cards */
  .h-\[320px\] { height: 200px !important; }
  .h-\[300px\] { height: 200px !important; }
  .h-\[240px\] { height: 180px !important; }
  
  /* Premium cards padding */
  .p-8.md\:p-10 { padding: 1.25rem !important; }
  .rounded-\[3rem\] { border-radius: 1.25rem !important; }
  .rounded-\[4rem\] { border-radius: 1.5rem !important; }

  /* --- DOCTOR SPECIALTY CARDS (2-col grid in doctor section) --- */
  .grid.grid-cols-2.gap-4 > div {
    padding: 0.875rem !important;
    border-radius: 1rem !important;
  }

  /* --- NAVBAR --- */
  /* Floating pill navbar — standard premium look */
  nav#navbar .glass {
    transition: all 0.3s ease !important;
  }
  /* Logo size in navbar */
  nav#navbar img {
    height: 2.5rem !important;
  }

  /* --- FOOTER --- */
  .lg\:grid-cols-4.gap-12 {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  footer .grid.lg\:grid-cols-4 {
    grid-template-columns: 1fr !important;
  }
  footer .lg\:col-span-1 {
    width: 100% !important;
  }
  footer img {
    height: 3rem !important;
  }
  footer .grid.grid-cols-2.gap-x-4 {
    grid-template-columns: 1fr 1fr !important;
  }
  footer .pt-24 {
    padding-top: 3rem !important;
  }
  footer .pb-12 {
    padding-bottom: 2rem !important;
  }

  /* --- FLOATING WHATSAPP BUTTON --- */
  /* Move up from bottom-8 so it doesn't overlap content */
  .fixed.bottom-8.right-8 {
    bottom: 1.25rem !important;
    right: 1.25rem !important;
  }
  .w-14.h-14 {
    width: 3rem !important;
    height: 3rem !important;
    font-size: 1.25rem !important;
  }

  /* --- MISC OVERFLOW FIXES --- */
  /* Remove blurred circles that can cause horizontal scroll */
  .blur-\[80px\],
  .blur-\[100px\],
  .blur-\[120px\],
  .blur-\[150px\] {
    display: none !important;
  }
  
  /* Prevent any absolute positioned decorative elements from overflowing */
  .absolute.-bottom-10,
  .absolute.-top-10,
  .absolute.-left-10,
  .absolute.-right-10 {
    display: none !important;
  }
}

/* ---------------------------------------------------------------
   SMALL MOBILE FIXES (max 480px)
--------------------------------------------------------------- */
@media (max-width: 480px) {
  /* Even tighter heading sizes */
  .text-5xl, .text-6xl, .text-7xl {
    font-size: 1.875rem !important;
  }
  .text-4xl { font-size: 1.5rem !important; }

  /* Hero min-height */
  .min-h-\[90vh\], .swiper-slide { min-height: 70vh !important; }

  /* Doctor section specialty cards — stack to 1 column */
  .grid.grid-cols-2.gap-4 {
    grid-template-columns: 1fr !important;
  }

  /* Stats numbers */
  .text-4xl.md\:text-5xl { font-size: 1.5rem !important; }

  /* Mobile text badge tracking */
  [class*="tracking-\[0\.4em\]"],
  [class*="tracking-\[0\.3em\]"],
  [class*="tracking-widest"] {
    letter-spacing: 0.06em !important;
  }

  /* Reduce container padding */
  .max-w-7xl.mx-auto.px-6 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Stats overlay padding */
  .py-10.md\:py-16 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
  .px-10 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
}

/* ---------------------------------------------------------------
   VERY SMALL MOBILE (max 360px)
--------------------------------------------------------------- */
@media (max-width: 360px) {
  .text-4xl, .text-5xl, .text-6xl, .text-7xl {
    font-size: 1.5rem !important;
    line-height: 1.15 !important;
  }
  input, select { font-size: 14px !important; }
  nav#navbar img { height: 2rem !important; }
}



