/* Portfolio Grid Styling */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
  }
  
  .portfolio-item-img {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .portfolio-item-img:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  }
  
  .portfolio-item-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
  }
  
  .portfolio-item-img:hover img {
    transform: scale(1.05);
  }
  
  .portfolio-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .portfolio-item-img:hover .portfolio-item-overlay {
    opacity: 1;
  }
  
  .portfolio-item-details {
    text-align: center;
    color: #fff;
    padding: 20px;
  }
  
  .portfolio-item-details h4 {
    margin: 0 0 5px;
    font-size: 18px;
    font-weight: 600;
  }
  
  .portfolio-item-details .category {
    display: block;
    margin-bottom: 15px;
    font-size: 14px;
    opacity: 0.8;
  }
  
  .external-link {
    display: inline-block;
    padding: 8px 15px;
    background: #e74c3c;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s ease;
  }
  
  .external-link:hover {
    background: #c0392b;
  }
  
  /* Modal Styling */
  .portfolio-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .portfolio-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
  }
  
  .modal-content {
    position: relative;
    background-color: #222;
    margin: auto;
    padding: 0;
    width: 80%;
    max-width: 900px;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    animation: modalZoom 0.3s;
    overflow: hidden;
  }
  
  @keyframes modalZoom {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
  }
  
  .close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #f1f1f1;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
  }
  
  .close-modal:hover {
    color: #e74c3c;
  }
  
  #modalImage {
    width: 100%;
    height: auto;
    display: block;
  }
  
  .modal-details {
    padding: 20px;
    background: #222;
    color: #fff;
  }
  
  .modal-details h3 {
    margin: 0 0 10px;
    font-size: 24px;
  }
  
  .modal-details p {
    margin: 0 0 15px;
    opacity: 0.8;
  }
  
  .modal-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #e74c3c;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
  }
  
  .modal-btn:hover {
    background: #c0392b;
  }
  
  /* Portfolio Filters */
  .portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
  }
  
  .portfolio-filters li {
    margin: 0 5px 10px;
  }
  
  .portfolio-filters .btn {
    padding: 8px 15px;
    border-radius: 30px;
    transition: all 0.3s ease;
  }
  
  .portfolio-filters .btn:hover,
  .portfolio-filters .active .btn {
    background: #e74c3c;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
  }