/**
 * OUM Event Categories Grid Styles
 * Version: 1.0.0
 *
 * This stylesheet provides styling for the [event-categories-grid] shortcode.
 * All classes use the .oum-ecg-* prefix (Event Categories Grid).
 */

/* ==========================================================================
   MAIN WRAPPER
   ========================================================================== */

.oum-ecg-wrapper {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.oum-ecg-wrapper.with-map {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.oum-ecg-wrapper.no-map {
    display: block;
    padding: 20px;
}

.oum-ecg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

@media (min-width: 1280px) {
    .open-user-map .box-wrap>.map-wrap {
        min-height: 620px !important;
    }
}

@media (min-width: 1440px) {
    .open-user-map .box-wrap>.map-wrap {
        min-height: 660px !important;
    }
}

@media (min-width: 1441px) and (max-width: 1519px) {
    .open-user-map .box-wrap>.map-wrap {
        min-height: 690px !important;
    }
}

@media (min-width: 1520px) {
    .open-user-map .box-wrap>.map-wrap {
        min-height: 700px !important;
    }
}

/* ==========================================================================
   CATEGORIES PANEL
   ========================================================================== */

.oum-ecg-categories {
    flex: 0 0 30%;
    max-width: 30%;
    border-radius: 12px;
}

.oum-ecg-wrapper.with-map {
    display: flex;
    align-items: flex-start;
}

.oum-ecg-wrapper.no-map .oum-ecg-categories {
    max-width: 100%;
    flex: none;
}

.oum-ecg-header .oum-ecg-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-top: 0;
    margin-bottom: 0;
    font-style: italic;
    flex: 0 0 30%;
    max-width: 30%;
}

.oum-ecg-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: flex-start;
    flex: 0 0 70%;
    max-width: 70%;
    padding-left: 1em;
}

.oum-ecg-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

.oum-ecg-legend-pin {
    display: inline-block;
    width: 16px;
    height: 24px;
    vertical-align: middle;
}

.oum-ecg-legend-label {
    line-height: 1;
}

/* ==========================================================================
   MAP CONTAINER
   ========================================================================== */

.oum-ecg-map-container {
    flex: 1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.oum-ecg-wrapper.with-map {
    position: relative;
    display: flex;
    align-items: flex-start;
}

.oum-ecg-map-container>*,
.oum-ecg-map-container iframe,
.oum-ecg-map-container #map {
    height: 100%;
    width: 100%;
}

/* ==========================================================================
   CATEGORIES GRID
   ========================================================================== */

