@font-face {
    font-family: 'Safira March';
    src: url('font/Safira_March.woff2') format('woff2'),
         url('font/Safira_March.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Safira March', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    letter-spacing: 0.05em;
}

.container {
    width: 85%;
    margin: 0 auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.header-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
}

.logo span:first-child {
    color: #b3002d;
    font-size: 2.35rem;
}

nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

nav a {
    color: #333;
    text-decoration: none;
    font-size: 0.68em;
    letter-spacing: 0.05em;
}

nav a:hover {
    color: #b3002d;
}

main {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    width: 85%;
    margin: auto;
    margin-bottom: 2rem;
}

.carousel-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    width: 100%;
}

.carousel {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    width: 100%;
}

.photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.8s ease, opacity 0.3s ease;
    cursor: pointer;
}

.photo:not(.reset-hover):hover {
    transform: scale(1.10);
}

.photo.reset-hover {
    transform: none;
    transition: none;
}

.photo img {
    display: block;
    width: 100%;
    height: auto;
}

.photo-title {
    margin-top: 0.5rem;
    font-size: 0.68em;
    color: #333;
    letter-spacing: 0.05em;
    word-wrap: break-word;
    hyphens: auto;
    text-align: center;
    white-space: normal;
    overflow-wrap: break-word;
    max-width: 100%;
    line-height: 1.2;
    padding: 0.6rem;
    box-sizing: border-box;
    height: auto;
}

.photo:hover .photo-title {
    color: #b3002d;
}

.photo:nth-child(1), .photo:nth-child(5) { width: 14%; }
.photo:nth-child(2), .photo:nth-child(4) { width: 16%; }
.photo:nth-child(3) { width: 18%; }

.content-section {
    display: none;
    padding: 2rem 2rem 4rem 2rem;
    position: relative;
    margin-bottom: 2rem;
}

.section-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
    text-align: left;
}

.section-content picture {
    width: 30%;
    display: flex;
}

.section-content img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 10px;
    align-self: flex-start;
    object-fit: cover;
}

.section-content div {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    max-width: 600px;
}

.section-content h2, .section-content p {
    margin: 0;
    padding: 0;
}

.section-content h2 {
    font-size: 1.2rem;
    color: #b3002d;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.section-content p {
    font-size: 1rem;
    color: #333;
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}
.section-content ul {
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0;
}

.section-content li {
    font-size: 1rem;
    color: #333;
    letter-spacing: 0.05em;
    margin: 0.25rem 0;
}

.section-content li::before {
    content: "– ";
    color: #333;
}

.section-content p,
.section-content ul,
.section-content li {
    font-family: 'Lato', sans-serif !important;
}

.show {
    display: flex !important;
    justify-content: flex-start;
    align-items: flex-start;
    animation: fadeIn 0.8s ease;
}

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

footer {
    background-color: #fff;
    color: #333;
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid #ddd;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.icons {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.contact-icon {
    width: 80px;
    height: auto;
    cursor: pointer;
}

.contact-icon:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.hamburger {
    display: none;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 20px;
}

.hamburger svg {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

.hamburger:hover svg {
    transform: scale(1.1);
}

/* Stylizacja dla urządzeń mobilnych */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .header-container {
        justify-content: space-between;
        width: 100%;
        position: relative;
        align-items: center;
        padding: 0;
    }

    .hamburger {
        display: block;
        top: 27px;
        padding: 0;
    }
    
    nav {
        display: none;
        flex-direction: column;
        background-color: #fff;
        position: absolute;
        color: rgb(179, 0, 45) !important;
        top: 60px;
        right: 10px;
        width: 200px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        border-radius: 10px;
        z-index: 1000;
    }

    nav.active {
        display: flex;
        color: rgb(179, 0, 45) !important;
    }

    .icons {
        display: none;
    }

    nav a {
        margin: 0.5rem 0;
        font-size: 1rem;
        color: rgb(179, 0, 45) !important;
    }

    /* Karuzela */
    .carousel-container {
        justify-content: flex-start;
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        width: 100%;
        margin: 0;
        padding: 0;
        height: 70vh;
        touch-action: pan-x;
        
        /* Ukrycie pasków przewijania */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* Internet Explorer 10+ */
    }

    /* Ukrycie pasków przewijania dla WebKit (Chrome, Safari, nowe Edge) */
    .carousel-container::-webkit-scrollbar {
        display: none;
    }

    .carousel {
        justify-content: flex-start;
        display: flex;
        flex-direction: row;
        gap: 1rem;
        padding: 1rem;
        width: max-content;
        align-items: center;
    }

    .photo {
        flex: 0 0 90%;
        height: auto;
        scroll-snap-align: start;
        border-radius: 20px;
        transition: opacity 0.3s ease;
        position: relative;
        overflow: visible;
    }

    .photo:hover {
        transform: none;
    }

    .photo:not(.reset-hover):hover {
        transform: none;
    }

    .photo img {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 20px;
    }

    .photo-title {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.85);
        color: #fff;
        padding: 0.8rem 1.5rem;
        border-radius: 15px;
        text-align: center;
        min-width: 120px;
        max-width: 80%;
        font-size: 0.7rem;
        letter-spacing: 0.05em;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        z-index: 2;
        margin: 0;
        white-space: nowrap;
    }

    .section-content {
        flex-direction: column;
        align-items: flex-start;
        text-align: flex-start;
    }

    .section-content picture {
        width: 100%;
        margin-bottom: 1rem;
    }

    .section-content img {
        width: 100%;
        max-width: none;
        max-height: 50vh;
        object-fit: cover;
    }

    .section-content div {
        align-items: flex-start;
        width: 100%;
        max-width: none;
    }

    .section-content h2 {
        text-align: flex-start;
        width: 100%;
    }

    .section-content p {
        text-align: flex-start;
        width: 100%;
    }

    .carousel .photo[data-section="omnie"] { order: 1; }
    .carousel .photo[data-section="karne"] { order: 2; }
    .carousel .photo[data-section="cywilne"] { order: 3; }
    .carousel .photo[data-section="konsultacje"] { order: 4; }
    .carousel .photo[data-section="kontakt"] { order: 7; }
}

.footer-lato {
    font-family: 'Lato', sans-serif !important;
}


@media (max-width: 768px) {
    .photo:hover .photo-title {
        color: #ffffff;
    }
}