:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --text-light: #777777;
    --header-bg: #1a1a1a;
    --header-text: #ffffff;
    --contact-bg: #f8f8f8;
    /* Light grey for contact */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    --transition: all 0.4s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Prevent iOS Safari from sizing viewport behind browser chrome */
    height: 100%;
    height: -webkit-fill-available;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.8;
    overflow-x: hidden;
    /* Match html sizing for iOS Safari */
    min-height: 100%;
    min-height: -webkit-fill-available;
}

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-body);
    font-weight: 300;
    color: #000;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 300;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 300;
}

/* Header */
#main-header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: #fff;
    color: #000;
    padding: 1.2rem 3rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: #000;
    transition: opacity 0.3s ease;
    letter-spacing: 2px;
    text-transform: uppercase;
}

nav .logo .highlight {
    color: #000;
}

nav .logo:hover {
    opacity: 0.7;
}

.hamburger {
    display: none;
}

.nav-controls {
    display: none;
}

.btn-faq-mobile {
    display: none;
}

.lang-switch {
    padding: 0.35rem 0.6rem;
    color: #000;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid #000;
    border-radius: 4px;
}

.lang-switch:hover {
    background: #000;
    color: #fff;
}

/* Desktop: lang switch only in main nav ul */
.nav-controls .lang-switch {
    display: none;
}

nav ul .lang-switch {
    display: inline-block;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav a {
    color: #000;
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: var(--transition);
    font-weight: 500;
}

nav a:hover {
    color: #666;
}

/* Hero Section */
#hero {
    height: 60vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #fff;
    padding: 0 2rem;
}

.hero-content {
    max-width: 1000px;
    /* Increased width to fit images */
}

.hero-title-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-bottom: 1rem;
}

.hero-side-img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 1px solid #000;
    color: #000;
    text-decoration: none;
    margin-top: 2rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #000;
    color: #fff;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

section {
    padding: 5rem 0;
}

/* Story Section */
#story {
    background-color: #f9f9f9;
    /* Grey */
}

.story-row {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 4rem;
}

.story-row:last-child {
    margin-bottom: 0;
}

.story-row.reverse {
    flex-direction: row-reverse;
}

.story-text {
    flex: 1;
}

.story-text p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-weight: 300;
    font-size: 1.1rem;
}

.story-heading {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: #000;
    font-weight: 400;
    line-height: 1.3;
}

.story-image {
    flex: 1;
    height: 400px;
    overflow: hidden;
}

.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: saturate(0.85) contrast(1.05);
    /* Unify look */
}

.story-image:hover img {
    transform: scale(1.03);
}

.emphasis {
    font-size: 1.25rem;
    color: #000;
    font-weight: 400;
    border-left: 2px solid #000;
    padding-left: 1.5rem;
    margin: 2rem 0;
}

/* Benefits Section */
#benefits {
    background-color: #ffffff;
    /* White */
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 3rem;
}

.benefit-card {
    text-align: center;
    padding: 1rem;
}

.benefit-card .icon-wrapper {
    margin-bottom: 1.5rem;
    color: #000;
}

.benefit-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.benefit-card p {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Portfolio Section */
#portfolio {
    padding: 0;
    width: 100%;
    background-color: #f9f9f9;
    /* Grey */
}

#portfolio .section-title {
    padding: 5rem 0;
    margin: 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.portfolio-item {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    cursor: pointer;
}

.thumbnail-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: grayscale(20%);
}

.portfolio-item:hover .thumbnail-wrapper img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    color: white;
    opacity: 0;
    font-size: 2rem;
    transition: all 0.3s ease;
    z-index: 2;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.portfolio-item:hover .play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Contact Section */
#contact {
    background-color: #ffffff;
    /* White */
    color: var(--text-color);
    text-align: center;
    padding: 6rem 0;
}

.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.phone-number {
    display: block;
    font-size: 2.5rem;
    font-family: var(--font-body);
    font-weight: 300;
    color: #000;
    margin: 2rem 0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.phone-number:hover {
    color: #555;
    transform: scale(1.02);
}

/* About Us Section */
#about {
    background-color: #f9f9f9;
    /* Grey */
    padding: 6rem 0;
}

