/* ========================================
   NAVICOM - Advanced Animations
   Theme-aware: uses CSS variables from style.css
   Brand colors: Green #5eb21d / Blue #2d3a8c
   ======================================== */

/* Preloader logo */
.preloader-logo-img {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(94, 178, 29, 0.4)) drop-shadow(0 0 60px rgba(45, 58, 140, 0.2));
    animation: preloaderLogoPulse 2s ease-in-out infinite;
}

@keyframes preloaderLogoPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 30px rgba(94, 178, 29, 0.4)) drop-shadow(0 0 60px rgba(45, 58, 140, 0.2));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 50px rgba(94, 178, 29, 0.6)) drop-shadow(0 0 80px rgba(45, 58, 140, 0.4));
    }
}

/* Header & Footer logo */
.logo-img {
    height: 64px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 6px rgba(94, 178, 29, 0.15));
}

.logo-img:hover {
    filter: drop-shadow(0 0 16px rgba(94, 178, 29, 0.4)) drop-shadow(0 0 30px rgba(45, 58, 140, 0.2));
    transform: scale(1.05);
}

.site-header.scrolled .logo-img {
    height: 48px;
}

.footer-brand .logo-img {
    height: 72px;
    margin-bottom: 16px;
}

/* Dark mode logo glow */
[data-theme="dark"] .logo-img {
    filter: drop-shadow(0 0 10px rgba(94, 178, 29, 0.3)) drop-shadow(0 0 20px rgba(45, 58, 140, 0.15));
}

[data-theme="dark"] .logo-img:hover {
    filter: drop-shadow(0 0 20px rgba(94, 178, 29, 0.6)) drop-shadow(0 0 40px rgba(45, 58, 140, 0.3));
}

/* ========================================
   ORBITAL ANIMATION (like the logo)
   ======================================== */
.orbital-ring {
    position: absolute;
    border: 1.5px solid transparent;
    border-radius: 50%;
    animation: orbitalSpin 12s linear infinite;
}

.orbital-ring::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent, #5eb21d);
    border-radius: 50%;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 15px rgba(94, 178, 29, 0.6);
}

.orbital-ring-1 {
    width: 300px;
    height: 120px;
    border-color: rgba(94, 178, 29, 0.2);
    transform: rotate(-20deg);
    animation-duration: 10s;
}

.orbital-ring-2 {
    width: 400px;
    height: 160px;
    border-color: rgba(45, 58, 140, 0.15);
    transform: rotate(15deg);
    animation-duration: 14s;
    animation-direction: reverse;
}

.orbital-ring-2::before {
    background: var(--accent-secondary, #2d3a8c);
    box-shadow: 0 0 15px rgba(45, 58, 140, 0.6);
}

@keyframes orbitalSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   FLOATING NODES (logo-style dots)
   ======================================== */
.floating-node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--text-muted, #999);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(94, 178, 29, 0.3);
    animation: nodeFloat 6s ease-in-out infinite;
}

.floating-node:nth-child(2) {
    animation-delay: -2s;
    box-shadow: 0 0 20px rgba(45, 58, 140, 0.3);
}

.floating-node:nth-child(3) {
    animation-delay: -4s;
}

@keyframes nodeFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translate(15px, -20px) scale(1.2);
        opacity: 1;
    }
    50% {
        transform: translate(-10px, 10px) scale(0.8);
        opacity: 0.4;
    }
    75% {
        transform: translate(20px, 15px) scale(1.1);
        opacity: 0.9;
    }
}

/* ========================================
   TEXT SHIMMER EFFECT
   ======================================== */
