/* ============================================
   Departments pages — St. Vincent De Paul Hospitals
   ============================================ */

/* ============ INTRO ============ */
.departments-intro {
  padding: 5rem 0;
  background: #fff;
}

.departments-intro-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.departments-intro-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.departments-intro-media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.departments-intro-text .section-title {
  text-align: left;
  margin-bottom: 1.25rem;
}

.departments-intro-text .section-eyebrow {
  text-align: left;
}

.departments-intro-body {
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.departments-intro-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.departments-intro-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.departments-intro-list i {
  color: var(--color-red);
  margin-top: 0.25rem;
  flex-shrink: 0;
}

/* ============ DEPARTMENT GRID (LIST) ============ */
.departments-list {
  padding: 5rem 0;
  background: var(--color-light);
}

.departments-list-header {
  text-align: center;
  margin-bottom: 3rem;
}

.departments-list-badge {
  display: inline-block;
  margin-top: -1.75rem;
  margin-bottom: 1rem;
  padding: 0.375rem 1rem;
  background: var(--color-navy);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 999px;
  text-transform: uppercase;
}

.departments-empty {
  text-align: center;
  padding: 4rem 1.5rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1px dashed var(--color-border);
  color: var(--color-muted);
}

.departments-empty i {
  font-size: 2.5rem;
  color: var(--color-navy);
  opacity: 0.35;
  margin-bottom: 1rem;
}

.departments-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.department-tile {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: all 0.3s ease;
  background: #fff;
  min-height: 160px;
}

.department-tile-icon {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.department-tile-icon i {
  font-size: 1.875rem;
  color: var(--color-red);
  transition: color 0.3s ease;
}

.department-tile h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-navy);
  line-height: 1.35;
  transition: color 0.3s ease;
  font-family: var(--font-display);
}

.department-tile-link {
  margin-top: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.department-tile-link i {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.department-tile:hover {
  background: var(--color-navy);
  border-color: var(--color-navy);
  transform: translateY(-2px);
  z-index: 1;
  box-shadow: var(--shadow-md);
}

.department-tile:hover .department-tile-icon i,
.department-tile:hover h3,
.department-tile:hover .department-tile-link {
  color: #fff;
}

.department-tile:hover .department-tile-link i {
  transform: translateX(4px);
}

/* ============ VALUES / STATS / CTA (LIST) ============ */
.departments-values {
  padding: 5rem 0;
}

.departments-stats {
  padding: 4rem 0;
  background: #fff;
}

.departments-cta {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-2) 100%);
}

.departments-cta-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.5fr;
  gap: 3rem;
  align-items: center;
}

.departments-cta-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0.75rem 0 1rem;
  color: #fff;
}

.departments-cta-text p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
  line-height: 1.75;
}

.departments-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.departments-cta-icon {
  font-size: clamp(4rem, 10vw, 6rem);
  color: rgba(255, 255, 255, 0.1);
}

/* ============ DEPARTMENT VIEW HERO ============ */
.dept-view-hero {
  padding: 0;
  background: var(--color-navy);
}

.dept-view-hero-banner {
  position: relative;
  overflow: hidden;
  height: clamp(380px, 48vh, 520px); /* Taller for grander entrance */
  background: var(--color-navy) center / cover no-repeat;
  background-image: var(--dept-hero-bg, none);
}

.dept-view-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dept-view-hero-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(105deg, rgba(14, 42, 85, 0.95) 0%, rgba(14, 42, 85, 0.7) 40%, rgba(14, 42, 85, 0.2) 70%, transparent 100%),
    linear-gradient(to top, rgba(14, 42, 85, 0.4) 0%, transparent 30%);
}

.dept-view-hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  animation: hero-reveal 1.2s cubic-bezier(0.2, 1, 0.3, 1) both;
}

.dept-view-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.dept-view-breadcrumb a:hover {
  color: #fff;
}

.dept-view-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}

.dept-view-hero-icon i {
  font-size: 1.5rem;
  color: var(--color-gold);
}

.dept-view-hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  color: #fff;
  max-width: 800px;
}

