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

html, body {
    width: 100%;
    height: 100%;
}


.stage-section--fleet-hero {
    --fleet-header-offset: 118px;
    min-height: calc(200vh + var(--fleet-header-offset));
    margin-top: calc(var(--fleet-header-offset) * -1);
    padding: 0;
    overflow: visible !important;
    background: #f2ece5;
}

.stage-section--fleet-hero .kb-hero-shell {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    isolation: isolate;
}

.stage-section--fleet-hero .kb-hero-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #1b130e;
    transform-origin: center center;
    will-change: transform, border-radius;
    box-shadow: 0 40px 120px rgba(17, 10, 6, 0.16);
}

.stage-section--fleet-hero .kb-hero-bg {
    position: absolute;
    inset: -2vw;
    background: linear-gradient(rgb(0 0 0 / 0%), rgb(0 0 0 / 34%)), url(assets/images/experiences-banner.webp);
    transform: scale(1.3);
    transform-origin: center center;
    will-change: transform;
    backface-visibility: hidden;
    background-position: 0% 31%;
    background-repeat: no-repeat;
    background-size: cover;
}

.stage-section--fleet-hero .kb-hero-content {
    position: absolute;
    z-index: 2;
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 0 24px;
    text-align: center;
    will-change: transform, opacity;
}

.stage-section--fleet-hero .kb-hero-kicker {
    margin: 0;
    color: rgba(255, 247, 239, 0.78);
    font-size: clamp(0.9rem, 1.6vw, 1rem);
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.stage-section--fleet-hero .kb-hero-content h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.88;
    font-weight: 500;
    letter-spacing: -0.05em;
    color: #fff7ef;
    text-shadow: 0 14px 42px rgba(0, 0, 0, 0.32);
}

.kb-modern-footer-section {
    min-height: auto;
    padding: 0;
    background: #483728;
}

.kb-modern-footer-section #kb-modern-footer-placeholder {
    width: 100%;
}

@media (max-width: 920px) {
    .stage-section--fleet-hero {
        --fleet-header-offset: 98px;
        min-height: calc(170svh + var(--fleet-header-offset));
    }

    .stage-section--fleet-hero .kb-hero-content {
        padding-top: clamp(118px, 18vh, 148px);
    }

    .stage-section--fleet-hero .kb-hero-content h1 {
        font-size: clamp(1rem, 8vw, 6rem) !important;
    }
}

@media (max-width: 640px) {
    .stage-section--fleet-hero {
        min-height: 400px;
        height: 400px;
    }

    .stage-section--fleet-hero .kb-hero-shell {
        height: 400px;
    }

    .stage-section--fleet-hero .kb-hero-bg {
        inset: -18px;
    }

    .stage-section--fleet-hero .kb-hero-content {
        padding: 0px 18px 0px;
        gap: 5px !important;
    }
}

/* 
 body {
     background-color: var(--bg-color);
     overflow-x: hidden;
 } */

.spacer {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-style: italic;
}

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

/* SVG Line Container */
.line-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#luxury-path {
    fill: none;
    stroke: var(--line-color);
    stroke-width: 1.5;
    opacity: 0.3;
}

/* Background Text Section */
.text-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 !important;
    z-index: 1;
}

.reveal-mask {
    overflow: hidden;
    margin-bottom: 10px;
}

.text-background h2 {
    font-size: clamp(3rem, 7vw, 4rem);
    color: #222;
    transform: translateY(110%);
    font-weight: 400;
}

.text-background p {
    font-size: 1.1rem;
    line-height: 160%;
    color: #555;
    max-width: 750px;
    opacity: 0;
    transform: translateY(30px);
}


@keyframes slow-rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {


    .khaas-door-right {
        right: 0;
        transform-origin: right center;
        clip-path: polygon(0% 0, 100% 0, 100% 100%, 0 100%);
    }

    .text-background p {
        font-size: 0.9rem !important;
    }

    .text-background h2 {
        font-size: clamp(1rem, 6vw, 5rem) !important;
    }

    .kb-filter-gallery__intro {
        text-align: center;
        margin-bottom: 80px;
    }

    .kb-filter-gallery__title {
        font-family: 'Playfair Display';
        font-size: clamp(2.5rem, 7vw, 4.5rem);
        font-weight: 400;
        margin-bottom: 70px;
        letter-spacing: -1px;
        color: #1a1a1a;
    }

    .kb-filter-gallery__subtitle {
        text-transform: uppercase;
        letter-spacing: 5px;
        font-size: 0.75rem;
        color: var(--kb-gallery-gold);
        font-family: 'Playfair Display';
        font-weight: 600;
    }

}

