/**
 * Taxonomy Archive: Locations
 **/


/* Layout */

.page-header {
    margin-bottom: calc(var(--regular-padding) * 2);
    margin-top: 0;
}

.page-title {
    text-wrap: balance;
}

.page-header .reviews-widget {
    margin-bottom: 1.2em;
}

.company-network {
	margin-left: 0;
	margin-right: 0;
}

.location-count_courses a,
.location-count_dates a {
    font-weight: 700;
}

@media (max-width: 799px) {
    .page-header {
        margin-bottom: 0;
    }
    .location-meta,
    .reviews-widget {
        text-align: center;
    }
}

@media (min-width: 800px) {
    .page-header {
        display: grid;
        gap: 1.25em 1em;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr auto auto 1fr;
        margin-top: 1em;
        padding-left: var(--regular-padding);
        padding-right: var(--regular-padding);
    }
    .term-image {
        grid-column: 2 / 3;
        grid-row: 1 / 5;
    }
    .page-title {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        margin-bottom: 0;
    }
    .location-meta {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
        margin-bottom: 0;
    }
    .page-header.has-reviews {
        grid-template-rows: 1.5fr 1fr auto;
    }
    .page-header.has-reviews .term-image {
        align-self: center;
        grid-row: 1 / 3;
    }
    .page-header.has-reviews .page-title {
        align-self: end;
        grid-row: 1 / 2;
    }
    .page-header.has-reviews .location-meta {
        align-self: start;
        grid-row: 2 / 3;
    }
    .page-header.has-reviews .reviews-widget {
        grid-column: 2 / 3;
        grid-row: 3 / 4;
        margin-bottom: 0;
        justify-self: center;
    }
}

@media (min-width: 1000px) {
    .location-content_wrapper {
        border-top: 1px solid var(--wp--preset--color--accent);
        display: grid;
        gap: 4em;
        grid-template-columns: 0.9fr 2fr;
    }
    .location-sidebar {
        border-right: 1px solid var(--wp--preset--color--accent);
        padding-top: calc(var(--regular-padding) * 2);
        padding-right: calc(var(--regular-padding) * 2);
    }
    .location-sidebar_content {
        position: sticky;
        top: 130px;
    }
    .logged-in .location-sidebar_content {
        top: calc( 130px + var(--wp-admin--admin-bar--height) );
    }
    .location-content {
        padding-top: calc(var(--regular-padding) * 2);
    }
}

@media (min-width: 82em) {
    .page-header {
        grid-template-columns: 0.9fr 1fr;
        margin-left: auto;
        margin-right: auto;
        max-width: 72em;
    }
}


/* Breadcrumbs */

#breadcrumbs span span:first-child::after,
#breadcrumbs span span:nth-child(2)::after {
    content: ' > ';
}

@media (max-width: 799px) {
    #breadcrumbs {
        padding: 0.5em var(--regular-padding) 1em;
        position: relative;
        text-align: center;
        z-index: 10;
    }
    body>#breadcrumbs {
        display: none;
    }
}

@media (min-width: 800px) {
    .page-header>#breadcrumbs {
        display: none;
    }
}


/* Location image */

.term-image {
    margin: 0;
}

@media (min-width: 800px) {
    .term-image {
        text-align: center;
    }
}


/* Location title and description */

.page-title {
    line-height: 1.1;
}

@media (max-width: 799px) {
    .page-title {
        margin-top: 0.5em;
        padding-left: var(--regular-padding);
        padding-right: var(--regular-padding);
        text-align: center;
    }
    .archive-description {
        font-style: italic;
        margin-top: 2em;
        padding-left: var(--regular-padding);
        padding-right: var(--regular-padding);
        text-align: center;
    }
}

@media (min-width: 82em) {
    .page-title {
        font-size: 2.5em;
        margin-top: 0.75em;
        margin-right: 2em;
    }
    .page-title span {
        display: block;
    }
    .archive-description {
        font-size: 1.125em;
        max-width: 26em;
    }
}


/* Table of contents */

.location-toc {
    background-color: #fff;
    margin-bottom: 0;
    max-width: none;
    padding: 0;
}

.location-toc ul {
    margin-top: 0.5em;
}

@media (max-width: 799px) {
    .location-toc {
        margin-bottom: 0.5em;
        margin-left: var(--regular-padding);
        margin-right: var(--regular-padding);
        margin-top: 1em;
        max-width: initial;
        width: calc(100% - (2 * var(--regular-padding)));
    }
    .location-toc li:first-child {
        display: none;
    }
}

@media (min-width: 800px) {
    .location-toc {
        font-size: 1.1em;
        margin-top: 0;
    }
    .location-toc>ul {
        margin-top: 0;
    }
}


/* Location details */

.location-meta {
    color: var(--wp--preset--color--link-hover);
    list-style: none;
}

.location-meta svg {
    color: var(--wp--preset--color--accent);
}