.text-shimmer {
    background: linear-gradient(
        90deg,
        #5eb21d 0%,
        #7fff00 25%,
        var(--text, #333) 50%,
        #2d3a8c 75%,
        #1a237e 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

/* ========================================
   GRADIENT TEXT (brand colors)
   ======================================== */
.gradient-text {
    background: linear-gradient(135deg, #5eb21d 0%, #2d3a8c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   GLITCH TEXT EFFECT
   ======================================== */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    color: #5eb21d;
    animation: glitch-1 3s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-2px, -1px);
    opacity: 0.7;
}

.glitch-text::after {
    color: #2d3a8c;
    animation: glitch-2 2s infinite linear alternate-reverse;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
    transform: translate(2px, 1px);
    opacity: 0.7;
}

@keyframes glitch-1 {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(3px, -1px); }
    60% { transform: translate(-1px, 2px); }
    80% { transform: translate(2px, -3px); }
    100% { transform: translate(0); }
}

@keyframes glitch-2 {
    0% { transform: translate(0); }
    20% { transform: translate(3px, -2px); }
    40% { transform: translate(-2px, 3px); }
    60% { transform: translate(2px, -1px); }
    80% { transform: translate(-3px, 2px); }
    100% { transform: translate(0); }
}

/* ========================================
   CARD TILT 3D EFFECT
   ======================================== */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tilt-card .card-inner {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* ========================================
   STAGGERED FADE-IN
   ======================================== */
.stagger-fade > * {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.stagger-fade > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-fade > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-fade > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-fade > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-fade > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-fade > *:nth-child(6) { animation-delay: 0.6s; }

@keyframes staggerIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   PULSE BORDER
   ======================================== */
.pulse-border {
    position: relative;
}

.pulse-border::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    padding: 3px;
    background: linear-gradient(135deg, #5eb21d, #2d3a8c, #5eb21d);
    background-size: 300% 300%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderPulse 4s ease infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.pulse-border:hover::after {
    opacity: 1;
}

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

/* ========================================
   LINE DRAW ANIMATION
   ======================================== */
.line-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2s ease forwards;
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

/* ========================================
   MORPHING BLOB
   ======================================== */
.morph-blob {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 50% 60% 30% 60% / 30% 50% 70% 60%; }
    75% { border-radius: 40% 60% 50% 40% / 60% 40% 60% 50%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* ========================================
   PARALLAX FLOATING ELEMENTS
   ======================================== */
[data-parallax] {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ========================================
   TYPING ANIMATION
   ======================================== */
.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--accent, #5eb21d);
    white-space: nowrap;
    animation:
        typing 3.5s steps(40, end),
        blinkCaret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blinkCaret {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent, #5eb21d); }
}

/* ========================================
   GLOW CONNECTIONS
   ======================================== */
.glow-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent, #5eb21d), transparent);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.2; transform: scaleX(0.8); }
    50% { opacity: 0.8; transform: scaleX(1); }
}

/* ========================================
   SCROLL-TRIGGERED COUNTER
   ======================================== */
.counter-animate {
    display: inline-block;
    transition: all 0.3s;
}

/* ========================================
   SERVICE CARD HOVER GLOW
   ======================================== */
.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #5eb21d, #2d3a8c);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius) var(--radius) 0 0;
}

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

/* ========================================
   SMOOTH SECTION TRANSITIONS
   ======================================== */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(94, 178, 29, 0.15), rgba(45, 58, 140, 0.15), transparent);
}

/* ========================================
   NAV CTA BUTTON ANIMATION
   ======================================== */
.nav-cta {
    background: linear-gradient(135deg, #5eb21d 0%, #2d3a8c 100%) !important;
    position: relative;
    overflow: hidden;
}

.nav-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: ctaShine 3s infinite;
}

@keyframes ctaShine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* ========================================
   SCROLL DOWN INDICATOR
   ======================================== */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 48px;
    animation: heroFadeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.9s both;
}

.scroll-indicator span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(94, 178, 29, 0.3);
    border-radius: 12px;
    position: relative;
}

.scroll-mouse::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 8px;
    background: var(--accent, #5eb21d);
    border-radius: 3px;
    animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 22px; }
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   CLIENT CARDS (for page-klienci.php)
   ======================================== */
.client-featured-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--radius-lg, 16px);
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.client-featured-card:hover {
    border-color: var(--accent, #5eb21d);
    box-shadow: 0 20px 60px rgba(94, 178, 29, 0.1);
}

.client-featured-name {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text, #111);
    margin-bottom: 20px;
}

.client-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.client-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.5;
}