:root {
    --primary-color: #2C2C2A;
    --secondary-color: #D4956F;
    --accent-color: #A67C52;
    --light-bg: #FAF9F7;
    --white: #FFFFFF;
    --text-primary: #2C2C2A;
    --text-secondary: #6B6B6B;
    --border-color: #E5E5E5;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== GALLERY SECTION LAYOUT ===== */
.hero-section,
.collections-section {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
    box-sizing: border-box;
}

.gallery-intro {
    max-width: 1400px;
    margin: 4rem auto 0;
    padding: 0 2rem;
    text-align: center;
}

.gallery-intro-kicker {
    margin: 0 0 0.75rem;
    font-size: 12px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--secondary-color);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}

.gallery-intro h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
    font-weight: 500;
    color: var(--text-primary);
    font-family: 'Bodoni FLF', 'Playfair Display', serif;
}

.gallery-intro p {
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: 0.75rem;
    color: #b89354;
    ;
    font-family: 'Playfair Display';
    font-weight: 600;
}

/* ===== HERO SECTION ===== */
.hero-section {
    margin: 3rem auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

.featured-car {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #A67C52 0%, #C9885F 100%);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    flex-direction: column;
}

.featured-car::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(44, 44, 42, 0.18), rgba(44, 44, 42, 0.18));
    pointer-events: none;
}

.featured-car-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-car:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.featured-car-content {
    position: relative;
    z-index: 1;
}

.featured-car-content h2 {
    font-size: 26px;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
    font-family: 'Bodoni FLF', 'Playfair Display', serif;
}

.featured-car-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.3px;
    font-family: 'Montserrat', sans-serif;
}

/* ===== SIDE GRID ===== */
.side-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
}

.grid-item {
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    background: #d7a27c;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
}

.grid-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(44, 44, 42, 0.12), rgba(44, 44, 42, 0.12));
    pointer-events: none;
}

.grid-item-image,
.explore-mini-image img,
.carousel-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    image-rendering: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.explore-mini-image img {
    border-radius: 10px;
}

.grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.grid-item.explore-more {
    background: linear-gradient(135deg, #483728 0%, #6b5d4c 100%);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    cursor: pointer;
}

.grid-item.explore-more::after {
    display: none;
}

.explore-more-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 0.9rem;
}

.explore-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    flex: 1;
    min-height: 0;
}

.explore-mini-image {
    border-radius: 10px;
    min-height: 0;
    overflow: hidden;
}

.explore-more-footer {
    text-align: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 0.85rem 0.75rem 0.95rem;
    backdrop-filter: blur(6px);
}

.explore-more-content p {
    font-size: 14px;
    color: var(--white);
    font-weight: 500;
    margin-bottom: 0.35rem;
    letter-spacing: 0.5px;
    font-family: 'Montserrat', sans-serif;
    margin-left: auto;
    margin-right: auto;
}

.explore-btn {
    translate: none;
    rotate: none;
    scale: none;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    pointer-events: auto;
    opacity: 1;
    transform: translate(0px, 0px);
    border: 1px solid #efe7db;
    text-align: center;
    border-radius: 50px;
    padding: 10px 20px;
    color: #5a4130;
    background: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    font-family: 'Montserrat', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    margin: 0 auto;
    line-height: 2.2;
    box-shadow: 0 10px 24px rgba(19, 10, 4, 0.12);
    z-index: 0;
}

.explore-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: #5a4130;
    transform: translateX(-68%) scaleX(0.42);
    transform-origin: left center;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: -1;
}

.explore-btn:hover {
    color: #ffffff;
    border-color: #5a4130;
}

.explore-btn:hover::before {
    transform: translateX(0) scaleX(1);
}

/* ===== OTHER COLLECTIONS SECTION ===== */
.collections-section {
    display: block !important;
    width: 100%;
    flex: none !important;
    margin: 4rem 0 2rem;
    padding-top: 0;
    padding-bottom: 0;
    margin-left: auto;
    margin-right: auto;
}

