/* Root styles for proper mobile handling */
.hero-section {
  background: linear-gradient(var(--rwth-blau), var(--rwth-blau-50));
  width: 100%;
  overflow-x: hidden;
  min-height: calc(100vh - 2*2.4rem - 35px);
  display: flex;
  flex-direction: column;
}

.hero-container {
  max-width: 100%;
  margin: auto;
  padding: 0 1rem 1rem;
  box-sizing: border-box;
}

.hero-content {
  display: grid;
  grid-template-columns: 4fr 3fr;
  gap: 3rem;
  align-items: center;
  max-width: 61rem;
  margin: 0 auto;
  box-sizing: border-box;
}

.hero-text {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: white;
  margin-bottom: 1.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.hero-title-highlight {
  background: linear-gradient(45deg, var(--rwth-gelb) 0%, var(--rwth-orange) 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  word-wrap: break-word;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.875rem, 2vw, 1rem);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero-feature-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--rwth-gelb);
  flex-shrink: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: clamp(0.875rem, 2vw, 1rem);
  white-space: nowrap;
  min-width: 0;
}

.btn-primary {
  background: linear-gradient(45deg, var(--rwth-gelb), var(--rwth-orange));
  color: #333 !important;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.hero-stat {
  text-align: center;
  min-width: 0;
}

.hero-stat-number {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.hero-stat-label {
  font-size: clamp(0.75rem, 1.5vw, 0.875rem);
  color: rgba(255, 255, 255, 0.8);
  word-wrap: break-word;
}

.hero-visual {
  position: relative;
  width: 140%;
  min-width: 0;
  box-sizing: border-box;
  perspective: 1000px;
}

.hero-scroll-indicator {
  display: flex;
  margin: 0 auto;
}

.hero-code-sample {
  background: rgba(0, 0, 0, 0.8);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}

.code-dots {
  display: flex;
  gap: 0.5rem;
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.code-dot-red {
  background: #ff5f56;
}

.code-dot-yellow {
  background: var(--rwth-orange);
}

.code-dot-green {
  background: var(--rwth-gruen);
}

.code-filename {
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(0.75rem, 1.5vw, 0.875rem);
  font-family: 'Monaco', 'Consolas', monospace;
  word-wrap: break-word;
}

.code-content {
  padding: 1.5rem;
  box-sizing: border-box;
  overflow-x: auto;
  /* Allow horizontal scrolling for code */
  overflow-y: hidden;
  max-width: 100%;
  --md-code-hl-keyword-color: var(--rwth-blau-50);
  --md-code-hl-name-color: #bdbdbd;
  --md-code-hl-variable-color: #e6e6e6;
  --md-code-hl-operator-color: #e6e6e6;
  --md-code-hl-punctuation-color: #e6e6e6;
  --md-code-hl-function-color: var(--rwth-orange);
  --md-code-hl-string-color: var(--rwth-maigruen);
}

.code-content pre {
  margin: 0;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: clamp(0.7rem, 1.5vw, 0.875rem);
  line-height: 1.5;
  white-space: pre;
  /* Prevent code wrapping */
  overflow-x: visible;
  min-width: max-content;
  /* Ensure content doesn't compress */
}

.code-content code {
  white-space: pre;
  /* Prevent code wrapping */
  display: block;
  min-width: max-content;
}

.hero-decorations {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.decoration {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
}

.decoration-1 {
  width: 60px;
  height: 60px;
  top: 20%;
  right: 10%;
  animation-delay: 0s;
}

.decoration-2 {
  width: 80px;
  height: 80px;
  top: 60%;
  right: 20%;
  animation-delay: 2s;
}

.decoration-3 {
  width: 40px;
  height: 40px;
  top: 40%;
  right: 5%;
  animation-delay: 4s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* Large Desktop breakpoint */
@media (max-width: 1600px) {
  .hero-stats {
    justify-content: flex-start;
  }
}

/* Tablet breakpoint */
@media (max-width: 1200px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
    /* Equal columns on medium screens */
    gap: 2rem;
  }
}

/* Mobile breakpoint */
@media (max-width: 968px) {
  .hero-content {
    grid-template-columns: 1fr;
    /* Single column on mobile */
    gap: 2rem;
  }

  .hero-container {
    padding: 0 1rem 2rem;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-stats {
    justify-content: center;
  }

  .code-content {
    padding: 1rem;
  }

  .hero-visual {
    width: 100%;
  }
}

/* Small mobile breakpoint */
@media (max-width: 640px) {
  .hero-section {
    padding: 1.5rem 0 0;
  }

  .hero-container {
    padding: 0 0.75rem 2rem;
  }

  .hero-content {
    gap: 1.5rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
    text-align: center;
  }

  .hero-stats {
    gap: 1rem;
    justify-content: space-between;
  }

  .hero-stat {
    flex: 1;
    min-width: 0;
  }

  .code-content {
    padding: 0.75rem;
  }

  .hero-decorations {
    display: none;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .hero-container {
    padding: 0 0.5rem;
  }

  .hero-content {
    gap: 1rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

  .hero-stat {
    width: 100%;
  }
}