.oum-ecg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.oum-ecg-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.oum-ecg-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.oum-ecg-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.oum-ecg-grid[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

.oum-ecg-grid[data-columns="6"] {
    grid-template-columns: repeat(6, 1fr);
}

/* ==========================================================================
   CATEGORY TILES
   ========================================================================== */

.oum-ecg-tile {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.oum-ecg-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.oum-ecg-tile:focus {
    outline: 2px solid #2ABFB3;
    outline-offset: 2px;
}

.oum-ecg-tile.active {
    box-shadow: 0 0 0 3px #2ABFB3, 0 6px 20px rgba(42, 191, 179, 0.3);
    transform: translateY(-3px);
}

.oum-ecg-tile-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.oum-ecg-tile-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
    padding: 40px 12px 12px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.oum-ecg-tile-name {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   ACTIVE FILTER INDICATOR
   ========================================================================== */

.oum-ecg-active-filter {
    display: none;
    align-items: center;
    background: #f0faf9;
    border: 1px solid #2ABFB3;
    border-radius: 25px;
    padding: 8px 15px;
    margin-top: 15px;
    margin-left: 10px;
    gap: 8px;
}

.oum-ecg-active-filter.visible {
    display: inline-flex;
}

.oum-ecg-filter-label {
    color: #666;
    font-size: 13px;
}

.oum-ecg-filter-name {
    color: #2ABFB3;
    font-weight: 600;
    font-size: 13px;
}

.oum-ecg-clear-filter {
    background: #2ABFB3;
    color: #fff;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.oum-ecg-clear-filter:hover {
    background: #229e94;
}

.oum-ecg-clear-filter:focus {
    outline: 2px solid #229e94;
    outline-offset: 2px;
}

/* ==========================================================================
   DETAIL VIEW (LOCATIONS LIST)
   ========================================================================== */

.oum-ecg-detail {
    display: none;
    animation: oumEcgFadeIn 0.3s ease;
}

.oum-ecg-detail.active {
    display: block;
}

.oum-ecg-grid-view.hidden {
    display: none;
}

.oum-ecg-detail-content {
    max-height: 450px;
    overflow-x: auto;
    scrollbar-width: thin;
}

@keyframes oumEcgFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.oum-ecg-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.oum-ecg-detail-image {
    width: 180px;
    height: 140px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.oum-ecg-detail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    padding: 35px 12px 12px;
}

.oum-ecg-detail-name {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: block;
    text-align: center;
}

.oum-ecg-back-btn {
    display: inline-block;
    color: #2ABFB3;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
}

.oum-ecg-back-btn:hover {
    color: #229e94;
}

.oum-ecg-back-btn:focus {
    outline: 2px solid #2ABFB3;
    outline-offset: 2px;
}

.oum-ecg-detail-header .oum-ecg-category-title {
    font-size: 26px;
    font-weight: 500;
    color: #333;
    margin: 0 0 15px 0;
    text-transform: uppercase;
}

/* ==========================================================================
   LOCATIONS GRID
   ========================================================================== */

.oum-ecg-locations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px 30px;
}

.oum-ecg-location-item {
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.oum-ecg-location-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}

.oum-ecg-location-address,
.oum-ecg-location-date,
.oum-ecg-location-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 3px 0;
    line-height: 1.4;
}

.oum-ecg-location-desc {
    color: #888;
    margin-bottom: 8px;
}

.oum-ecg-book-btn {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #2ABFB3;
    text-decoration: none;
    letter-spacing: 0.5px;
    margin-top: 5px;
    border-bottom: 2px solid #2ABFB3;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.oum-ecg-book-btn:hover {
    color: #229e94;
    border-bottom-color: #229e94;
}

.oum-ecg-book-btn:focus {
    outline: 2px solid #2ABFB3;
    outline-offset: 2px;
}

.oum-ecg-no-locations {
    color: #666;
    font-size: 15px;
    padding: 30px 0;
    grid-column: 1 / -1;
}

.oum-ec-no-categories {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Category page (standalone detail view) */
.oum-ecg-category-page {
    padding: 0 0 48px 0;
}

.oum-ecg-category-page .oum-ecg-detail {
    display: block;
}

.oum-ecg-category-page .oum-ecg-detail-content {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 48px;
    padding-left: 0;
    padding-right: 0;
    max-height: none;
    overflow: visible;
    overflow-x: visible;
}

/* Category page – 4-column grid (default) */
.oum-ecg-category-page .oum-ecg-locations-grid--4cols {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .oum-ecg-category-page .oum-ecg-locations-grid--4cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .oum-ecg-category-page .oum-ecg-locations-grid--4cols {
        grid-template-columns: 1fr;
    }
}

/* Category page – Masonry / Pinterest-style (saved for later: use class oum-ecg-locations-grid--masonry in template) */
.oum-ecg-category-page .oum-ecg-locations-grid--masonry {
    display: block;
    column-count: 4;
    column-gap: 24px;
}

.oum-ecg-category-page .oum-ecg-locations-grid--masonry .oum-ecg-location-item {
    break-inside: avoid;
    margin-bottom: 24px;
    page-break-inside: avoid;
}

.oum-ecg-category-page .oum-ecg-locations-grid--masonry .oum-ecg-no-locations {
    column-span: all;
}

@media (max-width: 992px) {
    .oum-ecg-category-page .oum-ecg-locations-grid--masonry {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .oum-ecg-category-page .oum-ecg-locations-grid--masonry {
        column-count: 1;
        column-gap: 20px;
    }

    .oum-ecg-category-page .oum-ecg-locations-grid--masonry .oum-ecg-location-item {
        margin-bottom: 20px;
    }
}

/* Category page – Locations pagination */
.oum-ecg-pagination {
    margin-top: 32px;
    text-align: center;
}

.oum-ecg-pagination .page-numbers {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.oum-ecg-pagination .page-numbers li {
    margin: 0;
}

.oum-ecg-pagination .page-numbers a,
.oum-ecg-pagination .page-numbers span {
    display: inline-block;
    min-width: 30px;
    padding: 0px 10px;
    font-size: 13px;
    line-height: 30px;
    text-align: center;
    text-decoration: none;
    color: #121212;
    border: 1px solid #121212;
    background: #fff;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.oum-ecg-pagination .page-numbers a:hover {
    color: #fff;
    background: #029791;
    border-color: #029791;
}

.oum-ecg-pagination .page-numbers .current {
    color: #fff;
    background: #029791;
    border-color: #029791;
}

.oum-ecg-category-page .oum-ecg-back-btn {
    display: inline-block;
    margin-top: 8px;
}

/* Category page – hero (full-width: image left ~2/3, dark panel right ~1/3) */
.oum-ecg-category-page .oum-ecg-detail-header--hero {
    display: flex;
    flex-wrap: nowrap;
    margin: 0 auto;
    padding: 0;
    gap: 0;
    max-width: 1280px;
    width: 100%;
    min-height: 420px;
    align-items: stretch;
}

.oum-ecg-category-page .oum-ecg-hero-image {
    flex: 0 0 50%;
    min-height: 420px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    border: none;
    margin: 0;
}

/* Prevent theme or other CSS from adding overlays (e.g. X shape) on the hero image */
.oum-ecg-category-page .oum-ecg-hero-image::before,
.oum-ecg-category-page .oum-ecg-hero-image::after {
    display: none !important;
    content: none !important;
}

.oum-ecg-category-page .oum-ecg-hero-panel {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px;
    background: #1a1a1a;
    color: #fff;
    border: none !important;
    border-left: none !important;
    margin: 0;
    box-shadow: none !important;
    outline: none !important;
}

.oum-ecg-category-page .oum-ecg-hero-tag {
    display: block;
    font-family: Lato, Helvetica, Arial, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 14px;
}

.oum-ecg-category-page .oum-ecg-hero-title {
    font-family: "Bellota Text", Helvetica, Arial, sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.28;
    color: #fff;
    margin: 0 0 24px 0;
    text-transform: uppercase;
    letter-spacing: 0;
}

.oum-ecg-category-page .oum-ecg-hero-excerpt {
    font-family: Lato, Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 28px 0;
}

.oum-ecg-category-page .oum-ecg-hero-excerpt p {
    margin: 0 0 0.75em 0;
}

.oum-ecg-category-page .oum-ecg-hero-excerpt p:last-child {
    margin-bottom: 0;
}

.oum-ecg-category-page .oum-ecg-hero-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.oum-ecg-category-page .oum-ecg-hero-line {
    display: block;
    width: 24px;
    height: 1px;
    background: rgba(255, 255, 255, 0.55);
}

.oum-ecg-category-page .oum-ecg-hero-link {
    display: inline-block;
    font-family: Lato, Helvetica, Arial, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 0;
    background: transparent;
    transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.oum-ecg-category-page .oum-ecg-hero-link:hover,
.oum-ecg-category-page .oum-ecg-hero-link:focus {
    color: #fff;
    background: hsla(0, 0%, 100%, .1);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Modern card style for category page location items */
.oum-ecg-category-page .oum-ecg-location-item {
    display: flex;
    flex-direction: column;
    padding: 20px 15px;
    margin-bottom: 0;
    border: none;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.oum-ecg-category-page .oum-ecg-location-item .oum_location_description {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.oum-ecg-category-page .oum-ecg-location-item .oum_location_description_link {
    margin-top: auto;
    padding-top: 15px;
}

.oum-ecg-category-page .oum-ecg-location-item .oum_location_description a {
    margin-top: 0;
}

.oum-ecg-category-page .oum-ecg-location-item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.oum-ecg-category-page .oum-ecg-location-item:hover .oum-ecg-location-name {
    color: #029791;
}

.oum-ecg-category-page .oum-ecg-locations-grid--4cols {
    gap: 15px;
}

/* Category page – location card typography */
.oum-ecg-category-page .oum-ecg-location-name {
    font-size: 20px;
    font-weight: 700;
    /* font-family: "Bellota Text", Helvetica, Arial, sans-serif; */
    color: #121212;
    margin: 0 0 15px 0;
    transition: color 0.25s ease;
    line-height: normal;
}

.oum-ecg-category-page .oum_location_description,
.oum-ecg-category-page .oum_location_description p {
    font-family: Lato, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #3d3d3d;
}

.oum-ecg-category-page .oum_location_description p:last-child {
    margin-bottom: 0;
}

/* FIND OUT MORE / READ MORE button – links inside location description (category page) */
.oum-ecg-category-page .oum_location_description a {
    display: inline-block;
    padding: 10px 20px;
    font-family: Lato, Helvetica, Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    background: #029791;
    border: 2px solid #029791;
    border-radius: 0;
    transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.oum-ecg-category-page .oum_location_description a:hover,
.oum-ecg-category-page .oum_location_description a:focus {
    color: #121212;
    background: #fff;
    border-color: #000;
    font-weight: 700;
}


.oum-ecg-category-page .next.page-numbers:after {
    content: "\F105";
}

.oum-ecg-category-page .prev.page-numbers:before {
    content: "\F104";
}

.oum-ecg-category-page .next.page-numbers:after,
.oum-ecg-category-page .prev.page-numbers:before {
    display: inline-block;
    font-family: FontAwesome;
    font-weight: 400;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


.oum_location_date {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 15px 0;
    line-height: normal;
}

.leaflet-popup-content .event-date {
    font-size: 16px;
    font-weight: bold;
    line-height: normal;
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */

/* Large tablets and small desktops */
@media (max-width: 1200px) {
    .oum-ecg-wrapper.with-map {
        flex-direction: column;
    }

    .oum-ecg-categories {
        flex: none;
        max-width: 100%;
        width: 100%;
    }
}

/* Tablets */
@media (max-width: 768px) {

    .oum-ecg-grid,
    .oum-ecg-grid[data-columns="3"],
    .oum-ecg-grid[data-columns="4"],
    .oum-ecg-grid[data-columns="5"],
    .oum-ecg-grid[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr);
    }

    .oum-ecg-locations-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .oum-ecg-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .oum-ecg-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .oum-ecg-legend {
        justify-content: flex-start;
    }

    .oum-ecg-detail-image {
        width: 140px;
        height: 110px;
    }

    .oum-ecg-category-page .oum-ecg-detail-header--hero {
        flex-direction: column;
        min-height: 0;
    }

    .oum-ecg-category-page .oum-ecg-hero-image {
        flex: 0 0 auto;
        min-height: 280px;
        width: 100%;
    }

    .oum-ecg-category-page .oum-ecg-hero-panel {
        flex: 0 0 auto;
        padding: 40px 24px;
    }

    .oum-ecg-category-page .oum-ecg-hero-title {
        font-size: 24px;
    }

    .oum-ecg-category-page .oum-ecg-detail-content {
        margin-top: 32px;
        padding-left: 0;
        padding-right: 0;
    }

    .oum-ecg-wrapper.with-map {
        display: initial;
        gap: initial;
        align-items: initial;
    }

    .oum-ecg-header .oum-ecg-title {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .oum-ecg-legend {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
    }
}

/* Mobile */
@media (max-width: 576px) {

    .oum-ecg-grid,
    .oum-ecg-grid[data-columns="1"],
    .oum-ecg-grid[data-columns="2"],
    .oum-ecg-grid[data-columns="3"],
    .oum-ecg-grid[data-columns="4"],
    .oum-ecg-grid[data-columns="5"],
    .oum-ecg-grid[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .oum-ecg-title {
        font-size: 18px;
    }

    .oum-ecg-tile-name {
        font-size: 11px;
    }

    .oum-ecg-active-filter {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }

    .oum-ecg-detail-header .oum-ecg-category-title {
        font-size: 20px;
    }

    .oum-ecg-category-page .oum-ecg-hero-title {
        font-size: 20px;
    }

    .oum-ecg-category-page .oum-ecg-hero-image {
        min-height: 220px;
    }

    .oum-ecg-category-page .oum-ecg-hero-panel {
        padding: 32px 20px;
    }

    .oum-ecg-category-page .oum-ecg-detail-content {
        margin-top: 28px;
        padding-left: 0;
        padding-right: 0;
    }

    .oum-ecg-categories {
        padding: 10px;
    }
}