.section-header {
    width: 100%;
    flex: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h3 {
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
}

.carousel-controls {
    display: flex;
    gap: 0.75rem;
}

.carousel-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1.2px solid var(--text-secondary);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-secondary);
    padding: 0;
}

.carousel-btn:hover {
    border-color: var(--secondary-color);
    color: #fff;
    background: #483728;
    transform: scale(1.08);
}

.carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.carousel-arrow {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
}

/* SVG Arrow styling */
.carousel-arrow {
    width: 14px;
    height: 14px;
    display: block;
}

.carousel-arrow path {
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===== CAROUSEL ===== */
.carousel-container {
    display: block;
    width: 100%;
    max-width: 100%;
    flex: none;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-wrapper {
    width: 100%;
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: auto;
    padding: 0.5rem 0;
    scrollbar-width: none;
    margin-bottom: 39px;
    will-change: scroll-position;
    transform: translateZ(0);
}

.carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex: 0 0 calc(33.333% - 1rem);
    min-width: calc(33.333% - 1rem);
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    background: #c9b8a0;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    position: relative;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.carousel-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(44, 44, 42, 0.14), rgba(44, 44, 42, 0.14));
    pointer-events: none;
}

.carousel-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .featured-car {
        aspect-ratio: auto;
        min-height: 280px;
        padding: 2rem;
    }

    .featured-car-content h2 {
        font-size: 24px;
    }

    .carousel-item {
        flex: 0 0 calc(50% - 0.75rem);
        min-width: calc(50% - 0.75rem);
    }

    .side-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.2rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1.5rem;
    }

    .header-container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .logo {
        font-size: 20px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }

    nav a {
        font-size: 12px;
    }

    .hero-section {
        margin: 2rem 0;
        gap: 1.5rem;
    }

    .hero-section,
    .collections-section,
    .gallery-intro {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .featured-car {
        min-height: 240px;
        padding: 1.5rem;
    }

    .featured-car-content h2 {
        font-size: 20px;
    }

    .featured-car-content p {
        font-size: 13px;
    }

    .side-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .carousel-item {
        flex: 0 0 calc(100% - 0.75rem);
        min-width: calc(100% - 0.75rem);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .collections-section {
        margin: 2.5rem 0 1.5rem;
    }

        .side-grid {
        grid-template-columns: 1fr;
    }
.explore-more-content {
    width: 100%;
}
}

@media (max-width: 480px) {
    .kb-filter-gallery__intro {
        margin-bottom: 34px;
    }

    header {
        padding: 1rem;
    }

    .logo {
        font-size: 18px;
    }

    nav {
        gap: 1rem;
    }

    nav a {
        font-size: 11px;
    }

    .hero-section {
        margin: 1.5rem 0;
        gap: 1rem;
    }

    .hero-section,
    .collections-section,
    .gallery-intro {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .gallery-intro {
        margin-top: 4.5rem;
        margin-bottom: -0.5rem;
    }

    .gallery-intro h2 {
        font-size: 1.8rem;
    }

    .gallery-intro p {
        font-size: 13px;
    }

    .featured-car {
        min-height: 200px;
        padding: 1.25rem;
    }

    .featured-car-content h2 {
        font-size: 18px;
    }

    .featured-car-content p {
        font-size: 12px;
    }

    .grid-item {
        border-radius: 10px;
            aspect-ratio: 0;
    }

    .explore-more-content p {
        font-size: 12px;
    }

    .explore-btn {
        padding: 0.6rem 1rem;
        font-size: 11px;
    }

    .carousel-item {
        flex: 0 0 100%;
        min-width: 100%;
        aspect-ratio: 16 / 10;
    }

    .section-header h3 {
        font-size: 11px;
    }

    .collections-section {
        margin: 2rem 0 1rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.hero-section {
    animation: slideInUp 0.8s ease-out;
}

.collections-section {
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.kb-filter-gallery__intro {
    text-align: center;
    margin-bottom: -44px;
    margin-left: auto;
    margin-right: auto;
    margin-top: -40px;
}

.kb-filter-gallery__title {
    font-family: 'Playfair Display';
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 400;
    margin-bottom: 70px;
    letter-spacing: -1px;
    color: #1a1a1a;
}

.kb-filter-gallery__subtitle {
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: 0.75rem;
    color: var(--kb-gallery-gold);
    font-family: 'Playfair Display';
    font-weight: 600;
}

.pin-container {
    width: 100%;
    background-color: #efe7db;
}

/* Hero Wrapper */
.hero-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    z-index: 1;
    margin: 0 auto;
    transform-origin: center center;
    will-change: transform, border-radius;
    contain: paint;
}

/* Banner Image Container & Tag */
.banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.banner-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* This ensures image fills the container like background-size: cover */
    display: block;
    will-change: transform;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
    will-change: background-color;
}

.hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    text-align: center;
    width: 100%;
    will-change: opacity, transform;
}

.hero-text h1 {
    margin: 0;
    font-family: "Playfair Display", sans-serif;
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 0.88;
    font-weight: 500;
    letter-spacing: -0.05em;
    color: #fff7ef;
    text-shadow: 0 14px 42px rgba(0, 0, 0, 0.32);
}

/* Khaas Bagh gallery masonry layout, scoped to this page only. */
.kb-gallery-page .landing-stage {
    position: relative;
    isolation: isolate;
}

.kb-gallery-page .hero-section {
    position: relative;
    overflow: visible;
    width: min(90%, 1400px);
    max-width: 1400px;
    margin: 3rem auto 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 0 0 42px;
}

.kb-gallery-page .kb-filter-gallery__intro {
    margin-bottom: 40px;
}

.kb-gallery-page .kb-filter-gallery__title {
    max-width: min(100%, 1000px);
    margin: 0 auto;
    overflow-wrap: anywhere;
    width: 1200px;
}

.kb-gallery-page .otr-gallery-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
    gap: 18px;
    min-height: clamp(360px, 46vw, 540px);
    align-items: stretch;
}

.kb-gallery-page .otr-gallery-row--reverse {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
}

.kb-gallery-page .otr-gallery-stack {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 18px;
    min-height: 100%;
}

.kb-gallery-page .otr-gallery-row--reverse .otr-gallery-stack {
    order: 1;
}

.kb-gallery-page .otr-gallery-row--reverse .otr-gallery-card--feature {
    order: 2;
}

.kb-gallery-page .otr-masonry-card {
    position: relative;
    isolation: isolate;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(72, 55, 40, 0.9), rgba(44, 32, 22, 0.96));
    box-shadow:
        0 0 0 1.5px rgba(252, 225, 164, 0.42),
        inset 0 0 0 1px rgba(252, 225, 164, 0.22),
        0 16px 36px rgba(34, 21, 7, 0.12);
    transition:
        transform 700ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 700ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.kb-gallery-page .otr-masonry-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    padding: clamp(2px, 0.28vw, 4px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 201, 104, 0.72), rgba(255, 255, 255, 0.18));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.88;
}

