/* ==========================================================================
   Sri Chakra Multispeciality Hospital - Header Stylesheet
   Strictly matched with header design:
   - Top Cyan Notification Bar with Rosette & User Icons
   - Soft ice-blue tinted navigation background (#f1f8fd)
   - Menu items: Home, About Us, Vascular, Gastro, Facilities (Dropdown), 
     Emergency Services, Insurance, Contact Us
   - Compact desktop spacing so all 8 items and Appointment Button fit cleanly without overflow
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500;600;700&display=swap');
@import url('../css/animations.css');

:root {
  --primary-cyan: #00a8ec;
  --primary-cyan-hover: #0096d6;
  --dark-navy-circle: #1f2c3f;
  --header-bg: #f2f8fd;
  --nav-text-color: #2b3548;
  --font-heading: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
  position: relative;
}

body.menu-open {
  overflow: hidden;
}

#header-container {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 99999;
  width: 100%;
}

.site-header {
  width: 100%;
  background-color: var(--header-bg);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 99999;
  font-family: var(--font-body);
  border-bottom: 1px solid rgba(0, 168, 236, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.scrolled,
#header-container.scrolled .site-header {
  background-color: rgba(242, 248, 253, 0.98);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.09);
  border-bottom-color: rgba(0, 168, 236, 0.2);
}

/* ---------------- Top Cyan Bar ---------------- */
.top-bar-container {
  width: 100%;
  padding: 0 16px;
  background: transparent;
}

.top-bar {
  max-width: 1440px;
  margin: 0 auto;
  background-color: var(--primary-cyan);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 28px;
  border-radius: 0 0 16px 16px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 14px rgba(0, 168, 236, 0.22);
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.top-text {
  font-weight: 600;
  color: #ffffff;
}

.top-text a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.top-text a:hover {
  text-decoration: underline;
  opacity: 0.92;
}

/* ---------------- Main Navigation ---------------- */
.main-nav-container {
  width: 100%;
  background: transparent;
}

.main-nav {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Brand / Logo */
.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Navigation Menu */
.nav-menu {
  display: flex;
  align-items: center;
  flex-grow: 1;
  justify-content: space-between;
  margin-left: 20px;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 24px;
  margin: 0 auto;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 24px;
  font-weight: 600;
  color: var(--nav-text-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 2px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-cyan);
}

.dropdown-chevron {
  transition: transform 0.2s ease;
}

.nav-item.dropdown:hover .dropdown-chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
  list-style: none;
  padding: 8px 0;
  margin: 6px 0 0 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 100;
  border: 1px solid #e2e8f0;
}

.nav-item.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  padding: 8px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.dropdown-item:hover {
  background: #f0f9ff;
  color: var(--primary-cyan);
  padding-left: 22px;
}

/* ---------------- Book Appointment Pill Button ---------------- */
.nav-action {
  flex-shrink: 0;
  margin-left: 6px;
}

.btn-appointment {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--primary-cyan);
  color: #ffffff;
  padding: 6px 8px 6px 18px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 168, 236, 0.32);
  white-space: nowrap;
}

.btn-arrow-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--dark-navy-circle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.btn-appointment:hover {
  background-color: var(--primary-cyan-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 168, 236, 0.42);
}

.btn-appointment:hover .btn-arrow-circle {
  transform: translateX(2px);
  background-color: #121c2a;
}

/* ---------------- Mobile Hamburger ---------------- */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background-color: #1e293b;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.open span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.mobile-menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.open span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* ---------------- Mobile Navigation Backdrop ---------------- */
.nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 999998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.nav-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ---------------- Responsive Styles ---------------- */
@media (max-width: 1360px) {
  .nav-list {
    gap: 12px;
  }

  .nav-link {
    font-size: 13.5px;
  }

  .btn-appointment {
    font-size: 13px;
    padding: 6px 8px 6px 14px;
    gap: 8px;
  }

  .main-nav {
    padding: 10px 16px;
    gap: 12px;
  }
}

@media (max-width: 1200px) {
  .nav-list {
    gap: 8px;
  }

  .nav-link {
    font-size: 12.8px;
    padding: 6px 1px;
  }

  .btn-appointment {
    font-size: 12px;
    padding: 5px 6px 5px 12px;
    gap: 6px;
  }

  .btn-arrow-circle {
    width: 24px;
    height: 24px;
  }
}

