/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fff;
  color: #333;
}

/* ===== Header Section ===== */
.header {
  position: relative;
  height: 100vh;
  text-align: center;
  color: white;
  overflow: hidden;
}

.header-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.header-image {
  width: 100%;
  height: 100vh;
  object-fit: cover;
    object-position: top; /* বা center top বা 50% 10% */
  transition: opacity 1s ease-in-out;
  filter: brightness(60%);
  opacity: 1;
}

.header-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  max-width: 800px;
  padding: 20px;
}

.header-text h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.header-text p {
  font-size: 22px;
}

/* ===== Navbar Section ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #2c3e50;
  z-index: 1000;
  padding: 10px 0;
}

.navbar ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 0;
}

.navbar ul li a {
  text-decoration: none;
  color: white;
  font-size: 16px;
  padding: 8px 14px;
  transition: all 0.3s ease;
}

.navbar ul li a:hover {
  background-color: #1abc9c;
  border-radius: 4px;
}

/* CSS */
.navbar ul li a.active {
  color: rgb(166, 213, 219);
  border-bottom: 2px solid #00bcd4;
  padding-bottom: 4px;
}

/* ===== Hamburger Icon ===== */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  position: absolute;
  top: 25px;
  right: 20px;
  z-index: 1001;
}

.menu-toggle span {
  height: 3px;
  width: 25px;
  background: white;
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s ease;
}

/* Overview Section */
.overview-section {
  padding: 80px 20px;
  background-color: #f8f9fa;
}

.overview-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.overview-text {
  flex: 1;
  padding: 20px;
}

.overview-text h1 {
  font-size: 36px;
  margin-bottom: 15px;
  color: #1a1a1a;
}

.overview-text p {
  font-size: 18px;
  color: #333;
  line-height: 1.6;
}

.overview-image {
  flex: 1;
  padding: 20px;
  text-align: center;
}

.overview-image img {
  width: 100%;
  max-width: 500px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Doctors Section */
.doctors-section {
  padding: 80px 20px;
  background-color: #ffffff;
  text-align: center;
}

.doctors-section h1 {
  font-size: 36px;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.doctors-description {
  font-size: 18px;
  color: #555;
  max-width: 800px;
  margin: 0 auto 40px;
}

.doctors-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.doctor-card {
  background-color: #f2f2f2;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 20px;
  max-width: 250px;
  text-align: center;
  transition: transform .3s ease;
}

.doctor-card:hover {
  transform: translateY(-10px);
}

.doctor-card img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  margin-bottom: 15px;
}

.doctor-card h3 {
  font-size: 20px;
  color: #333;
  margin-bottom: 5px;
}

.doctor-card p {
  font-size: 16px;
  color: #777;
}

/* Patients Section */
.patients-section {
  padding: 80px 20px;
  background-color: #f9f9f9;
  text-align: center;
}

.patients-section h1 {
  font-size: 36px;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.patients-description {
  font-size: 18px;
  color: #555;
  max-width: 800px;
  margin: 0 auto 40px;
}

.patients-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.patient-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 20px;
  max-width: 300px;
  text-align: center;
  transition: transform 0.3s ease;
}

.patient-card:hover {
  transform: translateY(-10px);
}

.patient-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 15px;
}

.patient-card h3 {
  font-size: 20px;
  color: #333;
  margin-bottom: 5px;
}

.patient-card p {
  font-size: 16px;
  color: #777;
}

/* Appointment Form Styles */
.appointment-form {
  margin-top: 40px;
  text-align: center;
}

.appointment-form h2 {
  margin-bottom: 20px;
}

#appointmentForm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  max-width: 400px;
  margin: 0 auto;
}

#appointmentForm input,
#appointmentForm button {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#appointmentForm button {
  background-color: #007BFF;
  color: white;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

#appointmentForm button:hover {
  background-color: #0056b3;
}

#formMessage {
  margin-top: 10px;
  font-weight: bold;
}

/* Appointments Section */
.appointments-section {
  padding: 80px 20px;
  background-color: #f9fcff;
  text-align: center;
}

