
/* =========================================
   1. IMPORTY I STYLE GLOBALNE
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Comfortaa:wght@300..700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #374151;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Comfortaa', cursive;
    font-weight: 700;
    line-height: 1.2;
}

/* Płynne przewijanie */
html {
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* --- NAPRAWA POZYCJONOWANIA PRZY SCROLLU --- */
/* To sprawia, że sekcja nie chowa się pod nagłówkiem po kliknięciu w menu */
section[id] {
    scroll-margin-top: 130px; 
}

/* =========================================
   2. ANIMACJE (W TYM NOWY BOUNCE)
   ========================================= */

/* Efekt sprężystego pojawiania się (Bounce) */
.reveal-bounce {
    opacity: 0;
    transform: translateY(80px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); /* Efekt sprężyny */
}

.reveal-bounce.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Opóźnienia dla elementów w grupie */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* Standardowe animacje (zostawione dla kompatybilności) */
@keyframes fadeIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.animate-fade-in { animation: fadeIn 0.8s ease-out; }
.animate-pulse { animation: pulse 2s infinite; }

/* =========================================
   3. ELEMENTY UI (BUTTONY, KARTY, FORMULARZE)
   ========================================= */

/* Button główny */
.cta-button {
    display: inline-flex;
    align-items: center;
    border: 2px solid transparent;
    color: #437CCD;
    font-weight: 700;
    padding: 12px 32px;
    border-radius: 9999px;
    transition: all 0.1s ease;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    background: white;
    cursor: pointer;
    letter-spacing: 0.04em;
    text-align: center;
    justify-content: center;
    background-image: linear-gradient(white, white), linear-gradient(90deg, rgba(67,124,205,1) 0%, rgba(72,172,222,1) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.cta-button:hover {
    background: linear-gradient(90deg, rgba(67,124,205,1) 0%, rgba(72,172,222,1) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 30px rgba(66, 123, 202, 0.0);
}

hr {
    border-color: #427BCA !important;
    width: 3.5rem;
    border-width: 1.5px;
}

/* Karty */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}
.card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Formularze */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}
.form-input:focus {
    outline: none;
    border-color: #427BCA;
    box-shadow: 0 0 0 3px rgba(66, 123, 202, 0.1);
}

/* Zdjęcia Hero */
.viewport-img {
    width: 100vw;
    height: 100vh;
    margin-left: calc(-50vw + 50%);
    display: flex;
    overflow: hidden;
}
.viewport-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
@media (max-width: 768px) {
    .viewport-img { width: 100%; height: 100vh; margin-left: 0; }
    .viewport-img img { object-fit: cover; } /* Zmienione na cover dla lepszego wyglądu */
}

/* Zdjęcia Usług */
.services-img-container {
    position: relative;
    width: 100%;
    padding-bottom: 61.8%; 
    overflow: hidden;
    border-radius: 0;
    background: #f8fafc;
}
.services-img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   4. GALERIA (POPRAWIONA)
   ========================================= */

.gallery-section {
    padding: 4rem 1rem;
    text-align: center;
    background: #f9f9f9;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- DESKTOP (PC) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 kolumny */
    gap: 8px; /* Małe odstępy */
    
    /* Zmniejszona szerokość galerii na PC */
    max-width: 960px; 
    margin: 0 auto; 
    padding-top: 2rem;
}

.gallery-item {
    cursor: pointer;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1 / 1; /* Kwadrat */
    border-radius: 0;    /* Ostre rogi */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

@media (hover: hover) {
    .gallery-item:hover img {
        transform: scale(1.05);
    }
}

/* --- MOBILE (TELEFON) --- */
@media (max-width: 768px) {
    /* Usuwamy paddingi, żeby zdjęcia dotykały krawędzi */
    .gallery-section {
        padding: 0;
        background: transparent;
    }

    #gallery .container, 
    #gallery .max-w-6xl {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Nagłówek sekcji na mobile */
    .gallery-container h2 {
        padding: 2rem 1rem;
        background: #f9f9f9;
        margin: 0;
    }

    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 KOLUMNY! */
        gap: 0; /* Zero odstępów */
        padding-top: 0;
        max-width: 100%;
    }

    .gallery-item {
        border-radius: 0;
        aspect-ratio: 1 / 1; /* Kwadrat */
        width: 100%;
    }
}

/* =========================================
   5. LIGHTBOX
   ========================================= */
.lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    justify-content: center;
    align-items: center;
    user-select: none;
}

.lightbox.active {
    display: flex !important;
}

.lightbox-content {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    padding: 20px;
    cursor: pointer;
    z-index: 1001;
}
.prev-btn { left: 5px; }
.next-btn { right: 5px; }

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    line-height: 0.5;
    z-index: 1001;
}

.lightbox-counter {
    position: absolute;
    top: 25px;
    left: 25px;
    color: white;
    font-family: sans-serif;
    font-size: 16px;
    z-index: 1001;
}

/* =========================================
   6. RESPANSYWNOŚĆ TEKSTÓW
   ========================================= */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .text-4xl { font-size: 2.5rem; }
    .text-5xl { font-size: 2rem; }
}

body.menu-open {
    overflow: hidden;
}