/* ---------------- Mobile Drawer Specific Elements ---------------- */
.nav-drawer-header,
.nav-drawer-footer {
  display: none;
}

@media (max-width: 1120px) {
  .mobile-menu-toggle {
    display: flex;
    position: relative;
    z-index: 1000001;
  }

  .nav-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background-color: rgba(15, 23, 42, 0.55) !important;
    z-index: 999998 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    pointer-events: none !important;
  }

  .nav-backdrop.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .nav-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 310px !important;
    max-width: 86vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: #ffffff !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    padding: 20px 20px 28px 20px !important;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.22) !important;
    transform: translateX(105%) !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    z-index: 999999 !important;
    margin-left: 0 !important;
  }

  .nav-menu.active {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* Drawer Header */
  .nav-drawer-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-bottom: 14px;
    margin-bottom: 12px;
    border-bottom: 1.5px solid #f1f5f9;
  }

  .drawer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .drawer-badge-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--primary-cyan);
    box-shadow: 0 0 0 3px rgba(0, 168, 236, 0.2);
  }

  .drawer-title {
    font-family: var(--font-heading);
    font-size: 15.5px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.2px;
  }

  .drawer-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #f1f5f9;
    border: none;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .drawer-close-btn:hover {
    background-color: #e2e8f0;
    color: #0f172a;
    transform: scale(1.05);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 2px;
    margin: 0;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 11px 8px;
    font-size: 14.5px;
    font-weight: 600;
    color: #334155;
    border-bottom: 1px solid #f8fafc;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .nav-link:hover,
  .nav-link.active {
    background-color: #f0f9ff;
    color: var(--primary-cyan);
  }

  /* Submenu Dropdown in Mobile/Tablet */
  .dropdown-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    border-left: 3.5px solid var(--primary-cyan) !important;
    background-color: #f6fbfe !important;
    border-radius: 8px !important;
    padding: 6px 0 !important;
    margin: 4px 0 6px 6px !important;
    display: none !important;
    width: calc(100% - 6px) !important;
    min-width: 0 !important;
  }

  .nav-item.dropdown:hover .dropdown-menu {
    display: none !important;
  }

  .nav-item.dropdown.mobile-open .dropdown-menu,
  .nav-item.dropdown.mobile-open:hover .dropdown-menu {
    display: block !important;
  }

  .nav-item.dropdown.mobile-open .dropdown-chevron {
    transform: rotate(180deg) !important;
  }

  .dropdown-item {
    padding: 9px 16px;
    font-size: 13.8px;
    color: #334155;
    display: block;
    border-bottom: 1px solid rgba(0, 168, 236, 0.05);
  }

  .dropdown-item:last-child {
    border-bottom: none;
  }

  .dropdown-item:hover,
  .dropdown-item.active {
    background: #eaf5fc;
    color: var(--primary-cyan);
    padding-left: 20px;
  }

  .nav-action {
    margin-left: 0;
    margin-top: 18px;
    width: 100%;
  }

  .btn-appointment {
    width: 100%;
    justify-content: space-between;
    padding: 10px 14px 10px 20px;
    font-size: 13.5px;
  }

  /* Mobile Drawer Footer */
  .nav-drawer-footer {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    font-size: 12.5px;
    color: #64748b;
  }

  .drawer-contact-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .drawer-contact-label {
    font-weight: 500;
  }

  .drawer-contact-link {
    color: var(--primary-cyan);
    font-weight: 700;
    text-decoration: none;
  }

  .top-bar {
    padding: 8px 18px !important;
    font-size: 13.5px !important;
    flex-direction: column !important;
  }
}

@media (max-width: 768px) {
  .top-bar-container {
    padding: 0 8px;
  }

  .top-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    border-radius: 0 0 12px 12px;
    font-size: 11.5px;
    gap: 4px;
  }

  .top-bar-item {
    gap: 5px;
  }

  .top-icon svg {
    width: 14px;
    height: 14px;
  }

  .top-text {
    font-size: 11.5px;
    white-space: nowrap;
  }

  .main-nav {
    padding: 10px 14px;
  }

  .nav-logo {
    height: 40px;
  }
}

@media (max-width: 420px) {
  .top-bar {
    font-size: 10.5px;
    padding: 5px 8px;
  }

  .top-text {
    font-size: 10.5px;
  }

  .top-icon svg {
    width: 12px;
    height: 12px;
  }
}