.appointments-section h1 {
  font-size: 38px;
  color: #222;
  margin-bottom: 10px;
}

.appointments-description {
  font-size: 18px;
  color: #444;
  max-width: 700px;
  margin: 0 auto 50px;
}

.appointments-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

/* Stylish Card Design */
.appointment-card-alt {
  position: relative;
  background-color: #ffffff;
  border: 2px solid #e0ecf4;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  max-width: 300px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.appointment-card-alt:hover {
  transform: translateY(-8px);
}

.appointment-card-alt img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  font-size: 20px;
  color: #005792;
  margin-bottom: 8px;
}

.card-content p {
  font-size: 15px;
  color: #666;
}

/* Ribbon style */
.ribbon {
  position: absolute;
  top: 12px;
  left: -20px;
  transform: rotate(-45deg);
  background-color: #007BFF;
  color: white;
  font-size: 14px;
  padding: 4px 30px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Departments Section */
.departments-section {
  padding: 80px 20px;
  background-color: #eef6fa;
  text-align: center;
}

.departments-section h1 {
  font-size: 36px;
  color: #004e7c;
  margin-bottom: 10px;
}

.departments-description {
  font-size: 17px;
  color: #444;
  max-width: 750px;
  margin: 0 auto 40px;
}

.departments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  justify-items: center;
}

/* Department Card */
.department-box {
  position: relative;
  width: 100%;
  max-width: 300px;
  height: 200px;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  transition: transform 0.3s ease;
}

.department-box:hover {
  transform: scale(1.05);
}

.department-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(85%);
}

.department-box .overlay {
  position: absolute;
  bottom: 0;
  background: rgba(0, 78, 124, 0.8);
  color: white;
  width: 100%;
  padding: 12px;
  text-align: center;
  transition: background 0.3s ease;
}

.department-box:hover .overlay {
  background: rgba(0, 78, 124, 0.95);
}

.department-box .overlay h3 {
  margin: 0;
  font-size: 18px;
}

/* Pharmacy Section */
.pharmacy-section {
  padding: 80px 20px;
  background-color: #fffdf5;
  text-align: center;
}

.pharmacy-section h1 {
  font-size: 36px;
  color: #2f4858;
  margin-bottom: 10px;
}

.pharmacy-description {
  font-size: 17px;
  color: #555;
  max-width: 760px;
  margin: 0 auto 40px;
}

.pharmacy-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

/* Pharmacy Card */
.pharmacy-card {
  background-color: #f8f8f8;
  border-radius: 14px;
  overflow: hidden;
  max-width: 500px;
  width: 100%;
  display: flex;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease;
}

.pharmacy-card:hover {
  transform: scale(1.03);
}

.pharmacy-card img {
  width: 340px;
  height: auto;
  object-fit: cover;
}

.pharmacy-info {
  padding: 20px;
  text-align: left;
}

.pharmacy-info h3 {
  font-size: 20px;
  color: #004e7c;
  margin-bottom: 10px;
}

.pharmacy-info p {
  font-size: 15px;
  color: #444;
}

/* Lab & Diagnostics Section */
/* Filter Buttons Style */
.filter-buttons {
  text-align: center;
  margin: 20px 0;
}

.filter-btn {
  background-color: #eee;
  border: none;
  padding: 10px 18px;
  margin: 5px;
  cursor: pointer;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
  background-color: #007BFF;
  color: white;
}

.lab-section {
  padding: 80px 20px;
  background-color: #f0faff;
  text-align: center;
}

.lab-section h1 {
  font-size: 36px;
  color: #0d3b66;
  margin-bottom: 10px;
}

.lab-description {
  font-size: 17px;
  color: #555;
  max-width: 780px;
  margin: 0 auto 40px;
}

.lab-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

