/* Visual refresh: hero video, photo tiles and muted page headers. */

header.hero {
    background: #0b0b0b url('img_index/video/homepage-hero-poster.jpg') center / cover no-repeat;
    height: 62vh;
    min-height: 520px;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

img,
video {
    max-width: 100%;
}

header.hero #hero-video {
    display: block;
    z-index: 0;
    pointer-events: none;
}

.hero-video-fallback header.hero #hero-video {
    display: none;
}

header.hero .hero-content {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.5) 45%, rgba(0, 0, 0, 0.36));
    padding: 0 1.5rem;
    z-index: 1;
}

header.hero h1 {
    font-size: clamp(2.6rem, 5vw, 4.7rem);
}

header.hero h2 {
    font-size: clamp(1.35rem, 2.4vw, 2.1rem);
}

.categories {
    background: #050505;
    padding: 2rem 0 2.4rem;
}

.category-box {
    height: 165px;
    min-height: 165px;
    border-radius: 8px;
    border-color: rgba(200, 164, 93, 0.75);
    background-image: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.78)), var(--tile-image);
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.language-switch {
    position: fixed;
    top: max(0px, env(safe-area-inset-top, 0px));
    left: 50%;
    right: auto;
    z-index: 1000;
    display: none;
    transform: translateX(-50%);
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(200, 164, 93, 0.6);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: rgba(8, 8, 8, 0.78);
    backdrop-filter: blur(8px);
}

.home-page .language-switch {
    display: flex;
}

.lang-btn {
    min-width: 42px;
    height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.lang-btn.is-active {
    background: #c8a45d;
    color: #0a0a0a;
}

.books-ribbon {
    position: fixed;
    right: 0;
    top: 50%;
    z-index: 900;
    transform: translateY(-50%);
    width: 176px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding: 12px 10px 14px;
    border: 1px solid rgba(200, 164, 93, 0.7);
    border-right: 0;
    border-radius: 8px 0 0 8px;
    background: rgba(7, 7, 7, 0.86);
    box-shadow: 0 10px 30px rgba(0,0,0,0.28);
    backdrop-filter: blur(8px);
}

.books-ribbon__tab,
.books-ribbon__close {
    border: 0;
    font: inherit;
    cursor: pointer;
}

.books-ribbon__tab {
    display: none;
}

.books-ribbon__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.books-ribbon__close {
    display: none;
}

.books-ribbon__label {
    color: #c8a45d;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-transform: none;
}

.books-ribbon a {
    color: #fff;
    text-decoration: none;
    font-size: 0.77rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 7px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    transition: background 0.2s ease, color 0.2s ease;
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 7px;
    align-items: center;
}

.books-ribbon img {
    width: 46px;
    height: 62px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    background: #fff;
}

.books-ribbon span {
    display: block;
    overflow-wrap: anywhere;
}

.books-ribbon a:hover {
    background: #c8a45d;
    color: #080808;
}

.contact-section {
    padding: 4rem 1.5rem;
    background: #f4f0e8;
}

.contact-wrap {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
    gap: 2.5rem;
    align-items: start;
}

.contact-copy .eyebrow {
    color: #9b7a35;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contact-copy h2 {
    margin: 0.4rem 0 1rem;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.06;
}

.contact-copy p {
    font-size: 1.08rem;
    color: #333;
}

.contact-form {
    display: grid;
    gap: 1.05rem;
    padding: 1.4rem;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(0,0,0,0.08);
}

.contact-form label {
    display: grid;
    gap: 0.42rem;
    font-weight: 700;
}

.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    border: 1px solid rgba(0,0,0,0.22);
    border-radius: 6px;
    padding: 0.9rem 1rem;
    font: inherit;
    color: #111;
    background: #fbfbfb;
}

.contact-form textarea {
    resize: vertical;
    min-height: 130px;
}

.contact-form input[name="_honey"] {
    position: absolute;
    left: -9999px;
}

.consent-row {
    grid-template-columns: 20px 1fr;
    align-items: start;
    gap: 0.7rem !important;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #333;
}

.consent-row input {
    width: 18px;
    height: 18px;
    margin-top: 0.15rem;
    accent-color: #c8a45d;
}

.form-submit {
    border: 0;
    border-radius: 6px;
    padding: 1rem 1.2rem;
    background: #111;
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.form-submit:hover {
    background: #c8a45d;
    color: #0b0b0b;
}

.form-note {
    font-size: 0.86rem;
    color: #666;
}

.category-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.05), rgba(0,0,0,0.7));
    z-index: 0;
    transition: background 0.3s ease;
}

.category-box:hover {
    background-image: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.62)), var(--tile-image);
}

.category-box:hover::before {
    background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.58));
}

.category-box i {
    position: relative;
    z-index: 1;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(200, 164, 93, 0.92);
    font-size: 1.65rem;
    margin-bottom: 1rem;
}

.category-box h3 {
    position: relative;
    z-index: 1;
    max-width: 95%;
    text-shadow: 0 2px 12px rgba(0,0,0,0.8);
}

