/* --- Komponenty: Iced Glass i Mikrointerakcje --- */
.iced-glass {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04);
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
}

.hover-lift {
    will-change: transform;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.08);
}

.hero-blob-wrapper {
    z-index: 0;
    filter: blur(90px);
    opacity: 0.45; /* Subtelne, eleganckie tło, nie razi w oczy */
}

.blob {
    border-radius: 50%;
    border-radius: 50%;
    will-change: transform;
    transform: translate3d(0,0,0);
}
/* Wiśniowy akcent marki */
.blob-cherry {
    background-color: #dc3545;
    width: 450px;
    height: 450px;
    top: -10%;
    top: 15%; /* Zmiana z -10% na 15%, aby dać miejsce na rozmycie (blur) */
}

/* Neutralny, jasny kontrast */
.blob-ambient {
    background-color: #f8f9fa;
    width: 600px;
    height: 600px;
    bottom: -20%;
    right: 10%;
    animation-delay: -4s;
}

@keyframes floatBlobs {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    50% {
        transform: translate(40px, -60px) scale(1.1);
    }
    100% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* Zabezpieczenie dla urządzeń mobilnych (redukcja obciążenia procesora) */
/* Zabezpieczenie dla urządzeń mobilnych (redukcja obciążenia procesora) */
@media (prefers-reduced-motion: reduce) {
    .blob {
        animation: none;
    }
}

/* --- Sprzętowy blask dla flary (Desktop & Mobile) --- */
.cc-hero-flare-line {
    filter: drop-shadow(0 0 8px rgba(220, 53, 69, 0.8));
}

/* --- Formularz: Pływające etykiety i Nowoczesny Focus --- */
.custom-input {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid rgba(0, 0, 0, 0.15); /* Subtelna baza */
    border-radius: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none !important; /* Likwidacja natywnego cienia Bootstrapa */
}

/* Animacja i kolory przy wprowadzaniu danych (Focus) */
.custom-input:focus {
    border-color: rgba(220, 53, 69, 0.3);
    border-bottom-color: #dc3545; /* Mocny wiśniowy akcent na dole */
    background-color: rgba(255, 255, 255, 0.9) !important; /* Rozświetlenie szkła */
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.08) !important;
    transform: translateY(-2px); /* Delikatne uniesienie pola */
}

/* Kolorowanie etykiety na wiśniowo, gdy pole jest aktywne lub wypełnione */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    color: #dc3545 !important;
    font-weight: 600;
    transform: scale(0.85) translateY(-0.75rem) translateX(0.15rem);
}

/* --- Brutalna pacyfikacja niebieskiego focusu Bootstrapa --- */
.custom-input:focus, 
.form-select.custom-input:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
    outline: none !important;
}

/* --- Ultra-nowoczesny animowany Checkbox RODO --- */
.modern-checkbox-input {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
}

.modern-checkmark {
    width: 24px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Ukryty ptaszek (stan początkowy) */
.modern-checkmark svg {
    width: 14px;
    height: 14px;
    stroke: white;
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    transition: stroke-dashoffset 0.4s ease;
}

/* Stan zaznaczony (Checked) */
.modern-checkbox-input:checked ~ .modern-checkmark {
    background-color: #dc3545;
    border-color: #dc3545;
    transform: scale(1.1);
}

/* Animacja rysowania ptaszka SVG */
.modern-checkbox-input:checked ~ .modern-checkmark svg {
    stroke-dashoffset: 0;
}

/* Focus dla dostępności z klawiatury (a11y) */
.modern-checkbox-input:focus-visible ~ .modern-checkmark {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
    border-color: #dc3545;
}

/* --- Mikrointerakcje dla dynamicznych kart Portfolio --- */
.portfolio-img-anim {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hover-overlay {
    transition: opacity 0.3s ease;
}
.hover-arrow {
    transition: transform 0.3s ease;
}

/* Zachowanie po najechaniu myszką (Hover) */
.card:hover .portfolio-img-anim {
    transform: scale(1.08); /* Delikatne zbliżenie obrazka w maskowaniu */
}
.card:hover .hover-overlay {
    opacity: 0.15 !important; /* Przyciemnienie wyciągające głębię */
}
.card:hover .hover-arrow {
    transform: translateX(8px); /* Przesunięcie strzałki "Zobacz szczegóły" */
}
.hover-danger:hover {
    color: #dc3545 !important;
}

/* --- Estymator: Custom Switch --- */
.custom-switch {
    width: 3em !important;
    height: 1.5em !important;
    cursor: pointer;
}
.custom-switch:checked {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}
.custom-switch:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
    border-color: #dc3545 !important;
}
/* Wymuszenie widoczności kropki, gdy switch jest sfocusowany, ale NIE zacheckowany */
.custom-switch:not(:checked):focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e") !important;
}

/* --- Header: Iced Glass --- */
.cc-glass-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    will-change: background, backdrop-filter;
}

