/*Wordpress for front end resultion of wp blocks */
.wp-g-0{
    /** 0 Gap for Post Templates **/
    gap:0!important;
}

figure.wp-block-image, div.wp-block-ed-map {
    display: inline-block;
    position:relative;
}

div.wp-block-ed-map {
    display: block;
}

figure.wp-block-image:not(.is-resized) {
    width: 100%;
}

figure.wp-block-image:not(.is-resized) img {
    width: 100%;
    height: 100%;
}


/* Base styles for all gallery layouts */
.wp-block-gallery {
    display: flex;
    flex-wrap: wrap;
    margin-left: -5px; /* Adjust as needed for spacing */
    margin-right: -5px; /* Adjust as needed for spacing */
}

.wp-block-gallery .blocks-gallery-item {
    padding: 5px; /* Adjust as needed for spacing */
    box-sizing: border-box; /* Ensure padding is included in width */
}

.wp-block-gallery img {
    display: block;
    width: 100%;
    height: auto;
    cursor: pointer;
}

.wp-block-gallery .wp-block-image:hover::after{
    content:'';
    display:block;
    position:absolute;
    top:0;left:0;right:0;bottom:0;

    background-color:var(--bs-primary);

    animation: fadeInGalleryOverlay 0.2s linear;

    opacity:0.51;

    cursor:pointer;
}
@keyframes fadeInGalleryOverlay {
    0%{
        opacity:0;
    }
    100%{
        opacity:0.5;
    }
}

/* 1 Column Layout */
.wp-block-gallery.columns-1 .blocks-gallery-item {
    flex: 0 0 100%;
    max-width: 100%;
}

/* 2 Column Layout */
.wp-block-gallery.columns-2 .blocks-gallery-item {
    flex: 0 0 50%;
    max-width: 50%;
}

/* 3 Column Layout */
.wp-block-gallery.columns-3 .blocks-gallery-item {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
}

/* 4 Column Layout */
.wp-block-gallery.columns-4 .blocks-gallery-item {
    flex: 0 0 25%;
    max-width: 25%;
}

/* 5 Column Layout */
.wp-block-gallery.columns-5 .blocks-gallery-item {
    flex: 0 0 20%;
    max-width: 20%;
}

/* 6 Column Layout */
.wp-block-gallery.columns-6 .blocks-gallery-item {
    flex: 0 0 16.6666%;
    max-width: 16.6666%;
}

/* 7 Column Layout */
.wp-block-gallery.columns-7 .blocks-gallery-item {
    flex: 0 0 14.2857%;
    max-width: 14.2857%;
}

/* 8 Column Layout */
.wp-block-gallery.columns-8 .blocks-gallery-item {
    flex: 0 0 12.5%;
    max-width: 12.5%;
}

