.iframe-card {
  position: relative;
  background: #1a1a1a;
  color: white;
  overflow: hidden; /* Changed to contain the description */
  flex: 1 1 45%;
  max-width: 600px;
  min-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  margin-bottom: 0em;
}

.iframe-card:nth-child(odd) {
  margin-top: 4em;
}

.iframe-card iframe,
.iframe-card img {
  width: 100%;
  height: 400px;
  border: none;
  object-fit: cover;
}

.card-header {
  display: block;
  text-decoration: none;
  color: white;
  background: #222;
  padding: 0.75em 1em;
  font-size: 1.25em;
  font-weight: bold;
  cursor: pointer;
  min-height: 3.5em;
  box-sizing: border-box;
  position: relative; /* For z-index */
  z-index: 2;
}

.card-header:hover {
  background: #333;
}

.description-box {
  background: #333;
  color: white;
  padding: 0;
  font-size: 0.9em;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  box-sizing: border-box;
}

.card-header:hover + .description-box {
  max-height: 500px; /* Adjust based on content needs */
  padding: 1em; /* Only add padding when visible */
}

.description-box a {
  display: inline-block;
  margin-top: 0.5em;
  color: #4ecdc4;
  text-decoration: underline;
}

/* Rest of your existing sidebar and responsive styles */
.sidebar {
  width: 250px;
  background: #111;
  color: white;
  padding: 1em;
  z-index: 10; /* higher than .card-header */
  height: 70%;
  overflow-y: auto;
  top: 12em;
  position: fixed;
  left: 0;
}

/* ... (keep all your existing sidebar and responsive styles) ... */

@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
  }

  .content {
    margin-left: 0;
  }
  
  .sidebar-toggle {
    display: none;
    position: absolute;
    top: 1em;
    left: 1em;
    z-index: 1000;
    background: #111;
    color: #4ecdc4;
    padding: 0.5em 0.75em;
    border: none;
    font-size: 1.2em;
    border-radius: 4px;
  }

  @media (max-width: 768px) {
    .sidebar {
      display: none;
      width: 100%;
      position: absolute;
      background: #111;
      z-index: 999;
      top: 3.5em; /* below navbar */
      left: 0;
      padding: 1em;
      height: auto;
    }

    .sidebar.open {
      display: block;
    }

    .sidebar-toggle {
      display: block;
    }

    .content {
      margin-left: 0;
      padding-top: 2em;
    }
  }
}