.client-card h4 {
    font-family: var(--font-display, 'Space Grotesk', sans-serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text, #111);
    margin-bottom: 4px;
}

/* Select styling for contact form */
select {
    width: 100%;
    padding: 14px 18px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--radius, 12px);
    color: var(--text, #111);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

select:focus {
    outline: none;
    border-color: var(--accent, #5eb21d);
    box-shadow: 0 0 0 3px rgba(94, 178, 29, 0.1);
}

/* ========================================
   FOCUS RING (Accessibility)
   ======================================== */
:focus-visible {
    outline: 2px solid var(--accent, #5eb21d);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ========================================
   HOLIDAY SYSTEM - Seasonal Decorations
   Auto-enabled by PHP based on calendar dates
   ======================================== */

/* --- Holiday Banner (all holidays) --- */
.holiday-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 50px;
    font-size: 0.9rem;
    color: #486581;
    position: relative;
    overflow: hidden;
    z-index: 999;
    border-bottom: 1px solid rgba(94, 178, 29, 0.15);
}

.holiday-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: holidaySlideIn 0.8s ease-out;
}

.holiday-banner-emoji {
    font-size: 1.2rem;
    display: inline-block;
    animation: holidayBounce 2s ease-in-out infinite;
}

.holiday-banner-emoji:last-child {
    animation-delay: 0.3s;
}

.holiday-banner-text {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.holiday-banner-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted, #627d98);
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    padding: 4px 8px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.holiday-banner-close:hover {
    opacity: 1;
}

/* Banner colors per holiday */
.holiday-banner-easter {
    background: linear-gradient(135deg, #f0fce8 0%, #e8f4fd 50%, #fef3e8 100%);
}

.holiday-banner-nicholas {
    background: linear-gradient(135deg, #e8f0fd 0%, #f0fce8 50%, #fde8e8 100%);
}

.holiday-banner-christmas {
    background: linear-gradient(135deg, #f0fce8 0%, #e8f0fd 50%, #fef8e8 100%);
}

.holiday-banner-newyear {
    background: linear-gradient(135deg, #e8f0fd 0%, #fef8e8 50%, #f0fce8 100%);
}

[data-theme="dark"] .holiday-banner {
    background: linear-gradient(135deg, rgba(94,178,29,0.06) 0%, rgba(45,58,140,0.05) 50%, rgba(255,215,0,0.03) 100%);
    border-bottom-color: rgba(94, 178, 29, 0.1);
    color: #94a3b8;
}

[data-theme="dark"] .holiday-banner-text strong {
    color: #7acc3a;
}

/* --- Holiday header icon (next to logo) --- */
.holiday-header-icon {
    display: inline-flex;
    align-items: center;
    margin-left: -4px;
    animation: holidayFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}

.holiday-header-icon .holiday-icon {
    height: 48px;
    width: auto;
    transition: all 0.4s var(--transition);
}

.holiday-header-icon .holiday-icon-egg {
    height: 42px;
}

.holiday-header-icon .holiday-icon-santa {
    height: 52px;
}

.holiday-header-icon .holiday-icon-tree {
    height: 56px;
}

.holiday-header-icon .holiday-icon-firework {
    height: 50px;
}

.holiday-header-icon:hover .holiday-icon {
    transform: scale(1.15) rotate(3deg);
    filter: drop-shadow(0 4px 12px rgba(94, 178, 29, 0.4));
}

.site-header.scrolled .holiday-header-icon .holiday-icon {
    height: 34px;
}

.site-header.scrolled .holiday-header-icon .holiday-icon-egg {
    height: 30px;
}

/* Sparkle animation on ornaments/dots */
.holiday-sparkle {
    animation: holidaySparkle 1.5s ease-in-out infinite;
}

/* Glow animation (star, center) */
.holiday-glow {
    animation: holidayGlow 2s ease-in-out infinite;
}

/* Ray animation (firework lines) */
.holiday-ray {
    animation: holidayRayPulse 1.2s ease-in-out infinite;
}

/* Garland animation (christmas tree) */
.holiday-garland {
    animation: holidayGarlandShimmer 2s linear infinite;
}

/* --- Preloader holiday text --- */
.preloader-holiday {
    position: absolute;
    bottom: 22%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    color: var(--text-muted, #627d98);
    white-space: nowrap;
    animation: holidayBounce 1.5s ease-in-out infinite;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* --- Holiday banner vivid backgrounds --- */
.holiday-banner-easter {
    background: linear-gradient(135deg, #FFF0F5 0%, #F0F8FF 30%, #FFFFF0 60%, #F0FFF0 100%);
}
.holiday-banner-nicholas {
    background: linear-gradient(135deg, #FFF0F0 0%, #FFF8F0 50%, #F0FFF0 100%);
}
.holiday-banner-christmas {
    background: linear-gradient(135deg, #F0FFF0 0%, #FFFFF0 50%, #FFF0F0 100%);
}
.holiday-banner-newyear {
    background: linear-gradient(135deg, #F0F0FF 0%, #FFFFF0 50%, #FFF0F5 100%);
}

.holiday-banner-text strong {
    background: linear-gradient(135deg, #5eb21d, #2d3a8c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Holiday Animations --- */
@keyframes holidaySlideIn {
    from { opacity: 0; transform: translateY(-100%); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes holidayBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes holidayFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(2deg); }
    75% { transform: translateY(2px) rotate(-2deg); }
}

@keyframes holidaySparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.6); }
}

@keyframes holidayGlow {
    0%, 100% { opacity: 0.8; filter: drop-shadow(0 0 3px #FFD700); }
    50% { opacity: 1; filter: drop-shadow(0 0 10px #FFD700) drop-shadow(0 0 20px #FFA500); }
}

@keyframes holidayRayPulse {
    0%, 100% { opacity: 0.9; stroke-width: 3; }
    50% { opacity: 0.4; stroke-width: 1.5; }
}

@keyframes holidayGarlandShimmer {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 20; }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .preloader {
        display: none !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
    }
}