/* Responsive adjustments (example) */
@media (max-width: 768px) {
    .wp-block-gallery.columns-4 .blocks-gallery-item,
    .wp-block-gallery.columns-5 .blocks-gallery-item,
    .wp-block-gallery.columns-6 .blocks-gallery-item,
    .wp-block-gallery.columns-7 .blocks-gallery-item,
    .wp-block-gallery.columns-8 .blocks-gallery-item,
    .wp-block-gallery.columns-3 .blocks-gallery-item{
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 480px) {
    .wp-block-gallery .blocks-gallery-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Optional: Add spacing between gallery items */
.wp-block-gallery .blocks-gallery-item {
    margin: 5px; /* Adjust as needed */
}

/*Optional: removes the margin from the parent container, to stop extra spacing on the left and right sides of the gallery.*/
.wp-block-gallery{
    margin-left: 0px;
    margin-right:0px;
}

.EDGalleryPopup{
    display:none;/*flex*/
    align-items: center;
    justify-content: center;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background-color:rgba(var(--bs-primary-rgb),0.3);
    z-index:999999999;
    backdrop-filter: blur(2px);
    text-align: center;
    padding-top:50px;
    animation:ed_fadeInGallery 0.3s linear;
}

@keyframes ed_fadeInGallery {
    0%{
        opacity:0;
        background-color:rgba(var(--bs-primary-rgb),0.3);
        filter:blur(2px);
    }
    50%{
        background-color:rgba(var(--bs-success-rgb),0.5);
    }
    100%{
        background-color:rgba(var(--bs-primary-rgb),0.3);
        opacity:1;
        filter:blur(0px);
    }
}


.EDGalleryPopup > img{
    box-shadow:1px 1px 5px rgba(var(--bs-dark-rgb),0.7);
    max-width:80%;
    max-height:80%;
}


.EDGalleryPopup button{
    border:none;
    appearance:none;
    background:transparent;
    color:white;
    font-size:40px;
    text-shadow:1px 1px 4px rgba(var(--bs-dark-rgb),0.9);
}

.EDGalleryPopup .closeModal::after {
    position: relative;
    content: '';
    display: block;
    width: 30px;
    transform: translate(-15px,0px) rotate(-45deg);
    height: 3px;
    background: var(--bs-light);
}

.EDGalleryPopup .closeModal:hover::after {
    background: var(--bs-warning);
    transform: translate(-15px,0px) rotate(45deg);
    transition: all 0.25s linear;
}

.EDGalleryPopup .closeModal:hover::before {
    background: var(--bs-warning);
    transform: translate(15px,0px) rotate(-45deg);
    transition: all 0.2s linear;
}

.EDGalleryPopup .closeModal {
    display: flex;
    position: absolute;
    top: 10px;
    right: 10px;
    height: 60px;
    align-items: center;
    cursor: pointer;
    justify-items: center;
    opacity: 0.8;
}

.EDGalleryPopup .closeModal::before {
    content: '';
    display: block;
    width: 30px;
    transform: translate(15px,0px) rotate(45deg);
    height: 3px;
    background: var(--bs-light);
}

@media (min-width: 768px) {
    .d-none.d-md-inherit {
        display: inherit !important;
    }
}

/** Query Column Supports **/
/** By Default, Wordpress doesn't nicely collapse their columns until the smallest viewport **/

/* ========================================================================= */
/* COLLAPSE to 2-3 Columns on larger tablets and small desktop (840px) */
/* ========================================================================= */
@media screen and (max-width: 992px) {

    /* Columns 3 -> 2 */
    .wp-block-query .columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Columns 4 -> 3 */
    .wp-block-query .columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Columns 5 -> 3 */
    .wp-block-query .columns-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    /* Columns 6, 7, 8 -> 4 */
    .wp-block-query .columns-6,
    .wp-block-query .columns-7,
    .wp-block-query .columns-8 {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* ========================================================================= */
/* COLLAPSE ALL to 1-2 Columns on smaller tablets and mobile (600px) */
/* ========================================================================= */
@media screen and (max-width: 600px) {
    /* Columns 3 and 4 -> 2 */
    .wp-block-query .columns-3,
    .wp-block-query .columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Columns 5 through 8 -> 1 */
    .wp-block-query .columns-5,
    .wp-block-query .columns-6,
    .wp-block-query .columns-7,
    .wp-block-query .columns-8 {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* ========================================================================= */
/* COLLAPSE EVERYTHING to 1 Column on small mobile (480px) */
/* ========================================================================= */
@media screen and (max-width: 480px) {
    /* Select all columns classes you are overriding */
    .wp-block-query .columns-3,
    .wp-block-query .columns-4,
    .wp-block-query .columns-5,
    .wp-block-query .columns-6,
    .wp-block-query .columns-7,
    .wp-block-query .columns-8 {
        grid-template-columns: repeat(1, 1fr);
    }
}

/*
* Wordpress pagination links for programatic paginations
 */

.wp-block-query-pagination .wp-block-query-pagination-next a,
.wp-block-query-pagination .wp-block-query-pagination-previous a,
.wp-block-query-pagination .wp-block-query-pagination-link a {
    display: inline-block;
    padding: .375rem .75rem;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    color: #fff;
    background-color: #007bff;
    border: 1px solid #007bff;
    border-radius: .25rem;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.wp-block-query-pagination .wp-block-query-pagination-next a:hover,
.wp-block-query-pagination .wp-block-query-pagination-previous a:hover,
.wp-block-query-pagination .wp-block-query-pagination-link a:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

.wp-block-query-pagination .wp-block-query-pagination-next a:focus,
.wp-block-query-pagination .wp-block-query-pagination-previous a:focus,
.wp-block-query-pagination .wp-block-query-pagination-link a:focus {
    outline: 0;
    box-shadow: 0 0 0 .2rem rgba(38, 143, 255, .5);
}

.wp-block-query-pagination .wp-block-query-pagination-next a:disabled,
.wp-block-query-pagination .wp-block-query-pagination-previous a:disabled,
.wp-block-query-pagination .wp-block-query-pagination-link a:disabled {
    opacity: .65;
    box-shadow: none;
}

/*
WORDPRESS PAGINATION BLOCK (USED IN QUERYLOOP)
 */
/* ==========================================================================
   WORDPRESS PAGINATION BLOCKS TO BOOTSTRAP STYLE
   ========================================================================== */

/* 1. Base Container Styling (mimics .pagination and .d-flex) */
.wp-block-query-pagination {
    /* WP already applies flex, so we just set spacing/list style */
    padding-left: 0;
    list-style: none;
    border-radius: 0.25rem; /* Bootstrap's default border-radius */
    margin: 1rem 0;
    gap: 0; /* Remove default gap applied by WP flex layout */
}

/* 2. Container for numbers, dots, and prev/next links */
.wp-block-query-pagination-numbers,
.wp-block-query-pagination-prev,
.wp-block-query-pagination-next {
    display: flex; /* Ensures items inside the number container are flexed */
    margin: 0; /* Override any block default margin */
}

/* 3. Link/Item Styling (mimics .page-item and .page-link) */
/* Target all links, current page span, and dots span */
.wp-block-query-pagination a,
.wp-block-query-pagination span.page-numbers {
    position: relative;
    display: block;
    padding: 0.375rem 0.75rem; /* Standard Bootstrap padding */
    line-height: 1.5;

    /* Bootstrap Colors */
    color: #0d6efd; /* Blue link color */
    background-color: #fff;
    border: 1px solid #dee2e6; /* Light gray border */
    text-decoration: none;

    /* Ensure only the right border is set for spacing, left border handled by previous item */
    margin-left: -1px;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

/* Fix: The first element needs a clean left border */
.wp-block-query-pagination a:first-child,
.wp-block-query-pagination-numbers > :first-child {
    margin-left: 0;
}

/* 4. First and Last Item Border-Radius */

/* First item (which could be the 'Previous' block or the first number) */
.wp-block-query-pagination a:first-child,
.wp-block-query-pagination-numbers > :first-child {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

/* Last item (which could be the 'Next' block or the last number) */
.wp-block-query-pagination a:last-child,
.wp-block-query-pagination-numbers > :last-child,
.wp-block-query-pagination-next a {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

/* 5. Hover/Focus State */
.wp-block-query-pagination a:hover {
    z-index: 2;
    color: #0a58ca; /* Darker blue */
    background-color: #e9ecef; /* Light gray background */
    border-color: #dee2e6;
}

/* 6. Active/Current Page State (mimics .active) */
/* Targets the <span class="page-numbers current">1</span> */
.wp-block-query-pagination .current {
    z-index: 3;
    color: #fff !important; /* White text */
    background-color: #0d6efd !important; /* Primary blue background */
    border-color: #0d6efd !important; /* Primary blue border */
    /* Override Bootstrap's !important use if necessary */
    pointer-events: none; /* Prevents cursor change/clicks */
}

/* 7. Disabled/Dots State (for non-linked <span> elements) */
.wp-block-query-pagination .dots {
    color: #6c757d; /* Muted gray text */
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

.accordion-button{
    font-size:unset;
}


/** WP Password Pages **/
form.post-password-form {
    height: 80vh;
    padding-top: 30vh;
    text-align: center;
    align-items: center;
    color: white !important;
    font-weight: bolder;
}
form.post-password-form label{
    color: white !important;
    font-weight: bolder;
}