/* ==========================================================================
   RESPONSIVE MEDICAL INSTITUTES PAGE STYLES
   ========================================================================== */

/* Base Styles and Variables */
:root {
  --primary-blue: #006dd3;
  --secondary-blue: #02386a;
  --light-blue: #ddeeff;
  --accent-green: #00cf7b;
  --white: #ffffff;
  --black: #000000;
  --text-gray: #00244573;
  --border-color: #ffffff;
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  
  /* Border Radius */
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 24px;
  --radius-xl: 50px;
}

/* ==========================================================================
   MAIN CONTAINER
   ========================================================================== */
.institutes {
  background-color: var(--white);
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow-x: hidden;
}


/* ========================
   Filter Section (Desktop + Mobile Responsive)
======================== */

.filter-section {
  margin-top: 30px;
}

.filter-container {
  margin: 0px 60px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--spacing-md);
}

/* Title */
.page-title {
  font-family: "Afacad", Helvetica, sans-serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--secondary-blue);
  margin: 0;
  cursor: pointer;
  position: relative;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%2302386a' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 20px;
}

/* Custom Dropdown */
.custom-dropdown {
  position: absolute;
  top: 0.8%;
  left: 48px;
  background-color: var(--white);
  border: 1px solid var(--light-blue);
  border-radius: var(--radius-lg); /* Increased radius for smoother look */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); /* Enhanced shadow for depth */
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  width: max-content;
  min-width: auto;
  transition: opacity 0.3s ease, transform 0.3s ease; /* Smooth appearance */
}

.custom-dropdown ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.custom-dropdown li {
  padding: var(--spacing-md) var(--spacing-lg); /* Increased padding for touch-friendliness */
  font-family: "Afacad", Helvetica, sans-serif;
  font-size: 20px; /* Slightly larger font */
  color: var(--secondary-blue);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease; /* Smoother hover transition */
  border-bottom: 1px solid var(--light-blue); /* Separator between items */
}

.custom-dropdown li:last-child {
  border-bottom: none; /* No border on last item */
}

.custom-dropdown li:hover {
  background-color: var(--primary-blue); /* Stylish hover with primary color */
  color: var(--white); /* White text on hover */
}

/* Custom Scrollbar */
.custom-dropdown::-webkit-scrollbar {
  width: 8px;
}

.custom-dropdown::-webkit-scrollbar-track {
  background: var(--light-blue);
  border-radius: var(--radius-sm);
}

.custom-dropdown::-webkit-scrollbar-thumb {
  background: var(--primary-blue);
  border-radius: var(--radius-sm);
}

.custom-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-blue);
}

/* Filter Controls Wrapper */
.filter-controls {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

/* Grouping label + input/select */
.filter-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-family: "Afacad", Helvetica, sans-serif;
  font-size: 14px;
  color: var(--secondary-blue);
}

/* Input field */
.number-input {
  width: 60px;
  padding: 8px 8px;
  background-color: var(--light-blue);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  text-align: center;
  color: var(--secondary-blue);
  appearance: textfield;
}

.number-input::-webkit-inner-spin-button,
.number-input::-webkit-outer-spin-button {
  opacity: 1;
  margin: 0;
}

/* Dropdown */
.dropdown-select {
  width: 60px;
  padding: 8px 8px;
  background-color: var(--light-blue);
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--secondary-blue);
  font-family: "Afacad", Helvetica, sans-serif;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%2302386a' height='12' viewBox='0 0 24 24' width='12' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
}

/* Remove default arrow in IE */
.dropdown-select::-ms-expand {
  display: none;
}

/* Institutes Count */
.institutes-count {
  font-family: "Afacad", Helvetica, sans-serif;
  font-size: 14px;
  color: var(--secondary-blue);
  margin-left: auto;
}

/* ========================
   Mobile Styles
======================== */
@media (max-width: 768px) {
  .filter-section {
    margin-left: 0;
    padding: var(--spacing-sm);
  }

  .page-title {
    font-size: 24px;
    text-align: center;
    margin-bottom: var(--spacing-sm);
  }

  .filter-container {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-md);
  }

  .filter-controls {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-sm);
  }

  .filter-group {
    display: flex;
    justify-content: space-between;
    gap: 16px;
  }

  .filter-item {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .number-input,
  .dropdown-select {
    padding: 10px 8px;
    font-size: 13px;
  }

  .institutes-count {
    text-align: right;
    font-size: 13px;
    margin-left: 0;
  }

  .custom-dropdown {
    left: auto;
        right: 50px;
        width: 70%;
        max-height: 150px;
        top: 0.65%;
  }
}