/* Lab Card */
.lab-card {
  background-color: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  width: 370px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.lab-card:hover {
  transform: translateY(-8px);
}

.lab-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.lab-info {
  padding: 20px;
  text-align: left;
}

.lab-info h3 {
  font-size: 19px;
  color: #0077b6;
  margin-bottom: 8px;
}

.lab-info p {
  font-size: 15px;
  color: #444;
}

/* Admin Panel Section */
.admin-section {
  padding: 80px 20px;
  background-color: #fef9f9;
  text-align: center;
}

.admin-section h1 {
  font-size: 36px;
  color: #2d3142;
  margin-bottom: 10px;
}

.admin-description {
  font-size: 17px;
  color: #666;
  max-width: 780px;
  margin: 0 auto 40px;
}

.admin-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

/* Admin Card */
.admin-card {
  background-color: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  width: 420px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.admin-card:hover {
  transform: translateY(-8px);
}

.admin-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.admin-info {
  padding: 20px;
  text-align: left;
}

.admin-info h3 {
  font-size: 19px;
  color: #d72638;
  margin-bottom: 8px;
}

.admin-info p {
  font-size: 15px;
  color: #444;
}

/* Contact Section */
.contact-section {
  padding: 80px 20px;
  background-color: #f2f7ff;
  text-align: center;
}

.contact-section h1 {
  font-size: 36px;
  color: #1d3557;
  margin-bottom: 10px;
}

.contact-description {
  font-size: 17px;
  color: #555;
  max-width: 800px;
  margin: 0 auto 40px;
}

.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

/* Contact Card */
.contact-card {
  background-color: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  width: 320px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-8px);
}

.contact-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.contact-info {
  padding: 20px;
  text-align: left;
}

.contact-info h3 {
  font-size: 20px;
  color: #0a9396;
  margin-bottom: 8px;
}

.contact-info p {
  font-size: 15px;
  color: #444;
}

/* Footer Styling */
#footer {
  background-color: #222;
  color: #fff;
  padding: 40px 20px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}

.footer-about,
.footer-links,
.footer-contact {
  flex: 1 1 250px;
}

.footer-links ul {
  list-style: none;
  padding: 10px;
}

.footer-links ul li {
  margin-bottom: 8px;
}

.footer-links ul li a {
  color: #ddd;
  text-decoration: none;
  transition: 0.3s;
}

.footer-links ul li a:hover {
  color: #00bcd4;
}

.footer-contact .social-icons img {
  width: 24px;
  margin-right: 10px;
  margin-top: 15px;
}

.footer-contact .social-icons a:hover img {
  opacity: 0.7;
}

footer p {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #aaa;
}

.copyright{
    text-align: center;
}

/* Back to Top Button */
#backToTopBtn {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  font-size: 18px;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  transition: opacity 0.3s ease;
}

#backToTopBtn:hover {
  background-color: #0056b3;
}

/* Image Modal Style */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
}

.modal-content {
  display: block;
  margin: auto;
  max-width: 80%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 20px white;
}

.close {
  position: absolute;
  top: 40px;
  right: 60px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #ccc;
}

/* ===== Responsive Design ===== */

/* Mobile Devices (Max Width: 768px) */
@media (max-width: 768px) {

  /* Header text resizing */
  .header-text h1 {
    font-size: 32px;
  }

  .header-text p {
    font-size: 18px;
  }

  /* Navbar horizontal to vertical */
  .navbar ul {
    flex-direction: column;
    background-color: #2c3e50;
    display: none;
    width: 100%;
    text-align: center;
  }

  .navbar ul.show {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .navbar ul li {
    margin: 10px 0;
  }

  /* Overview Section */
  .overview-container {
    flex-direction: column;
  }

  .overview-text, .overview-image {
    padding: 10px;
    text-align: center;
  }

  /* Doctors & Patients Cards */
  .doctors-container,
  .patients-container {
    flex-direction: column;
    align-items: center;
  }

  .doctor-card,
  .patient-card {
    max-width: 90%;
  }

  /* Appointments Cards */
  .appointments-grid {
    flex-direction: column;
    align-items: center;
  }

  .appointment-card-alt {
    max-width: 90%;
  }

  /* Departments Grid */
  .departments-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Tablets (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .overview-container {
    flex-direction: column;
  }

  .overview-text, .overview-image {
    padding: 15px;
  }

  .doctor-card, .patient-card, .appointment-card-alt {
    max-width: 80%;
  }

  .departments-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