.about-intro {
    max-width: 800px;
    margin: 0 auto 4rem auto;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-color);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-top: 3rem;
    text-align: left;
    margin-bottom: 5rem;
}

.about-card {
    padding: 1.5rem;
    border-top: 1px solid #eee;
}

.about-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #000;
}

.about-card p {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* About Collage */
.about-collage {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    /* 6 columns */
    gap: 1.5rem;
    /* Increased gap for circles */
    margin-top: 2rem;
}

.collage-item {
    aspect-ratio: 1/1;
    overflow: hidden;
    /* Circle shape */
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: saturate(0.85) contrast(1.05);
    /* Unify look */
}

.collage-item:hover img {
    transform: scale(1.05);
}


/* Footer */
footer {
    background-color: #f1f1f1;
    color: #888;
    text-align: center;
    padding: 2rem;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Video Modal Lightbox – wycentrowany, krzyżyk zawsze widoczny, RWD */
.video-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
    box-sizing: border-box;
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    min-height: 0;
    /* flex może zmniejszyć po obrocie */
    animation: slideIn 0.3s ease;
}

.video-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 44px;
    min-height: 44px;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.65);
    border: none;
    border-radius: 50%;
    transition: background-color 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.video-modal-close:hover,
.video-modal-close:focus {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.85);
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    border-radius: 4px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Video modal – mobile i stabilny layout przy obrocie */
@media (max-width: 768px) {
    .video-modal-content {
        width: calc(100% - 1rem);
        max-width: none;
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
    }

    .video-modal-close {
        top: 0.25rem;
        right: 0.25rem;
        width: 2.5rem;
        height: 2.5rem;
        min-width: 44px;
        min-height: 44px;
        font-size: 1.5rem;
    }
}

/* Po obrocie – landscape na telefonie: film na pełną wysokość */
@media (max-height: 500px) {
    .video-modal-content {
        width: calc(100% - 1rem);
        max-width: none;
        max-height: calc(100% - 0.5rem);
    }

    .video-wrapper {
        /* W landscape zamiast aspect-ratio kontrolujemy wysokość */
        aspect-ratio: auto;
        width: auto;
        height: calc(100dvh - 2rem);
        max-width: 100%;
        margin: 0 auto;
    }
}

