/* Bento Gallery Section - Kasauli */

.bento-gallery-section {
    background-color: #f5ede3;
    padding: 80px 40px;
    overflow: hidden;
}

.bento-gallery-container {
    max-width: 1400px;
    margin: 0 auto;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(4, minmax(150px, auto));
    gap: 20px;
}

/* Main large item - spans left side */
.bento-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-color: #2a2a2a;
}

.bento-item img,
.bento-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.bento-item:hover img,
.bento-item:hover video {
    transform: scale(1.05);
}

/* Item 1 - Large left (Kasauli main) */
.bento-item-1 {
    grid-column: 1 / 6;
    grid-row: 1 / 4;
    min-height: 400px;
}

.bento-item-1 .bento-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
}

.bento-item-1 .bento-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.1;
}

.bento-item-1 .bento-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
}

/* Item 2 - Text box */
.bento-item-2 {
    grid-column: 1 / 4;
    grid-row: 4 / 5;
    background-color: #2c2c2c;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bento-item-2 .bento-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.3;
}

.bento-item-2 .bento-description {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
}

/* Item 3 - Medium image below text */
.bento-item-3 {
    grid-column: 4 / 6;
    grid-row: 4 / 5;
}

/* Item 4 - Explore box (text with image) */
.bento-item-4 {
    grid-column: 6 / 9;
    grid-row: 1 / 2;
    background-color: #6b5b4f;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.bento-item-4 .bento-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 12px;
}

.bento-item-4 .bento-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

/* Item 5 - Top right image */
.bento-item-5 {
    grid-column: 9 / 13;
    grid-row: 1 / 2;
}

/* Item 6 - Center tall image */
.bento-item-6 {
    grid-column: 6 / 9;
    grid-row: 2 / 4;
}

/* Item 7 - Cuisine text box */
.bento-item-7 {
    grid-column: 9 / 13;
    grid-row: 2 / 3;
    background-color: #6b5b4f;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.bento-item-7 .bento-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 12px;
}

.bento-item-7 .bento-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

/* Item 8 - Bottom right image */
.bento-item-8 {
    grid-column: 9 / 13;
    grid-row: 3 / 4;
}

/* Item 9 - Stay text box */
.bento-item-9 {
    grid-column: 6 / 9;
    grid-row: 4 / 5;
    background-color: #3d3d3d;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.bento-item-9 .bento-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 12px;
}

.bento-item-9 .bento-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

/* Item 10 - Bottom far right image */
.bento-item-10 {
    grid-column: 9 / 13;
    grid-row: 4 / 5;
}

/* Horizontal rows - Top and Bottom */
.bento-horizontal-row {
    display: flex;
    gap: 20px;
    grid-column: 1 / 13;
}

.bento-horizontal-row.top-row {
    grid-row: 1 / 2;
    max-height: 350px;
}

.bento-horizontal-row.bottom-row {
    grid-row: 6 / 7;
    max-height: 350px;
}

.bento-horizontal-row .bento-item {
    flex-shrink: 0;
    min-height: 350px;
}

.bento-horizontal-row .bento-item.video-70 {
    flex: 0 0 calc(60% - 10px);
}

.bento-horizontal-row .bento-item.image-30 {
    flex: 0 0 calc(40% - 10px);
}

/* Adjust grid rows when horizontal rows are present */
.bento-grid.with-horizontal-rows {
    grid-template-rows: minmax(280px, auto) repeat(4, minmax(150px, auto)) minmax(280px, auto);
}

.bento-grid.with-horizontal-rows .bento-item-1 {
    grid-row: 2 / 5;
}

.bento-grid.with-horizontal-rows .bento-item-2 {
    grid-row: 5 / 6;
}

.bento-grid.with-horizontal-rows .bento-item-3 {
    grid-row: 5 / 6;
}

.bento-grid.with-horizontal-rows .bento-item-4 {
    grid-row: 2 / 3;
}

.bento-grid.with-horizontal-rows .bento-item-5 {
    grid-row: 2 / 3;
}

.bento-grid.with-horizontal-rows .bento-item-6 {
    grid-row: 3 / 5;
}

.bento-grid.with-horizontal-rows .bento-item-7 {
    grid-row: 3 / 4;
}

.bento-grid.with-horizontal-rows .bento-item-8 {
    grid-row: 4 / 5;
}

.bento-grid.with-horizontal-rows .bento-item-9 {
    grid-row: 5 / 6;
}

.bento-grid.with-horizontal-rows .bento-item-10 {
    grid-row: 5 / 6;
}

/* Navigation Controls */
.bento-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
}

.bento-btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1a1a1a;
    background-color: #c4a77d;
    border: none;
    padding: 14px 32px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.bento-btn:hover {
    background-color: #b3956c;
}

