
/* Faculty Card Grid */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    padding: 40px;
    max-width: 1200px;
    margin: auto;
  }
  
  /* Individual Card with more animation */
  .card {
    background: var(--soft-bg);
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: center;
    padding: 20px;
    position: relative;
    cursor: pointer;
    animation: fadeInBounce 0.8s ease;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
  }
  
  .card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 18px 36px rgba(0,0,0,0.3);
    background: linear-gradient(145deg, var(--soft-bg), #ffffff);
  }
  
  /* Faculty Image */
  .card img {
    width: 140px;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 3px solid var(--primary);
    transition: transform 0.3s ease-in-out;
  }
  
  .card:hover img {
    transform: scale(1.1);
  }
  
  /* Name & Designation */
  .card .name {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
    transition: color 0.3s ease;
  }
  
  .card .designation {
    font-size: 14px;
    color: #444;
    transition: color 0.3s ease;
  }
  
  .card:hover .name {
    color: var(--secondary);
  }
  
  /* Enhanced fade and bounce animation */
  @keyframes fadeInBounce {
    0% {
      opacity: 0;
      transform: translateY(40px) scale(0.95);
    }
    60% {
      opacity: 1;
      transform: translateY(-8px) scale(1.02);
    }
    100% {
      transform: translateY(0) scale(1);
    }
  }



/* Smartphones (portrait and landscape) */
@media only screen and (max-width: 600px) {
    .grid-container {
      padding: 20px;
      gap: 20px;
    }
  
    .card {
      padding: 15px;
    }
  
    .card img {
      width: 100px;
      height: 130px;
    }
  
    .card .name {
      font-size: 16px;
    }
  
    .card .designation {
      font-size: 13px;
    }
  
    header h1, header h2 {
      font-size: 18px;
    }
  
    .logout-button a {
      padding: 6px 12px;
      font-size: 14px;
    }
  }
  
  /* Tablets (portrait and landscape) */
  @media only screen and (min-width: 601px) and (max-width: 1024px) {
    .grid-container {
      padding: 30px;
      gap: 25px;
    }
  
    .card {
      padding: 18px;
    }
  
    .card img {
      width: 120px;
      height: 160px;
    }
  
    .card .name {
      font-size: 17px;
    }
  
    .card .designation {
      font-size: 14px;
    }
  
    header h1, header h2 {
      font-size: 22px;
    }
  
    .logout-button a {
      padding: 8px 16px;
      font-size: 15px;
    }
  }
  
  /* iPads specifically in landscape */
  @media only screen and (min-device-width: 768px) and (max-device-width: 1024px)
    and (orientation: landscape) {
    .grid-container {
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
  }
  
  