/* Web Design Layout (Needs more space for cards) */
.web-vertical-layout {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 60px auto;
  display: none;
  flex-direction: column;
  gap: 24px; /* Spacious gap for web cards */
  animation: fadeIn 0.5s ease;
}

/* Graphic & UI/UX Layouts (Reverted to original spacing style) */
.uiux-vertical-layout,
.graphic-vertical-layout {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 60px auto;
  display: none;
  flex-direction: column;
  /* Removed gap: 24px to rely on margin-bottom for tighter control */
  animation: fadeIn 0.5s ease;
}

/* Active state triggers display */
.web-vertical-layout.active,
.uiux-vertical-layout.active,
.graphic-vertical-layout.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Web Design Card Styles */
.web-item {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  height: 400px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(30,41,59,0.15);
  transition: box-shadow 0.3s, transform 0.3s;
  margin-bottom: 0;
}

.web-item:hover {
  box-shadow: 0 12px 35px rgba(123,220,255,0.25);
  transform: translateY(-4px);
}

.web-item .img-hover-scroll {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.web-item .scroll-image {
  width: 100%;
  height: auto;
  min-height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  will-change: top;
}

.web-item .portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 2;
}

.web-item:hover .portfolio-overlay {
  opacity: 1;
}

.web-item .portfolio-title {
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.web-item .portfolio-category {
  color: #ccc;
  margin-bottom: 16px;
}

.web-item .btn {
  background: white;
  color: black;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.web-item .btn:hover {
  background: #7bdcff;
  color: white;
  transform: translateY(-2px);
}

/* Graphic & UI/UX Image Styles */
.graphic-vertical-layout img,
.uiux-vertical-layout img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  margin-bottom: 12px; /* Restored the margin-bottom for spacing */
}

/* Remove margin from the last image */
.graphic-vertical-layout img:last-child,
.uiux-vertical-layout img:last-child {
  margin-bottom: 12px;
}

.graphic-vertical-layout img:hover,
.uiux-vertical-layout img:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(123,220,255,0.15);
}

/* Light Theme Adjustments */
body.light-theme .web-item {
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

body.light-theme .web-item:hover {
  box-shadow: 0 12px 35px rgba(0,123,255,0.15);
}

body.light-theme .graphic-vertical-layout img,
body.light-theme .uiux-vertical-layout img {
  border-color: rgba(0,0,0,0.1);
}

body.light-theme .graphic-vertical-layout img:hover,
body.light-theme .uiux-vertical-layout img:hover {
  box-shadow: 0 8px 24px rgba(0,123,255,0.12);
}