/* ============================================================
   P.H.U. KRECIK - Custom Styles
   Komplementarne do Tailwind CSS
   ============================================================ */

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

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

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

::-webkit-scrollbar-thumb {
    background: #FDB913;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e0a510;
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
    transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}

#navbar.scrolled {
    background-color: rgba(44, 62, 80, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar:not(.scrolled) {
    background-color: transparent;
}

/* Hamburger Icon */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 4px;
}

.hamburger-icon span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    transform-origin: left;
}

/* Hamburger active state (X) */
.hamburger-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(0px, -1px);
}

.hamburger-icon.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

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

/* Mobile Menu Slide Animation */
.mobile-menu-closed {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.mobile-menu-open {
    max-height: 500px;
    transition: max-height 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-bg {
    /* Zastąp ścieżką do własnego zdjęcia: url('../img/hero.jpg') */
    background-image: url('https://images.unsplash.com/photo-1578662996442-48f60103fc96?w=1920&q=85');
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
}

/* Fallback: jeśli zdjęcie się nie załaduje */
.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2C3E50 0%, #1a252f 50%, #2C3E50 100%);
    z-index: -1;
}

/* Paralax effect na desktop */
@media (min-width: 769px) {
    .hero-bg {
        background-attachment: fixed;
    }
}

/* Hero animation */
.animate-hero {
    animation: heroFadeIn 0.9s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

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

/* ============================================================
   SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal,
.reveal-delay-1,
.reveal-delay-2,
.reveal-delay-3,
.reveal-delay-4,
.reveal-delay-5 {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1.visible { opacity: 1; transform: translateY(0); transition-delay: 0.12s; }
.reveal-delay-2.visible { opacity: 1; transform: translateY(0); transition-delay: 0.24s; }
.reveal-delay-3.visible { opacity: 1; transform: translateY(0); transition-delay: 0.36s; }
.reveal-delay-4.visible { opacity: 1; transform: translateY(0); transition-delay: 0.48s; }
.reveal-delay-5.visible { opacity: 1; transform: translateY(0); transition-delay: 0.60s; }

/* ============================================================
   CITY TAGS (Obszar działania)
   ============================================================ */
.city-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    background-color: rgba(253, 185, 19, 0.1);
    color: #FDB913;
    border: 1px solid rgba(253, 185, 19, 0.3);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: default;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.city-tag:hover {
    background-color: #FDB913;
    color: #2C3E50;
}

/* ============================================================
   GALLERY
   ============================================================ */
.gallery-item img {
    display: block;
    width: 100%;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
#lightbox {
    transition: opacity 0.3s ease;
}

#lightbox.active,
#form-modal.active {
    opacity: 1 !important;
    pointer-events: all !important;
}

#lightbox-img {
    transition: opacity 0.2s ease;
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
input,
textarea,
select {
    font-family: 'Inter', sans-serif;
    color: #2C3E50;
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
#back-to-top.visible {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* ============================================================
   PRELOADER
   ============================================================ */
#preloader {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hide {
    opacity: 0;
    visibility: hidden;
}

/* Preloader pulse + glow */
#preloader .preloader-icon {
    animation: preloaderPulse 2s ease-in-out infinite alternate;
}

#preloader .preloader-text {
    animation: preloaderGlow 2s ease-in-out infinite alternate;
}

@keyframes preloaderPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(253, 185, 19, 0.3), 0 0 20px rgba(253, 185, 19, 0.15);
    }
    100% {
        transform: scale(1.08);
        box-shadow: 0 0 20px rgba(253, 185, 19, 0.5), 0 0 40px rgba(253, 185, 19, 0.25), 0 0 60px rgba(253, 185, 19, 0.1);
    }
}

@keyframes preloaderGlow {
    0% {
        text-shadow: 0 0 10px #fdb913, 0 0 20px #fdb913, 0 0 30px #e0a510;
    }
    100% {
        text-shadow: 0 0 20px #fdb913, 0 0 40px #fdb913, 0 0 60px #e0a510;
    }
}

/* ============================================================
   COUNTER ANIMATION
   ============================================================ */
.counter {
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   SERVICE CARDS hover lift
   ============================================================ */
.service-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ============================================================
   RESPONSIVE FIXES
   ============================================================ */
@media (max-width: 640px) {
    /* Prevent hero background parallax on mobile (iOS fix) */
    .hero-bg {
        background-attachment: scroll;
    }
}

@media (max-width: 480px) {
    /* Smaller city tags on very small screens */
    .city-tag {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* ============================================================
   UTILITY: No-select for decorative elements
   ============================================================ */
.city-tag,
[cursor-default] {
    user-select: none;
    -webkit-user-select: none;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    #navbar,
    #back-to-top,
    #lightbox,
    #preloader {
        display: none !important;
    }
}

/* ============================================================
   CLS Prevention
   ============================================================ */
.gallery-item img {
    aspect-ratio: 4/3;
    background-color: #f3f4f6;
}

iframe {
    background-color: #e5e7eb;
}
