/* ========================================
   ABS Abschleppdienst - Custom CSS
   TailwindCSS Additions & Animations
   ======================================== */

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.gradient-card-bg {
    background: linear-gradient(135deg, rgb(20, 20, 34) 0%, rgb(22, 33, 62) 50%, rgb(12, 41, 77) 100%);
}

/* Page Hero Gradient */
.page-hero-gradient {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* Primary Gradient */
.gradient-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pulse Animation */
@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px 10px rgba(255, 107, 53, 0);
    }
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* Bounce Animation */
@keyframes bounce-soft {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.bounce-soft {
    animation: bounce-soft 2s infinite;
}

/* Card Hover Effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Service Card Top Border Animation */
.service-card-border {
    position: relative;
    overflow: hidden;
}

.service-card-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card-border:hover::before {
    transform: scaleX(1);
}

/* Form Focus Styles */
.form-input-focus {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input-focus:focus {
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    outline: none;
}

/* FAQ Accordion */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Header Scroll Effect */
.header-scrolled {
    background: #1a1a2e !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Gradient Overlay */
.gradient-overlay {
    position: relative;
}

.gradient-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
}

/* Icon Circle */
.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.icon-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.4);
}

.icon-circle-sm {
    width: 50px;
    height: 50px;
}

.icon-circle-lg {
    width: 100px;
    height: 100px;
}

/* Process Number */
.process-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 107, 53, 0.1);
    line-height: 1;
}

/* Benefit Item Hover */
.benefit-hover {
    transition: background 0.3s ease, transform 0.3s ease;
}

.benefit-hover:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
}

/* Testimonial Card */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

/* Partner Logo Hover */
.partner-hover {
    transition: background 0.3s ease;
}

.partner-hover:hover {
    background: #1a1a2e;
}

.partner-hover:hover span {
    color: white;
}

/* Location Card */
.location-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

/* Form Success Message */
.form-success {
    text-align: center;
    padding: 40px 20px;
}

.form-success i {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 20px;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    color: white;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
}

/* Error State */
.form-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 107, 53, 0.2);
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .icon-circle {
        width: 60px;
        height: 60px;
    }
    
    .icon-circle-lg {
        width: 80px;
        height: 80px;
    }
    
    .process-number {
        font-size: 2rem;
    }
}

/* Extra Small Screens - Prevent overflow only */
@media (max-width: 456px) {
    /* Prevent horizontal overflow */
    html, body {
        overflow-x: hidden;
    }
    
    /* Ensure all elements stay within viewport */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Text overflow prevention */
    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Hero Section - reduce spacing */
    section.min-h-screen {
        min-height: auto !important;
        padding-top: 5rem !important;
        padding-bottom: 5rem !important;
    }
    
    section.min-h-screen .mb-6 {
        margin-bottom: 1rem !important;
    }
    
    section.min-h-screen .mb-4 {
        margin-bottom: 0.75rem !important;
    }
    
    section.min-h-screen .mb-8 {
        margin-bottom: 1.5rem !important;
    }
    
    section.min-h-screen .mb-10 {
        margin-bottom: 2rem !important;
    }
    
    section.min-h-screen .gap-4 {
        gap: 0.75rem !important;
    }
    
    /* Hero badge - long text */
    .bg-primary\/20 {
        font-size: 0.65rem !important;
        padding: 0.375rem 0.75rem !important;
        letter-spacing: 0.1em !important;
    }
    
    /* Hero title - prevent overflow */
    section.min-h-screen h1 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
    }
    
    section.min-h-screen h1 span.block.text-primary {
        font-size: 0.875rem !important;
    }
    
    /* Long uppercase headings that may overflow */
    .font-heading.text-3xl,
    .font-heading.text-4xl {
        font-size: 1.5rem !important;
    }
    
    /* Partner names - can be long */
    .partner-hover span {
        font-size: 0.6rem !important;
    }
    
    /* Footer addresses - uppercase long text */
    footer li {
        font-size: 0.7rem !important;
        word-break: break-word;
    }
    
    /* Reduce padding on small screens */
    .max-w-7xl {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* Hide scroll indicator on mobile */
    section.min-h-screen .absolute.bottom-8 {
        display: none !important;
    }
}

/* Minimum 320px width support */
@media (max-width: 320px) {
    /* Hero title - further reduce */
    section.min-h-screen h1 {
        font-size: 1.5rem !important;
    }
    
    section.min-h-screen h1 span.block.text-primary {
        font-size: 0.75rem !important;
    }
    
    /* Section headings */
    .font-heading.text-3xl,
    .font-heading.text-4xl {
        font-size: 1.25rem !important;
    }
    
    /* Hero badge */
    .bg-primary\/20 {
        font-size: 0.55rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

/* Print Styles */
@media print {
    .header,
    .fab-container,
    .scroll-to-top {
        display: none !important;
    }
    
    .hero {
        min-height: auto !important;
        padding: 40px 0 !important;
    }
    
    section {
        padding: 30px 0 !important;
    }
}