/* ==========================================
   CSS Variables & Reset
   ========================================== */
:root {
    --mainBg: #1a1a1a;
    --secondBg: #0a0a0a;
    --white: #ffffff;
    --grey: #d1d5db;
    --accent: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--mainBg);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

/* ==========================================
   Header / Navigation
   ========================================== */
header {
    background: #2b3c4f !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Stronger shadow when scrolled */
header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.menuItem {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.menuItem:hover {
    color: var(--grey);
    transform: translateY(-2px);
}

.menuItem::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--grey);
    transition: width 0.3s ease;
}

.menuItem:hover::after {
    width: 100%;
}

/* Mobile Navigation */
.mobileNav {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobileNav.active {
    transform: translateX(0);
}

.navBtn {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.navBtn:hover {
    transform: scale(1.1);
}

.navBtn.active span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.navBtn.active span:nth-child(2) {
    opacity: 0;
}

.navBtn.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

.navBtn span {
    transition: all 0.3s ease;
}

/* ==========================================
   Buttons
   ========================================== */
.cta-button {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    transition: left 0.3s ease;
    z-index: -1;
}

.cta-button:hover::before {
    left: 0;
}

.cta-button:hover {
    color: var(--mainBg);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../hero.webp');
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    position: relative;
}

.hero h1 {
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    animation: fadeInUp 1.2s ease-out;
}

.hero .cta-button {
    animation: fadeInUp 1.4s ease-out;
}

/* ==========================================
   Partner Logos
   ========================================== */

/* Logo Section Background */
#clients {
    background: #2f4357;
}

/* Logo Cards */
.logo-card {
    background: white;
    border-radius: 8px;
    min-height: 150px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.logo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(200,200,200,0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.logo-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.logo-card:hover::before {
    opacity: 1;
}

.logoItem {
    width: auto;
    height: auto !important;
    max-height: 200px;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(0%);
}

.logo-card:hover .logoItem {
    transform: scale(1.1);
    filter: grayscale(0%) brightness(1.1);
}

.logoReveal {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for logos */
.logoReveal:nth-child(1) { animation-delay: 0.1s; }
.logoReveal:nth-child(2) { animation-delay: 0.2s; }
.logoReveal:nth-child(3) { animation-delay: 0.3s; }
.logoReveal:nth-child(4) { animation-delay: 0.4s; }
.logoReveal:nth-child(5) { animation-delay: 0.5s; }
.logoReveal:nth-child(6) { animation-delay: 0.6s; }
.logoReveal:nth-child(7) { animation-delay: 0.7s; }
.logoReveal:nth-child(8) { animation-delay: 0.8s; }
.logoReveal:nth-child(9) { animation-delay: 0.9s; }
.logoReveal:nth-child(10) { animation-delay: 1s; }

/* Responsive Logo Adjustments */
@media (max-width: 1024px) {
    .logo-card {
        min-height: 120px;
    }
    
    .logoItem {
        max-height: 150px;
    }
}

@media (max-width: 768px) {
    .logo-card {
        min-height: 100px;
    }
    
    .logoItem {
        max-height: 100px;
    }
}

/* ==========================================
   Content Reveal Animation
   ========================================== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.contentReveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.contentReveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Team Section
   ========================================== */
.team-img-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.team-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: top;
    display: block;
    transition: transform 0.4s ease;
}

/* Overlay with team info */
.team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.team-info {
    text-align: center;
    padding: 20px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.team-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.team-position {
    font-size: 1rem;
    font-weight: 500;
    color: #d1d5db;
    line-height: 1.6;
}

/* Hover Effects */
.team-img-container:hover .team-overlay {
    opacity: 1;
}

.team-img-container:hover .team-info {
    transform: translateY(0);
}

.team-img-container:hover .team-img {
    transform: scale(1.05);
}

/* Responsive Team Layout */
@media (max-width: 1024px) {
    .team-img {
        height: 350px;
    }
    
    .team-name {
        font-size: 1.5rem;
    }
    
    .team-position {
        font-size: 0.95rem;
    }
}

@media (max-width: 640px) {
    .team-img {
        height: 300px;
    }
    
    .team-name {
        font-size: 1.25rem;
    }
    
    .team-position {
        font-size: 0.9rem;
    }
}

/* ==========================================
   Image Slider
   ========================================== */
.slider-container {
    max-width: 100%;
}

.slider-track {
    display: flex;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--mainBg);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: var(--white);
    transform: scale(1.1);
}

/* ==========================================
   FAQ Section
   ========================================== */
.theFaq {
    margin-top: 3rem;
}

.faq-item {
    background-color: rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.faq-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.faq-question {
    background: transparent;
    text-align: left;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.faq-arrow {
    transition: transform 0.3s ease;
    font-size: 0.875rem;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    transition: max-height 0.5s ease;
    overflow: hidden;
}

.faq-item.active .faq-answer {
    max-height: 2000px;
}

.faqContent {
    padding: 1rem 0;
    animation: fadeIn 0.5s ease;
}

.faqContent h2 {
    font-size: 1.25rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.faqContent ol {
    list-style-position: inside;
    margin-left: 1rem;
}

.faqContent ul {
    list-style-type: disc;
    list-style-position: inside;
    margin-left: 2rem;
    margin-top: 0.5rem;
}

.faqContent ul.sublist {
    margin-left: 3rem;
}

.faqContent li {
    margin-bottom: 0.5rem;
}

.faqContent p {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background-color: var(--mainBg);
    position: relative;
    min-height: 600px;
}

.footer-container {
    position: relative;
}

.instagram {
    filter: brightness(0) invert(1);
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 4rem;
    }
    
    h2 {
        font-size: 4rem;
    }
    
    h3 {
        font-size: 2rem;
    }
    
    p {
        font-size: 1.25rem;
    }
    
    .team-img {
        height: 400px;
    }
    
    .slider-track img {
        height: 400px !important;
    }
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 3rem;
    }
    
    .mapsBanner h3 {
        font-size: 1.25rem;
    }
    
    .team-img {
        height: 300px;
    }
    
    .slider-track img {
        height: 300px !important;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* ==========================================
   Utility Classes
   ========================================== */
.filter-brightness {
    filter: brightness(0) invert(1);
}

section {
    scroll-margin-top: 100px;
}

/* Smooth transitions for all interactive elements */
button, a, img {
    transition: all 0.3s ease;
}

/* ==========================================
   Additional Animations & Effects
   ========================================== */

/* Parallax effect for sections */
section {
    position: relative;
}

/* Service cards hover effect */
.contentReveal h3 {
    position: relative;
    padding-bottom: 10px;
}

.contentReveal h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--grey), transparent);
    transition: width 0.4s ease;
}

.contentReveal.active h3::after {
    width: 60px;
}

/* Smooth fade-in for text */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale up animation */
@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Gradient animation for headings */
h2 {
    background: linear-gradient(90deg, var(--white) 0%, var(--grey) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
}

/* Logo Slider - Animated Partner Logos */
.logo-slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.logo-slider {
    display: flex;
    gap: 60px;
    animation: scroll-left 30s linear infinite;
    width: fit-content;
}

.logo-slide {
    flex-shrink: 0;
    width: 180px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    transition: transform 0.3s ease;
}

.logo-slide:hover {
    transform: scale(1.05);
    animation-play-state: paused;
}

.logo-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(0%);
}

/* Pause animation on hover over the entire container */
.logo-slider-container:hover .logo-slider {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Responsive Logo Slider */
@media (max-width: 768px) {
    .logo-slide {
        width: 140px;
        height: 60px;
        padding: 10px 15px;
    }
    
    .logo-slider {
        gap: 40px;
        animation: scroll-left 25s linear infinite;
    }
}

/* Service section background pattern */
#service {
    background: #f5f5f5;
    position: relative;
}

#service h2 {
    color: #2b3c4f;
    background: none;
    -webkit-text-fill-color: inherit;
}

/* Service Grid */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Service Cards */
.service-card {
    position: relative;
    height: 250px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Service Card Background Images */
.service-card[data-service="fehlerdiagnose"] {
    background-image: url('../services/fehlerdiagnose.webp');
}

.service-card[data-service="inspektion"] {
    background-image: url('../services/inspektion.webp');
}

.service-card[data-service="instandsetzung"] {
    background-image: url('../services/instandsetzung.webp');
}

.service-card[data-service="reifenservice"] {
    background-image: url('../services/reifenservice.webp');
}

.service-card[data-service="tuev"] {
    background-image: url('../services/tuev.webp');
}

.service-card[data-service="lackservice"] {
    background-image: url('../services/lackservice.webp');
}

.service-card[data-service="klimaservice"] {
    background-image: url('../services/klimaservice.webp');
}

.service-card[data-service="scheibenservice"] {
    background-image: url('../services/scheibenservice.webp');
}

.service-card[data-service="holbring"] {
    background-image: url('../services/holbring.webp');
}

/* Service Card Overlay */
.service-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.85));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}

