/* ==========================================================================
   Recreational Therapy Modalities - Directory Layout
   ========================================================================== */

/* The 2-Cell Top Tab Switcher */
.dir-tabs {
  display: flex;
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e0e0e0;
}

.dir-tab-btn {
  flex: 1;
  padding: 15px 20px;
  font-size: 1.1rem;
  font-weight: 600;
  background: #f8f9fa;
  color: #555;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dir-tab-btn:first-child {
  border-right: 2px solid #e0e0e0;
}

.dir-tab-btn:hover {
  background: #e9ecef;
}

.dir-tab-btn.active {
  background: #0056b3; /* Change to your brand primary color */
  color: #ffffff;
}

/* Main Split-Box Layout */
.dir-view {
  display: none; /* Hidden by default */
  animation: fadeIn 0.4s ease-in-out;
}

.dir-view.active {
  display: block; /* Shows when tab is clicked */
}

.dir-split-box {
  display: grid;
  grid-template-columns: 320px 1fr; /* Left menu fixed width, right content fluid */
  gap: 20px;
  align-items: start;
  margin-bottom: 40px;
}

/* Left Column: Menu Items */
.dir-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dir-menu-btn {
  text-align: left;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: 0.2s;
}

.dir-menu-btn:hover {
  border-color: #0056b3;
  background: #f0f7ff;
}

.dir-menu-btn.active {
  background: #0056b3;
  color: #ffffff;
  border-color: #0056b3;
}

/* Left Column: Alphabet Grid (A-Z) */
.dir-alpha-menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
  gap: 8px;
}

.dir-alpha-btn {
  padding: 10px 0;
  text-align: center;
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.dir-alpha-btn:hover, .dir-alpha-btn.active {
  background: #0056b3;
  color: #ffffff;
  border-color: #0056b3;
}

.dir-alpha-btn:disabled {
  background: #f5f5f5;
  color: #bbb;
  cursor: not-allowed;
  border-color: #eaeaea;
}

/* Right Column: Content Viewer */
.dir-content-box {
  background: #fdfdfd;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px;
  min-height: 300px;
}

.dir-pane {
  display: none;
}

.dir-pane.active {
  display: block;
}

.dir-pane h3 {
  margin-top: 0;
  color: #222;
  border-bottom: 2px solid #eaeaea;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.dir-pane-desc {
  font-size: 1.05rem;
  color: #555;
  margin-bottom: 20px;
}

/* The Modality Pills */
.dir-pill-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modality-pill {
  display: inline-block;
  padding: 10px 18px;
  background: #0056b3; /* Change to your brand color */
  color: #ffffff !important;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modality-pill:hover {
  background: #003d82;
  transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .dir-split-box {
    grid-template-columns: 1fr; /* Stack vertically on small screens */
  }
  
  .dir-tabs {
    flex-direction: column;
  }
  
  .dir-tab-btn:first-child {
    border-right: none;
    border-bottom: 2px solid #e0e0e0;
  }
}