/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

/* Body as flex container to keep footer at the bottom */
body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  display: flex;
  flex-direction: column;
}

/* Header & Footer */
header, footer {
  background-color: #333;
  color: #fff;
  padding: 20px;
}

/* Header Container */
.header-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hamburger Button (placed at top left) */
.menu-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 101;
}

/* Curtain Menu that slides in from the left */
.curtain-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px; /* Adjust menu width as needed */
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  transform: translateX(-100%); /* Start off-screen to the left */
  transition: transform 0.5s ease;
  z-index: 100;
}

.curtain-menu.open {
  transform: translateX(0);
}

.curtain-menu ul {
  list-style: none;
  padding: 50px 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.curtain-menu ul li a {
  color: #fff;
  font-size: 1.5rem;
  text-decoration: none;
}

/* Header Title */
header h1 {
  font-size: 2rem;
}

/* Footer */
footer p {
  margin: 0;
  text-align: center;
}

/* Main content area */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* Center vertically initially */
  padding: 20px;
  transition: justify-content 0.5s ease;
}

main.expanded {
  justify-content: flex-start;
}

/* Navigation (Card Container) */
.card-container {
  display: flex;
  gap: 20px;
  width: 90%;
  margin: 0 auto;
  transition: all 0.5s ease;
  margin-bottom: 20px;
}

/* Content Sections */
.content-section {
  display: none;
  background: #fff;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 20px;
  width: 90%;
}

.content-section.visible {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Back Button Styling (Arrow with no background) */
.back-btn {
  background: none;
  border: none;
  color: #333;
  font-size: 2rem;
  cursor: pointer;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.back-btn:hover {
  color: #555;
}

/* Card Styling */
.card {
  position: relative;
  flex: 1;
  min-width: 400px; /* This ensures each card is at least 400px wide */
  height: 300px;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 1;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  z-index: 10;
}

.card-container:hover .card:not(:hover) {
  transform: scale(0.95);
}

/* Specific Backgrounds */
#equipment {
  background-image: url('styleq.jpg'); /* Replace with your actual path */
}

#reagents {
  background-image: url('stylre.jpg'); /* Replace with your actual path */
}

/* Overlay Effect */
.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  transition: background 0.3s ease;
}

.card:hover .card-overlay {
  background: rgba(0, 0, 0, 0.25);
}

/* Card Content */
.card-content {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

.card-content h2 {
  margin: 0;
  font-size: 2rem;
}

/* Expanded State Overrides */
.card-container.expanded .card.active,
.card-container.expanded .card.inactive {
  flex: none;
}

.card-container.expanded .card.active {
  width: 70%;
  height: 120px;
  border-radius: 6px;
  transition: width 0.5s ease, height 0.5s ease;
}

.card-container.expanded .card.inactive {
  width: 30%;
  height: 120px;
  border-radius: 6px;
  transition: width 0.5s ease, height 0.5s ease;
}
