/* ===== SHARED CSS - Wspólne style dla wszystkich stron ===== */
/* Ten plik zawiera style używane w wielu plikach CSS, aby uniknąć duplikacji */
/* Zaimportuj ten plik na początku każdego pliku CSS strony */

/* ===== ANIMACJE SCROLL REVEAL ===== */
/* Używane w: index, kontakt, cennik, uslugi, o-nas, vouchery, koszyk, platnosc, etc. */

/* Fade-in animacja */
.fade-in {
    opacity: 0;
    transform: translateY(clamp(1.875rem, 5vw, 1.875rem));
    /* 30px */
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slide-in z lewej - zoptymalizowane */
.slide-in-left {
    opacity: 0;
    transform: translateX(clamp(-3.125rem, -8vw, -3.125rem));
    /* -50px */
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale-in dla kart - zoptymalizowane */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Optymalizacja animacji - wyłącz will-change po zakończeniu */
.fade-in.visible,
.slide-in-left.visible,
.scale-in.visible {
    will-change: auto;
}

/* ===== CZARNA LINIA NAD SEKCJAMI ===== */
/* Używane w: kontakt, o-nas, platnosc, platnosc-sukces, wybierz-voucher, etc. */
main > section {
    position: relative;
    z-index: 1;
}

main > section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    height: 1px;
    width: 100vw;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 1;
}

/* ===== PASKI W TLE - KONTENERY NAD PASKAMI ===== */
/* body::after (paski) ma z-index: 1 
   Wszystkie sekcje i kontenery muszą mieć z-index: 2+ żeby być nad paskami */

/* Sekcje - nad paskami */
section,
main,
.main-appointment-section,
.booking-methods-section,
.booking-form-section,
.clinic-info-section,
.benefits-section,
.faq-section,
.team-section,
.services-section,
.pricing-section,
.contact-section,
.hero-section,
.page-banner,
.new-banner {
    position: relative;
    z-index: 2;
    /* NIE używamy isolation: isolate - blokuje z-index względem body::after */
}

/* Kontenery - nad paskami */
.container,
.form-container,
.info-container,
.benefits-container,
.faq-container,
.banner-container,
.hero-content,
.banner-content {
    position: relative;
    z-index: 2;
}

/* Karty i boxy - nad paskami */
.method-card,
.info-card,
.benefit-card,
.specialist-card,
.team-member,
.team-card,
.service-card,
.price-card,
.voucher-card,
.review-card,
.contact-card,
.modern-card,
.faq-item,
.form-wrapper {
    position: relative;
    z-index: 3;
    /* Tło białe/solidne żeby zakryć paski */
    background-color: #fff;
}

/* ===== UTILITY CLASSES ===== */
/* Używane w: index, kontakt, etc. */
.hidden {
    display: none !important;
}

/* ===== FOCUS STYLES (dla dostępności) ===== */
/* Używane w: kontakt, platnosc, wybierz-voucher */
:where(a, button, input, select, textarea, [tabindex]):focus {
    outline: none;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: clamp(0.125rem, 0.3vw, 0.125rem) solid var(--primary);
    outline-offset: clamp(0.125rem, 0.3vw, 0.125rem);
}

/* ========================================
   FLOATING BUTTONS (CTA + Scroll to Top)
   ======================================== */
.floating-buttons {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.floating-buttons.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.floating-cta {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #064F3D 0%, #0B1A17 100%);
    color: #fff;
    padding: 14px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 8px 30px rgba(6, 79, 61, 0.4);
    transition: all 0.3s ease;
}

.floating-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(6, 79, 61, 0.5);
    color: #fff;
}

.floating-cta i {
    font-size: 1.1rem;
}

.scroll-to-top {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #064F3D;
    color: #064F3D;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    align-self: flex-end;
}

.scroll-to-top:hover {
    background: #064F3D;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(6, 79, 61, 0.3);
}

/* Mobile adjustments for floating buttons */
@media (max-width: 768px) {
    .floating-buttons {
        bottom: 16px;
        right: 16px;
    }
    
    .floating-cta {
        padding: 0;
        width: 56px;
        height: 56px;
        justify-content: center;
        border-radius: 50%;
    }
    
    .floating-cta span {
        display: none;
    }
    
    .floating-cta i {
        font-size: 1.25rem;
    }
    
    .scroll-to-top {
        width: 44px;
        height: 44px;
    }
}

