/* Portfolio page body styles */
body {
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100vh;
}

html {
  overflow-y: auto !important;
  height: auto !important;
}

/* Portfolio-specific styles */
.portfolio-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(43, 48, 53, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.back-to-home {
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.back-to-home:hover {
  opacity: 0.8;
}

.header-logo {
  width: 40px;
  height: 40px;
  border-radius: 4px;
}

.portfolio-title {
  color: white;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
}

.portfolio-container {
  padding: 6rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 6rem);
}

.main-container {
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100vh;
}

.portfolio-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.portfolio-intro p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.portfolio-item {
  background: rgba(43, 48, 53, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(16px);
}

.portfolio-item:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.portfolio-item.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.portfolio-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.05);
}

.portfolio-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.portfolio-content h3 {
  color: white;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.portfolio-content p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: auto;
}

.portfolio-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.portfolio-link:hover svg {
  width: 16px;
  height: 16px;
}

/* Language selector styles for portfolio page */
.language-dropdown {
  position: relative;
}

.language-dropdown:hover .language-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(-5px);
}

.language-options {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.flag-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.flag-icon:hover {
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.flag-icon.active {
  border-color: #00d4ff;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Portfolio page uses centralized modal system from style.css */

.portfolio-link svg {
  width: 16px;
  height: 16px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .portfolio-header {
    padding: 1rem;
  }

  .header-logo {
    width: 32px;
    height: 32px;
  }

  .portfolio-title {
    font-size: 1.25rem;
  }

  .portfolio-container {
    padding: 5rem 1rem 4rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .portfolio-item.featured {
    grid-template-columns: 1fr;
  }

  .portfolio-content {
    padding: 1rem;
  }

  .portfolio-intro p {
    font-size: 1rem;
  }
}

/* Large screens */
@media (min-width: 1200px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio-item.featured {
    grid-column: 1 / -1;
  }
}

/* Placeholder für fehlende Bilder */
.portfolio-image {
  position: relative;
}

.portfolio-image.no-image::before {
  content: attr(data-placeholder);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  padding: 1rem;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.portfolio-image img:not([src]), 
.portfolio-image img[src=""],
.portfolio-image img[src*="placeholder"] {
  opacity: 0;
}

.portfolio-image img.error {
  display: none;
}

.portfolio-card.placeholder {
  border: 2px dashed rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.portfolio-card.placeholder .portfolio-image {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 3rem;
}

/* Telegram Bot Card Styling */
.portfolio-card.telegram-bot {
  border: 2px solid rgba(0, 136, 204, 0.4);
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.1), rgba(0, 136, 204, 0.05));
}

.portfolio-card.telegram-bot .portfolio-image {
  background: linear-gradient(135deg, #0088cc, #229ed9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 4rem;
}

.portfolio-card.telegram-bot .portfolio-image::before {
  content: "🤖";
}

.portfolio-card.custom-bot {
  border: 2px solid rgba(138, 43, 226, 0.4);
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(138, 43, 226, 0.05));
}

.portfolio-card.custom-bot .portfolio-image {
  background: linear-gradient(135deg, #8a2be2, #9932cc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 4rem;
}

.portfolio-card.custom-bot .portfolio-image::before {
  content: "🔧";
}

/* Telegram Bot specific styles */
.portfolio-item.telegram-bot .portfolio-image,
.portfolio-item.custom-bot .portfolio-image {
  background: linear-gradient(135deg, #0088cc, #005580);
  border: 2px dashed #00aaff;
}

.portfolio-item.telegram-bot .portfolio-image::before,
.portfolio-item.custom-bot .portfolio-image::before {
  content: "🤖";
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: white;
}

.portfolio-link.bot-info {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.portfolio-link.bot-info:hover {
  color: #4a90e2;
}

/* Bot Info Modal Styles */
.bot-info-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  padding: 2rem;
  overflow-y: auto;
}

.bot-info-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-info-content {
  background: rgba(43, 48, 53, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  position: relative;
  backdrop-filter: blur(16px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.bot-info-content h3 {
  color: white;
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  padding-right: 2rem;
}

.bot-info-content p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

.bot-info-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.bot-info-close:hover {
  color: white;
  background: rgba(255, 255, 255, 0.2);
}

/* Mobile styles for bot info modal */
@media (max-width: 768px) {
  .bot-info-modal {
    padding: 1rem;
  }
  
  .bot-info-content {
    padding: 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .bot-info-content h3 {
    font-size: 1.1rem;
  }
  
  .bot-info-content p {
    font-size: 0.9rem;
  }
}

/* Demo Projects Section Styles */
.demo-projects-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
  color: white;
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
}

.section-description {
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  line-height: 1.6;
  font-size: 1.1rem;
}

.demo-category {
  margin-bottom: 3rem;
}

.category-title {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

.category-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, #00d4ff, #0099cc);
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.demo-item {
  background: rgba(43, 48, 53, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(16px);
}

.demo-item:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.demo-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  position: relative;
}

.demo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.demo-item:hover .demo-image img {
  transform: scale(1.05);
}

.demo-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.demo-content h4 {
  color: white;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.demo-content p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  line-height: 1.5;
  font-size: 0.85rem;
}

.demo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.demo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: white;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: auto;
}

.demo-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.demo-link svg {
  width: 16px;
  height: 16px;
}

/* Placeholder für fehlende Demo-Bilder */
.demo-image.no-image::before {
  content: attr(data-placeholder);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2rem;
  text-align: center;
  padding: 1rem;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .portfolio-header {
    padding: 1rem;
  }

  .header-logo {
    width: 32px;
    height: 32px;
  }

  .portfolio-title {
    font-size: 1.25rem;
  }

  .portfolio-container {
    padding: 5rem 1rem 4rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .portfolio-item.featured {
    grid-template-columns: 1fr;
  }

  .portfolio-content {
    padding: 1rem;
  }

  .portfolio-intro p {
    font-size: 1rem;
  }

  /* Demo Projects Mobile Styles */
  .demo-projects-section {
    margin-top: 3rem;
    padding-top: 2rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-description {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .category-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .demo-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .demo-content {
    padding: 1rem;
  }

  .demo-content h4 {
    font-size: 1rem;
  }

  .demo-content p {
    font-size: 0.8rem;
  }
}