.kb-gallery-page .otr-masonry-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(44, 44, 42, 0.08), rgba(44, 44, 42, 0.18));
    pointer-events: none;
    opacity: 1;
    transition: opacity 650ms ease;
}

.kb-gallery-page .otr-masonry-card>a[data-fancybox] {
    position: relative;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.kb-gallery-page .otr-masonry-card>a[data-fancybox]::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(120deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 248, 230, 0.1) 32%,
            rgba(255, 255, 255, 0.34) 48%,
            rgba(255, 248, 230, 0.08) 64%,
            rgba(255, 255, 255, 0) 100%);
    transform: translateX(-130%);
    opacity: 0;
    transition:
        transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 450ms ease;
}

.kb-gallery-page .otr-masonry-card img {
    position: static;
    inset: auto;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    line-height: 0;
    border-radius: inherit;
    transform: scale(1);
    transform-origin: center center;
    transition:
        transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 700ms ease;
}

.kb-gallery-page .otr-gallery-card--feature img {
    aspect-ratio: 1 / 1.08;
}

.kb-gallery-page .otr-gallery-card--compact img {
    aspect-ratio: 16 / 10;
}

@media (hover: hover) and (pointer: fine) {
    .kb-gallery-page .otr-masonry-card:hover {
        transform: translateY(-8px);
        box-shadow:
            0 0 0 1.5px rgba(252, 225, 164, 0.52),
            inset 0 0 0 1px rgba(252, 225, 164, 0.26),
            0 24px 44px rgba(34, 21, 7, 0.2);
        filter: saturate(1.04);
    }

    .kb-gallery-page .otr-masonry-card:hover::after {
        opacity: 0.62;
    }

    .kb-gallery-page .otr-masonry-card:hover img {
        transform: scale(1.08);
        filter: contrast(1.03) saturate(1.05);
    }

    .kb-gallery-page .otr-masonry-card:hover>a[data-fancybox]::before {
        transform: translateX(130%);
        opacity: 1;
    }
}