/* ============ DEPARTMENT VIEW MAIN ============ */
.dept-view-main {
  padding: 3.5rem 0 4.5rem;
  background: #fff;
}

.dept-view-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3rem;
  align-items: start;
}

.dept-view-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.dept-view-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  color: var(--color-navy);
}

.dept-view-appointment {
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8125rem;
  padding: 0.875rem 1.5rem;
}

.dept-view-body {
  font-size: 0.9375rem;
  line-height: 1.85;
  color: var(--color-text);
}

.dept-view-body p {
  margin-bottom: 1.25rem;
  color: var(--color-muted);
}

.dept-view-body p strong,
.dept-view-body p em {
  color: var(--color-navy);
}

.dept-view-body h4 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-navy);
  margin: 2rem 0 1rem;
}

.dept-view-body ul {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.625rem;
}

.dept-view-body ul li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--color-text);
  font-size: 0.9375rem;
}

.dept-view-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.625rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-red);
}

/* Gallery on department view */
.dept-view-gallery {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}

.dept-view-gallery-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-navy);
  margin: 0.5rem 0 1.5rem;
}

.dept-view-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.dept-view-gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-light);
}

.dept-view-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.dept-view-gallery-item:hover img {
  transform: scale(1.05);
}

/* Doctors on department view */
.dept-view-doctors {
  margin-top: 3.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border);
}

.dept-view-doctors-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--color-navy);
  margin: 0.5rem 0 2rem;
}

.dept-view-doctors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.dept-doctor-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
}

.dept-doctor-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.dept-doctor-photo {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--color-light);
}

.dept-doctor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.dept-doctor-info {
  padding: 1.25rem;
}

.dept-doctor-dept {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-red);
  margin-bottom: 0.375rem;
  font-weight: 700;
}

.dept-doctor-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.dept-doctor-info p {
  font-size: 0.8125rem;
  color: var(--color-muted);
  line-height: 1.4;
}

.dept-view-all-doctors {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-red);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dept-view-all-doctors:hover {
  gap: 1rem;
  color: var(--color-red-dk);
}

/* Sidebar */
.dept-view-sidebar {
  position: sticky;
  top: 100px;
}

.dept-sidebar-panel {
  background: var(--color-navy);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.dept-sidebar-panel h3 {
  padding: 1.25rem 1.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-body);
}

.dept-sidebar-list {
  max-height: min(70vh, 560px);
  overflow-y: auto;
}

.dept-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.dept-sidebar-link i {
  font-size: 0.625rem;
  opacity: 0.5;
  transition: all 0.2s ease;
}

.dept-sidebar-link:hover,
.dept-sidebar-link.is-active {
  background: rgba(255, 255, 255, 0.08);
  padding-left: 1.75rem;
}

.dept-sidebar-link.is-active {
  background: var(--color-red);
  color: #fff;
}

.dept-sidebar-link.is-active i {
  opacity: 1;
}

.dept-sidebar-link:hover i {
  opacity: 1;
  transform: translateX(-2px);
}

.dept-sidebar-name {
  line-height: 1.35;
}

/* Department view CTA */
.dept-view-cta {
  padding: 4rem 0;
  background: var(--color-light);
}

.dept-view-cta-inner {
  text-align: center;
}

.dept-view-cta-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--color-navy);
  margin: 0.75rem 0 1rem;
}

.dept-view-cta-text p {
  color: var(--color-muted);
  max-width: 520px;
  margin: 0 auto 2rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .departments-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .departments-intro-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .departments-intro-media {
    order: -1;
  }

  .dept-view-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .dept-view-sidebar {
    position: static;
    order: -1;
  }

  .dept-sidebar-list {
    max-height: 280px;
  }
}

@media (max-width: 768px) {
  .departments-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .departments-cta-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .departments-cta-actions {
    justify-content: center;
  }

  .dept-view-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dept-view-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dept-view-doctors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .departments-grid {
    grid-template-columns: 1fr;
  }

  .dept-view-doctors-grid {
    grid-template-columns: 1fr;
  }

  .dept-view-gallery-grid {
    grid-template-columns: 1fr;
  }
}
