@import url('root.css');

/* =========================================
   PAGE TITLE SECTION
   ========================================= */
.page-title{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 380px;
    padding: 60px 20px;
    background-image: url('../images/stones.jpg');
    background-size: cover;
    background-position: center;
    margin-top: -10px;

    .content{
        text-align: center;
        max-width: 800px;
        padding: 30px 40px;
        background-color: rgba(245, 245, 245, 0.575);
        border-radius: 20px;

        h1{
            color: var(--green);
            font-family: var(--heading-font);
            font-size: 70px;
        }

        p{
            color: var(--green);
            font-family: var(--body-font);
            font-size: 20px;
            margin-bottom: 0;
        }
    }
}

/* =========================================
   WIGGLE LINE - between page title and filters
   ========================================= */
.wiggle-line{
    position: relative;
    z-index: 4;
    height: 100px;
    margin-top: -46px;
    /* top half lets the page title show through, bottom half blends into the filters section */
    background: linear-gradient(to bottom, transparent 50%, transparent 50%);

    &::before{
        content: "";
        position: absolute;
        inset: 0;
        background-color: var(--goldenrod);

        /* wavy band shape - wiggle on the top and bottom edge */
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0,18 C240,40 420,0 720,14 C1000,28 1200,2 1440,20 L1440,80 C1200,100 1000,70 720,86 C420,100 240,64 0,84 Z' fill='black'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0,18 C240,40 420,0 720,14 C1000,28 1200,2 1440,20 L1440,80 C1200,100 1000,70 720,86 C420,100 240,64 0,84 Z' fill='black'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
    }
}

/* =========================================
   FILTER SECTION
   ========================================= */
.filters{
    display: flex;
    justify-content: center;
    margin-top: -38px;
    padding: 70px 20px 20px;
    background-color: whitesmoke;

    .filter-buttons{
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;

        .filter-btn{
            margin: 6px;
            padding: 10px 28px;
            background-color: transparent;
            border: 2px solid var(--goldenrod);
            border-radius: 30px;
            color: var(--green);
            font-family: var(--body-font);
            font-size: 18px;
            cursor: pointer;
            transition: background-color 0.2s ease, color 0.2s ease;

            &:hover{
                background-color: var(--bone);
            }

            /* the category that is currently selected */
            &.active{
                background-color: var(--goldenrod);
                color: var(--bone);
            }
        }
    }
}

/* =========================================
   GALLERY SECTION
   ========================================= */
.gallery{
    padding: 30px 60px 80px;
    background-color: whitesmoke;

    /* masonry layout - images keep their own shape and stack in columns */
    .gallery-grid{
        column-count: 3;
        column-gap: 20px;
    }

    .gallery-item{
        position: relative;
        margin-bottom: 20px;
        border-radius: 20px;
        overflow: hidden;
        break-inside: avoid;
        cursor: pointer;
        box-shadow: 0 10px 25px rgba(36, 49, 23, 0.12);

        img{
            display: block;
            width: 100%;
            height: auto;
            transition: transform 0.4s ease;
        }

        /* caption that fades in over the image on hover */
        .overlay{
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            align-items: flex-start;
            padding: 20px;
            background: linear-gradient(to top, rgba(36, 49, 23, 0.85), transparent 60%);
            opacity: 0;
            transition: opacity 0.3s ease;

            .tag{
                padding: 4px 14px;
                margin-bottom: 8px;
                background-color: var(--goldenrod);
                color: var(--bone);
                font-family: var(--body-font);
                font-size: 13px;
                border-radius: 30px;
            }

            h2{
                color: var(--bone);
                font-family: var(--heading-font);
                font-size: 28px;
                margin: 0;
            }
        }

        &:hover{
            img{
                transform: scale(1.05);
            }

            .overlay{
                opacity: 1;
            }
        }
    }

    .no-results{
        display: none;
        text-align: center;
        padding: 40px 20px;

        h2{
            color: var(--green);
            font-family: var(--heading-font);
            font-size: 40px;
        }

        p{
            color: var(--clay-brown);
            font-family: var(--body-font);
            font-size: 18px;
        }
    }
}

/* =========================================
   BOOKING SECTION
   ========================================= */
.booking{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 70px 20px 90px;
    background-image: url('../images/vision_bg.jpg');
    background-size: cover;
    background-position: center;

    .content{
        text-align: center;
        max-width: 700px;
        padding: 25px 40px;
        background-color: rgba(245, 245, 245, 0.575);
        border-radius: 20px;

        h2{
            color: var(--green);
            font-family: var(--heading-font);
            font-size: 40px;
        }

        p{
            color: var(--green);
            font-family: var(--body-font);
            font-size: 18px;
            margin-bottom: 20px;
        }

        .book-btn{
            display: inline-block;
            padding: 12px 34px;
            background-color: var(--goldenrod);
            color: var(--bone);
            font-family: var(--body-font);
            font-size: 18px;
            text-decoration: none;
            border-radius: 30px;
            transition: background-color 0.2s ease;

            &:hover{
                background-color: var(--clay-brown);
            }
        }
    }
}

