/* Services Page Specific Styles */
.services-main {
        min-height: 100vh;
    padding-top: 80px;
    /* background: var(--tertiary-color); */
    background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url(../src/imgs/bg/10.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    padding: 80px 20px;
    display: flex
;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Hero Section */
.services-hero {
    /* background: var(--tertiary-color); */
    color: var(--secondary-color);
    padding: 60px;
    max-width: 100%;
    text-align: center;

    /*Kaputt*/
}

.services-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    /* padding-top: 60px; */
}

/* Using global h2 styles */

.services-hero-description {
    font-size: 1.3em;
    max-width: 900px;
    margin: 0 auto;
    color: var(--secondary-color);
}

/* Services Grid - Side by Side Layout */
/* .services-grid {
    padding: 0px 0px 100px 0px;
    background: var(--tertiary-color);
} */

.services-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    max-width: 1500px;
    margin: 0 auto;
}

/* Side by Side Cards */
.services-cards .service-card {
    max-width: 450px;
    min-width: 450px;
}

/* Service Cards */
.service-card {
    /* Using global card class with specific overrides */
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 550px;
    max-height: 550px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border-left: 5px solid var(--primary-color);
    /* Use fade-in class for opacity and transform animation */
}

.service-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
            transform: translateY(-5px) scale(1.02);
            box-shadow: 0 8px 16px rgba(255, 102, 0, 0.2);
            border-color: var(--primary-color);
}

/* Hover Circle Effect - Fixed positioning */
.service-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 20;
}

.service-card:hover::before {
    opacity: 1;
    transform: scale(1.4);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Service Card Header */
.service-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.service-icon {
    min-width: 50px;
    min-height: 50px;
    max-width: 50px;
    max-height: 50px;
    background: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(231, 121, 25, 0.3);
}

/* Using global h2 styles with color override */
.service-card-header h2 {
    color: var(--secondary-color);
    margin: 0;
    font-size: 1.6rem; /* Specific override for service cards */
}

/* Service Features */
.service-features {
    flex-grow: 1;
    margin-bottom: 1rem;
    overflow-y: auto;
}

.feature-highlight {
    margin-bottom: 1rem;
}

/* Using global h3 styles with specific overrides */
.feature-highlight h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem; /* Specific size for features */
}

.feature-highlight p {
    color: var(--secondary-color);
    line-height: 1.5;
    font-size: 0.95rem !important;
}

.features-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.features-list i {
    color: var(--primary-color);
    font-size: 0.7rem;
    width: 14px;
}

/* Service Card Footer */
.service-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
}

.service-card-footer .btn-learn-more {
    padding: 10px 20px;
    font-size: 0.9rem;
    min-height: 40px;
    max-height: 40px;
}

