:root {
  --primary-blue: #263489;
  --accent-red: #ec1d25;
  --text-black: #000000;
  --bg-light: #f4f6f9;
}

/* Page spacing */
.row.mx-1 {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 10px;
}

/* Section card */
.hospital-space {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* 👉 GAP BETWEEN SECTIONS */
.department-section {
  margin-bottom: 40px;
}

.department-section:last-child {
  margin-bottom: 0;
}

/* Main heading */
.main-title {
  font-size: 28px;
  color: var(--primary-blue);
  text-align: center;
  margin-bottom: 35px;
  font-weight: 700;
}

/* Section titles */
.section-title {
  font-size: 22px;
  color: var(--primary-blue);
  margin-bottom: 20px;
  position: relative;
  padding-left: 14px;
  font-weight: 600;
}

/* Accent line */
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 5px;
  height: 18px;
  background: var(--accent-red);
  border-radius: 2px;
}

/* Image grid spacing */
.department-grid > div {
  margin-bottom: 20px;
}

/* Image cards */
.department-grid img {
  width: 100%;
  border-radius: 12px;
  transition: 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Hover effect */
.department-grid img:hover {
  transform: translateY(-5px) scale(1.03);
}

/* Fix inline margin issue */
.department-grid img[style] {
  margin-top: 0 !important;
}

/* Table redesign */
.table1 {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

/* Table header */
.table1 thead {
  background: var(--primary-blue);
  color: #fff;
}

.table1 th {
  padding: 12px;
  font-weight: 600;
}

/* Table body */
.table1 td {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

/* Row hover */
.table1 tbody tr:hover {
  background: var(--bg-light);
}

/* Alternate rows */
.table1 tbody tr:nth-child(even) {
  background: #fafafa;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .hospital-space {
    padding: 20px;
  }

  .main-title {
    font-size: 22px;
  }

  .section-title {
    font-size: 18px;
  }

  .department-grid > div {
    width: 50%;
  }
}

@media (max-width: 480px) {
  .department-grid > div {
    width: 100%;
  }
}



.department-section .item {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.department-section .item img {
  width: 100%;
  border-radius: 20px;
  display: block;
  transition: 0.4s ease;
}

.doctor-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 20px;
}

.doctor-link:hover img {
  transform: scale(1.05);
}

/* OVERLAY */
.doctor-overlay {
  position: absolute;
  inset: 0;

  background: rgba(38,52,137,0.75);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  transition: 0.4s ease;
}

.doctor-link:hover .doctor-overlay {
  opacity: 1;
}

.doctor-overlay span {
  background: #ec1d25;
  color: #fff;

  padding: 12px 22px;
  border-radius: 50px;

  font-size: 15px;
  font-weight: 600;
}