/* ================= 1. RESET I BAZA ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ================= 2. UKŁAD I SEKCJE ================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================= ODSTĘPY MIĘDZY SEKCJAMI ================= */
.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: #0d2c54;
    margin-bottom: 10px;
}

.bg-light {
    background-color: #f9f9f9;
}

.bg-dark {
    background-color: #1a1a1a;
    color: #fff;
}

.highlight {
    color: #fca311;
}

/* ================= 3. PRZYCISKI ================= */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background-color: #fca311;
    color: #000;
}

.btn-primary:hover {
    background-color: #e59400;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.btn-outline:hover {
    background-color: #fff;
    color: #000;
}

/* ================= 4. HEADER ================= */
header {
    background-color: #0d2c54;
    color: #fff;
    height: 80px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    z-index: 1001;
}

nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-left: calc(10px + 1vw);
}

.nav-links li a {
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.3s ease;
    padding: 10px 5px;
}

.nav-links li a:hover {
    color: #fca311;
}

.highlight-link {
    color: #fca311 !important;
    border-bottom: 2px solid #fca311;
}

/* Wyróżnienie Cmentarzy */

.btn-nav {
    background-color: #fca311;
    color: #000 !important;
    padding: 10px 25px !important;
    border-radius: 4px;
    font-weight: 700 !important;
    margin-left: 10px;
}

.burger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px;
    transition: all 0.3s ease;
}

