/* Reset and Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  background-color: #F9F7F7;
}


/* Header Top */
.header-top {
  background: #60EFB8;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: bold;
  color: #000;
}

/* Main Header */
.main-header {
  background: #90AEFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 1rem 1rem;
  width: 100%;
  top: 0;
  z-index: 999;
}

.main-header .logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.main-header .logo-section img {
  height: 100px;
  width: 80px;
  transition: transform 0.3s ease;
  border-radius: 15px;
}

.main-header .logo-section img:hover {
  transform: scale(1.2);
}

.main-header .right-text {
  font-weight: bold;
  font-size: 1.2rem;
  color: #ffffff;
  text-align: right;
}

.hospital-name {
  color: white !important;
  font-weight: bold;
  font-size: 1.5rem;
  line-height: 1.5;
}

/* Full-screen overlay */
#page-preloader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease, visibility 1s ease;
}

#page-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-logo {
  width: 140px;
  margin-bottom: 20px;
  animation: fadeInUp 1.2s ease-out both;
}

.loader-dots {
  display: flex;
  gap: 12px;
}

.loader-dots span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  animation: wave 1s infinite ease-in-out;
}

/* Individual colors and animation delays */
  .loader-dots span:nth-child(1) { background: #e74c3c; animation-delay: 0s; }
  .loader-dots span:nth-child(2) { background: #f1c40f; animation-delay: 0.15s; }
  .loader-dots span:nth-child(3) { background: #2ecc71; animation-delay: 0.3s; }
  .loader-dots span:nth-child(4) { background: #3498db; animation-delay: 0.45s; }
  .loader-dots span:nth-child(5) { background: #9b59b6; animation-delay: 0.6s; }

@keyframes wave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
  }

/* Optional: Smooth fade-in logo keyframe */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-out .loader-content {
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

/* Autoplay */
#video-preloader {
  position: fixed;
  top: 0; left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
  z-index: 9999;
  transition: opacity 1s ease;
}

.fade-out {
  opacity: 0;
  visibility: hidden;
}

video {
  width: 100%;
  height: 80%;
}

#video-overlay button {
  margin: 0 5px;
  padding: 8px 12px;
  cursor: pointer;
}

/* Mute/unmute and close positioning */
#sound-toggle {
  top: 20px;
  right: 100px;
}

#fullscreen-toggle {
  top: 20px;
  right: 20px;
}

#close-video {
  top: 20px;
  left: 20px;
}


/* Homepage Hospital Image */
.homepage-hospital-img {
  display: block;
  margin: 2rem auto;
  width: 90%;
  max-width: 1000px;
  border-radius: 25px;
  border: 6px solid #000000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  /* Animation */
  opacity: 0;
  animation: homepageFadeZoom 1.5s ease-out forwards;
}

