/* Projects Gallery block (axisworld/projects-gallery, inc/projects-gallery.php).
   Loaded on the site and in the editor, so it can't live in css/style.css.
   Sizes are px: bootstrap.min.css sets html { font-size: 62.5% }. */

.aw-gallery {
    width: 100vw;
    max-width: none;
    margin: 0 0 0 calc(50% - 50vw);
    padding: 64px 0;
    background-color: #fdfbf7;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.5;
    color: #1e1711;
    box-sizing: border-box;
}

.aw-gallery .aw-gallery__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.aw-gallery button {
    font-family: inherit;
    cursor: pointer;
}

/* Filters */
.aw-gallery .aw-gallery__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.aw-gallery .aw-gallery__filter {
    padding: 10px 24px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #5e3f23;
    background: transparent;
    border: 1px solid #e6dfc5;
    border-radius: 0;
    transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

.aw-gallery .aw-gallery__filter:hover {
    color: #c47723;
    border-color: #c47723;
}

.aw-gallery .aw-gallery__filter.is-active {
    color: #fdfbf7;
    background-color: #c47723;
    border-color: #c47723;
}

/* Grid */
.aw-gallery .aw-gallery__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.aw-gallery .aw-gallery__item[hidden] {
    display: none;
}

.aw-gallery .aw-gallery__card {
    display: block;
    position: relative;
    width: 100%;
    padding: 0;
    overflow: hidden;
    text-align: left;
    background: none;
    border: 0;
    border-radius: 0;
}

.aw-gallery .aw-gallery__photo {
    display: block;
    overflow: hidden;
}

.aw-gallery .aw-gallery__photo img {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform .9s cubic-bezier(.4, 0, .2, 1);
}

.aw-gallery .aw-gallery__card:hover .aw-gallery__photo img {
    transform: scale(1.05);
}

.aw-gallery .aw-gallery__info {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    background-color: #fdfbf7;
    border: 1px solid #e6dfc5;
    border-top: 0;
}

.aw-gallery .aw-gallery__category {
    display: block;
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #c47723;
}

.aw-gallery .aw-gallery__name {
    display: block;
    margin-top: 8px;
    font-size: 24px;
    line-height: 32px;
    font-weight: 800;
    color: #5e3f23;
    transition: color .15s cubic-bezier(.4, 0, .2, 1);
}

.aw-gallery .aw-gallery__card:hover .aw-gallery__name {
    color: #c47723;
}

.aw-gallery .aw-gallery__units {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    line-height: 20px;
    color: #5c5248;
}

.aw-gallery .aw-gallery__status {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 10px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(94, 63, 35, .6);
    border: 1px solid #e6dfc5;
}

.aw-gallery .aw-gallery__status.is-soon {
    color: #fdfbf7;
    background-color: #c47723;
    border-color: #c47723;
}

/* Details modal */
.aw-gallery .aw-gallery__modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.aw-gallery .aw-gallery__modal[hidden] {
    display: none;
}

.aw-gallery .aw-gallery__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(24, 18, 12, .8);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.aw-gallery .aw-gallery__panel {
    position: relative;
    width: 100%;
    max-width: 768px;
    max-height: 85vh;
    overflow-y: auto;
    background-color: #fdfbf7;
}

.aw-gallery .aw-gallery__panel-media {
    position: relative;
}

.aw-gallery .aw-gallery__panel-media img {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.aw-gallery .aw-gallery__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #5e3f23;
    background-color: #fdfbf7;
    border: 0;
    border-radius: 0;
    transition: all .15s cubic-bezier(.4, 0, .2, 1);
}

.aw-gallery .aw-gallery__close::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    margin: 0 auto;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.aw-gallery .aw-gallery__close:hover {
    color: #fdfbf7;
    background-color: #c47723;
}

.aw-gallery .aw-gallery__panel-soon {
    position: absolute;
    bottom: 16px;
    left: 20px;
    padding: 6px 12px;
    font-size: 10px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #fdfbf7;
    background-color: #c47723;
}

.aw-gallery .aw-gallery__panel-soon[hidden],
.aw-gallery .aw-gallery__panel-tags[hidden] {
    display: none;
}

.aw-gallery .aw-gallery__panel-body {
    padding: 28px;
}

.aw-gallery .aw-gallery__panel-body p,
.aw-gallery .aw-gallery__panel-body h3 {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
}

.aw-gallery .aw-gallery__panel-meta {
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #c47723;
}

.aw-gallery .aw-gallery__panel-name {
    margin-top: 12px;
    font-size: 30px;
    line-height: 36px;
    font-weight: 800;
    letter-spacing: -.025em;
    color: #5e3f23;
}

.aw-gallery .aw-gallery__panel-text {
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.625;
    color: #4a4036;
}

.aw-gallery .aw-gallery__panel-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.aw-gallery .aw-gallery__panel-tags span {
    padding: 6px 12px;
    font-size: 11px;
    line-height: 16px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(94, 63, 35, .7);
    border: 1px solid #e6dfc5;
}

.aw-gallery .aw-gallery__enquire {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding: 14px 28px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    color: #fdfbf7;
    background-color: #c47723;
}

.aw-gallery .aw-gallery__enquire::after {
    content: "";
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}

.aw-gallery .aw-gallery__enquire:hover::after {
    transform: translate(2px, -2px);
}

html.aw-gallery-open {
    overflow: hidden;
}

@media (min-width: 640px) {
    .aw-gallery .aw-gallery__inner {
        padding-right: 32px;
        padding-left: 32px;
    }

    .aw-gallery .aw-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aw-gallery .aw-gallery__item.is-offset {
        margin-top: 56px;
    }

    .aw-gallery .aw-gallery__photo img {
        height: 380px;
    }

    .aw-gallery .aw-gallery__modal {
        padding: 32px;
    }

    .aw-gallery .aw-gallery__panel-media img {
        height: 300px;
    }

    .aw-gallery .aw-gallery__panel-body {
        padding: 40px;
    }

    .aw-gallery .aw-gallery__panel-name {
        font-size: 36px;
        line-height: 40px;
    }
}

@media (min-width: 1024px) {
    .aw-gallery {
        padding: 96px 0;
    }

    .aw-gallery .aw-gallery__inner {
        padding-right: 48px;
        padding-left: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aw-gallery .aw-gallery__photo img,
    .aw-gallery .aw-gallery__enquire::after {
        transition: none;
    }
}

/* Block editor: sit inside the content column, and keep the modal out of the preview. */
.editor-styles-wrapper .aw-gallery {
    width: auto;
    margin: 0;
}

.editor-styles-wrapper .aw-gallery .aw-gallery__modal {
    display: none;
}

.editor-styles-wrapper .aw-gallery .aw-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-styles-wrapper .aw-gallery .aw-gallery__item {
    opacity: 1;
    transform: none;
}

/* Modal host inside the home Featured Projects block: no page chrome, only the fixed modal. */
.aw-gallery.aw-gallery--popup {
    width: auto;
    margin: 0;
    padding: 0;
    background: none;
}