/* Pełny ekran na mobile (landscape) – tylko film + krzyżyk, bez paska i zakładek */
.video-modal:fullscreen,
.video-modal:-webkit-full-screen {
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.video-modal:fullscreen .video-modal-content,
.video-modal:-webkit-full-screen .video-modal-content {
    width: 100%;
    max-width: none;
    max-height: 100%;
}

.video-modal:fullscreen .video-wrapper,
.video-modal:-webkit-full-screen .video-wrapper {
    max-height: 100%;
}

/* Podpowiedź na iOS Safari: „Dodaj do ekranu początkowego” dla widoku bez paska */
.ios-fullscreen-hint {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10002;
    margin: 0;
    padding: 0.4rem 0.6rem;
    font-size: 0.7rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(0, 0, 0, 0.75);
    border-radius: 6px;
    max-width: calc(100% - 1rem);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    pointer-events: none;
}

.ios-fullscreen-hint.visible {
    opacity: 1;
    visibility: visible;
}

.ios-fullscreen-hint strong {
    font-weight: 600;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

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

.portfolio-item {
    cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .story-row {
        gap: 2rem;
    }

    .about-collage {
        grid-template-columns: repeat(4, 1fr);
        /* 4 on tablet */
    }
}

@media (max-width: 768px) {
    .story-row {
        flex-direction: column !important;
        gap: 2rem;
    }

    .story-image {
        width: 100%;
        height: 250px;
    }

    .benefits-grid,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-card {
        text-align: center;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .phone-number {
        font-size: 1.8rem;
    }

    .about-collage {
        grid-template-columns: repeat(3, 1fr);
        /* 3 on mobile */
    }

    /* Mobile Navigation - Hamburger Menu */
    header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    nav {
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem;
    }

    .nav-controls {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .nav-controls .lang-switch {
        display: inline-block;
    }

    .btn-faq-mobile {
        display: inline-block;
        padding: 0.5rem 1rem;
        background: #000;
        color: #fff;
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 500;
        border-radius: 4px;
        transition: all 0.3s ease;
    }

    .btn-faq-mobile:hover {
        background: #333;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 1001;
        position: relative;
    }

    .hamburger span {
        width: 25px;
        height: 3px;
        background: #000;
        transition: all 0.3s ease;
    }

    .hamburger.active {
        position: fixed;
        right: 1rem;
        top: 1rem;
    }

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

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

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

    nav ul {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    nav ul.active {
        max-height: 400px;
    }

    nav ul li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    nav ul li a {
        display: block;
        padding: 1rem;
        text-align: center;
    }
}

/* FAQ Styles */
#faq-section {
    padding: 6rem 0;
    min-height: 80vh;
    min-height: 80dvh;
}

.faq-container {
    max-width: 1000px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 0;
    border-bottom: none;
    padding: 2rem 3rem;
}

/* Alternating backgrounds like main page */
.faq-item:nth-child(odd) {
    background: #fff;
}

.faq-item:nth-child(even) {
    background: #f8f8f8;
}

summary {
    font-size: 1.3rem;
    font-family: var(--font-heading);
    cursor: pointer;
    list-style: none;
    font-weight: 500;
    position: relative;
    padding-right: 2rem;
    transition: color 0.3s ease;
    margin-bottom: 1rem;
}

summary:hover {
    color: #555;
}

/* Custom indicator for accordion */
summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

/* Hero Section */
#hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    padding-top: calc(2rem + env(safe-area-inset-top));
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('collage_14.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
    filter: saturate(0.85) contrast(1.05);
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-content .subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-light);
    margin-bottom: 3rem;
    font-weight: 300;
}

.btn-primary {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: #000;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid #000;
}

.btn-primary:hover {
    background: #fff;
    color: #000;
}

.faq-content-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.faq-image {
    flex: 0 0 250px;
    height: 250px;
    overflow: hidden;
    border-radius: 50%;
}

.faq-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.85) contrast(1.05);
}

.faq-content {
    flex: 1;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.7;
}

.faq-content p {
    margin-bottom: 1rem;
}

.faq-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.faq-content li {
    margin-bottom: 0.75rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: #000;
    text-decoration: none;
    border-bottom: 1px solid #000;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.back-link:hover {
    color: #555;
    border-color: #555;
}

/* Responsive FAQ */
@media (max-width: 768px) {
    .faq-content-wrapper {
        flex-direction: column;
    }

    .faq-image {
        flex: 0 0 200px;
        height: 200px;
        margin: 0 auto;
    }
}

/* ===== Mobile landscape: hide Safari chrome overlaps ===== */
@media (orientation: landscape) and (max-height: 500px) {

    html,
    body {
        /* Let content flow naturally, no forced height */
        height: auto;
    }

    #hero {
        min-height: 100dvh;
        min-height: -webkit-fill-available;
        padding-left: calc(2rem + env(safe-area-inset-left));
        padding-right: calc(2rem + env(safe-area-inset-right));
    }

    /* Sticky header must not be covered by notch/safe area */
    #main-header {
        padding-left: calc(1rem + env(safe-area-inset-left));
        padding-right: calc(1rem + env(safe-area-inset-right));
    }

    /* Footer safe area */
    footer {
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
        padding-left: calc(2rem + env(safe-area-inset-left));
        padding-right: calc(2rem + env(safe-area-inset-right));
    }

    /* Sections need side safe area insets in landscape */
    section {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* ===== iOS Safari: force recalculation on orientation change ===== */
@supports (-webkit-touch-callout: none) {

    /* iOS-only hack: Safari is the only browser supporting this property */
    html {
        min-height: -webkit-fill-available;
    }

    body {
        min-height: -webkit-fill-available;
    }

    #hero {
        min-height: -webkit-fill-available;
    }
}