@media (max-width: 799px) {
    .location-meta {
        padding-left: var(--regular-padding);
        padding-right: var(--regular-padding);
    }
    .location-meta li:first-child {
        margin-bottom: 1em;
    }
    .location-count_courses {
        margin-bottom: 0.5em;
    }
    .location-meta svg {
        transform: translateY(4px);
    }
}

@media (min-width: 800px) {
    .location-meta {
        margin-bottom: 0;
        margin-top: 1em;
        padding-left: 0
    }
    .location-meta li {
        align-items: center;
        display: flex;
        justify-content: center;
    }
    .location-meta li:not(:last-child) {
        margin-bottom: 0.5em;
    }
    .location-meta li .svg-icon {
        margin-right: 0.25em;
    }
}

@media (min-width: 1200px) {
    .location-meta {
        display: flex;
        font-size: 1.125em;
        gap: 1em;
    }
    .location-meta li:not(:last-child) {
        margin-bottom: 0;
    }
}

/* Social share */

.location-content_wrapper .social-share {
    justify-content: start;
    margin-bottom: 2em;
    margin-top: 3em;
}

/* Confirmed sessions */

.course-table {
    padding-top: 0;
}

.dynatable-pagination-links {
	margin-bottom: 0;
}

@media (min-width: 920px) {
    #confirmed-sessions {
        display: grid;
        grid-template-columns: 1fr auto;
    }
    #confirmed-sessions>* {
        grid-column: 1 / 3;
    }
    #confirmed-sessions h2 {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }
}

/* Location services */

.services-icons {
    padding-left: 0;
    list-style: none;
}

.services-icons li {
    display: inline-flex;
    align-items: center;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.services-icons li .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.25em;
    min-width: 30px;
}

.services-notes {
    border-top: 1px solid #ddd;
    margin-top: 1.5em;
}

/* Team */

.team-members {
    display: flex;
    gap: 1em;
    flex-direction: row !important;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 1.25em;
}

.team-member.child-card {
    display: inline-block; /* Align items horizontally */
    flex-shrink: 0; /* Prevent shrinking */
    width: calc((100% / 1.5) - 1em);
}

.team-member .post-thumbnail {
    margin-left: 0;
    margin-right: 0;
}

.carousel-navigation {
    display: none;
}

@media (min-width: 520px) {
    .team-member.child-card {
        width: calc((100% / 2.5) - (2em / 3));
    }
}

@media (min-width: 768px) {
    .location-content {
        overflow-x: hidden;
    }
    .team-member.child-card {
        width: calc((100% / 3.5) - 0.75em);
    }
    .carousel-navigation {
        display: flex;
        font-size: 0.85em;
        justify-content: space-between;
    }
    .carousel-navigation button {
        padding: 0.5em 1.25em;
    }
    .carousel-navigation button:disabled {
        cursor: not-allowed;
        opacity: 0.5
    }
}

/* Courses */

@media (min-width: 768px) {
    .course-preview {
        margin-bottom: 1.5em;
    }
}

/* Reviews */

.ti-widget {
    margin-bottom: 4em;
    margin-top: 2em;
}

/* Gallery */

.wp-block-image {
    margin: 1.5em 0;
}

.wp-block-image img {
    display: block;
}

.location-gallery {
    display: grid;
    gap: calc( var(--regular-padding) / 1.5 );
    grid-template-columns: repeat(2, 1fr);
    list-style-type: none;
    margin: 1.5em 0;
}

.location-gallery img {
    display: block;
    position: relative;
}

.location-gallery img:hover {
    cursor: pointer;
}

@media ( min-width: 600px ) {
    .location-gallery {
        gap: var(--regular-padding);
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Slideshow */

/* Modal Background */
body > .modal {
    display: none;
    position: fixed;
    z-index: 1000000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

/* Modal content (container for the image) */
body > .modal .modal-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

body > .modal .modal-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

/* Navigation buttons */
body > .modal .modal .prev,
body > .modal .modal .next {
    position: absolute;
    top: 50%;
    font-size: 30px;
    color: white;
    padding: 16px;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
}

body > .modal .modal .prev {
    left: 10px;
}

body > .modal  .modal .next {
    right: 10px;
}

/* Close button */
body > .modal .close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}


/* Map and Virtual Tour */

.responsive-iframe {
    height: 0;
    margin: 1.5em 0 2em;
    overflow: hidden;
    padding-bottom: 75%;
    padding-top: 0;
    position: relative;
}

.responsive-iframe.location_google-map {
    padding-bottom: 56.25%;
}

.responsive-iframe iframe {
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

/* Content */

.location-content ul a {
    overflow-wrap: break-word
}

.location-content h2:not(:first-child) {
    margin-top: 3em;
}

.location-content>h3:not(:first-child) {
    margin-top: 1.5em;
}

@media screen and (min-width: 48em) {
    .location-content>h3:not(:first-child) {
        font-size: 1.3em;
    }
}