/* Existing Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    text-align: center;
    margin: 0;
    padding: 20px;
  }
  h1 {
    color: #2c3e50;
  }
  #card-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px auto;
    max-width: 400px;
  }
  #card-container-inner {
    width: 100%;
  }
  hr {
    border: 1px solid #e0e0e0;
    margin: 20px 0;
  }
  p {
    font-size: 16px;
    color: #34495e;
    line-height: 1.5;
    margin: 10px 0;
  }
  
  .card-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    min-width: 300px;
    flex: 0 0 auto;
    scroll-snap-align: start; /* Snap to the start of each card */
  }
  
  .card-content {
    width: 100%;
  }
  
  /* Optional: Customize Scrollbar (Webkit Browsers) */
  .gallery::-webkit-scrollbar {
    height: 8px;
  }
  
  .gallery::-webkit-scrollbar-track {
    background: #f1f1f1; 
  }
  
  .gallery::-webkit-scrollbar-thumb {
    background: #888; 
    border-radius: 4px;
  }
  
  .gallery::-webkit-scrollbar-thumb:hover {
    background: #555; 
  }

  .gallery-container {
    position: relative;
  }
  
  .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(44, 62, 80, 0.8);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 50%;
  }
  
  .nav.left {
    left: 10px;
  }
  
  .nav.right {
    right: 10px;
  }
  
  .nav:hover {
    background-color: rgba(44, 62, 80, 1);
  }
  
  
  /* Responsive Adjustments */
  @media (max-width: 600px) {
    .gallery {
        display: flex;
        overflow-x: auto;
        padding: 20px 0;
        gap: 20px;
        scroll-snap-type: x mandatory; /* Enable snap scrolling */
      }
  
    .card-container {
      min-width: 100%; /* Make cards full-width */
    }
  }
  
  .gallery {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 20px; /* Adjust spacing between cards as needed */
    scroll-snap-type: x mandatory; /* Enables snap scrolling */
  }

  /* Modal Styles */
  .modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5); /* Black w/ opacity */
  }

  .modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* 10% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    border-radius: 8px;
    position: relative;
  }

  .close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
  }

  .close-btn:hover,
  .close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
  }

  /* Code Block Styles (Override if necessary) */
  .modal-content pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    text-align: left;
    margin-top: 10px;
    font-family: 'Courier New', Courier, monospace;
  }

  /* Show Code Button Styles */
  .show-code-btn {
    background-color: #3498db;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
  }
  .show-code-btn:hover {
    background-color: #2980b9;
  }
