/* ========================================
   Logopädie Herne - Premium Custom Styles
   Beyond Tailwind CSS
   ======================================== */

/* Custom Properties */
:root {
    --primary: #059669;
    --primary-dark: #047857;
    --primary-light: #10b981;
    --secondary: #f59e0b;
    --secondary-dark: #d97706;
    --accent: #8b5cf6;
    --dark: #1f2937;
    --light: #f9fafb;
    --gradient-primary: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --gradient-hero: linear-gradient(135deg, #059669 0%, #047857 50%, #065f46 100%);
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-large: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(5, 150, 105, 0.3);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Selection Color */
::selection {
    background: var(--primary);
    color: white;
}

/* ========================================
   Animations
   ======================================== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4); }
    50% { box-shadow: 0 0 0 20px rgba(5, 150, 105, 0); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Animation Classes */
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; }
.animate-gradient { 
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}
.animate-bounce-subtle { animation: bounce-subtle 2s ease-in-out infinite; }

/* ========================================
   Hero Section
   ======================================== */
.hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
}

.hero-blob-1 {
    width: 400px;
    height: 400px;
    background: #10b981;
    top: -100px;
    right: -100px;
}

.hero-blob-2 {
    width: 300px;
    height: 300px;
    background: #f59e0b;
    bottom: -50px;
    left: -50px;
}

/* ========================================
   Glass Effect
   ======================================== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   Cards
   ======================================== */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-large);
}

.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.card-3d:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(-5deg) scale(1.02);
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.5);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: var(--gradient-warm);
    color: white;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-outline {
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: transparent;
}

.btn-outline:hover {
    background: white;
    color: var(--primary);
}

/* ========================================
   Floating Action Buttons
   ======================================== */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.fab-phone {
    background: var(--gradient-primary);
}

.fab-whatsapp {
    background: #25D366;
}

.fab-booking {
    background: var(--gradient-warm);
    animation: pulse-glow 2s infinite;
}

/* ========================================
   Team Cards
   ======================================== */
.team-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.team-card img {
    transition: transform 0.5s ease;
}

.team-card:hover img {
    transform: scale(1.1);
}

.team-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 30px 20px 20px;
    transform: translateY(60px);
    transition: transform 0.3s ease;
}

.team-card:hover .team-card-overlay {
    transform: translateY(0);
}

/* ========================================
   Stats Counter
   ======================================== */
.stat-item {
    text-align: center;
    padding: 30px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* ========================================
   Testimonials
   ======================================== */
.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    box-shadow: var(--shadow-soft);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 80px;
    color: var(--primary);
    opacity: 0.1;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-stars {
    color: #fbbf24;
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-large);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--primary);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--gradient-primary);
    color: white;
    transform: rotateY(360deg);
}

/* ========================================
   FAQ Accordion
   ======================================== */
.faq-item {
    background: white;
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.faq-question {
    padding: 25px 30px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f9fafb;
}

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer.active {
    padding: 0 30px 25px;
    max-height: 500px;
}

.faq-icon {
    transition: transform 0.3s ease;
}

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

/* ========================================
   Contact Form
   ======================================== */
.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

/* ========================================
   Navigation
   ======================================== */
.nav-link {
    position: relative;
    padding: 8px 0;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ========================================
   Sticky Header
   ======================================== */
.header-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
}

/* ========================================
   Section Decorations
   ======================================== */
.section-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.section-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    margin: 20px auto;
}

/* ========================================
   Image Effects
   ======================================== */
.img-glow {
    box-shadow: 0 0 60px rgba(5, 150, 105, 0.3);
}

.img-frame {
    border: 8px solid white;
    box-shadow: var(--shadow-large);
}

/* ========================================
   Badges
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
}

.badge-primary {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: var(--primary);
}

.badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

/* ========================================
   Loading States
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2.5rem;
    }
    
    .fab-container {
        bottom: 20px;
        right: 20px;
    }
    
    .fab {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .hero-blob {
        display: none;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .fab-container,
    .header-navigation,
    .footer-top-link {
        display: none !important;
    }
}

/* ========================================
   Mobile Specific Utilities
   ======================================== */

/* Hide scrollbar but allow scrolling */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Safe area padding for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .fab-container {
        bottom: calc(1rem + env(safe-area-inset-bottom));
    }
    
    .page-footer {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Mobile touch improvements */
@media (max-width: 768px) {
    /* Larger touch targets */
    .btn-primary,
    .btn-secondary,
    .fab {
        min-height: 48px;
    }
    
    /* Prevent text size adjustment on orientation change */
    html {
        -webkit-text-size-adjust: 100%;
    }
    
    /* Smooth momentum scrolling */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Reduce motion for battery saving */
    @media (prefers-reduced-motion: reduce) {
        .animate-float,
        .animate-pulse-glow,
        .animate-bounce-subtle {
            animation: none;
        }
    }
    
    /* Better font rendering on mobile */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Mobile Navigation Hamburger Animation */
.hamburger span {
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Pulse animation for booking button */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(245, 158, 11, 0);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Mobile card shadows - lighter for performance */
@media (max-width: 768px) {
    .shadow-lg {
        box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.1);
    }
    
    .shadow-xl {
        box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.1);
    }
}

/* Improve mobile tap highlight */
* {
    -webkit-tap-highlight-color: rgba(5, 150, 105, 0.1);
}