/* ================= 5. HERO ================= */
.hero {
    height: 100vh;
    background-image: url('images/tlo.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    text-align: center;
    width: 100%;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero h2 {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 30px;
    color: #ddd;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ================= 6. FEATURES & OFFER GRIDS ================= */
.features-grid,
.offer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-box {
    text-align: center;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fff;
    transition: 0.3s;
}

.feature-box:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-box i {
    font-size: 3rem;
    color: #fca311;
    margin-bottom: 20px;
}

.offer-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.offer-item img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: #fff;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.offer-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.offer-content h3 {
    color: #0d2c54;
    margin-bottom: 15px;
}

.offer-content p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #666;
}

.specs {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.specs li {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #333;
}

.specs i {
    color: #fca311;
    margin-right: 8px;
}

/* ================= 7. SEKCJA CMENTARZE & EV ================= */
.cemetery-wrapper {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.cemetery-text {
    flex: 1;
    min-width: 300px;
}

.cemetery-image {
    flex: 1;
    min-width: 300px;
}

.cemetery-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cemetery-feature {
    margin-bottom: 25px;
}

.highlight-box {
    background: rgba(252, 163, 17, 0.1);
    padding: 20px;
    border-left: 4px solid #fca311;
    border-radius: 5px;
}

.highlight-box h3 {
    color: #fca311;
}

.ev-wrapper {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
    flex-direction: row-reverse;
}

/* Obrazek z prawej */
.ev-image {
    flex: 1;
    min-width: 300px;
}

.ev-image img {
    width: 100%;
    border-radius: 10px;
}

.ev-text {
    flex: 1;
    min-width: 300px;
}

.ev-specs {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}

.ev-box {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    flex: 1;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ev-box i {
    color: #28a745;
    font-size: 2rem;
    margin-bottom: 10px;
}

/* ================= 8. KONTAKT & FOOTER ================= */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}

.contact-info,
.contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: none;
    margin-bottom: 15px;
}

footer {
    background-color: #081b33;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

/* ================= 9. RESPONSYWNOŚĆ ================= */
@media screen and (max-width: 1200px) {
    .nav-links {
        position: absolute;
        right: 0;
        height: 92vh;
        top: 80px;
        background-color: #0d2c54;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 60px;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.4s ease-in;
        gap: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links li a {
        font-size: 1.2rem;
        display: block;
        padding: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .btn-nav {
        margin: 30px auto;
        width: 80%;
        text-align: center;
        display: block;
    }

    .burger {
        display: block;
    }
}

.nav-active {
    transform: translateX(0%);
}

.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* ================= EFEKTY ZDJĘĆ (ZOOM I LIGHTBOX) ================= */

/* Efekt ZOOM po najechaniu na kafelek */
.offer-item img {
    transition: transform 0.4s ease;
    /* Płynne przejście */
    cursor: pointer;
    /* Kursor rączki - sugeruje klikalność */
}

.offer-item:hover img {
    transform: scale(1.05);
    /* Lekkie powiększenie zdjęcia */
}

/* Styl dla Lightboxa (Pełny ekran) */
.lightbox {
    display: none;
    /* Domyślnie ukryty */
    position: fixed;
    z-index: 9999;
    /* Zawsze na wierzchu */
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    /* Ciemne tło */
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    /* Maksymalna szerokość zdjęcia */
    max-height: 80vh;
    object-fit: contain;
    border-radius: 5px;
    animation: zoomIn 0.3s;
    /* Animacja wejścia */
}

/* Podpis pod zdjęciem w Lightboxie */
#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-size: 1.2rem;
}

/* Przycisk zamknięcia (X) */
.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #fca311;
    /* Kolor złoty po najechaniu */
    text-decoration: none;
    cursor: pointer;
}

/* Animacja powiększania */
@keyframes zoomIn {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

/* Responsywność Lightboxa na telefonach */
@media only screen and (max-width: 700px) {
    .lightbox-content {
        width: 100%;
    }
}

/* ================= NOWY STYL DLA WĄSKICH ZDJĘĆ (DUAL OFFER) ================= */

/* Kontener na dwa elementy obok siebie */
.dual-offer-container {
    display: flex;
    gap: 30px;
    /* Odstęp między nimi */
    margin-bottom: 40px;
}

/* Pojedynczy element w parze */
.dual-offer-item {
    flex: 1;
    /* Oba zajmują po równo miejsca (50%) */
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

/* Wrapper na wysokie zdjęcie */
.dual-img-wrapper {
    height: 500px;
    /* USTAW TU WYSOKOŚĆ - im więcej, tym wyższe będą zdjęcia */
    overflow: hidden;
    border-bottom: 1px solid #f0f0f0;
}

/* Styl samego zdjęcia */
.dual-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Zdjęcie wypełni cały obszar, nie będzie spłaszczone */
    object-position: center;
    /* Wyśrodkowanie */
    transition: transform 0.5s ease;
}

/* Efekt zoom po najechaniu */
.dual-offer-item:hover .dual-img-wrapper img {
    transform: scale(1.05);
}

/* Responsywność na telefonach (jedno pod drugim) */
@media screen and (max-width: 768px) {
    .dual-offer-container {
        flex-direction: column;
        /* Na telefonie układ pionowy */
    }

    .dual-img-wrapper {
        height: 400px;
        /* Trochę niższe na telefonie */
    }
}

/* ================= GALERIA WIDEO (POPRAWKA - OBOK SIEBIE) ================= */

.video-gallery {
    display: grid;
    /* ZMIANA: Wymuszamy dwie kolumny o równej szerokości */
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    /* Odstęp między filmami */
    margin-bottom: 50px;
}

.video-item {
    width: 100%;
}

.video-item video {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: block;
    /* CSS hacks for iOS Safari scrolling glitches */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

.video-item p {
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    color: #0d2c54;
}

/* ================= ZABEZPIECZENIE NA TELEFON ================= */
/* Na telefonie filmy muszą być jeden pod drugim, bo będą za małe */
@media screen and (max-width: 768px) {
    .video-gallery {
        grid-template-columns: 1fr;
        /* Jedna kolumna na telefonie */
    }
}

/* ================= AKORDION (ROZWIJANA SPECYFIKACJA) ================= */

/* Styl przycisku rozwijania */
.accordion {
    background-color: #f1f1f1;
    color: #0d2c54;
    cursor: pointer;
    padding: 12px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    transition: 0.4s;
    font-weight: bold;
    border-radius: 5px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion:hover,
.accordion.active {
    background-color: #e0e0e0;
    color: #fca311;
    /* Złoty akcent przy aktywnym */
}

/* Ikona plusa/minusa */
.accordion:after {
    content: '\002B';
    /* Plus sign */
    color: #777;
    font-weight: bold;
    float: right;
    margin-left: 5px;
}

.accordion.active:after {
    content: "\2212";
    /* Minus sign */
}

/* Ukryty panel z treścią */
.panel {
    padding: 0 15px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    border-left: 3px solid #fca311;
}

/* Styl tabeli wewnątrz panelu */
.tech-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 0.9rem;
}

.tech-table th,
.tech-table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.tech-table th {
    font-weight: 600;
    color: #555;
    width: 50%;
}

.tech-info-list {
    list-style: circle;
    padding-left: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* ================= POPRAWKA DLA EKO-DESIGN (Układ Poziomy) ================= */

/* Specjalna klasa dla kafelka z pionowym zdjęciem */
.offer-item.horizontal-mode {
    display: flex;
    flex-direction: row;
    /* Układaj obok siebie */
    align-items: center;
    min-height: 400px;
    /* Wysokość dopasowana do pionowego zdjęcia */
}

/* Ustawienia zdjęcia w trybie poziomym */
.offer-item.horizontal-mode img {
    width: 40%;
    /* Zdjęcie zajmuje 40% szerokości */
    height: 100%;
    /* Rozciągnij na pełną wysokość kafelka */
    min-height: 400px;
    object-fit: cover;
    /* Wypełnij obszar bez zniekształceń */
    border-bottom: none;
    /* Usuwamy linię na dole */
    border-right: 1px solid #f0f0f0;
    /* Dodajemy linię z prawej */
    padding: 0;
    /* Usuwamy padding */
}

/* Ustawienia tekstu w trybie poziomym */
.offer-item.horizontal-mode .offer-content {
    width: 60%;
    /* Tekst zajmuje resztę miejsca */
    padding: 40px;
    /* Więcej oddechu dla tekstu */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Wersja na telefon (wracamy do układu pionowego) */
@media screen and (max-width: 768px) {
    .offer-item.horizontal-mode {
        flex-direction: column;
    }

    .offer-item.horizontal-mode img {
        width: 100%;
        height: 350px;
        /* Ustalamy wysokość na telefonie */
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }

    .offer-item.horizontal-mode .offer-content {
        width: 100%;
        padding: 25px;
    }
}

/* ================= SEKCJE REALIZACJI (W TYM SLIDER) ================= */
.project-section {
    margin-top: 50px;
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    text-align: center;
}

.project-section h3 {
    color: #0d2c54;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.project-section .video-gallery {
    margin-bottom: 0;
    /* Override default video-gallery bottom margin when inside a project card */
}

.slider-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-wrapper {
    overflow: hidden;
    border-radius: 10px;
    position: relative;
    width: 100%;
    height: 500px;
    background: #111;
    /* Ciemne tło, by zdjęcia z pionem i poziomem ładnie wyglądały z czarnymi pasami, jak w galerii */
}

.slider-wrapper img.slide {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Zamiana cover na contain, żeby nie ucinało zdjęć */
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
    cursor: pointer;
}

.slider-wrapper img.slide:hover {
    transform: scale(1.02);
}

.slider-wrapper img.slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slider-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.3s ease;
    border-radius: 5px;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    z-index: 10;
}

.slider-btn:hover {
    background-color: #fca311;
    color: #000;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

@media screen and (max-width: 768px) {
    .slider-wrapper {
        height: 300px;
    }
}