.cc-logo-img {
    display: block;
    height: 65px; 
    width: auto;
    max-width: none; 
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.navbar-brand:hover .cc-logo-img {
    transform: scale(1.03);
}

/* --- Hamburger Madness: "Wisienka" --- */
.cc-cherry-burger {
    outline: none !important;
    cursor: pointer;
}

.cc-cherry-icon {
    width: 48px;
    height: 48px;
    background-color: #dc3545; /* Kolor wiśni */
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55), background-color 0.3s ease;
}

/* Geometryczny listek wiśni */
.cc-cherry-icon::before {
    content: '';
    position: absolute;
    top: -4px;
    right: 2px;
    width: 14px;
    height: 14px;
    background-color: #198754; /* Ciemna, szlachetna zieleń */
    border-radius: 14px 0px 14px 0px; /* Kształt listka */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom left;
}

/* Środkowe linie (Kremowy/Biały środek) */
.cc-cherry-line {
    position: absolute;
    width: 22px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.cc-cherry-line.top { transform: translateY(-4px); }
.cc-cherry-line.bottom { transform: translateY(4px); }

/* --- Stan Aktywny (Menu Otwarte) - Zamiana w "X" --- */
.cc-cherry-burger[aria-expanded="true"] .cc-cherry-icon {
    background-color: #212529; /* Wiśnia zmienia się w czarną dziurę/grafit */
    transform: rotate(90deg);
}
.cc-cherry-burger[aria-expanded="true"] .cc-cherry-icon::before {
    transform: scale(0); /* Listek chowa się */
    opacity: 0;
}
.cc-cherry-burger[aria-expanded="true"] .cc-cherry-line.top {
    transform: rotate(45deg);
}
.cc-cherry-burger[aria-expanded="true"] .cc-cherry-line.bottom {
    transform: rotate(-45deg);
}

/* --- Fullscreen Overlay Menu --- */
.cc-fullscreen-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    visibility: hidden;
    z-index: 1040; /* Pomiędzy stroną a headerem */
    pointer-events: none;
}
.cc-fullscreen-menu.is-active {
    pointer-events: auto;
}

/* Potężne tło ze szkła */
.cc-menu-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    opacity: 0; /* Animowane przez GSAP */
}

/* Typografia immersyjnych linków */
.cc-menu-item a:not(.btn) {
    font-size: 3.5rem;
    color: #212529;
    letter-spacing: -1px;
    display: inline-block;
    transition: color 0.3s ease, transform 0.3s ease;
}
@media (min-width: 992px) {
    /* Typografia immersyjnych linków na Mobile */
    .cc-menu-item a:not(.btn) {
        font-size: 2.5rem; /* Było 3.5rem i wyżej */
        color: #212529;
        letter-spacing: -1px;
        display: inline-block;
        transition: color 0.3s ease, transform 0.3s ease;
    }
    .cc-menu-item a:not(.btn):hover {
        color: #dc3545;
        transform: translateX(10px);
    }
}
@media (max-width: 991.98px) {
        .cc-logo-img {
            height: 55px;
        }
    }

/* --- Utilities & Mikrointerakcje dla Tabs (cc-services) --- */
.transition-colors {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.transition-transform {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Nadpisanie natywnego niebieskiego akcentu Bootstrapa dla zakładek */
.nav-pills .nav-link.active, 
.nav-pills .show > .nav-link {
    background-color: #ffffff !important;
    color: #dc3545 !important;
}

.nav-pills .nav-link {
    transition: all 0.3s ease;
    outline: none !important;
}

.nav-pills .nav-link:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.nav-pills .nav-link:hover:not(.active) {
    background-color: rgba(0, 0, 0, 0.03);
    color: #dc3545 !important;
}

/* --- Dynamiczna Wyspa (Floating Menu) --- */
#cc-dynamic-island {
    bottom: 30px;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
    will-change: transform, opacity; /* Wymuszenie akceleracji sprzętowej GPU */
}

.cc-island-hidden {
    transform: translate(-50%, 150px) !important;
    opacity: 0 !important;
    pointer-events: none;
}

.cc-island-visible {
    transform: translate(-50%, 0) !important;
    opacity: 1 !important;
    pointer-events: auto;
}

/* --- Gorący Przycisk Kontaktu (Pulse FAB) --- */
.cc-pulse-btn {
    position: relative;
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cc-pulse-btn:hover {
    transform: scale(1.1);
}

/* Wektorowy pierścień pulsujący pod przyciskiem */
.cc-pulse-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    border: 2px solid rgba(220, 53, 69, 0.6);
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Kinematyka pojawiania się menu */
.cc-hot-contact .dropdown-menu {
    transform-origin: bottom center;
    animation: dropup-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes dropup-pop {
    0% { opacity: 0; transform: translateY(15px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Ochrona przed nakładaniem się na Dynamiczną Wyspę na urządzeniach mobilnych */
@media (max-width: 767.98px) {
    .cc-hot-contact { bottom: 70px !important; }
}