/* ==========================================================================
   Global Smooth Scroll & Scroll Reveal Animation Effects
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

/* Base Scroll Reveal Animation (Fade & Slide Up) */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-reveal.revealed {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Slide From Left */
.reveal-left {
  opacity: 0;
  transform: translateX(-35px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left.revealed {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* Slide From Right */
.reveal-right {
  opacity: 0;
  transform: translateX(35px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right.revealed {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

/* Subtle Zoom / Scale In */
.reveal-zoom {
  opacity: 0;
  transform: scale(0.93);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-zoom.revealed {
  opacity: 1 !important;
  transform: scale(1) !important;
}

/* Staggered Child Delays for Grids & Lists */
.reveal-delay-1 {
  transition-delay: 0.08s !important;
}

.reveal-delay-2 {
  transition-delay: 0.16s !important;
}

.reveal-delay-3 {
  transition-delay: 0.24s !important;
}

.reveal-delay-4 {
  transition-delay: 0.32s !important;
}

.reveal-delay-5 {
  transition-delay: 0.40s !important;
}

.reveal-delay-6 {
  transition-delay: 0.48s !important;
}

.reveal-delay-7 {
  transition-delay: 0.56s !important;
}

.reveal-delay-8 {
  transition-delay: 0.64s !important;
}

/* Accessibility fallback */
@media (prefers-reduced-motion: reduce) {

  .scroll-reveal,
  .reveal-left,
  .reveal-right,
  .reveal-zoom {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   Floating Bottom-Right Back to Top Arrow Button
   ========================================================================== */
.floating-back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00a8ec 0%, #007bbd 100%);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0, 168, 236, 0.45);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.85);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

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

.floating-back-to-top:hover {
  background: linear-gradient(135deg, #00bdfb 0%, #0092cf 100%);
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 30px rgba(0, 168, 236, 0.65);
}

.floating-back-to-top:active {
  transform: translateY(-1px) scale(0.96);
}

.floating-back-to-top svg {
  stroke-width: 2.6;
  stroke: #ffffff;
  transition: transform 0.25s ease;
}

.floating-back-to-top:hover svg {
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .floating-back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   Hospital Page Preloader Loading Animation
   ========================================================================== */
.page-preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s ease;
  overflow: hidden;
}

.page-preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 30px;
  max-width: 420px;
  animation: preloaderContentFade 0.8s ease;
}

@keyframes preloaderContentFade {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.preloader-logo-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.preloader-pulse-ring {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  border: 2.5px solid rgba(0, 168, 236, 0.35);
  animation: pulseRing 2.4s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.85);
    opacity: 0.85;
  }

  50% {
    transform: scale(1.18);
    opacity: 0.15;
  }

  100% {
    transform: scale(0.85);
    opacity: 0.85;
  }
}

.preloader-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  animation: preloaderBreathing 2.4s ease-in-out infinite alternate;
}

@keyframes preloaderBreathing {
  0% {
    transform: scale(0.96);
  }

  100% {
    transform: scale(1.04);
  }
}

/* ECG Heartbeat Line Animation */
.preloader-ecg {
  width: 140px;
  height: 38px;
  margin-bottom: 16px;
}

.ecg-svg {
  width: 100%;
  height: 100%;
}

.ecg-path {
  fill: none;
  stroke: #00a8ec;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: ecgDash 2.2s ease-in-out infinite;
}

@keyframes ecgDash {
  0% {
    stroke-dashoffset: 220;
  }

  50% {
    stroke-dashoffset: 0;
  }

  100% {
    stroke-dashoffset: -220;
  }
}

.preloader-text-wrap {
  margin-bottom: 20px;
}

.preloader-title {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.preloader-title .highlight-cyan {
  color: #00a8ec;
}

.preloader-subtitle {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  color: #64748b;
  letter-spacing: 0.2px;
}

/* Progress Bar */
.preloader-progress-bar {
  width: 180px;
  height: 4px;
  background-color: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.preloader-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 45%;
  background: linear-gradient(90deg, #00a8ec, #00d2ff);
  border-radius: 10px;
  animation: progressIndeterminate 2.2s infinite ease-in-out;
}

@keyframes progressIndeterminate {
  0% {
    left: -45%;
    width: 45%;
  }

  50% {
    left: 30%;
    width: 60%;
  }

  100% {
    left: 100%;
    width: 45%;
  }
}