@media (max-width: 1300px) and (max-height: 700px) and (min-width: 1025px) {
    .kb-gallery-page .kb-filter-gallery__intro {
        margin-bottom: 32px;
    }

    .kb-gallery-page .hero-section {
        width: min(100%, 1040px);
        gap: 14px;
        padding-bottom: 34px;
    }

    .kb-gallery-page .otr-gallery-row,
    .kb-gallery-page .otr-gallery-stack {
        gap: 14px;
    }

    .kb-gallery-page .otr-gallery-row {
        min-height: clamp(280px, 32vw, 360px);
    }
}

@media (max-width: 1100px) {
    .kb-gallery-page .otr-gallery-row,
    .kb-gallery-page .otr-gallery-stack {
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .kb-gallery-page .pin-container {
        padding-top: 0;
        background-color: transparent;
    }

    .kb-gallery-page .banner-img img {
        object-position: center 50%;
    }

    .kb-gallery-page .banner-overlay {
        background: rgba(0, 0, 0, 0.22);
    }

    .kb-gallery-page .hero-text {
        top: 55%;
        padding: 0 12px;
    }

    .kb-gallery-page .hero-text h1 {
        font-size: clamp(3.1rem, 13.5vw, 4.5rem);
        line-height: 0.94;
    }

    .kb-gallery-page .gallery-intro {
        margin-top: 2.25rem;
        position: static;
        left: auto;
        width: auto;
        max-width: 1400px;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        overflow: visible;
    }

    .kb-gallery-page .kb-filter-gallery__intro {
        margin-bottom: 18px;
    }

    .kb-gallery-page .kb-filter-gallery__title {
        font-size: clamp(2.2rem, 9vw, 3.7rem) !important;
        line-height: 1.05;
        width: min(330px, 88vw);
        max-width: 88vw;
        margin-left: auto;
        margin-right: auto;
        transform: none;
        word-break: break-word;
    }

    .kb-gallery-page .hero-section {
        width: min(90%, 1400px);
        margin: 2rem auto;
        padding-left: 0;
        padding-right: 0;
    }

    .kb-gallery-page .otr-gallery-row,
    .kb-gallery-page .otr-gallery-row--reverse {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 10px;
    }

    .kb-gallery-page .otr-gallery-stack {
        gap: 10px;
    }

    .kb-gallery-page .otr-gallery-row--reverse .otr-gallery-stack,
    .kb-gallery-page .otr-gallery-row--reverse .otr-gallery-card--feature {
        order: initial;
    }

    .kb-gallery-page .otr-gallery-card--feature img,
    .kb-gallery-page .otr-gallery-card--compact img {
        aspect-ratio: 16 / 11;
    }
}

@media (max-width: 560px) {
    .kb-gallery-page .pin-container {
        padding-top: 0;
        margin-bottom: 122px;
    }

    .kb-gallery-page .gallery-intro {
        display: none;
    }

    .kb-gallery-page .hero-text {
        top: 55%;
        padding: 0 10px;
    }

    .kb-gallery-page .hero-text h1 {
        font-size: clamp(1.8rem, 13vw, 4rem);
    }

    .kb-gallery-page .kb-filter-gallery__intro {
        margin-bottom: 20px;
    }

    .kb-gallery-page .kb-filter-gallery__title {
        font-size: clamp(1.9rem, 9vw, 2.25rem) !important;
        line-height: 1.14;
        width: min(300px, 84vw);
        max-width: 84vw;
    }

    .kb-gallery-page .hero-section,
    .kb-gallery-page .otr-gallery-row,
    .kb-gallery-page .otr-gallery-stack {
        gap: 20px;
    }

    .kb-gallery-page .otr-masonry-card {
        border-radius: 18px;
    }
}
