/* body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    margin: 0;
    padding: 40px;
  } */
  
  .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    margin: auto;
    max-width: 1200px;
  }
  
  .card {
    display: flex;
    flex-direction: column;
    height: 100%;
    
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  
  .card:hover {
    transform: scale(1.02);
  }
  
  .card img {
    width: 100%;
    height: auto;               
    aspect-ratio: 4 / 3; 
    object-fit: cover;
    flex-shrink: 0;
  }
  
  .card-text {
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    flex-grow: 1;
  }
  
  /* Modal Styles */
  .modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
  }
  
  .modal-content {
    background-color: #fff;
    margin: 8% auto;
    padding: 30px;
    border-radius: 15px;
    width: 60%;
    max-width: 600px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
  }
  
  .modal-content h2 {
    margin-top: 0;
  }
  
  .close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
  }
  
  .close:hover {
    color: #000;
  }
  
  @keyframes fadeIn {
    from {opacity: 0; transform: scale(0.95);}
    to {opacity: 1; transform: scale(1);}
  }
  
  .modal-img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
  }

  @media screen and (max-width: 900px) {
    .grid {
      grid-template-columns: repeat(2, 1fr);  /* 태블릿: 2열 */
    }
  }
  
  @media screen and (max-width: 600px) {
    .grid {
      grid-template-columns: repeat(1, 1fr);  /* 모바일: 1열 */
    }
    .modal-content {
      width: 90%;       /* ✅ 모바일에서 너비 확대 */
      padding: 20px;    /* ✅ 패딩도 줄여서 공간 효율 */
    }
    #modal-title {
      font-size: 18px;  /* ✅ 모바일에서 제목 약간 줄임 (기존보다 살짝 작게) */
    }
  
    #modal-description {
      font-size: 14px;  /* ✅ 본문은 확실히 줄여서 읽기 편하게 */
      line-height: 1.6; /* ✅ 줄간격으로 가독성 확보 */
    }
  }
  