/* Base (mobile first) */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }
  
  body {
    margin: 0 auto;
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  .grid-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 20px;
    max-width: 1500px;
    margin: 0 auto;
  }
  
  span {
    color: #FFFFFF;
  }
  
  .content-1, .content-2 {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  
  .content-1 h2, .content-1 h5 {
    text-align: left;
    max-width: 730px;
  }
  
  .content-1 h2 {
    color: #F27405;
  }
  
  .content-1 h5, .demo-description h5, .demo-description h5 {
    color: #f25c5c;
    margin-bottom: 0.5rem;
  }
  
  .content-1 p, .demo-description p {
    color: #FFFFFF;
    margin-bottom: 0.5rem;
  }
  
  .content-2 img{
    height: auto;
    border-radius: 10%;
    max-width: 100%;
  }
  
  .player {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 1500px;
    margin: 0 auto;
  }
  
  h4 {
    color: #FFFFFF;
    text-align: center;
    margin-bottom: 1rem;
  }
  
  .video-container{
    max-width: 350px;
    height: auto;
    margin: 0 auto;
  }
  
  .video {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .demo-description {
    max-width: 700px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  
  /* Desktop layout (≥769px) */
  @media (min-width: 769px) {
    .grid-wrapper {
      grid-template-columns: 1fr 1fr;
    }
  
    .content-2 {
      padding-top: 50px;
    }

    .video-container {
        width: 90%;
        max-width: 10000px;
        margin: 0 auto;
        justify-self: center;
        margin-bottom: 60px;
        
        display: block;           /* helps margin: 0 auto work reliably */
        overflow: hidden;         /* prevents any child overflow from showing */
    }

    .video-container img,
    .video-container svg {
        width: 100% !important;     /* ← force it to fill container width */
        max-width: 100%;            /* prevents it from exceeding container */
        height: auto !important;    /* maintain aspect ratio */
        display: block;             /* removes any bottom gap from inline image */
        margin: 0 auto;             /* just in case */
    }
   
  }
  
  /* Mobile layout (≤800px) */
  @media (max-width: 800px) {
    .grid-wrapper, .player {
      grid-template-columns: 1fr;
      grid-template-rows: auto auto;
    }
  
    .content-1 {
      order: 2;
    }
    .video-container {
        width: 95%;
        max-width: 700px;
        margin: 0 auto;
        justify-self: center;
        
        
        display: block;           /* helps margin: 0 auto work reliably */
        overflow: hidden;         /* prevents any child overflow from showing */
    }

    .video-container img,
    .video-container svg {
        width: 100% !important;     /* ← force it to fill container width */
        max-width: 100%;            /* prevents it from exceeding container */
        height: auto !important;    /* maintain aspect ratio */
        display: block;             /* removes any bottom gap from inline image */
        margin: 0 auto;             /* just in case */
    }
    .content-2{
      order: 1;
    }
    .demo-description{
        order: 2;
    } 
  
    .content-2 img {
      align-self: center;
    }
  }
  
  /* Large desktops (≥1501px) */
  @media (min-width: 1501px) {
    body {
      max-width: 1500px;
      margin: 0 auto;
    }
  }

/* Project Gallery */
  .project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1500px;
    margin: 0 auto;
    margin-bottom: 4rem;
  }
  .project-gallery .image {
    max-height: 250px;
    max-width:350px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #212121;
    overflow-x: hidden;
    padding: 10px;
    border-radius: 10px;
  }
  .project-gallery .image img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
  }
  .project-gallery .image:hover {
    background-color: #333333;
    opacity: 0.9;
    transition: background-color 0.3s ease, opacity 0.3s ease;
  }
  .preview-image {
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    height: 100vh;
    width: 100vw;
    z-index: 1000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-image span {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 40px;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    z-index: 1001;
}

.preview-image img.zoomable {
    max-width: 90%;
    max-height: 70vh;
    object-fit: contain;
    border: 10px solid #212121;
    transform-origin: center center;
    transition: transform 0.2s ease; /* Smooth zoom, but not panning */
    cursor: move; /* Indicate draggable when zoomed */
    user-select: none; /* Prevent text selection */
    touch-action: none; /* Prevent default touch behaviors */
}

.preview-image .image-desc {
    color: #ffffff;
    max-width: 90%;
    text-align: center;
    margin: 20px 0;
}

.zoom-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 1001;
}

.zoom-btn {
    background: #333333;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.zoom-btn:hover {
    background: #555555;
}

.zoom-btn:focus {
    outline: 2px solid #f27405;
    outline-offset: 2px;
}
  
