html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

:root {
    --granat: #2c39da;
    --granat-trans: rgba(44, 57, 218, 0.9);
    --bialy: #fff;
    --bialy-trans: rgba(255, 255, 255, 0.8);
    --czerwony: #e53935;
    --czerwony-dark: #b71c1c;
    --shadow-light: rgba(26, 35, 126, 0.08);
    --shadow-dark: rgba(229, 57, 53, 0.15);
    --akcent-kolor-glowny: #1e3c72;
}

body {
    background: linear-gradient(181deg, rgb(9 9 121) 0%, rgb(104 2 2) 100%);
    color: white;
    font-family: var(--bs-body-font-family, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
}

.navbar {
    background: transparent !important;
    position: absolute !important;
    top: 20px !important;
    left: 0 !important;
    width: 100%;
    z-index: 1030 !important;
    transition: background-color 0.3s ease-in-out;
    box-shadow: none;
    border-bottom: 0;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    color: var(--bialy) !important;
}

.navbar-nav .nav-link.active::after,
.navbar-nav .nav-link:hover::after {
    width: 100%;
}

.navbar-brand {
    padding-bottom: 0;
    font-weight: bold;
    letter-spacing: 1px;
    color: var(--bialy) !important;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: var(--bialy) !important;
    font-weight: 500;
    transition: color 0.3s ease-in-out;
    position: relative;
    padding-bottom: 8px;
    margin: 0 10px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--czerwony);
    transition: width 0.3s ease-in-out;
}

.section-title {
    border-left: 5px solid var(--czerwony);
    padding-left: 0.6em;
    margin-bottom: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
    color: white;
}

.accent {
    color: var(--czerwony);
}

.btn-accent {
    background: var(--czerwony);
    color: var(--bialy);
    border: none;
    transition: background-color 0.2s ease;
}

.btn-accent:hover {
    background: var(--czerwony-dark);
    color: var(--bialy);
}

.card {
    border: none;
    box-shadow: 0 4px 24px var(--shadow-light);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 32px var(--shadow-dark);
}

.site-footer {
    color: var(--bialy);
    padding: 1rem 0;
}

.site-footer .footer-logo-container {
    display: flex;
    align-items: center;
}

.site-footer .footer-logo-img {
    max-height: 55px;
    margin-right: 0.5rem;
}

@media (max-width: 576.98px) {
    .site-footer .footer-logo-container {
        justify-content: center;
    }
    .site-footer .footer-logo-img {
        margin-right: 0;
    }
}

.site-footer .social-icons a {
    color: var(--bialy);
    font-size: 1.8rem;
    margin: 0 0.5rem;
    transition: color 0.3s ease-in-out, transform 0.2s ease-in-out;
    display: inline-block;
}

.site-footer .social-icons a:hover {
    color: var(--czerwony);
    transform: scale(1.1);
}

.site-footer .social-icons .bi {
    vertical-align: middle;
}

.site-footer .footer-copyright-row {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: .5rem;
}

.site-footer .footer-copyright-row p {
    font-size: 0.85rem;
    color: var(--bialy-trans);
    margin-bottom: 0;
}

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

.gallery-thumb {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 0.6em;
    box-shadow: 0 2px 12px var(--shadow-light);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    background: linear-gradient(90deg, #1a237e 25%, #283593 50%, #1a237e 75%);
    background-size: 200% 100%;
}

.gallery-thumb.loading {
    animation: shimmer 1.5s infinite;
}

.gallery-thumb.loading img {
    opacity: 0;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

.gallery-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 32px var(--shadow-dark);
}

.gallery-thumb:hover img {
    transform: scale(1.1);
}

@media (max-width: 992px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 576px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

html.lightbox-open,
body.lightbox-open {
    overflow: hidden;
    touch-action: none;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    touch-action: none;
    overscroll-behavior: contain;
}

.lightbox.active {
    display: flex;
}

.lightbox-img-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
    min-width: 200px;
    min-height: 150px;
}

.lightbox-img-wrapper.loading::before {
    content: '';
    position: absolute;
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--czerwony);
    border-radius: 50%;
    animation: lightbox-spin 0.8s linear infinite;
}

@keyframes lightbox-spin {
    to { transform: rotate(360deg); }
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    opacity: 1;
    transition: opacity 0.15s ease;
}

