/* White Pearl - Style animacji */
/* Autor: Maciej Nowak */
/* Data: 2023 */

/* ===== ANIMACJE WEJŚCIA ===== */

/* Fade In */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease forwards;
}

/* Fade In Down */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-down {
    animation: fadeInDown 1s ease forwards;
}

/* Fade In Left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-left {
    animation: fadeInLeft 1s ease forwards;
}

/* Fade In Right */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-right {
    animation: fadeInRight 1s ease forwards;
}

/* Zoom In */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.zoom-in {
    animation: zoomIn 1s ease forwards;
}

/* Slide In Up */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.slide-in-up {
    animation: slideInUp 1s ease forwards;
}

/* ===== ANIMACJE HOVER ===== */

/* Pulse */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse:hover {
    animation: pulse 1s infinite;
}

/* Shake */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake:hover {
    animation: shake 0.8s ease-in-out;
}

/* Float */
@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* ===== ANIMACJE ELEMENTÓW ===== */

/* Animacja cząsteczek */
@keyframes particleAnimation {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0);
    }
    25% {
        opacity: 1;
    }
    75% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) translateX(100px);
    }
}

.particle {
    position: absolute;
    background-color: rgba(23, 143, 179, 0.2);
    border-radius: 50%;
    pointer-events: none;
    animation: particleAnimation 3s linear infinite;
}

/* Animacja błysku */
@keyframes glowAnimation {
    0% { box-shadow: 0 0 5px rgba(23, 143, 179, 0.5); }
    50% { box-shadow: 0 0 20px rgba(23, 143, 179, 0.8); }
    100% { box-shadow: 0 0 5px rgba(23, 143, 179, 0.5); }
}

.glow {
    animation: glowAnimation 2s infinite;
}

/* Animacja pisania tekstu */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--color-accent); }
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--color-accent);
    animation: 
        typing 3.5s steps(40, end),
        blink-caret .75s step-end infinite;
}

/* Animacja licznika */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.counter-animation {
    animation: countUp 1s ease-out forwards;
}

/* Usunięto animację cardHover - zastąpiona płynnym transition w style.css */

/* Animacja przycisku */
@keyframes buttonPulse {
    0% { box-shadow: 0 0 0 0 rgba(23, 143, 179, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(23, 143, 179, 0); }
    100% {
         box-shadow: 0 0 0 0 rgba(23, 143, 179, 0);
     }
 }

/* ===== ELEGANCKIE ANIMACJE HERO TITLE ===== */

/* Elegancka animacja fade-in z slide-up */
@keyframes elegant-fade-in {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Subtelny efekt shimmer/połysku */
@keyframes elegant-shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Delikatne pulsowanie z scale */
@keyframes elegant-pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 10px rgba(23, 143, 179, 0.2);
    }
    50% {
        transform: scale(1.02);
        text-shadow: 0 0 15px rgba(23, 143, 179, 0.3);
    }
}

/* Klasy dla hero title */
.hero-title-animated {
    opacity: 0;
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #ffffff 40%,
        rgba(23, 143, 179, 0.8) 50%,
        #ffffff 60%,
        #ffffff 100%
    );
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: 
        elegant-fade-in 1.5s ease-out 0.3s forwards,
        elegant-shimmer 3s ease-in-out 2s infinite,
        elegant-pulse 4s ease-in-out 2s infinite;
}

.hero-title-animated.loaded {
    opacity: 1;
    animation: 
        elegant-shimmer 3s ease-in-out infinite,
        elegant-pulse 4s ease-in-out infinite;
}

.btn-pulse {
    animation: buttonPulse 2s infinite;
}

/* Animacja ładowania */
@keyframes loadingBar {
    0% { width: 0%; }
    100% { width: 100%; }
}

.loading-bar {
    height: 4px;
    background-color: var(--color-accent);
    animation: loadingBar 2s ease-in-out;
}

/* Animacja przewijania */
@keyframes scrollIndicator {
    0% { height: 0%; }
    100% { height: 100%; }
}

.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 4px;
    background-color: var(--color-accent);
    z-index: 1000;
    animation: scrollIndicator linear;
    animation-timeline: scroll();
}

/* Animacja parallax */
.parallax {
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Animacja dla Intersection Observer */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animacja dla timeline */
.timeline-animation {
    position: relative;
}

.timeline-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.5s ease-in-out;
}

.timeline-animation.animate::before {
    transform: scaleX(1);
}

/* Animacja dla nawigacji */
@keyframes navItemFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-item {
    opacity: 0;
}

.nav-item.fade {
    animation: navItemFade 0.5s ease forwards;
}

/* Animacja dla hamburger menu */
.nav-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Animacja dla glass morphism */
.glass-morph {
    background: rgba(44, 44, 44, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.glass-morph:hover {
    background: rgba(44, 44, 44, 0.4);
    transform: translateY(-5px);
}

/* Animacja dla micro-interactions */
.micro-interaction {
    transition: all 0.3s ease;
    position: relative;
}

.micro-interaction::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

.micro-interaction:hover::after {
    transform-origin: bottom left;
    transform: scaleX(1);
}

/* Animacja dla gradient backgrounds */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-bg {
    background: linear-gradient(-45deg, #0e0e0e, #2c2c2c, #0e0e0e, #178FB3);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
}

/* Dodaj na końcu pliku animations.css */

/* Animacje dla Timeline */
@keyframes timeline-item-appear {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item {
    opacity: 0;
    transform: translateY(30px);
}

.timeline-item.visible {
    animation: timeline-item-appear 0.8s forwards;
}

/* Animacja fali dla counter-item */
.counter-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: rgba(23, 143, 179, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: counter-wave 2s ease-out forwards;
}

@keyframes counter-wave {
    0% {
        width: 10px;
        height: 10px;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* Animacja dla counter-item */
.counter-item {
    opacity: 0;
    transform: translateY(20px);
}

.counter-item.visible {
    animation: counter-appear 0.8s forwards;
}

@keyframes counter-appear {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animacje dla sekcji usług */
@keyframes service-card-appear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.service-card-animation {
    animation: service-card-appear 0.8s forwards;
}

/* Efekt fali dla kart usług */
.service-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: rgba(23, 143, 179, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: service-wave 1.5s ease-out forwards;
}

@keyframes service-wave {
    0% {
        width: 10px;
        height: 10px;
        opacity: 1;
    }
    100% {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}

/* Animacja dla ikon usług */
@keyframes icon-float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

.icon-float {
    animation: icon-float 3s ease-in-out infinite;
}

/* Animacja dla tła sekcji */
@keyframes bg-pulse {
    0% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
    100% { opacity: 0.5; transform: scale(1); }
}

.bg-pulse {
    animation: bg-pulse 15s ease-in-out infinite;
}

/* Animacje dla podglądu galerii */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(23, 143, 179, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(23, 143, 179, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(23, 143, 179, 0);
    }
}

.gallery-preview-zoom {
    animation: pulse-glow 2s infinite;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

.gallery-preview-item {
    animation: float 6s ease-in-out infinite;
}

.gallery-preview-item:nth-child(2) {
    animation-delay: 1s;
}

.gallery-preview-item:nth-child(3) {
    animation-delay: 2s;
}