.service-card:hover .service-card-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.95));
}

/* Service Card Title */
.service-card-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    z-index: 2;
    width: 90%;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    transition: all 0.4s ease;
}

/* Service Card Description */
.service-card-description {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
    z-index: 3;
    width: 85%;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.service-card:hover .service-card-title {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -60%);
}

.service-card:hover .service-card-description {
    opacity: 1;
    visibility: visible;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* Responsive Service Grid */
@media (max-width: 1024px) {
    .service-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .service-card {
        height: 220px;
    }
    
    .service-card-title {
        font-size: 1.25rem;
    }
    
    .service-card-description {
        font-size: 0.85rem;
        line-height: 1.5;
        padding: 15px;
    }
}

@media (max-width: 640px) {
    .service-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .service-card {
        height: 200px;
    }
    
    .service-card-title {
        font-size: 1.1rem;
    }
    
    .service-card-description {
        font-size: 0.8rem;
        line-height: 1.4;
        padding: 12px;
        width: 90%;
    }
    
    #service h2 {
        font-size: 2rem;
    }
}

/* Team section background pattern */
#team {
    background: var(--secondBg);
    position: relative;
}

#team::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

#team > * {
    position: relative;
    z-index: 1;
}

/* Smooth scroll indicator */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Button ripple effect */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:active::after {
    width: 300px;
    height: 300px;
}