.lightbox-img-wrapper.loading .lightbox-img {
    opacity: 0;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: var(--bialy);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--czerwony);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: var(--bialy);
    background: none;
    border: none;
    cursor: pointer;
    padding: 1rem;
    transition: color 0.2s;
    z-index: 10;
    opacity: 1;
    visibility: visible;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

@media (hover: hover) {
    .lightbox-prev:hover,
    .lightbox-next:hover {
        color: var(--czerwony);
    }
}

.lightbox-prev:focus,
.lightbox-next:focus {
    outline: none;
    color: var(--bialy);
}

.lightbox-prev.pressed,
.lightbox-next.pressed {
    color: var(--czerwony);
}

.carousel-control-prev,
.carousel-control-next {
    width: 5% !important;
}

.hero-section {
    position: relative;
    width: 100%;
    height: 100svh;
    background: url('../images/glowna.png') center center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(23deg, rgb(2 15 131 / 85%) 0%, rgb(207 0 0 / 45%) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.scroll-down-arrow {
    position: absolute;
    left: 50%;
    bottom: max(32px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    font-size: 4rem;
    color: var(--bialy);
    z-index: 3;
    animation: bounce 1.8s infinite;
    text-shadow: 0 2px 12px rgba(26, 35, 126, 0.4);
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(18px);
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 380px;
        padding: 2rem 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .scroll-down-arrow {
        font-size: 2.2rem;
        bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
    }
}

#studio .card-title {
    color: var(--akcent-kolor-glowny);
}
#studio .card .accent {
    color: var(--akcent-kolor-glowny);
}

.team-member {
    min-height:650px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1.5rem;
    text-align: left;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 15px;
    box-sizing: border-box;
    opacity: 0.7;
    transform: scale(0.95);
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.3) 0%, rgba(30, 60, 114, 0.2) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    align-items: center;
}