/* =========================================
   WIGGLE LINE 1 - between booking and footer
   ========================================= */
.wiggle-line1{
    position: relative;
    z-index: 4;
    height: 100px;
    margin-top: -46px;
    /* top half lets the booking section show through, bottom half blends into the footer */
    background: linear-gradient(to bottom, transparent 50%, transparent 50%);

    &::before{
        content: "";
        position: absolute;
        inset: 0;
        background-color: var(--clay-brown);

        /* wavy band shape - long, gentle sweeps like the first line, but flowing the opposite way */
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0,12 C260,0 460,38 760,20 C1040,4 1240,36 1440,10 L1440,84 C1240,64 1040,98 760,82 C460,66 260,100 0,78 Z' fill='black'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0,12 C260,0 460,38 760,20 C1040,4 1240,36 1440,10 L1440,84 C1240,64 1040,98 760,82 C460,66 260,100 0,78 Z' fill='black'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
    }
}

/* =========================================
   LIGHTBOX
   ========================================= */
.lightbox{
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 80px;
    background-color: rgba(36, 49, 23, 0.92);
    /* hidden until an image is clicked */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;

    &.open{
        opacity: 1;
        visibility: visible;
    }

    .lightbox-content{
        text-align: center;

        img{
            max-width: 100%;
            max-height: 80vh;
            border-radius: 15px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        }

        p{
            color: var(--bone);
            font-family: var(--heading-font);
            font-size: 26px;
            padding-top: 15px;
            margin: 0;
        }
    }

    .close-btn, .arrow-btn{
        position: absolute;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: var(--goldenrod);
        color: var(--bone);
        border: none;
        border-radius: 50%;
        cursor: pointer;
        transition: background-color 0.2s ease;

        &:hover{
            background-color: var(--clay-brown);
        }
    }

    .close-btn{
        top: 20px;
        right: 20px;
        width: 46px;
        height: 46px;
        font-size: 30px;
        line-height: 1;
    }

    .arrow-btn{
        top: 50%;
        transform: translateY(-50%);
        width: 50px;
        height: 50px;
        font-size: 34px;
        line-height: 1;

        &.prev{
            left: 20px;
        }

        &.next{
            right: 20px;
        }
    }
}

/* =========================================
   PHONE VIEW
   ========================================= */
@media (max-width: 767px){
    /* PAGE TITLE */
    .page-title{
        min-height: 260px;
        padding: 40px 20px 60px;

        .content{
            padding: 22px 20px;

            h1{
                font-size: 44px;
            }

            p{
                font-size: 17px;
            }
        }
    }

    /* WIGGLE LINE */
    .wiggle-line{
        height: 70px;
        margin-top: -32px;
    }

    /* FILTERS */
    .filters{
        margin-top: -26px;
        padding: 50px 20px 10px;

        .filter-buttons{
            .filter-btn{
                margin: 4px;
                padding: 8px 18px;
                font-size: 15px;
            }
        }
    }

    /* GALLERY */
    .gallery{
        padding: 20px 20px 50px;

        .gallery-grid{
            column-count: 1;
        }

        /* no hover on phones, so the caption always shows */
        .gallery-item{
            .overlay{
                opacity: 1;
                padding: 15px;

                h2{
                    font-size: 22px;
                }
            }
        }
    }

    /* BOOKING */
    .booking{
        padding: 50px 20px 70px;

        .content{
            padding: 20px 22px;

            h2{
                font-size: 30px;
            }

            p{
                font-size: 16px;
            }
        }
    }

    /* WIGGLE LINE 1 */
    .wiggle-line1{
        height: 70px;
        margin-top: -32px;
    }

    /* LIGHTBOX */
    .lightbox{
        padding: 70px 15px;

        .lightbox-content{
            p{
                font-size: 20px;
            }
        }

        /* arrows move to the bottom so they don't cover the image */
        .arrow-btn{
            top: auto;
            bottom: 20px;
            transform: none;
            width: 44px;
            height: 44px;
            font-size: 28px;

            &.prev{
                left: calc(50% - 54px);
            }

            &.next{
                right: calc(50% - 54px);
            }
        }
    }
}

/* =========================================
   TABLET VIEW
   ========================================= */
@media (min-width: 768px) and (max-width: 1100px){
    .gallery{
        padding: 30px 30px 70px;

        .gallery-grid{
            column-count: 2;
        }
    }
}

/* =========================================
   BIGGER SCREEN SIZES VIEWS
   ========================================= */
