/* Mobile Institutions Section Fixes */

/* Responsive styles for institution cards */
@media (max-width: 767px) {
  /* Make cards stack vertically */
  .institution-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
  }

  /* Set full width for each card on mobile */
  .institution-card {
    width: 100%;
    max-width: 360px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  /* Add hover effect for better touch experience */
  .institution-card:active {
    transform: scale(0.98);
  }

  /* Ensure images are properly sized */
  .institution-logo {
    height: 200px;
    overflow: hidden;
  }
  
  .institution-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* Improve institution info display */
  .institution-info {
    padding: 15px;
    text-align: center;
  }
  
  .institution-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #002147;
  }
  
  .institution-affiliation {
    color: #555;
  }
  
  /* Better spacing between cards */
  .institution-card:not(:last-child) {
    margin-bottom: 25px;
  }
  
  /* Improve campus selector for mobile */
  .campus-selector {
    max-width: 100%;
    flex-direction: row;
    margin-bottom: 25px;
    display: flex;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
  
  .campus-selector-button {
    flex: 1;
    font-size: 14px;
    padding: 12px 5px;
    border: none;
    background: #f5f5f5;
    color: #555;
    transition: all 0.3s ease;
  }
  
  .campus-selector-button.active {
    background: #002147;
    color: white;
  }
  
  /* Improve view button visibility */
  .institution-overlay .view-btn {
    background-color: rgba(0, 33, 71, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
  }
  
  /* Section title improvement */
  .home-section-title {
    margin-bottom: 30px;
  }
}

/* Fix for very small screens */
@media (max-width: 480px) {
  .institution-card {
    max-width: 100%;
  }
  
  .institution-name {
    font-size: 16px;
  }
  
  .institution-affiliation {
    font-size: 14px;
  }
  
  .campus-selector-button {
    font-size: 12px;
    padding: 8px 5px;
  }
  
  /* Center section title on mobile */
  .home-section-title {
    text-align: center;
    margin-bottom: 20px;
  }
}
