/* General Body Styles */
.dmc-body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    padding: 20px;
    box-sizing: border-box;
}

/* Container for overall layout */
.dmc-container {
    max-width: 1200px;
    margin: 20px auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Heading Styles */
.dmc-heading {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.2em;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.dmc-heading::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #3498db;
    border-radius: 2px;
}

/* Controls Section (Search) */
.dmc-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    /* Allow wrapping for smaller screens */
    gap: 15px;
    /* Space between elements */
}

.dmc-search-box {
    flex-grow: 1;
    max-width: 500px;
    position: relative;
}

.dmc-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    /* Adjust padding for icon */
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1em;
    color: #495057;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dmc-input:focus {
    border-color: #80bdff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.dmc-search-box::before {
    content: "🔍";
    /* Search icon */
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 1.1em;
}

/* Table Styles */
.dmc-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    /* Ensures rounded corners are applied */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dmc-thead {
    background-color: #3498db;
    color: #ffffff;
}

.dmc-table th,
.dmc-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.dmc-table th {
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease;
}

.dmc-table th:hover {
    background-color: #2980b9;
}

/* Sort indicators */
.dmc-table th.sort-asc::after {
    content: " ▲";
    font-size: 0.8em;
}

.dmc-table th.sort-desc::after {
    content: " ▼";
    font-size: 0.8em;
}

.dmc-table tbody tr {
    background-color: #ffffff;
    transition: background-color 0.2s ease;
}

.dmc-table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

.dmc-table tbody tr:hover {
    background-color: #e3f2fd;
}

/* Highlight for search results */
.highlight {
    background-color: #ffe082;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Loading and No data messages */
.dmc-loading,
.dmc-table td[colspan="6"] {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

.dmc-table td[colspan="6"][style*="orange"] {
    color: orange;
}

/* College Count */
.dmc-college-count {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #555;
}

/* Pagination */
.dmc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.dmc-pagination-btn {
    background-color: transparent;
    color: rgb(12, 12, 12);
    border: none;
    padding: 10px 18px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.2);
}

.dmc-pagination-btn:hover:not(:disabled) {
background: linear-gradient(90deg, #466cb4 60%, #00c3ff 100%) !important;
    transform: translateY(-2px);
}

.dmc-pagination-btn:disabled {
    background: linear-gradient(90deg, #4361ee 60%, #4cc9f0 100%) !important;
    color: white;
    cursor: not-allowed;
    box-shadow: none;
}

.dmc-pagination-btn.active {
    background: linear-gradient(90deg, #4361ee 60%, #4cc9f0 100%) !important;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.dmc-pages {
    display: flex;
    gap: 5px;
}

/* Responsive Design */
/* Responsive Table: Always table format, scrollable on mobile */
.dmc-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Main table: never switch to display: block! */
.dmc-table {
  width: 100%;
  min-width: 650px; /* Adjust as needed for your columns */
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Optional: improve th/td for small screens */
.dmc-table th,
.dmc-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  font-size: 1em;
  white-space: nowrap; /* Prevent awkward wrapping */
}

.dmc-thead {
  background-color: #3498db;
  color: #ffffff;
}

/* Responsive adjustments for container and heading */
@media (max-width: 768px) {
  .dmc-container {
    margin: 10px 2vw;
    padding: 12px 2vw;
  }
  .dmc-heading {
    font-size: 1.4em;
  }
  .dmc-table th,
  .dmc-table td {
    font-size: 0.98em;
    padding: 10px 10px;
  }
}

/* Extra small screen tweaks */
@media (max-width: 480px) {
  .dmc-heading {
    font-size: 1.1em;
  }
  .dmc-table th,
  .dmc-table td {
    font-size: 0.95em;
    padding: 9px 8px;
  }
}

/* Hide horizontal scrollbar except when scrolling */
.dmc-table-responsive::-webkit-scrollbar {
  height: 6px;
  background: transparent;
}
.dmc-table-responsive::-webkit-scrollbar-thumb {
  background: #c6d5ef;
  border-radius: 4px;
}












/* second table */

/* Container styles */
.container-mbbs-college {
  max-width: 1200px;
  margin: 32px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(30, 40, 90, 0.12);
  padding: 32px 26px 24px 26px;
}

.container-mbbs-college h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #3751a6;
  text-align: center;
  margin-bottom: 30px;
  letter-spacing: -0.01em;
}

.search-container {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
#searchInput2 {
  width: 100%;
  max-width: 420px;
  padding: 12px 40px 12px 15px;
  border-radius: 9px;
  border: 1.3px solid #b3c7ef;
  font-size: 1em;
  background: #f9fbfe;
  box-shadow: 0 1px 6px rgba(67,97,238,0.06);
  transition: border 0.18s, box-shadow 0.18s;
  color: #334169;
}
#searchInput2:focus {
  border-color: #466cb4;
  outline: none;
  box-shadow: 0 2px 9px rgba(67,97,238,0.09);
}

/* Table Responsive Wrapper with scroll shadows */
.table-responsive-wrapper {
  position: relative;
  width: 100%;
  overflow-x: auto; /* This allows horizontal scrolling */
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(30, 40, 90, 0.04);
  background: #fff;
  margin-bottom: 18px;
}

/* Table shadow effects (left/right) */
.table-scroll-shadow-left,
.table-scroll-shadow-right {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 24px;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.23s;
  opacity: 0;
  /* background: linear-gradient(to right, #fff 70%, rgba(210,220,255,0)); */
  /* Using current background for shadows to match */
  background: linear-gradient(to right, #fff 70%, rgba(255,255,255,0));
}
.table-scroll-shadow-left {
  left: 0;
  /* background: linear-gradient(to right, #fff 70%, rgba(210,220,255,0)); */
  background: linear-gradient(to right, #fff 70%, rgba(255,255,255,0));
}
.table-scroll-shadow-right {
  right: 0;
  /* background: linear-gradient(to left, #fff 70%, rgba(210,220,255,0)); */
  background: linear-gradient(to left, #fff 70%, rgba(255,255,255,0));
}
.table-responsive-wrapper.can-scroll-left .table-scroll-shadow-left { opacity: 1; }
.table-responsive-wrapper.can-scroll-right .table-scroll-shadow-right { opacity: 1; }

/* Table styles */
#medicalCollegesTable2 {
  width: 100%;
  /* Adjusted min-width. Start with a slightly lower value. You might need to fine-tune this. */
  /* This prevents the table from forcing a scrollbar when it's not truly needed. */
  min-width: 700px;
  border-collapse: collapse;
  background: #fff;
}
#medicalCollegesTable2 th, #medicalCollegesTable2 td {
  padding: 14px 16px;
  border-bottom: 1px solid #e3e6f2;
  font-size: 1.01em;
  text-align: left;
  white-space: nowrap; /* Keep nowrap as default for most columns */
}
#medicalCollegesTable2 th {
  background: #426df4;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  position: sticky; /* keeps header visible on scroll if wrapper is short */
  top: 0;
  z-index: 1;
  cursor: pointer;
  transition: background 0.18s;
}
#medicalCollegesTable2 th:hover {
  background: #3253b5;
}
#medicalCollegesTable2 tr:nth-child(even) td {
  background: #f6f8fe;
}
#medicalCollegesTable2 tr:hover td {
  background: #eaf0ff;
}

