/* Services Directory Styles */

.services-directory-container {
  max-width: 1200px; /* Industry standard */
  width: 100%; /* Full width up to max */
  margin: 20px auto; /* Center the container */
  background-color: white;
  border-radius: 25px;
  padding: 40px 20px;
  box-sizing: border-box;
  color: #333;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 40px);
  height: auto;
}

/* Page Header */
.services-directory-container h1 {
  margin-top: 0;
  padding: 0 0 15px 0;
  font-size: 28px;
  border-bottom: 2px solid #0066cc;
  color: #222;
}

.services-directory-container > p {
  font-size: 17px;
  color: #666;
  margin-bottom: 25px;
  font-weight: bold;
}

/* View Options Section */
.view-options {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
}

.mode-toggle,
.view-toggle {
  display: flex;
  gap: 10px;
}

.mode-toggle a,
.view-toggle a {
  display: inline-block;
  padding: 8px 16px;
  color: #333;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
}

.mode-toggle a.active,
.view-toggle a.active {
  background-color: #0066cc;
  color: white;
}

/* Service List Container */
.service-list {
  flex: 1;
  overflow: visible;
  padding-right: 10px;
}

/* Services Table */
.services-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 5px;
  table-layout: fixed;
}

.services-table tr {
  height: 40px;
}

.services-table td {
  vertical-align: middle;
  box-sizing: border-box;
  overflow: hidden;
}

.service-item {
  font-size: 20px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 4px;
  font-weight: bold;
  margin-left: 10px;
}

.service-item.empty {
  visibility: hidden;
}

/* Scrollbar Styling */
.service-list::-webkit-scrollbar {
  width: 8px;
}

.service-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.service-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.service-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Responsive Design - Matches policy.css breakpoints and spacing */
@media (max-width: 1240px) {
  .services-directory-container {
    margin: 20px; /* Add margins on smaller screens */
    width: calc(100% - 40px); /* Account for margins */
  }
}

@media (max-width: 992px) {
  .services-directory-container {
    padding: 30px;
    margin: 15px; /* Smaller margins on tablets */
    width: calc(100% - 30px);
    min-height: calc(100vh - 60px);
  }
}

@media (max-width: 768px) {
  .services-directory-container {
    padding: 25px;
    margin: 15px; /* Even smaller margins on mobile */
    width: calc(100% - 30px);
    min-height: calc(100vh - 40px);
  }

  .view-options {
    flex-direction: column;
    gap: 15px;
  }

  .service-list {
    max-width: 100%; /* Allow full width on small screens */
  }
}

@media (max-width: 480px) {
  .services-directory-container {
    padding: 20px;
    margin: 15px; /* Minimal margins on very small screens */
    width: calc(100% - 30px);
    min-height: calc(100vh - 20px);
  }

  .services-directory-container h1 {
    padding: 15px;
    text-align: center;
  }

  .services-directory-container p {
    padding: 0 15px;
  }

  .service-item {
    padding: 8px;
    font-size: 14px;
  }
}
