/* Animated List CSS */
.scroll-list-container {
  position: relative;
  width: 450px;
  height: 300px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.scroll-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.scroll-list::-webkit-scrollbar {
  width: 8px;
}

.scroll-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.scroll-list::-webkit-scrollbar-thumb {
  background: var(--accent, #22d3ee);
  border-radius: 4px;
}

.scroll-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent, #22d3ee);
  opacity: 0.8;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.animated-item {
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  transform: scale(0.7);
  opacity: 0;
}

.animated-item.visible {
  transform: scale(1);
  opacity: 1;
}

.item {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.item:hover::before {
  transform: translateX(100%);
}

.item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
}

.item.selected {
  background: var(--accent, #22d3ee);
  color: var(--accent-contrast, #03151a);
  border-color: var(--accent, #22d3ee);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
  transform: translateY(-2px);
}

.item.selected .item-text {
  color: var(--accent-contrast, #03151a);
  font-weight: 600;
}

.item-text {
  color: var(--text, #f3f6fb);
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.top-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: linear-gradient(to bottom, var(--bg, #0c0f14), transparent);
  pointer-events: none;
  transition: opacity 0.3s ease;
  border-radius: 12px 12px 0 0;
}

.bottom-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, var(--bg, #0c0f14), transparent);
  pointer-events: none;
  transition: opacity 0.3s ease;
  border-radius: 0 0 12px 12px;
}

/* Portfolio Layout */
.portfolio-animated {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .portfolio-animated {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 1.5rem;
  }
  
  .portfolio-preview {
    grid-row: 2;
  }
  
  .portfolio-info {
    grid-row: 3;
  }
}

@media (max-width: 768px) {
  .portfolio-animated {
    gap: 1rem;
  }
}

.portfolio-list {
  width: 450px;
  height: 300px;
}

@media (max-width: 1024px) {
  .portfolio-list {
    width: 100%;
    max-width: 450px;
    height: 250px;
  }
}

@media (max-width: 640px) {
  .portfolio-list {
    height: 200px;
  }
}

.portfolio-preview {
  /* Removed sticky positioning */
}

@media (max-width: 1024px) {
  .portfolio-preview {
    width: 100%;
    max-width: 450px;
  }
}

.portfolio-info {
  grid-column: 1 / -1;
  grid-row: 2;
}

.portfolio-preview-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.portfolio-preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.portfolio-preview-card video {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.portfolio-preview-card:hover video {
  transform: scale(1.05);
}

.portfolio-preview-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 20px;
  color: white;
}

.portfolio-preview-overlay h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color: white;
}

/* Ensure overlay link title is always readable: white text with dark edge */
.portfolio-preview-overlay a {
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 700;
  text-shadow:
    0 0 3px rgba(0,0,0,0.9),
    0 0 6px rgba(0,0,0,0.8),
    0 2px 4px rgba(0,0,0,0.7);
}
.portfolio-preview-overlay a:visited,
.portfolio-preview-overlay a:hover,
.portfolio-preview-overlay a:focus {
  color: #ffffff !important;
}

/* Ensure text is visible in light mode */
[data-theme="minimalisticky"] .portfolio-preview-overlay h3,
[data-theme="luxusni"] .portfolio-preview-overlay h3,
[data-theme="technicky"] .portfolio-preview-overlay h3,
[data-theme="pratelsky"] .portfolio-preview-overlay h3,
[data-theme="hravy"] .portfolio-preview-overlay h3,
[data-theme="tradicni"] .portfolio-preview-overlay h3,
[data-theme="seriozni"] .portfolio-preview-overlay h3,
[data-theme="dynamicky"] .portfolio-preview-overlay h3 {
  color: white !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Fix text visibility in light themes for portfolio list */
[data-theme="minimalisticky"] .sub-page-item.selected .sub-page-name,
[data-theme="tradicni"] .sub-page-item.selected .sub-page-name {
  color: var(--accent-contrast, #03151a) !important;
}

/* Fix text visibility in light themes for info tags */
[data-theme="minimalisticky"] .info-tag,
[data-theme="tradicni"] .info-tag {
  background: var(--accent, #22d3ee) !important;
  color: var(--accent-contrast, #03151a) !important;
}

.portfolio-preview-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: var(--muted, #9aa4b2);
  font-size: 1.1rem;
  text-align: center;
}

/* Info Card Styles */
.portfolio-info-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.portfolio-info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
}

.info-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent, #22d3ee);
  margin-bottom: 0.5rem;
}

.info-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text, #f3f6fb);
  margin-bottom: 1rem;
}

.info-description {
  color: var(--muted, #9aa4b2);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.info-tag {
  background: var(--accent, #22d3ee);
  color: var(--accent-contrast, #03151a);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.info-cta {
  background: var(--accent, #22d3ee);
  color: var(--accent-contrast, #03151a);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.info-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(34, 211, 238, 0.3);
}

/* Expandable List Styles */
.web-item {
  margin-bottom: 0.25rem;
}

.web-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.web-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.web-header:hover::before {
  transform: translateX(100%);
}

.web-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
}

.web-name {
  color: var(--text, #f3f6fb);
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.expand-icon {
  color: var(--accent, #22d3ee);
  font-size: 14px;
  transition: all 0.3s ease;
  transform: rotate(0deg);
}

.sub-pages {
  margin-top: 0.25rem;
  padding-left: 16px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  margin-left: 8px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.sub-pages.expanded {
  max-height: 200px;
}

.sub-page-item {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-bottom: 0.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sub-page-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
  border-color: rgba(255, 255, 255, 0.1);
}

.sub-page-item.selected {
  background: var(--accent, #22d3ee);
  color: var(--accent-contrast, #03151a);
  border-color: var(--accent, #22d3ee);
  transform: translateX(4px);
  box-shadow: 0 4px 15px rgba(34, 211, 238, 0.3);
}

.sub-page-name {
  color: var(--text, #f3f6fb);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.sub-page-item.selected .sub-page-name {
  color: var(--accent-contrast, #03151a);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .portfolio-animated {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap: 2rem;
  }
  
  .portfolio-list {
    position: static;
    grid-row: 1;
  }
  
  .portfolio-preview {
    position: static;
    grid-row: 2;
  }
  
  .portfolio-info {
    grid-column: 1;
    grid-row: 3;
  }
  
  .scroll-list-container {
    max-width: 100%;
  }
  
  .scroll-list {
    max-height: 300px;
  }
  
  .sub-pages {
    padding-left: 15px;
    margin-left: 5px;
  }
}
