:root {
  --primary: #0f172a;
  --secondary: #f27200;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --border: #e2e8f0;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.facilities-hero {
  padding: 10rem 2rem 5rem;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.75)), url('assets/images/hero_bg.png');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .facilities-hero {
    padding: 8rem 1.5rem 4rem;
    min-height: 300px;
    text-align: center;
  }
  .facilities-hero-content {
    text-align: center;
    width: 100%;
  }
}

.facilities-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 30% 60%, rgba(242, 114, 0, 0.15), transparent 60%),
              radial-gradient(ellipse at 70% 40%, rgba(242, 114, 0, 0.08), transparent 50%);
  pointer-events: none;
}

.facilities-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1rem;
  font-family: 'Outfit', sans-serif;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.facilities-hero p {
  font-size: 1.2rem;
  color: #cbd5e1;
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .facilities-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    text-align: center !important;
  }
  .facilities-hero p {
    font-size: 1.05rem;
    padding: 0 0.5rem;
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
  }
  .facilities-hero .hero-subtitle {
    text-align: center;
    margin-bottom: 0.5rem;
  }
}

.facilities-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

.facilities-container {
  max-width: 1280px;
  margin: 2rem auto 4rem;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  height: calc(100vh - 140px); /* Fixed height container */
  min-height: 500px;
}

/* Tabs Sidebar */
.facilities-tabs {
  position: sticky;
  top: 0;
  align-self: start;
  height: auto;
  max-height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  scrollbar-width: none;
  z-index: 10;
  padding-right: 10px; /* Space for scroll */
}

.facilities-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 1rem 1.5rem 1rem 3.5rem;
  text-align: left;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tab-btn i {
  font-size: 0.8rem;
  opacity: 0.5;
  transition: var(--transition);
}

.tab-btn:hover {
  background: var(--bg-light);
  color: var(--primary);
  border-color: var(--secondary);
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}

.tab-btn.active i {
  opacity: 1;
  transform: translateX(3px);
  color: var(--secondary);
}

/* Content Area */
.facility-content-wrapper {
  position: relative;
  height: 100%;
  overflow-y: auto;
  padding-right: 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--secondary) transparent;
}

.facility-content-wrapper::-webkit-scrollbar {
  width: 6px;
}

.facility-content-wrapper::-webkit-scrollbar-thumb {
  background-color: var(--secondary);
  border-radius: 10px;
}

.facility-panel {
  display: none;
  animation: fadeIn 0.5s ease-out;
}

.facility-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.facility-panel img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  border-radius: 24px;
  margin-bottom: 2.5rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.facility-panel h2 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-family: 'Outfit', sans-serif;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.facility-panel h2::after {
  content: '';
  height: 4px;
  width: 60px;
  background: var(--secondary);
  border-radius: 2px;
}

.facility-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #475569;
  text-align: justify;
}

.facility-features {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.feature-box {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.feature-box h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.feature-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
  .facilities-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .facilities-tabs {
    position: relative;
    top: 0;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .facilities-tabs::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    white-space: nowrap;
    padding: 0.8rem 1.2rem;
  }

  .tab-btn i {
    display: none;
  }

  .facility-panel img {
    height: 300px;
  }
}

/* Advanced Blocks */
.block-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-item {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
    box-shadow: var(--shadow-md);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.block-table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.block-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.block-table th {
    background: var(--bg-light);
    color: var(--primary);
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid var(--border);
}

.block-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.block-table tr:hover td {
    background: var(--bg-light);
}

.block-achievement {
    background: linear-gradient(135deg, var(--primary), #1e293b);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: var(--shadow-md);
}

.achievement-year {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    padding-right: 2rem;
    border-right: 1px solid rgba(255,255,255,0.1);
    min-width: 150px;
}

.achievement-content {
    flex: 1;
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Mobile Responsiveness for Advanced Blocks */
@media (max-width: 768px) {
    .block-achievement {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .achievement-year {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 0.5rem;
        padding-right: 0;
        width: 100%;
    }
}