/* CTA Section */
.services-cta {
    background: linear-gradient(135deg, var(--tertiary-color) 0%, #4a4a4a 100%);
    color: var(--secondary-color);
    padding: 100px 0;
    text-align: center;
}

/* Using global h2 styles with specific overrides */
.cta-content h2 {
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.cta-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.services-carousel {
  position: relative;
  perspective: 1800px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 600px;
  /* margin-top: 50px; */
  overflow: visible;
  padding: 0 5%;
  touch-action: pan-y pinch-zoom;
    width: 65%;
    max-width: 1500px;
}

.carousel {
  width: 450px;
  height: 550px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Touch-friendly on mobile */
@media (max-width: 768px) {
  .carousel {
    touch-action: pan-y; /* Allow vertical scrolling */
  }
}

/* Karten im Karussell - Dreieck-Layout */
.carousel-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.6s ease,
              filter 0.6s ease;
  backface-visibility: hidden;
  user-select: none;
}

/* Grundzustand der Karte - kleiner und dunkler */
.carousel-card .service-card {
  max-width: 100%;
  min-height: 550px;
  max-height: 550px;
  transform: scale(0.7);
  opacity: 0.4;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  filter: brightness(0.7) blur(1px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Aktive Karte - volle Größe und Helligkeit */
.carousel-card.active .service-card {
  transform: scale(1);
  opacity: 1;
  z-index: 10;
  pointer-events: auto;
  filter: brightness(1) blur(0);
  /* box-shadow: 0 20px 60px rgba(255, 102, 0, 0.4); */
}

/* Ensure carousel cards don't have hover effects that conflict */
.carousel-card .service-card:hover {
  transform: scale(0.7);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.carousel-card.active .service-card:hover {
  transform: scale(1.02);
  box-shadow: 0 22px 65px rgba(255, 102, 0, 0.5);
}

/* Match the circle effect for carousel cards */
.carousel-card .service-card::before {
  opacity: 0;
  transform: scale(0);
}

.carousel-card.active .service-card:hover::before {
  opacity: 1;
  transform: scale(1.4);
}


/* Pfeile */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-size: 1.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  z-index: 100;
  transition: all 0.3s ease;
}

.carousel-btn.left {
  left: -20px;
}
.carousel-btn.right {
  right: -20px;
}

.carousel-btn:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

/* Fallback for browsers that don't support backdrop-filter */
/* .no-backdrop-filter .carousel-btn {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: none;
} */

/* Swipe indicator for mobile */
.swipe-hint {
  position: absolute;
  bottom: -65px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--secondary-color);
  font-size: 1rem;
  opacity: 0;
  animation: fadeInOut 4s ease-in-out infinite;
  pointer-events: none;
  display: none;
  text-align: center;
  white-space: nowrap;
}

.swipe-hint i {
  margin: 0 8px;
  animation: swipeAnimation 2s ease-in-out infinite;
}

.swipe-hint i:first-child {
  animation: swipeLeft 2s ease-in-out infinite;
}

.swipe-hint i:last-child {
  animation: swipeRight 2s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  20%, 80% { opacity: 0.8; }
}

@keyframes swipeLeft {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-5px); }
}

@keyframes swipeRight {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

@media (max-width: 768px) {
  .swipe-hint {
    display: block;
  }
  
  /* Hide carousel buttons on mobile */
  .carousel-btn {
    display: none;
  }
}

@media (min-width: 769px) {
  .swipe-hint {
    display: none;
  }
}

/* Responsive Design */
@media (max-width: 1100px) {
    .services-cards .service-card {
        width: calc(50% - 1rem);
        max-width: 500px;
        min-width: 300px;
    }

    .service-card:hover::before {
        transform: scale(2.4);
    }

    .services-main{
        align-items: unset;
    }

    .services-carousel {
        height: 550px;
        padding: 0 60px;
            width: 100%;
    }

    .carousel {
        width: 400px;
        height: 500px;
    }

    .carousel-card .service-card {
        min-height: 500px;
        max-height: 500px;
    }

    .carousel-card.active .service-card {
        transform: scale(0.95);
    }

    .carousel-btn {
        font-size: 1.4rem;
        width: 45px;
        height: 45px;
    }

    .carousel-btn.left {
        left: 5px;
    }
    .carousel-btn.right {
        right: 5px;
    }
}

@media (max-width: 768px) {
    .services-hero {
        padding: 60px 20px;
    }
    
    /* Using global responsive h2 styles */
    
    .hero-description {
        font-size: 1.1rem !important;
    }
    
    .services-cards {
        gap: 2rem;
    }
    
    .services-cards .service-card {
        width: 95%;
        max-width: none;
        min-height: auto;
        max-height: none;
        padding: 1.5rem;
        min-width: 0;
    }
    
    .service-card-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .service-card-header h2 {
        font-size: 1.4rem; /* Specific mobile size */
    }
    
    .services-cta {
        padding: 60px 0;
    }
    
    /* Using global responsive h2 styles */
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn-primary,
    .cta-buttons .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
    
    /* Adjust hover effects for mobile */
    .service-card::before {
        width: 30px;
        height: 30px;
        top: -15px;
        right: -15px;
    }
    
    .service-card {
        border-width: 3px;
    }

    .services-carousel {
        height: 480px;
        perspective: 1500px;
        padding: 0 50px;
    }

    .carousel {
        width: 340px;
        height: 450px;
    }

    .carousel-card .service-card {
        min-height: 450px;
        max-height: 450px;
        font-size: 0.9rem;
        padding: 1.3rem;
    }

    .carousel-card.active .service-card {
        transform: scale(0.95);
    }

    .carousel-btn {
        font-size: 1.3rem;
        width: 40px;
        height: 40px;
    }

    .carousel-btn.left {
        left: 5px;
    }
    .carousel-btn.right {
        right: 5px;
    }

    .carousel .service-card-header {
        margin-bottom: 1rem;
    }

    .carousel .service-icon {
        min-width: 40px;
        min-height: 40px;
        max-width: 40px;
        max-height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .services-cards {
        gap: 1.5rem;
    }
    
    .services-cards .service-card {
        width: 100%;
        padding: 1.2rem;
    }
    
    .service-card-header h2 {
        font-size: 1.3rem;
    }
    
    .services-hero h2 {
        font-size: 1.8rem;
    }
    
    /* Further adjust hover effects for small screens */
    .service-card::before {
        width: 25px;
        height: 25px;
        top: -12px;
        right: -12px;
    }
    
    .service-card {
        border-width: 2px;
    }

    .services-carousel {
        height: 450px;
        perspective: 1200px;
        padding: 0 45px;
        margin-top: 30px;
    }

    .carousel {
        width: 300px;
        height: 400px;
    }

    .carousel-card .service-card {
        min-height: 400px;
        max-height: 400px;
        font-size: 0.85rem;
        padding: 1.1rem;
    }

    .carousel-card.active .service-card {
        transform: scale(0.92);
    }

    .carousel-btn {
        font-size: 1.2rem;
        width: 36px;
        height: 36px;
    }

    .carousel-btn.left {
        left: 2px;
    }
    .carousel-btn.right {
        right: 2px;
    }

    .carousel .service-card-header {
        gap: 0.5rem;
        margin-bottom: 0.9rem;
    }

    .carousel .service-icon {
        min-width: 38px;
        min-height: 38px;
        max-width: 38px;
        max-height: 38px;
        font-size: 0.95rem;
    }

    .carousel .service-card-header h4 {
        font-size: 1.15rem;
    }

    .carousel .feature-highlight h3 {
        font-size: 1.05rem;
    }

    .carousel .features-list li {
        font-size: 0.82rem;
        margin-bottom: 0.45rem;
    }

    .carousel .service-card-footer .btn-learn-more {
        font-size: 0.88rem;
        padding: 9px 18px;
    }
}

/* Animation delays for staggered entrance - Only for fade-in animations */
.service-card.fade-in:nth-child(1) {
    transition-delay: 0.1s;
}

.service-card.fade-in:nth-child(2) {
    transition-delay: 0.2s;
}

.service-card.fade-in:nth-child(3) {
    transition-delay: 0.3s;
}

/* Remove transition delay when animated in to prevent hover delays */
.service-card.fade-in.animate-in {
    transition-delay: 0s;
}