.category-nieruchomosci { --tile-image: url('deweloper_img/radomir-projekt5.jpg'); }
.category-biznes { --tile-image: url('img_index/categories/biznes-domy-radomir.jpg'); }
.category-ksiazki { --tile-image: url('RADOMIR_img/vida_05.jpg'); }
.category-kim { --tile-image: url('img_wywiady/orly_04.jpg'); }
.category-szkolenia { --tile-image: url('img_wywiady/orly_01.jpg'); }
.category-spolecznosc { --tile-image: url('deweloper_img/radomir-team.jpg'); }
.category-jezyki { --tile-image: url('RADOMIR_img/vida_02.jpg'); }
.category-wywiady { --tile-image: url('img_wywiady/orly_02.jpg'); }

.profile-hero,
.books-hero,
.author-hero,
.real-estate-hero,
.business-hero,
.minimal-hero,
.esans-hero,
.hero-section {
    background-image:
        linear-gradient(rgba(14, 14, 14, 0.72), rgba(14, 14, 14, 0.78)),
        url('img_index/hero/radomir-page-bg.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
}

.hero-section .hero-container,
.hero-section .hero-content,
.profile-hero .hero-content,
.books-hero .hero-content,
.business-hero .hero-content {
    position: relative;
    z-index: 1;
}

.hero-section .hero-container {
    background: rgba(255,255,255,0.9);
}

@media (max-width: 768px) {
    html,
    body {
        position: relative;
        overflow-x: clip;
    }

    .category-box {
        height: 145px;
        min-height: 145px;
    }

    header.hero {
        height: 58svh;
        min-height: 430px;
    }

    header.hero .hero-content {
        background: rgba(0, 0, 0, 0.58);
        width: 100%;
        overflow: hidden;
    }

    header.hero h1 {
        font-size: 2.05rem;
        line-height: 1.1;
        max-width: calc(100vw - 32px);
        white-space: normal;
        overflow-wrap: break-word;
    }

    header.hero h2 {
        font-size: 1.05rem;
        max-width: calc(100vw - 32px);
    }

    header.hero .cta-button {
        width: auto;
        max-width: calc(100vw - 32px);
        padding: 1.05rem 1.15rem;
        font-size: 0.85rem;
        letter-spacing: 0;
    }

    .language-switch {
        top: env(safe-area-inset-top, 0px);
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: max-content;
        max-width: calc(100vw - 20px);
        justify-content: center;
        gap: 4px;
        padding: 4px;
        border-radius: 0 0 14px 14px;
        background: rgba(8, 8, 8, 0.88);
    }

    .lang-btn {
        min-width: 0;
        width: 34px;
        height: 30px;
        border-radius: 999px;
        font-size: 0.82rem;
        line-height: 1;
        padding: 0;
        touch-action: manipulation;
    }

    .books-ribbon {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        top: auto;
        transform: none;
        width: auto;
        max-height: 92px;
        display: block;
        overflow: visible;
        padding: 0;
        border: 1px solid rgba(200, 164, 93, 0.72);
        border-radius: 8px;
        background: rgba(7, 7, 7, 0.94);
        box-shadow: 0 8px 28px rgba(0,0,0,0.32);
    }

    .books-ribbon__content {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 8px;
        max-width: 100%;
        min-height: 74px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 8px 42px 8px 8px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }

    .books-ribbon__label {
        flex: 0 0 118px;
        min-width: 118px;
        padding: 0 4px;
        font-size: 0.64rem;
        line-height: 1.1;
        display: flex;
        align-items: center;
    }

    .books-ribbon__close {
        position: absolute;
        top: 6px;
        right: 6px;
        z-index: 2;
        display: grid;
        place-items: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: rgba(255,255,255,0.12);
        color: #fff;
        font-size: 1.25rem;
        line-height: 1;
        touch-action: manipulation;
    }

    .books-ribbon__tab {
        display: none;
    }

    .books-ribbon.is-collapsed {
        left: auto;
        width: auto;
        max-height: none;
        border-radius: 999px;
    }

    .books-ribbon.is-collapsed .books-ribbon__content {
        display: none;
    }

    .books-ribbon.is-collapsed .books-ribbon__tab {
        display: block;
        min-height: 42px;
        padding: 0 14px;
        border-radius: 999px;
        background: #c8a45d;
        color: #090909;
        font-size: 0.78rem;
        font-weight: 900;
        touch-action: manipulation;
    }

    .books-ribbon a {
        flex: 0 0 min(142px, 42vw);
        min-height: 58px;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 6px;
        padding: 6px;
        font-size: 0.68rem;
        scroll-snap-align: start;
    }

    .books-ribbon img {
        width: 34px;
        height: 46px;
        border-radius: 3px;
    }

    .contact-wrap {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-section {
        padding: 3rem 1rem 7.5rem;
    }

    .programs {
        background-attachment: scroll;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .program-content {
        padding: 1.4rem;
    }

    .books-grid,
    .gallery-grid,
    .projects-grid,
    .business-grid,
    .interviews-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100%;
        max-width: 100%;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        gap: 1.25rem !important;
    }

    .book-card,
    .program-card,
    .project-card,
    .business-card,
    .interview-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        border-radius: 8px !important;
    }

    .book-content,
    .book-content h3,
    .book-content h4,
    .book-content p,
    .book-links {
        width: 100% !important;
        max-width: 100% !important;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 420px) {
    header.hero {
        height: 62svh;
        min-height: 420px;
    }

    header.hero .hero-content {
        padding-top: 4.25rem;
    }

    .categories-grid {
        padding-left: 1rem;
        padding-right: 1rem;
        gap: 1rem;
    }

    .cta-button,
    .program-button {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}
