/* ==========================================
   Glass Tile Component
   ========================================== */

.glass-tile {
  margin: 2rem auto;
  max-width: 960px;
  width: calc(100% - 3rem);
  padding: 1.5rem;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}


.glass-tile-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.glass-tile h2 {
  font-family: 'Noto', sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: #2a2a2a;
  margin: 0;
}

/* ==========================================
   Universal Button Styles
   ========================================== */

.uxi-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 8px;
  font-family: 'Noto', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 10;
  min-width: 180px;
  text-align: center;
}

/* Primary Button */
.uxi-button.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.uxi-button.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}

/* Secondary Button */
.uxi-button.secondary {
  background: rgba(255, 255, 255, 0.9);
  color: #667eea !important;
  border: 2px solid #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.uxi-button.secondary:hover {
  background: #667eea;
  color: white !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

/* Button States */
.uxi-button:active {
  transform: translateY(-1px);
}

.uxi-button:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.uxi-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Button Icons */
.uxi-button i {
  font-size: 1.2rem;
}

/* Loading State */
.button-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================
   Form Elements
   ========================================== */

.glass-tile input,
.glass-tile textarea,
.glass-tile select,
.glass-tile label,
.glass-tile span,
.glass-tile button {
  font-family: 'Noto', sans-serif;
  font-weight: 300;
  color: #2a2a2a;
}

.form-group {
  margin-bottom: 1.5rem;
}

.glass-tile label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 400;
  font-size: 1rem;
}

.glass-tile input[type="text"],
.glass-tile input[type="email"],
.glass-tile input[type="tel"],
.glass-tile textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-tile textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

/* Validation Messages */

.form-message {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.form-message.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #166534;
}

.form-message.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #991b1b;
}

.required-indicator {
  color: #c01dff;
  font-weight: 500;
}

.optional-indicator {
  color: #666;
  font-size: 0.875rem;
  font-style: italic;
}

.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  font-weight: 400;
  min-height: 1.2rem;
}

.input-hint {
  color: #666;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  font-style: italic;
}

/* ==========================================
   Input States
   ========================================== */

.glass-tile input:focus,
.glass-tile textarea:focus,
.glass-tile select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Invalid */
.glass-tile input:invalid:not(:placeholder-shown),
.glass-tile textarea:invalid:not(:placeholder-shown),
.glass-tile input[aria-invalid="true"],
.glass-tile textarea[aria-invalid="true"] {
  border-color: #dc2626;
  background: rgba(239, 68, 68, 0.05);
}

/* ==========================================
   Radio & Checkbox
   ========================================== */

.contact-options {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.radio-label:hover {
  background: rgba(102, 126, 234, 0.05);
}

.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.privacy-checkbox {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  text-align: left;
  margin-bottom: 0.5rem;
}

.privacy-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.25rem;
  cursor: pointer;
}

/* ==========================================
   Dynamic Fields
   ========================================== */

.dynamic-field {
  margin-bottom: 1.5rem;
  animation: slideIn 0.3s ease-out;
}

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

/* ==========================================
   Hero Section
   ========================================== */

.hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  margin-top: -80px;
  position: relative;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 10;
}

.hero-title {
  font-size: 3rem;
  font-weight: 300;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  color: #555;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* ==========================================
   Services Section
   ========================================== */

.services-section {
  max-width: 960px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.services-section h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  text-align: center;
  padding: 2.5rem 2rem;
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
}

.service-icon {
  font-size: 3rem;
  color: #667eea;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.service-card h3 {
  font-size: 1.3rem;
  margin: 1rem 0;
}

.service-card p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
}

/* ==========================================
   Portfolio Section
   ========================================== */

.portfolio-section {
  max-width: 960px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

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

.portfolio-item {
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.2);
}

.portfolio-image {
  width: 100%;
  height: 250px;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
}

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

.portfolio-content {
  padding: 2rem;
}

.portfolio-content h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.portfolio-content p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1.5rem;
}

/* ==========================================
   CTA Section
   ========================================== */

.cta-section {
  text-align: center;
  padding: 4rem 2rem;
  margin: 4rem auto;
  max-width: 960px;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.08) 0%,
    rgba(118, 75, 162, 0.08) 100%
  );
  border: 1px solid rgba(102, 126, 234, 0.15);
  position: relative;
  overflow: hidden;
  isolation: isolate; /* GSAP fix */
}

.cta-section::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(102, 126, 234, 0.1) 0%,
    transparent 70%
  );
  animation: glow 8s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-section p {
  max-width: 600px;
  margin: 0 auto 2.5rem;
  font-size: 1.1rem;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================
   Responsive (600px / 768px Kombiniert)
   ========================================== */

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .services-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .cta-section {
    padding: 3rem 1.5rem;
  }

  .cta-section h2 {
    font-size: 2rem;
  }

  .cta-section p {
    font-size: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .uxi-button {
    width: 100%;
    max-width: 100%;
  }

  .contact-options {
    flex-direction: column;
  }

  .radio-label {
    width: 100%;
  }
}

/* Ultra‑Mobile Fix */
@media (max-width: 600px) {
  .uxi-button {
    min-width: 0 !important; /* Verhindert Überlauf */
    width: 100% !important;
    box-sizing: border-box;
  }

  .cta-buttons a,
  .cta-buttons button {
    width: 100%;
  }
}

/* ==========================================
   Reduced Motion
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  .dynamic-field,
  .service-card,
  .portfolio-item,
  .uxi-button,
  .hero-cta {
    animation: none;
    transition: none;
  }

  .spinner {
    animation: none;
  }

  .cta-section::before {
    animation: none;
  }
}

/* ==========================================
   Print
   ========================================== */

@media print {
  .glass-tile {
    background: white;
    border: 1px solid #ccc;
    box-shadow: none;
  }

  .uxi-button {
    border: 1px solid #000;
    box-shadow: none;
  }

  .cta-section::before {
    display: none;
  }
}

/* Performance Optimierungen */
.service-card,
.portfolio-item {
  will-change: transform;
}

.cta-section .uxi-button {
  opacity: 1 !important;
}


