* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
  background-color: #0a0a0c;
}

.container {
  display: flex;
  width: 90vw;
  max-width: 1200px;
  height: 80vh;
  gap: 20px;
}

.panel {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 100%;
  border-radius: 40px;
  color: #fff;
  cursor: pointer;
  flex: 0.5; 
  position: relative;
  transition: flex 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.panel h3 {
  font-size: 24px;
  position: absolute;
  bottom: 30px;
  left: 30px;
  margin: 0;
  opacity: 0;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
  font-weight: 600;
  letter-spacing: 1px;
}

/* When the active class is added via JavaScript */
.panel.active {
  flex: 5; /* Expands the selected panel */
  cursor: default;
}

.panel.active h3 {
  opacity: 1;
  transition: opacity 0.3s ease-in 0.4s; /* Delays text fade-in until expansion is nearly done */
}

/* Responsive adjustment for smaller screens */
@media (max-width: 480px) {
  .container {
    width: 100vw;
  }
  .panel:nth-of-type(4),
  .panel:nth-of-type(5) {
    display: none;
  }
}