/* Image loading fade-in */
img {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

img[src*=".svg"] {
    opacity: 1;
}

/* Header shadow on scroll */
header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Glassmorphism effect for mobile nav */
.mobileNav {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(26, 26, 26, 0.95);
}

/* Footer hover effects */
.footer a {
    position: relative;
    display: inline-block;
}

.footer a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--grey);
    transition: width 0.3s ease;
}

.footer a:hover::before {
    width: 100%;
}

/* Stagger animation for service items */
.contentReveal:nth-child(1) {
    animation-delay: 0.1s;
}

.contentReveal:nth-child(2) {
    animation-delay: 0.2s;
}

.contentReveal:nth-child(3) {
    animation-delay: 0.3s;
}

/* Smooth color transitions */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection color */
::selection {
    background-color: var(--grey);
    color: var(--mainBg);
}

::-moz-selection {
    background-color: var(--grey);
    color: var(--mainBg);
}

/* ==========================================
   Slider Button - Hover-Animation deaktivieren
   ========================================== */
.slider-btn,
.slider-prev,
.slider-next {
    transition: none !important;
    transform: translateY(-50%) !important;
}

.slider-btn:hover,
.slider-prev:hover,
.slider-next:hover,
.slider-btn:focus,
.slider-prev:focus,
.slider-next:focus,
.slider-btn:active,
.slider-prev:active,
.slider-next:active {
    transition: none !important;
    transform: translateY(-50%) !important;
    background-color: rgba(255, 255, 255, 0.8) !important;
    color: #000 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    scale: 1 !important;
    opacity: 1 !important;
}