/* Hover Scale */
.homepage-hospital-img:hover {
  transform: scale(1.03); 
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

/* Keyframes for Fade + Scale In */
@keyframes homepageFadeZoom {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}


/* Hospital Photo - About Us page */
.hospital-photo {
  text-align: center;
  margin: 2rem auto;
}

.hospital-img {
  max-width: 90%;
  width: 500px;
  border-radius: 30px;
  border: 8px solid #000000;
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hospital-img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

/* PATIENTS - Vision & Mission */
.acronym-badge {
  display: inline-block;
  background: #1E3A8A;
  color: white;
  font-weight: bold;
  border-radius: 8px;
  padding: 2px 8px;
  margin-right: 10px;
  font-size: 0.95rem;
}

/* Navigation Bar */
nav {
  background: #CEFC86;
  padding: 0;
  border-bottom: 1px solid #ccc;
  width: 100%;
  height: 60px;
  position: relative;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: top 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

nav.fixed {
  position: fixed;
  top: 0;
  left: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  animation: slideDown 0.4s ease forwards;
}

@keyframes slideDown {
  from {
    top: -60px;
    opacity: 0;
  }
  to {
    top: 0;
    opacity: 1;
  }
}

@keyframes fadeInTop {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

nav.fixed {
  animation: fadeInTop 0.4s ease forwards;
}


body.nav-fixed {
  padding-top: 60px;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

nav ul li {
  position: relative;
}

nav ul li > a {
  color: #0a0a0a;
  text-decoration: none;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

nav ul li > a.has-dropdown::after {
  content: ' ▼';
  font-size: 0.6rem;
  margin-left: 4px;
}

/* Dropdown Menus */
nav ul li ul {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  background: #90AEFF;
  z-index: 999;
  border-radius: 12px;
  padding: 0.3rem 0;
}

nav ul li:hover ul {
  display: block;
}

nav ul li ul li a {
  padding: 0.6rem 1rem;
  color: #0a0a0a;
  text-decoration: none;
  display: block;
  transition: background-color 0.3s ease, color 0.3s ease;
  border-radius: 8px;
  width: 250px;
}

nav ul li > a:hover,
nav ul li ul li a:hover {
  background-color: #d9fca5;
  color: #000;
}

/* Common Dropdown Menu */
.dropdown-menu {
  background-color: #90AEFF !important;
  border-radius: 12px !important;
  padding: 0.3rem;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  max-width: 220px;
  overflow: hidden !important;
}

/* Departments Dropdown (Desktop: 2 Columns) */
.dropdown-menu.departments-dropdown {
  min-width: 420px !important;
  max-width: 500px !important;
  column-count: 2;
  column-gap: 1rem;
  transform: translateX(-20%);
  left: 0 !important;
  padding: 1rem;
  border-radius: 20px;
  background-color: #90AEFF;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Department Dropdown Links */
.departments-dropdown li a {
  display: block;
  padding: 0.6rem 1rem;
  color: #111;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.3s, color 0.3s;
}

.departments-dropdown li a:hover {
  background-color: #d9fca5;
  color: #000;
}

/* Department Layout (Desktop) */
.wrap-text-dropdown {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  gap: 0.5rem;
}

.wrap-text-dropdown li {
  flex: 0 0 200px;
}

.wrap-text-dropdown li a {
  white-space: normal;
  word-wrap: break-word;
  display: block;
  padding: 0.5rem 1rem;
}


/* Hamburger */
.hamburger {
  display: none;
  font-size: 1.4rem;
  color: #000;
  position: fixed;
  top: 15px;
  right: 20px;
  z-index: 10001;
  background: #CEFC86;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
}


/* Section Containers */
.main-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem;
  max-width: 1200px;
  margin: auto;
}

.left-content {
  flex: 1 1 60%;
  text-align: justify;
}

.right-content {
  flex: 1 1 35%;
  background: #CEFC86;
  padding: 1rem;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  max-height: 500px;
  overflow: hidden;
}

/* Content Box */
.content-box {
  background: #f4f9ff;
  padding: 30px;
  border-radius: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  max-width: 1000px;
  width: 100%;
  margin: 2rem auto;
  text-align: center;
}

/* Section Headings */
.section-heading-left {
  text-align: center;
  color: #1E3A8A;
  margin-bottom: 1rem;
}

.section-heading-center {
  text-align: center;
  font-size: 2rem;
  margin: 2rem 0 1rem;
  font-weight: bold;
  color: #1E3A8A;
}

/* Lists */
.welcome-list,
.news-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 1rem;
  text-align: left;
}

.welcome-list li,
.news-list li {
  margin-bottom: 0.6rem;
  line-height: 1.6;
  color: #333;
}

/* Map */
.map-container {
  width: 100%;
  max-width: 1400px;
  margin: 2rem auto 3rem;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: 0;
  display: block;
}

/* Global justify for main content */
:is(p, li, div, section, article, blockquote) {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* Departments */
.content-box {
  background: #f4f9ff;
  padding: 30px;
  border-radius: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  max-width: 1000px;
  margin: 2rem auto;
}

/* Table styling */
.styled-table,
.table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

/* Center all cells by default */
.styled-table th,
.styled-table td,
.table th,
.table td {
  border: 1px solid #ddd;
  padding: 0.6rem;
  text-align: center;
  vertical-align: middle;
}

/* Left-align only the Name column cells */
.styled-table td:nth-child(2),
.table td:nth-child(2) {
  text-align: left;
}

/* Optional: Caption centered */
.styled-table caption,
.table caption {
  caption-side: top;
  text-align: center;
  font-weight: bold;
  margin-bottom: 2rem;
}

/* Header styles */
.styled-table thead th,
.table thead th {
  background-color: #1E3A8A;
  color: white;
}

/* Zebra striping */
.styled-table tbody tr:nth-child(odd),
.table tbody tr:nth-child(odd) {
  background-color: #f9f9f9;
}

/* Faculty photo styling */
.faculty-photo {
  width: 100px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
}

/* Paragraphs and lists */
.department ul {
  list-style: disc inside;
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.department li {
  margin-bottom: 1rem;
}


/* Footer container */
footer {
  background: #CEFC86;
  color: #000;
  width: 100%;
  margin: 0 auto;
  z-index: 1;
  text-align: center;
  padding: 1.5rem 0;
}

footer p,
footer .social-icons {
  display: block;       
  margin:0.25rem auto;  
  text-align: center;
}

footer .social-icons a {
  display: inline-block; 
  margin: 0 12px;
  font-size: 1.5rem;
  color: #000;
  transition: transform 0.2s ease-in-out;
}

footer .social-icons a:hover {
  animation: bounce 0.6s;
  color: #1E3A8A;
}

.footer-text {
  text-align: center;
}

/* Bounce animation */
@keyframes bounce {
  0% { transform: translateY(0); }
  30% { transform: translateY(-8px); }
  60% { transform: translateY(4px); }
  100% { transform: translateY(0); }
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background: #0077b6;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 1000;
  display: none;
  transition: opacity 0.3s ease;
}


/* Responsive */
@media (max-width: 768px) {
  .main-section {
    padding: 1rem;
  }
  .hospital-name {
    font-size: 1.2rem;
    text-align: left;
  }
  .main-header .logo-section img {
    height: 60px;
    width: 60px;
  }
}

/* Gallery - Mobile */
.glightbox-clean .gclose {
  display: block !important;
  font-size: 24px;
  top: 10px;
  right: 10px;
  z-index: 10000;
}

/* Mobile Response */
@media screen and (max-width: 768px) {
  /* Stack and center the header */
  .main-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem !important;
  }

  /* Center logo‑section content */
  .logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .logo-section img {
    height: 80px;
    width: auto;
    border-radius: 10px;
  }

  .logo-section .hospital-name {
    font-size: 1.3rem !important;
    line-height: 1.3;
    color: white !important;
    text-align: center !important;
  }

  /* Style for “Attached to MRMC” on right-text */
  .right-text {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: white;
    text-align: center !important;
    line-height: 1.2;
  }

  /* Navigation / hamburger menu adjustments */
  nav {
    flex-direction: column;
    align-items: flex-start;
    display: none;
    height: auto;
    padding: 1rem 0;
  }
  nav.open {
    display: flex;
  }
  nav ul {
    flex-direction: column;
    width: 100%;
  }
  nav ul li {
    width: 100%;
  }
  nav ul li > a {
    width: 100%;
    padding: 1rem;
    background: #CEFC86;
    border-bottom: 1px solid #fff;
    font-size: 1rem;
  }
  nav ul li ul {
    display: none;
    background: #90AEFF;
    border-radius: 0 0 10px 10px;
  }
  nav ul li.open > ul {
    display: block;
  }
  nav ul li ul li a {
    padding: 0.8rem 1.5rem;
    color: #000;
    background: #CEFC86;
    border-bottom: 1px solid #000;
  }
  nav ul li ul li a:hover {
    background-color: #1E3A8A;
    color: #fff;
  }
  .hamburger {
    display: block;
  }
}

/* Fold phone */
@media (device-posture: folded) {
  .main-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.8rem;
  }
  .logo-section,
  .right-text {
    padding: 0.3rem 0;
  }
}

/* smallfoldphones */
@media only screen and (max-width: 320px),
       only screen and (max-device-width: 320px) {
  html { font-size: 14px; }
  .main-header,
  .content-box,
  nav ul li a { padding: 0.5rem; }
}
