/* vertical room title label */
.grid-label {
    position: absolute;
    bottom: 0;
    right: 0;
    writing-mode: vertical-rl;
    text-orientation: upright;
    text-align: center;
    font-size: 15px;
    letter-spacing: var(--letter-spaceing-tight);
    height: 100%;
    padding: 0 2px;
    color: white;
    background-color: rgba(20, 71, 56, 0.8);
    z-index: 5;
    white-space: nowrap;
}

.grid-display-container {
    grid-auto-rows: 270px;
}

/* EN room title */
.grid-display-container figcaption{
    position: absolute;
    margin: 0;
    color: white;
    font-size: 30px;
    font-weight: 400;
    letter-spacing: var(--letter-spaceing-title);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    pointer-events: none;
    z-index: 5;
}

.room-grid-image img{
    filter: brightness(0.7);
}

.linked-card figure{
    height: 100%;
}
/* 1. Set the positioning context for the parent container */
.linked-card {
    overflow: hidden; 
    /* The 'position: relative;' property is required here 
       for the absolute positioning of the link in step 3 to work correctly. */
}

/* 2. Image itself: responsible for visual effect, not click events */
.linked-card img {
    display: block;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
    pointer-events: none; 
    
    /* z-index is required for 'position: relative;' 
       (although clicks will penetrate due to pointer-events: none) */
    z-index: 5; 
    position: relative; 
}

/* 3. The full-link overlay (from the Button block): responsible for click events */
.linked-card .full-link-overlay a {
    /* Maintain absolute positioning and full coverage */
    position: absolute; 
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    
    /* Key fix B: Link needs a high z-index to capture the click events */
    z-index: 20; /* Increased to ensure it's above the image and content */
    
    /* Ensure it is visually invisible */
    background-color: transparent; 
    opacity: 0;
    /* Ensure it receives click events (default behavior) */
    pointer-events: auto; 
}

.linked-card:hover img {
    transform: scale(1.02);
}

.room-title-overlay-top::after{
    content: "";
    position: absolute;
    border-bottom: 1px solid white;
    top: 100%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8%;
}

@media (max-width: 768px){

    .grid-display-container {
        grid-auto-rows: 100px;
    }

    .room-label{
        display: none;
    }
    .grid-label{
        font-size: xx-small;
    }

    
    .grid-display-container figcaption{
        font-size: large;
    }

}

/* new room */
.gallery-one-big-two-small{
    align-items: stretch;
}
.gallery-one-big-two-small figure{
    height: 100%;
}

.small-images-row {
    display: flex;
    flex-direction: row;
    height: 100%;
    gap: 10px;
    flex: 1;
}

.small-images-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


@media (max-width: 768px){
    .gallery-one-big-two-small{
        /* grid-template-columns: 2fr; */
        /* grid-template-rows: 2fr auto; */
    }
}