/* ==========================================================================
   TABLE CONTAINER
   ========================================================================== */
.table-container {
  margin: 20px 48px;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.2) 100%
  ),
  linear-gradient(90deg, rgba(0, 207, 123, 1) 0%, rgba(0, 109, 211, 1) 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Table Header */
.table-header {
  display: grid;
  grid-template-columns: 1fr 2fr 1.5fr 1.5fr 1fr 0.6fr;
  gap: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  padding: var(--spacing-md);
}

.header-cell {
  font-family: "Afacad", Helvetica;
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  padding: var(--spacing-sm);
  text-align: left;
}

/* Table Rows */
.table-row {
  display: grid;
  grid-template-columns: 1fr 2fr 1.5fr 1.5fr 1fr 0.6fr;
  gap: 1px;
  margin: 10px 10px 10px 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 0.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
}

.table-row:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.table-cell {
  padding: var(--spacing-md);
  font-family: "Afacad", Helvetica;
  font-size: 20px;
  font-weight: 400;
  color: var(--white);
  line-height: 1.5;
  display: flex;
  align-items: center;
}

/* State Column - Special Styling */
.table-cell.state-col {
  background-color: var(--white);
  color: var(--black);
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin: var(--spacing-xs);
}

/* ==========================================================================
   RESPONSIVE DESIGN - TABLET
   ========================================================================== */
@media (max-width: 1024px) {
  
  /* Page title */
  .page-title {
    font-size: 28px;
    margin: var(--spacing-md);
  }
  
  /* Table container */
  .table-container {
    margin: var(--spacing-md);
  }
  
  .table-header,
  .table-row {
    grid-template-columns: 1fr 2fr 1fr 1fr 0.8fr 0.6fr;
  }
  
  .header-cell,
  .table-cell {
    font-size: 18px;
    padding: var(--spacing-sm);
  }
}
/* ==========================================================================
   RESPONSIVE DESIGN - MOBILE
   ========================================================================== */
@media (max-width: 768px) {
  /* Page title */
  .page-title {
    font-size: 24px;
    margin: var(--spacing-sm);
    text-align: left;
  }
  
  
  /* Table - Mobile Card Layout */
  .table-container {
    margin: 20px 48px;
  }
  
  .table-header {
    display: none;
  }
  
  .table-row {
    display: block;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-md);
  }
  
  .table-cell {
    display: block;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 16px;
  }
  
  .table-cell:last-child {
    border-bottom: none;
  }
  
  .table-cell.state-col {
    background-color: var(--white);
    color: var(--black);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
  }
  
  /* Add labels for mobile */
  .table-cell:not(.state-col)::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--accent-green);
    display: block;
    margin-bottom: var(--spacing-xs);
  }
  
}
/* ==========================================================================
   RESPONSIVE DESIGN - SMALL MOBILE
   ========================================================================== */
@media (max-width: 480px) {
  /* Further mobile optimizations */
  .logo {
    height: 50px;
    max-width: 140px;
  }
  
  .page-title {
    font-size: 20px;
  }
  
  .table-cell {
    font-size: 14px;
  }
  
  .link-title {
    font-size: 24px;
  }
  
}
/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Loading and Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Page Title (now applied to select) */
.page-title {
  font-family: "Afacad", Helvetica, sans-serif;
  font-size: 30px;
  font-weight: 600;
  color: var(--secondary-blue);
  background-color: transparent;
  border: none;
  appearance: none;
  padding: 0 40px 0 0;
  margin: 0;
  width: auto;
  max-width: 100%;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%2302386a' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 40px;
}

.page-title:focus {
  outline: none;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .page-title {
    font-size: 24px;
    text-align: center;
    background-position: right 10px center;
    padding-right: 30px;
  }

  .filter-container {
    justify-content: center;
  }
}