/* 2AM Connect - Custom Responsive Fixes for German Text */

/* Mobile/Desktop text visibility helpers */
.hide-mobile {
  display: block;
}

.hide-desktop {
  display: none;
}

@media (max-width: 767px) {
  .hide-mobile {
    display: none;
  }

  .hide-desktop {
    display: block;
  }
}

/* Fix für lange deutsche Wörter in Überschriften */
.big-text, 
.big-text-h2 {
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
}

/* Hero Heading - besseres Wrapping für "Ihre Digitale Zukunft" */
.hero_heading {
  word-break: break-word;
}

/* Animated text section - längere deutsche Texte */
.text_line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.text-text {
  word-break: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Feature sections - bessere Typografie für lange Wörter */
.h2-wrap .big-text-h2 {
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: 1.1;
}

/* Mobile responsive improvements */
@media (max-width: 991px) {
  .big-text {
    font-size: clamp(3rem, 12vw, 6rem);
    line-height: 1.05;
  }
  
  .big-text-h2 {
    font-size: clamp(2.5rem, 10vw, 5rem);
    line-height: 1.1;
  }
  
  .text-text {
    font-size: clamp(1.5rem, 6vw, 3rem);
  }
  
  /* Hero section better spacing */
  .hero_layout {
    gap: 2rem;
  }
  
  /* Testimonial cards - bessere Lesbarkeit */
  .text-2xl {
    font-size: clamp(1.25rem, 4vw, 2rem);
    line-height: 1.3;
  }
}

@media (max-width: 767px) {
  .big-text {
    font-size: clamp(2.5rem, 10vw, 4.5rem);
    line-height: 1;
  }
  
  .big-text-h2 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    line-height: 1.1;
  }
  
  .text-text {
    font-size: clamp(1.25rem, 5vw, 2rem);
  }
  
  /* Pricing card - bessere mobile Darstellung */
  .pricing_card {
    padding: 1.5rem;
  }
  
  .card_price {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

@media (max-width: 479px) {
  .big-text {
    font-size: 4rem;
    line-height: 0.9;
    letter-spacing: -0.02em;
  }
  
  .big-text-h2 {
    font-size: 2rem;
    line-height: 1.05;
  }
  
  .text-text {
    font-size: 1.5rem;
  }
}

/* Extra small mobile optimization (Mobile M & S) */
@media (max-width: 425px) {
  .big-text {
    font-size: 4rem;
    line-height: 0.88;
    letter-spacing: -0.03em;
  }
  
  .text-color-secondary {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  /* Navigation - kleinere Schrift für längere deutsche Begriffe */
  .nav_links {
    font-size: 0.9rem;
  }
  
  /* Footer links - besseres Spacing */
  .footer_wrap-links {
    gap: 2rem;
  }
  
  /* FAQ Accordion - längere Fragen */
  .text-xl {
    font-size: 1.25rem;
    line-height: 1.4;
  }
}

/* Spezielle Anpassungen für sehr lange Wörter */
.text_line:has(.text-text:nth-child(3)) {
  /* Für Zeilen mit "PROZESS-AUTOMATISIERUNG" */
  flex-direction: row;
  justify-content: center;
}

@media (max-width: 767px) {
  .text_line {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* Hero CardSwap animation (GSAP) */

/* Adjust hero container for better CardSwap positioning */
.hero_img-h {
  padding-top: 100% !important;
  min-height: 500px;
}

/* Mobile hero container adjustments */
@media (max-width: 767px) {
  .hero_img-h {
    padding-top: 100% !important;
    min-height: 400px;
  }
  
  .hero_layout {
    min-height: auto;
  }
}

@media (max-width: 479px) {
  .hero_img-h {
    padding-top: 95% !important;
    min-height: 350px;
  }
}

/* Default desktop positioning - 2/3 visible, aligned with "Ihre" text */
.card-swap-container {
  position: absolute;
  top: 15%;
  left: calc(100% - 480px);
  width: 720px;
  height: 450px;
  transform: scale(1.05);
  transform-origin: top left;
  perspective: 900px;
  overflow: visible;
}

/* Base card styles */
.card-swap-container .card {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #020617;
  color: #f9fafb;
  padding: 2rem 2.25rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.3);
  transform-style: preserve-3d;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

/* Video background for cards */
.card-swap-container .card video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
}

/* Ensure card content is above video and always readable */
.card-swap-container .card h3,
.card-swap-container .card p {
  position: relative;
  z-index: 1;
  text-align: left;
}

.card-swap-container .card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 3px 16px rgba(0, 0, 0, 0.5);
  font-weight: 600;
  max-width: 50%;
}

.card-swap-container .card p {
  font-size: 0.95rem;
  line-height: 1.6;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6), 0 2px 12px rgba(0, 0, 0, 0.4);
  max-width: 50%;
}

/* 4K and ultra-wide monitors - larger cards, 2/3 visible */
@media (min-width: 2560px) {
  .hero_img-h {
    padding-top: 100% !important;
    min-height: 600px;
  }

  .card-swap-container {
    position: absolute;
    top: -50%;
    left: calc(100% - 720px);
    transform: scale(1.8) !important;
    transform-origin: top left;
    perspective: 1200px;
    overflow: visible;
  }
  
  .card-swap-container .card {
    width: 720px !important;
    height: 450px !important;
    padding: 2.5rem 3rem !important;
  }
  
  .card-swap-container .card h3 {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8), 0 4px 24px rgba(0, 0, 0, 0.6) !important;
    max-width: 50% !important;
  }
  
  .card-swap-container .card p {
    font-size: 1.15rem !important;
    line-height: 1.65 !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 3px 16px rgba(0, 0, 0, 0.5) !important;
    max-width: 50% !important;
  }
}

/* Laptop L (1440px) - larger scale, aligned with "Ihre" text */
@media (max-width: 1919px) and (min-width: 1280px) {
  .hero_img-h {
    padding-top: 100% !important;
  }

  .card-swap-container {
    left: calc(100% - 600px);
    top: -50%;
    transform: scale(1.25);
    transform-origin: top left;
  }
}

/* Medium desktops / laptops - larger scale, aligned with "Ihre" text */
@media (max-width: 1279px) and (min-width: 1024px) {
  .card-swap-container {
    left: calc(100% - 510px);
    top: 0%;
    transform: scale(1.05);
  }
}

/* Tablets (horizontal & vertical) - larger scale, centered */
@media (max-width: 1023px) and (min-width: 768px) {
  .card-swap-container {
    position: absolute;
    left: 50%;
    top: 60%;
    bottom: auto;
    transform: translate(-50%, -50%) scale(1.15);
    transform-origin: center;
  }
}

/* Mobile L (landscape phones, 426px and up) - centered */
@media (max-width: 767px) and (min-width: 426px) {
  .card-swap-container {
    position: absolute;
    right: auto;
    bottom: auto;
    left: 50%;
    top: 60%;
    margin: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transform-origin: center;
  }
}

/* Mobile M & S (smaller phones) - centered */
@media (max-width: 425px) {
  .card-swap-container {
    position: absolute;
    right: auto;
    bottom: auto;
    left: 50%;
    top: 60%;
    margin: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transform-origin: center;
  }
}

/* Contact Section Styling */
.section_contact {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  position: relative;
  overflow: hidden;
}

.section_contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(2, 54, 123, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.contact_layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.contact_content {
  color: #f9fafb;
}

.contact_content .big-text-h2 {
  color: #f9fafb;
}

.contact_content .text-3xl {
  color: rgba(255, 255, 255, 0.85);
}

.contact_form-wrapper {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 3rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.contact_form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.form_field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form_label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f9fafb;
  letter-spacing: 0.025em;
}

.form_input,
.form_textarea {
  padding: 0.875rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #f9fafb;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form_input::placeholder,
.form_textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form_input:focus,
.form_textarea:focus {
  outline: none;
  border-color: rgba(2, 54, 123, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(2, 54, 123, 0.1);
}

.form_textarea {
  min-height: 150px;
  resize: vertical;
}

.form_submit-wrap {
  margin-top: 0.5rem;
}

.button.is-primary {
  width: 100%;
  background: linear-gradient(135deg, #02367b 0%, #01274d 100%);
  color: #ffffff;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(2, 54, 123, 0.3);
}

.button.is-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(2, 54, 123, 0.4);
}

.button.is-primary:active {
  transform: translateY(0);
}

.form_success-message {
  padding: 1.25rem 1.5rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  color: #10b981;
  margin-top: 1rem;
}

.form_error-message {
  padding: 1.25rem 1.5rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  color: #ef4444;
  margin-top: 1rem;
}

/* Responsive Contact Layout */
@media (max-width: 991px) {
  .contact_layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .contact_form-wrapper {
    padding: 2.5rem;
  }
  
  .form_grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 767px) {
  .contact_form-wrapper {
    padding: 2rem;
    border-radius: 20px;
  }
  
  .form_input,
  .form_textarea {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
  
  .contact_layout {
    gap: 2rem;
  }
  
  .button.is-primary {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 479px) {
  .contact_form-wrapper {
    padding: 1.5rem;
  }
  
  .form_grid {
    gap: 1rem;
  }
  
  .contact_form {
    gap: 1.25rem;
  }
}

/* Pricing section - bessere Darstellung auf Tablets */
@media (max-width: 991px) and (min-width: 768px) {
  .tab-link .text-xl {
    font-size: 1.25rem;
  }
  
  .pricing_card .text-base {
    font-size: 0.95rem;
    line-height: 1.5;
  }
}

/* Testimonials - besseres Text-Wrapping */
.testimonial_card {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Button text - kein Umbruch */
.button-text {
  white-space: nowrap;
}

@media (max-width: 479px) {
  .button.is-small {
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem;
  }
}

/* DSGVO-Checkbox Styling im Kontaktformular */
.w-checkbox {
  margin-bottom: 0;
  padding-left: 0;
}

.w-checkbox-input {
  accent-color: #02367b;
  cursor: pointer;
}

.w-checkbox-input:focus {
  outline: 2px solid #02367b;
  outline-offset: 2px;
}

/* Spline Animation - KI-gestützte Lösungen Section */

/* Allow overflow on parent containers */
.container_img.is-support {
  overflow: visible !important;
}

.support_img-h--spline {
  padding-top: 100% !important;
  position: relative;
  display: block;
  overflow: visible !important;
}

.support_img-h--spline iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.6);
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  z-index: 10;
}

/* Ensure the solutions layout allows overflow */
.section_support .solutions_layout {
  overflow: visible !important;
}

.section_support .padding-global {
  overflow: visible !important;
}

.section_support .container-full {
  overflow: visible !important;
}

/* Responsive adjustments for Spline animation */
@media (max-width: 1440px) {
  .support_img-h--spline iframe {
    transform: translate(-50%, -50%) scale(1.5);
  }
}

@media (max-width: 1280px) {
  .support_img-h--spline iframe {
    transform: translate(-50%, -50%) scale(1.4);
  }
}

@media (max-width: 1024px) {
  .support_img-h--spline iframe {
    transform: translate(-50%, -50%) scale(1.3);
  }
}

@media (max-width: 991px) {
  .support_img-h--spline {
    padding-top: 120% !important;
  }

  .support_img-h--spline iframe {
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@media (max-width: 767px) {
  .support_img-h--spline {
    padding-top: 100% !important;
  }

  .support_img-h--spline iframe {
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@media (max-width: 479px) {
  .support_img-h--spline {
    padding-top: 100% !important;
  }

  .support_img-h--spline iframe {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ==========================================
   BLOG STYLING
   ========================================== */

/* Blog List Container */
.blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

@media (max-width: 767px) {
  .blog-list {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Blog Card */
.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.blog-card-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.blog-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
  color: #1a1a1a;
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-card-title a:hover {
  color: #02367b;
}

.blog-card-caption {
  font-size: 0.875rem;
  color: #666;
  margin: 0 0 1rem 0;
  font-style: italic;
  line-height: 1.5;
}

.blog-card-excerpt {
  font-size: 0.9375rem;
  color: #4a4a4a;
  line-height: 1.6;
  margin: 0 0 1rem 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid #e5e5e5;
  font-size: 0.875rem;
  color: #666;
}

.blog-card-date {
  margin: 0;
}

.blog-card-link {
  color: #02367b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.blog-card-link:hover {
  color: #01274d;
  text-decoration: underline;
}

/* Blog Post Detail Page */
.blog-post-header {
  margin-bottom: 2rem;
}

.blog-post-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  line-height: 1.2;
  color: #1a1a1a;
}

@media (max-width: 767px) {
  .blog-post-title {
    font-size: 2rem;
  }
}

.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  color: #666;
}

.blog-post-date,
.blog-post-author {
  margin: 0;
}

.blog-post-image-wrapper {
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
}

.blog-post-image {
  width: 100%;
  height: auto;
  display: block;
  max-height: 600px;
  object-fit: cover;
}

.blog-post-caption {
  font-size: 0.875rem;
  color: #666;
  font-style: italic;
  margin-top: 0.75rem;
  text-align: center;
  padding: 0 1rem;
}

.blog-post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
  line-height: 1.8;
  color: #333;
}

.blog-post-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 2rem 0 1rem 0;
  color: #1a1a1a;
}

.blog-post-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
  color: #1a1a1a;
}

.blog-post-content p {
  margin: 0 0 1.5rem 0;
}

.blog-post-content ul,
.blog-post-content ol {
  margin: 0 0 1.5rem 0;
  padding-left: 2rem;
}

.blog-post-content li {
  margin: 0.5rem 0;
}

.blog-post-content a {
  color: #02367b;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.blog-post-content a:hover {
  color: #01274d;
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.blog-post-content blockquote {
  border-left: 4px solid #02367b;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #555;
}

/* Blog Tags */
.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.blog-tag {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: rgba(2, 54, 123, 0.1);
  color: #02367b;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.blog-tag:hover {
  background: rgba(2, 54, 123, 0.2);
  color: #01274d;
}

/* Blog Back Link */
.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #02367b;
  text-decoration: none;
  font-weight: 500;
  margin: 2rem 0;
  transition: color 0.2s ease;
}

.blog-back-link:hover {
  color: #01274d;
}

/* Blog Loading State */
.blog-loading {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}

.blog-error {
  text-align: center;
  padding: 4rem 2rem;
  color: #d32f2f;
}

.blog-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: #666;
}