.team-member-img {
    width: 160px;
    height: 160px;
    margin: 0 auto 1rem;
    overflow: hidden;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.team-member-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.team-member-img:hover img {
    transform: scale(1.05);
}

.team-member h5 {
    color: var(--bialy);
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.team-member p {
    color: #cfd8dc;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.team-member p.text-muted {
    color: #ffa9a6 !important;
    min-height: 1.5em;
}

.team-member-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

@keyframes fadeInDescription {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.language-switch.input-group {
    width: auto;
    flex-wrap: nowrap;
}
.language-switch .input-group-text {
    color: #fff;
}
.language-switch .instagram-link:hover {
    color: var(--czerwony);
}
.language-switch .btn-group .btn {
    color: rgba(255,255,255,0.6);
    border-color: rgba(255,255,255,0.3);
    background-color: transparent;
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    transition: all 0.2s ease;
}
.language-switch .btn-group .btn:hover,
.language-switch .btn-group .btn:focus {
    background-color: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}
.language-switch .btn-group .btn.active {
    background-color: var(--czerwony);
    border-color: var(--czerwony);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.4);
}
@media (min-width: 992px) {
    .navbar .language-switch { gap: .5rem; }
    .navbar .navbar-collapse { display: flex !important; align-items: center; }
    .navbar .navbar-collapse > .navbar-nav { margin-left: auto; margin-right: auto; }
    .navbar .navbar-collapse > .d-flex { margin-left: auto; }
}

.navbar-brand img {
    width: 160px;
    height: auto;
    display: block;
}

@media (max-width: 990px) {
    .navbar { top: 0 !important; }
    .navbar.navbar-open {
        background-color: #e53935eb !important;
        box-shadow: none;
        border-bottom: 0;
    }
    .navbar-collapse {
        text-align: right;
    }
    .navbar-collapse .nav-link {
        text-align: right;
    }
    .navbar-collapse .language-switch {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255,255,255,0.2);
    }
    .navbar-collapse .language-switch .btn-group .btn {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
    .navbar-collapse .language-switch .btn-group .btn.active {
        background-color: #fff;
        border-color: #fff;
        color: var(--czerwony);
    }
    .team-splide .splide__pagination {
        bottom: -20px;
    }
    .team-member {
        min-height: 550px;
    }
}

.splide:focus,
.splide:focus-visible,
.splide *:focus,
.splide *:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.splide__slide:focus,
.splide__slide:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.splide__arrow:focus,
.splide__arrow:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.splide__slide a:focus,
.splide__slide a:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}
.splide__arrow {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.splide__arrow svg {
    fill: var(--czerwony);
}
.team-splide {
    position: relative;
}

.team-splide .splide__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    box-shadow: none;
    z-index: 10;
    width: 40px;
    height: 40px;
}

.team-splide .splide__arrow--prev {
    left: -50px;
}

.team-splide .splide__arrow--next {
    right: -50px;
}

.movies-splide { position: relative; }
.movies-splide .splide__slide { padding: 0.5rem 0; }
.movies-splide .splide__list { will-change: transform; }

.movie-card { border-radius: 0.75rem; background: rgba(9, 12, 41, 0.28); box-shadow: none; overflow: hidden; }
.movie-card__header { padding: .75rem 1rem; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.movie-card__header:active { cursor: grabbing; }
.movie-title { font-weight: 600; color: #fff; letter-spacing: .2px; }
.movie-card__body { padding: 0; }

.video-wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 0; }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.video-facade { cursor: pointer; }
.video-facade img { position: absolute; top: 50%; left: 50%; width: 100%; height: auto; min-height: 100%; object-fit: cover; transform: translate(-50%, -50%); transition: filter 0.2s ease; }
.video-facade:hover img { filter: brightness(0.8); }
.video-play-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: none; border: none; padding: 0; cursor: pointer; z-index: 2; transition: transform 0.2s ease, opacity 0.2s ease; opacity: 0.9; }
.video-facade:hover .video-play-btn { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }

@supports (touch-action: pan-y) {
  .movie-card { touch-action: pan-y; }
}
.movies-splide .splide__pagination { position: relative; bottom: auto; display: flex; justify-content: center; gap: .25rem; margin-top: -2rem; z-index: 5; }
.movies-splide .splide__arrow { position: absolute; top: 50%; transform: translateY(-50%); background: transparent; border: none; box-shadow: none; z-index: 10; width: 40px; height: 40px; }
.movies-splide .splide__arrow--prev { left: -50px; }
.movies-splide .splide__arrow--next { right: -50px; }
@media (max-width: 990px) { .movies-splide .splide__arrow { display: none; } }

.movie-card__footer {
    height: 32px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: transparent;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
    position: relative;
}
.movie-card__footer:active { cursor: grabbing; }
.movie-card__footer .grab-hint {
    width: 36px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255,255,255,0.35);
}
@media (max-width: 990px) {
    .movie-card__footer { height: 44px; }
    .movies-splide .splide__pagination { margin-top: -1.5rem; }
    #filmy { padding-bottom: 1.5rem !important; }
    #gallery { padding-top: 1.5rem !important; }
}

.movie-footer-arrow {
    display: none;
    background: transparent;
    border: 0;
    color: rgba(255,255,255,0.8);
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    cursor: pointer;
    border-radius: 999px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, transform 0.1s ease;
}
.movie-footer-arrow i { font-size: 1.15rem; line-height: 1; }
.movie-footer-arrow:focus { outline: none; box-shadow: none; }
.movie-footer-arrow.pressed { color: var(--czerwony); }
@media (hover: hover) {
    .movie-footer-arrow:hover { color: var(--czerwony); }
}
.movie-footer-arrow--prev { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); }
.movie-footer-arrow--prev.pressed { transform: translateY(-50%) scale(0.92); }
.movie-footer-arrow--next { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
.movie-footer-arrow--next.pressed { transform: translateY(-50%) scale(0.92); }
@media (max-width: 990px) {
    .movie-footer-arrow { display: inline-flex; }
}

.movie-awards { font-size: 0.9rem; }
.movie-director { color: rgba(255,255,255,0.7); }
.movie-placeholder { padding: 2rem; text-align: center; color: rgba(255,255,255,0.6); }

#studio .card .card-body .card-text {
  text-align: left;
}

.back-to-top {
    position: fixed;
    bottom: max(32px, env(safe-area-inset-bottom));
    right: 32px;
    font-size: 2.5rem;
    color: var(--czerwony);
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: rotate(180deg) translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 1000;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: rotate(180deg) translateY(0);
}

@media (max-width: 768px) {
    .back-to-top {
        font-size: 1.8rem;
        right: 20px;
        bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
    }
}