.bento-nav-btn {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    /* color: rgba(255, 255, 255, 0.6); */
    color: #1a1a1a;
    background: transparent;
    border: 1px solid #1a1a1a;
    padding: 14px 28px;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.bento-nav-btn:hover {
    color: #fff;
    border-color: #1a1a1a;
}

/* Video play button overlay */
.bento-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.bento-video-overlay.playing {
    opacity: 0;
    pointer-events: none;
}

.bento-play-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.bento-play-icon:hover {
    transform: scale(1.1);
}

.bento-play-icon svg {
    width: 24px;
    height: 24px;
    fill: #1a1a1a;
    margin-left: 4px;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: auto;
        gap: 15px;
    }

    .bento-horizontal-row {
        grid-column: 1 / 7;
        gap: 15px;
        min-height: 220px;
    }

    .bento-horizontal-row .bento-item {
        min-height: 220px;
    }

    .bento-horizontal-row.top-row {
        grid-row: auto;
    }

    .bento-horizontal-row.bottom-row {
        grid-row: auto;
    }

    .bento-grid.with-horizontal-rows .bento-item-1,
    .bento-grid.with-horizontal-rows .bento-item-2,
    .bento-grid.with-horizontal-rows .bento-item-3,
    .bento-grid.with-horizontal-rows .bento-item-4,
    .bento-grid.with-horizontal-rows .bento-item-5,
    .bento-grid.with-horizontal-rows .bento-item-6,
    .bento-grid.with-horizontal-rows .bento-item-7,
    .bento-grid.with-horizontal-rows .bento-item-8,
    .bento-grid.with-horizontal-rows .bento-item-9,
    .bento-grid.with-horizontal-rows .bento-item-10 {
        grid-row: auto;
    }

    .bento-item-1 {
        grid-column: 1 / 4;
        grid-row: 1 / 3;
        min-height: 350px;
    }

    .bento-item-2 {
        grid-column: 4 / 7;
        grid-row: 1 / 2;
    }

    .bento-item-3 {
        grid-column: 4 / 7;
        grid-row: 2 / 3;
    }

    .bento-item-4 {
        grid-column: 1 / 3;
        grid-row: 3 / 4;
    }

    .bento-item-5 {
        grid-column: 3 / 5;
        grid-row: 3 / 4;
    }

    .bento-item-6 {
        grid-column: 5 / 7;
        grid-row: 3 / 4;
    }

    .bento-item-7 {
        grid-column: 1 / 3;
        grid-row: 4 / 5;
    }

    .bento-item-8 {
        grid-column: 3 / 5;
        grid-row: 4 / 5;
    }

    .bento-item-9 {
        grid-column: 5 / 7;
        grid-row: 4 / 5;
    }

    .bento-item-10 {
        grid-column: 1 / 7;
        grid-row: 5 / 6;
    }

    .bento-item-1 .bento-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .bento-gallery-section {
        padding: 50px 20px;
    }

    .bento-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .bento-horizontal-row {
        grid-column: 1 / 3;
        flex-direction: column;
        gap: 12px;
        min-height: auto;
    }

    .bento-horizontal-row .bento-item.video-70,
    .bento-horizontal-row .bento-item.image-30 {
        flex: 1 1 auto;
        min-height: 180px;
    }

    .bento-horizontal-row .bento-item.video-70 {
        margin: 0;
        border-radius: 16px;
    }

    .bento-horizontal-row .bento-item.video-70 video {
        border-radius: 16px;
    }

    .bento-item-1 {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
        min-height: 280px;
    }

    .bento-item-2 {
        grid-column: 1 / 3;
        grid-row: 2 / 3;
        padding: 25px;
    }

    .bento-item-3 {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
    }

    .bento-item-4 {
        grid-column: 2 / 3;
        grid-row: 3 / 4;
    }

    .bento-item-5 {
        grid-column: 1 / 2;
        grid-row: 4 / 5;
    }

    .bento-item-6 {
        grid-column: 2 / 3;
        grid-row: 4 / 5;
    }

    .bento-item-7 {
        grid-column: 1 / 3;
        grid-row: 5 / 6;
    }

    .bento-item-8 {
        grid-column: 1 / 2;
        grid-row: 6 / 7;
    }

    .bento-item-9 {
        grid-column: 2 / 3;
        grid-row: 6 / 7;
    }

    .bento-item-10 {
        grid-column: 1 / 3;
        grid-row: 7 / 8;
    }

    .bento-item-1 .bento-title {
        font-size: 1.8rem;
    }

    .bento-item-2 .bento-heading {
        font-size: 1.3rem;
    }

    .bento-controls {
        flex-direction: column;
        gap: 10px;
    }

    .bento-btn,
    .bento-nav-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .bento-gallery-section {
        padding: 40px 15px;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .bento-horizontal-row {
        grid-column: 1 / 2;
        gap: 10px;
    }

    .bento-horizontal-row .bento-item.video-70,
    .bento-horizontal-row .bento-item.image-30 {
        min-height: 150px;
    }

    .bento-horizontal-row .bento-item.video-70 {
        margin: 0;
        border-radius: 16px;
    }

    #y-margin-remove video {
        transform: scale(1.35);
    }

    .bento-horizontal-row .bento-item.video-70 video {
        transform: scale(1.35);
    }

    .bento-item-1,
    .bento-item-2,
    .bento-item-3,
    .bento-item-4,
    .bento-item-5,
    .bento-item-6,
    .bento-item-7,
    .bento-item-8,
    .bento-item-9,
    .bento-item-10 {
        grid-column: 1 / 2;
        grid-row: auto;
    }

    .bento-item-7 {
        height: 150px;
    }

    .bento-item-1 {
        min-height: 250px;
    }

    .bento-item-1 .bento-title {
        font-size: 1.5rem;
    }
}

/* Slide Transition Effect */
.bento-grid {
    transition: opacity 0.15s ease-out;
}

.bento-grid.transitioning {
    opacity: 0.5;
}

.bento-item img,
.bento-item video {
    transition: opacity 0.3s ease, transform 0.5s ease;
}

/* Disabled button state */
.bento-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.bento-nav-btn:disabled:hover {
    color: #1a1a1a;
    background: transparent;
}