/* --- Specific Column Adjustments (New/Modified) --- */

/* Allow "Name" column to wrap text and give it a minimum width */
#medicalCollegesTable2 td:nth-child(2) { /* Target the 'Name' column (2nd child) */
  white-space: normal; /* Allow text to wrap */
  word-break: break-word; /* Ensure long words break */
  min-width: 180px; /* Prevent it from becoming too narrow */
}

/* Allow "Institute Type" column to wrap text if needed */
#medicalCollegesTable2 td:nth-child(3) { /* Target the 'Institute Type' column (3rd child) */
  white-space: normal;
  word-break: break-word;
}

/* Make "S.No" and "Year" columns compact */
#medicalCollegesTable2 th:nth-child(1),
#medicalCollegesTable2 td:nth-child(1), /* S.No column */
#medicalCollegesTable2 th:nth-child(5),
#medicalCollegesTable2 td:nth-child(5) { /* Year column */
  width: 1%; /* Makes the column take minimum necessary width */
  white-space: nowrap; /* Keep nowrap for these specific compact columns */
}


/* Info and pagination */
.results-info {
  color: #35528c;
  font-weight: 500;
  font-size: 1.05em;
  margin-bottom: 12px;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.pagination button {
  background:transparent;
  color: #0e0e0e;
  border: none;
  padding: 7px 15px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1em;
  box-shadow: 0 1px 6px rgba(67,97,238,0.08);
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
}
.pagination button.active, .pagination button:active {
background: linear-gradient(90deg, #466cb4 60%, #00c3ff 100%) !important;
  transform: scale(1.06);
  color:white
}
.pagination button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
  background: #b3cbfa;
}

/* Responsive: horizontal scroll on small screens, softer layout */
@media (max-width: 900px) {
  .container-mbbs-college {
    padding: 18px 6vw;
    max-width: 100vw;
  }
  .table-responsive-wrapper {
    margin-bottom: 12px;
  }
  #medicalCollegesTable2 {
    font-size: 0.98em;
    /* You might need to adjust this again for smaller screens if columns are still too wide */
    min-width: 650px; /* Further reduced for smaller screens */
  }
}
@media (max-width: 600px) {
  .container-mbbs-college {
    padding: 10px 2vw;
  }
  .search-container {
    padding: 0;
    margin-bottom: 10px;
  }
  #searchInput2 {
    padding: 10px 12px;
    font-size: 0.97em;
    max-width: 99vw;
  }
  #medicalCollegesTable2 th, #medicalCollegesTable2 td {
    font-size: 0.93em;
    padding: 9px 8px;
  }
  #medicalCollegesTable2 {
    /* Critical adjustment for very small screens */
    min-width: 500px; /* Reduced further for mobile */
  }
}