/* ==================================================
   TOMAS HANDYMAN
   Before and after gallery
   ================================================== */


/* ==================================================
   1. GALLERY PAGE HERO
   ================================================== */

.gallery-page-hero .page-hero-number {
    color: rgba(255, 255, 255, 0.09);
    font-size: 190px;
}


/* ==================================================
   2. GALLERY SECTION
   ================================================== */

.work-gallery-section {
    min-height: 650px;
    padding: 105px 0;
    background-color: var(--white);
}


.gallery-introduction {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 42px;
}


.gallery-introduction h2 {
    font-family: var(--heading-font);
    font-size: clamp(55px, 6vw, 84px);
    font-weight: 800;
    line-height: 0.94;
    letter-spacing: -0.025em;
    text-transform: uppercase;
}


.gallery-introduction > p {
    max-width: 470px;
    color: var(--grey);
    font-size: 17px;
}


/* ==================================================
   3. FILTER BUTTONS
   ================================================== */

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 45px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--grey-light);
}


.gallery-filter {
    min-height: 44px;
    padding: 10px 19px;
    border: 1px solid var(--grey-light);
    border-radius: 999px;
    color: var(--dark);
    background-color: var(--white);
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}


.gallery-filter:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-1px);
}


.gallery-filter.active {
    border-color: var(--primary-blue);
    color: var(--white);
    background-color: var(--primary-blue);
}


/* ==================================================
   4. GALLERY STATUS
   ================================================== */

.gallery-status {
    display: flex;
    min-height: 300px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 50px 25px;
    border: 2px dashed #bfd3df;
    border-radius: var(--medium-radius);
    background-color: var(--off-white);
    text-align: center;
}


.gallery-status[hidden] {
    display: none;
}


.gallery-status h3 {
    margin-bottom: 8px;
    font-family: var(--heading-font);
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}


.gallery-status p {
    max-width: 560px;
    color: var(--grey);
}


.gallery-status-icon {
    display: grid;
    width: 70px;
    height: 70px;
    place-items: center;
    margin-bottom: 20px;
    border-radius: 50%;
    color: var(--white);
    background-color: var(--primary-blue);
    font-size: 34px;
    font-weight: 800;
}


.gallery-error {
    border-color: #e6a5a5;
    background-color: #fff5f5;
}


.gallery-error h3 {
    color: #a62626;
}


.gallery-loading-spinner {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    border: 5px solid #d4e4ee;
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: gallerySpinner 0.8s linear infinite;
}


@keyframes gallerySpinner {

    to {
        transform: rotate(360deg);
    }
}


/* ==================================================
   5. BEFORE AND AFTER GRID
   ================================================== */

.before-after-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}


.before-after-card {
    overflow: hidden;
    border: 1px solid var(--grey-light);
    border-radius: var(--medium-radius);
    background-color: var(--white);
    box-shadow: var(--shadow-small);
}


.before-after-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: var(--dark);
}


.comparison-image {
    position: relative;
    height: 360px;
    overflow: hidden;
}


.comparison-image:first-child {
    border-right: 3px solid var(--white);
}


.comparison-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.comparison-label {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 7px 11px;
    border-radius: 5px;
    color: var(--white);
    background-color: rgba(10, 23, 36, 0.88);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}


.comparison-image:last-child .comparison-label {
    color: var(--dark);
    background-color: var(--yellow);
}


.before-after-content {
    padding: 25px;
}


.project-category {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--primary-blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}


.before-after-content h2 {
    margin-bottom: 9px;
    font-family: var(--heading-font);
    font-size: 31px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}


.before-after-content p {
    color: var(--grey);
    font-size: 14px;
}


.project-date {
    display: block;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid var(--grey-light);
    color: var(--grey);
    font-size: 12px;
}


/* ==================================================
   6. INFORMATION SECTION
   ================================================== */

.gallery-information-section {
    padding: 90px 0;
    background-color: var(--primary-blue-light);
}


.gallery-information-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}


.gallery-information-card {
    padding: 34px;
    border: 1px solid #cadee9;
    border-radius: var(--medium-radius);
    background-color: rgba(255, 255, 255, 0.75);
}


.gallery-information-card > span {
    display: block;
    margin-bottom: 40px;
    color: var(--primary-blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.14em;
}


.gallery-information-card h2 {
    margin-bottom: 12px;
    font-family: var(--heading-font);
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}


.gallery-information-card p {
    color: var(--grey);
    font-size: 14px;
}


/* ==================================================
   7. TABLETS
   ================================================== */

@media screen and (max-width: 1000px) {

    .comparison-image {
        height: 300px;
    }
}


@media screen and (max-width: 900px) {

    .gallery-introduction {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }


    .before-after-grid {
        grid-template-columns: 1fr;
    }


    .comparison-image {
        height: 390px;
    }


    .gallery-information-grid {
        grid-template-columns: 1fr;
    }


    .gallery-information-card > span {
        margin-bottom: 20px;
    }
}


/* ==================================================
   8. MOBILE PHONES
   ================================================== */

@media screen and (max-width: 600px) {

    .work-gallery-section {
        padding: 72px 0;
    }


    .gallery-introduction {
        margin-bottom: 32px;
    }


    .gallery-introduction h2 {
        font-size: 51px;
    }


    .gallery-introduction > p {
        font-size: 15px;
    }


    .gallery-filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 32px;
    }


    .gallery-filter {
        width: 100%;
        padding-right: 12px;
        padding-left: 12px;
    }


    .gallery-status {
        min-height: 260px;
        padding: 40px 18px;
    }


    .gallery-status h3 {
        font-size: 29px;
    }


    .before-after-grid {
        gap: 20px;
    }


    .before-after-images {
        grid-template-columns: 1fr;
    }


    .comparison-image {
        height: 340px;
    }


    .comparison-image:first-child {
        border-right: 0;
        border-bottom: 3px solid var(--white);
    }


    .before-after-content {
        padding: 21px;
    }


    .before-after-content h2 {
        font-size: 28px;
    }


    .gallery-information-section {
        padding: 70px 0;
    }


    .gallery-information-card {
        padding: 27px;
    }
}


/* ==================================================
   9. SMALL MOBILE PHONES
   ================================================== */

@media screen and (max-width: 390px) {

    .gallery-filters {
        grid-template-columns: 1fr;
    }


    .comparison-image {
        height: 300px;
    }
}