/* Hide mobile menu overlay on desktop */
@media (min-width: 768px) {
    .ct-mobile-menu-overlay {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .custom-events-wrapper.events-magazine {
        grid-template-columns: repeat(2, 1fr);
        display: block;
    }

    .event-card .event-card-link {
        margin-bottom: 15px;
    }

    /* Reset special layout for cards 1–5, keep 6th spanning full width */
    .custom-events-wrapper.events-magazine .event-card {
        grid-row: auto;
        grid-column: auto;
    }

    /* Keep the last card full-width at tablet */
    .custom-events-wrapper.events-magazine .event-card:nth-child(6) {
        grid-column: 1 / -1;
    }

    .event-card-first .event-title,
    .event-card-last .event-title {
        font-size: 2.25rem;
        line-height: 2.25rem;
    }

    /* Reduce title size slightly at tablet */
    .event-card:nth-child(6) .event-content .event-title {
        font-size: 2.5rem !important;
    }

    .event-card:nth-child(6) .event-card-link .event-content {
        padding: 30px 35px;
    }

    .gd-places-grid .color-blue .gd-place-content h3.gd-place-title,
    .gd-places-grid .color-red .gd-place-content h3.gd-place-title {
        font-size: 2.5rem !important;
        line-height: 1 !important;
    }
}




@media (max-width: 767px) {
    .custom-events-wrapper.events-magazine {
        grid-template-columns: 1fr;
    }

    /* 6th card mobile: stack vertically, content above image */
    .event-card:nth-child(6) .event-card-link {
        display: flex !important;
        flex-direction: column;
        min-height: auto;
    }

    .event-card:nth-child(6) .event-card-link .event-image,
    .event-card:nth-child(6) .event-card-link .event-content {
        width: 100% !important;
        order: unset !important;
    }

    .event-card:nth-child(6) .event-card-link .event-image {
        order: 2 !important;
        min-height: 240px;
    }

    .event-card:nth-child(6) .event-card-link .event-content {
        order: 1 !important;
        padding: 25px 20px !important;
        text-align: right;
    }

    .event-card:nth-child(6) .event-content .event-title {
        font-size: 2rem !important;
        line-height: 1 !important;
    }

    .gd-places-grid .color-blue .gd-place-content h3.gd-place-title,
    .gd-places-grid .color-red .gd-place-content h3.gd-place-title {
        font-size: 2rem !important;
        line-height: 1 !important;
    }

    .gd-places-grid {
        grid-template-columns: 1fr;
    }

    .gd-places-grid .gd-place-card {
        grid-column: auto !important;
        grid-row: auto !important;
        display: block;
    }

    .gd-places-grid .gd-place-card:nth-child(1),
    .gd-places-grid .gd-place-card:nth-child(5) a {
        display: block;
    }

    .gd-places-grid .gd-place-card:nth-child(1) .gd-place-image,
    .gd-places-grid .gd-place-card:nth-child(5) .gd-place-image {
        width: 100%;
    }

    .gd-places-grid .gd-place-card:nth-child(1) .gd-place-content,
    .gd-places-grid .gd-place-card:nth-child(5) .gd-place-content {
        width: 100%;
        padding: 20px;
    }

    .search-card-wrapper {
        display: block;
    }

    .search-card-wrapper .search-card-image,
    .search-card-wrapper .search-card-content {
        width: 100%;
    }

    .gd-places-grid .gd-place-card:nth-child(1) a {
        display: block;
    }



    /* Mobile menu css start */
    .ct-mobile-logo-row img {
        width: 60%;
    }

    /* Logo + Close on same line */
    .ct-mobile-menu-inner {
        padding: 30px 25px;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .ct-mobile-logo-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        text-align: center;
    }

    /* Overlay */
    .ct-mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #f05a00;
        z-index: 99999;
        transform: translateX(-100%);
        transition: transform 0.35s ease;
        overflow-y: auto;
    }

    .ct-mobile-menu-overlay.active {
        transform: translateX(0);
    }

    /* Inner */
    .ct-mobile-menu-inner {
        padding: 30px 25px;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    /* Close Button */
    .ct-mobile-menu-close {
        align-self: flex-end;
        background: none;
        border: none;
        color: #dacbc5;
        font-size: 22px;
        cursor: pointer;
        margin-bottom: 20px;
    }

    /* Advertise Button */
    .ct-menu-btn {
        display: inline-block;
        border: 1px solid #dacbc5;
        color: #dacbc5;
        padding: 6px 18px;
        border-radius: 10px;
        font-size: 1.15rem;
        letter-spacing: 1px;
        text-decoration: none;
        width: fit-content;
    }

    /* Search */
    .ct-menu-search input {
        width: 60% !important;
        padding: 10px 16px;
        border: 1px solid #dacbc5 !important;
        border-radius: 10px !important;
        background: transparent;
        color: #dacbc5 !important;
        font-size: 1.15rem;
        letter-spacing: 1px;
        outline: none;
        box-sizing: border-box;
    }

    .ct-menu-search input::placeholder {
        color: #dacbc5;
    }

    /* Nav Links */
    .ct-mobile-nav {
        display: flex;
        flex-direction: column;
        gap: 18px;
        margin-top: 10px;
    }

    .ct-mobile-nav a {
        color: #dacbc5;
        text-decoration: none;
        font-size: 1.2rem;
        letter-spacing: 1.5px;
    }

    .ct-mobile-nav a:hover,
    .ct-mobile-nav a:active {
        opacity: 0.75;
        color: #fff;
    }

    .ct-menu-search input {
        text-transform: uppercase !important;
    }

    .search-form .search-submit {
        color: #dacbc5 !important;
    }

    .ct-mobile-nav .active {
        color: #fff;
    }

    /* Mobile menu css end */
}


@media (max-width: 1024px) and (min-width: 768px) {
    .gd-places-grid {
        grid-template-columns: 1fr 1fr;
    }

    .gd-places-grid .gd-place-card:nth-child(1) {
        grid-column: 1 / 3;
    }

    .gd-places-grid .gd-place-card:nth-child(2) {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .gd-places-grid .gd-place-card:nth-child(3),
    .gd-places-grid .gd-place-card:nth-child(4) {
        grid-column: auto;
    }

    .gd-places-grid .gd-place-card:nth-child(5) {
        grid-column: 1 / 3;
    }
}

/* Events */

@media (min-width: 769px) and (max-width: 1024px) {

    .page-template-template-event .ctcontainer .accordion-header,
    .page-template-template-event .ctcontainer .accordion-header.business,
    .page-template-template-event-php .ctcontainer .accordion-header,
    .page-template-template-event-php .ctcontainer .accordion-header.business {
        grid-template-columns: max-content max-content minmax(0, 1fr) 150px 24px;
        grid-template-areas: "date category event image arrow";
        gap: 16px;
        align-items: center;
        padding: 14px 20px;
    }

    .page-template-template-event .ctcontainer .date,
    .page-template-template-event-php .ctcontainer .date {
        grid-area: date;
        font-size: 1rem;
        text-align: left;
        white-space: nowrap;
    }

    .page-template-template-event .ctcontainer .category,
    .page-template-template-event-php .ctcontainer .category {
        grid-area: category;
        width: max-content;
        white-space: nowrap;
        font-size: 0.95rem;
        padding: 5px 20px;
        border-radius: 999px;
        text-align: center;
    }

    .page-template-template-event .ctcontainer .event-name,
    .page-template-template-event-php .ctcontainer .event-name {
        grid-area: event;
        font-size: 1rem;
        line-height: 1.1;
        max-width: 240px;
    }

    .page-template-template-event .ctcontainer .event-image,
    .page-template-template-event-php .ctcontainer .event-image {
        grid-area: image;
        width: 150px;
        height: 110px;
        border-radius: 16px;
        justify-self: end;
        display: block;
    }

    .page-template-template-event .ctcontainer .arrow,
    .page-template-template-event-php .ctcontainer .arrow {
        grid-area: arrow;
        justify-self: center;
        font-size: 1rem;
        display: block;
    }

    .page-template-template-event .ctcontainer .location,
    .page-template-template-event-php .ctcontainer .location {
        display: none;
    }

    .page-template-template-business .ctcontainer .accordion-header,
    .page-template-template-business .ctcontainer .accordion-header.business,
    .page-template-template-business-php .ctcontainer .accordion-header,
    .page-template-template-business-php .ctcontainer .accordion-header.business {
        grid-template-columns: max-content minmax(0, 1fr) 130px;
        grid-template-areas: "category event image";
        gap: 16px;
        align-items: center;
        padding: 14px 20px;
    }

    .page-template-template-business .ctcontainer .event-name,
    .page-template-template-business-php .ctcontainer .event-name {
        grid-area: event;
        font-size: 1rem;
        line-height: 1.05;
        align-self: center;
        max-width: 100%;
    }

    .page-template-template-business .ctcontainer .category,
    .page-template-template-business-php .ctcontainer .category {
        grid-area: category;
        width: max-content;
        max-width: 100%;
        white-space: nowrap;
        font-size: 0.75rem;
        padding: 5px 16px;
        border-radius: 999px;
        text-align: center;
        align-self: center;
    }

    .page-template-template-business .ctcontainer .event-image,
    .page-template-template-business-php .ctcontainer .event-image {
        grid-area: image;
        width: 130px;
        height: 96px;
        border-radius: 14px;
        justify-self: end;
        display: block;
    }

    .page-template-template-business .ctcontainer .date,
    .page-template-template-business .ctcontainer .location,
    .page-template-template-business .ctcontainer .arrow,
    .page-template-template-business-php .ctcontainer .date,
    .page-template-template-business-php .ctcontainer .location,
    .page-template-template-business-php .ctcontainer .arrow {
        display: none;
    }
}

@media (max-width: 991px) {
    .ctcontainer {
        margin: 1rem;
    }

    .ctcontainer .accordion-header,
    .ctcontainer .accordion-header.business {
        grid-template-columns: 1fr 140px 24px;
        grid-template-areas:
            "date image arrow"
            "category image arrow"
            "event image arrow"
            "location image arrow";
        gap: 10px 12px;
        padding: 15px;
    }

    .ctcontainer .date {
        grid-area: date;
        font-size: 0.625rem;
        text-align: left;
    }

    .ctcontainer .category {
        grid-area: category;
        font-size: 0.5625rem;
        padding: 3px 8px;
    }

    .ctcontainer .event-name {
        grid-area: event;
        font-size: 0.75rem;
    }

    .ctcontainer .location {
        grid-area: location;
        font-size: 0.625rem;
    }

    .ctcontainer .event-image {
        grid-area: image;
        width: 130px;
        height: 90px;
    }

    .ctcontainer .arrow {
        grid-area: arrow;
        font-size: 0.875rem;
    }

    .ctcontainer .accordion-item.active .accordion-content {
        padding: 0 12px 12px;
    }

    .ctcontainer .content-inner {
        grid-template-columns: 1fr;
        border-radius: 14px;
    }

    .ctcontainer .event-detail-media,
    .ctcontainer .event-detail-image {
        min-height: 250px;
    }

    .ctcontainer .event-detail-body {
        padding: 16px 0;
    }

    .ctcontainer .event-detail-title {
        font-size: 2.375rem;
        line-height: 0.95;
        margin-bottom: 12px;
    }

    .ctcontainer .event-detail-description p {
        font-size: 0.875rem;
        margin-bottom: 12px;
    }

    .ctcontainer .event-detail-address__heading {
        font-size: 1.5rem;
    }

    .ctcontainer .event-detail-address__line {
        font-size: 1.125rem;
    }

    .ctcontainer .event-detail-footer {
        gap: 10px;
    }

    .ctcontainer .event-detail-meta,
    .ctcontainer .event-read-more {
        font-size: 0.6875rem;
    }

    .geodir-page-cpt-gd_event .wp-block-geodirectory-geodir-widget-post-content {
        margin-top: 8px;
    }

    .single-gd_event .wp-block-geodirectory-geodir-widget-single-taxonomies .geodir_post_taxomomies {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .single-gd_event .wp-block-geodirectory-geodir-widget-single-taxonomies .geodir_post_taxomomies a {
        margin-bottom: 5px;
    }

}

@media (max-width: 768px) {
    .ctcontainer .no-filter-results {
        /* border-radius: 12px; */
        font-size: 0.8125rem;
        margin: 12px 0 16px;
        /* min-height: 52px; */
        /* padding: 12px 14px; */
    }

    .ctcontainer .event-filters--category {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-color: #FC6208 transparent;
        scrollbar-width: thin;
        padding-bottom: 8px;
    }

    .ctcontainer .event-filters--category .event-filter-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .page-template-template-event .ctcontainer .event-filters--category::-webkit-scrollbar,
    .page-template-template-event-php .ctcontainer .event-filters--category::-webkit-scrollbar,
    .page-template-template-business .ctcontainer .event-filters--category::-webkit-scrollbar,
    .page-template-template-business-php .ctcontainer .event-filters--category::-webkit-scrollbar {
        height: 1px;
    }

    .page-template-template-event .ctcontainer .event-filters--category::-webkit-scrollbar-track,
    .page-template-template-event-php .ctcontainer .event-filters--category::-webkit-scrollbar-track,
    .page-template-template-business .ctcontainer .event-filters--category::-webkit-scrollbar-track,
    .page-template-template-business-php .ctcontainer .event-filters--category::-webkit-scrollbar-track {
        background: transparent;
        margin-right: 80px;
    }

    .page-template-template-event .ctcontainer .event-filters--category::-webkit-scrollbar-thumb,
    .page-template-template-event-php .ctcontainer .event-filters--category::-webkit-scrollbar-thumb,
    .page-template-template-business .ctcontainer .event-filters--category::-webkit-scrollbar-thumb,
    .page-template-template-business-php .ctcontainer .event-filters--category::-webkit-scrollbar-thumb {
        background-color: #fc6208;
        border-radius: 999px;
    }

    .ctcontainer .event-filters--location .event-dropdown-menu {
        max-width: calc(100vw - 24px);
    }

    .ctcontainer .event-filters--location .event-dropdown--date {
        position: relative;
    }

    .ctcontainer .event-filters--location .event-dropdown--friendly {
        position: relative;
    }

    .ctcontainer .event-filters--location .event-dropdown--date .event-dropdown-menu--date {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        position: fixed;
        top: var(--event-date-top, 120px);
        width: min(340px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
        z-index: 30;
    }

    .ctcontainer .event-filters--location .event-dropdown--friendly .event-dropdown-menu {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        position: fixed;
        top: var(--event-friendly-top, 120px);
        width: min(320px, calc(100vw - 24px));
        max-width: calc(100vw - 24px);
        z-index: 30;
    }

    .ctcontainer .event-filters--location .event-dropdown--date .event-date-calendar {
        gap: 8px;
    }

    .ctcontainer .event-filters--location .event-dropdown--date .event-calendar-weekdays,
    .ctcontainer .event-filters--location .event-dropdown--date .event-calendar-grid {
        gap: 4px;
    }

    .ctcontainer .event-filters--location .event-dropdown--date .event-calendar-day {
        font-size: 0.9rem;
        min-height: 30px;
    }

    .ctcontainer .accordion-header,
    .ctcontainer .accordion-header.business {
        grid-template-columns: 1fr 20px;
        grid-template-areas:
            "date arrow"
            "category arrow"
            "event arrow"
            "location arrow";
        gap: 8px 10px;
    }

    .ctcontainer .event-image {
        display: none;
    }

    .ctcontainer .date,
    .ctcontainer .event-name,
    .ctcontainer .location {
        width: 100%;
    }

    .ctcontainer .date.is-range {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ctcontainer .date.is-range .date-line {
        display: inline;
    }

    .ctcontainer .date.is-range .date-to {
        margin: 0 6px;
    }

    .ctcontainer .category {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .page-template-template-event .ctcontainer .accordion-header,
    .page-template-template-event .ctcontainer .accordion-header.business,
    .page-template-template-event-php .ctcontainer .accordion-header,
    .page-template-template-event-php .ctcontainer .accordion-header.business {
        grid-template-columns: 58px minmax(0, 1fr) 96px;
        grid-template-areas:
            "date event image"
            "date category image";
        gap: 8px 12px;
        align-items: center;
        padding: 14px 16px;
    }

    .page-template-template-event .ctcontainer .date,
    .page-template-template-event-php .ctcontainer .date {
        grid-area: date;
        font-size: 0.95rem;
        line-height: 1;
        align-self: start;
        text-align: left;
        white-space: nowrap;
    }

    .page-template-template-event .ctcontainer .event-name,
    .page-template-template-event-php .ctcontainer .event-name {
        grid-area: event;
        font-size: 1rem;
        line-height: 1.05;
        align-self: flex-start;
    }

    .page-template-template-event .ctcontainer .category,
    .page-template-template-event-php .ctcontainer .category {
        grid-area: category;
        width: max-content;
        max-width: 100%;
        font-size: 0.7rem;
        padding: 4px 12px;
        text-align: center;
        align-self: flex-start;
    }

    .page-template-template-event .ctcontainer .event-image,
    .page-template-template-event-php .ctcontainer .event-image {
        display: block;
        grid-area: image;
        width: 96px;
        height: 72px;
        border-radius: 10px;
        justify-self: end;
    }

    .page-template-template-event .ctcontainer .location,
    .page-template-template-event .ctcontainer .arrow,
    .page-template-template-event-php .ctcontainer .location,
    .page-template-template-event-php .ctcontainer .arrow {
        display: none;
    }

    .page-template-template-business .ctcontainer .accordion-header,
    .page-template-template-business .ctcontainer .accordion-header.business,
    .page-template-template-business-php .ctcontainer .accordion-header,
    .page-template-template-business-php .ctcontainer .accordion-header.business {
        grid-template-columns: minmax(0, 1fr) 96px;
        grid-template-areas:
            "event image"
            "category image";
        gap: 8px 12px;
        align-items: center;
        padding: 14px 16px;
    }

    .page-template-template-business .ctcontainer .event-name,
    .page-template-template-business-php .ctcontainer .event-name {
        grid-area: event;
        font-size: 1rem;
        line-height: 1.05;
        align-self: flex-start;
    }

    .page-template-template-business .ctcontainer .category,
    .page-template-template-business-php .ctcontainer .category {
        grid-area: category;
        width: max-content;
        max-width: 100%;
        font-size: 0.7rem;
        padding: 4px 12px;
        text-align: center;
        align-self: flex-start;
    }

    .page-template-template-business .ctcontainer .event-image,
    .page-template-template-business-php .ctcontainer .event-image {
        display: block;
        grid-area: image;
        width: 96px;
        height: 72px;
        border-radius: 10px;
        justify-self: end;
    }

    .page-template-template-business .ctcontainer .date,
    .page-template-template-business .ctcontainer .location,
    .page-template-template-business .ctcontainer .arrow,
    .page-template-template-business-php .ctcontainer .date,
    .page-template-template-business-php .ctcontainer .location,
    .page-template-template-business-php .ctcontainer .arrow {
        display: none;
    }
}

@media (max-width: 480px) {
    .ctcontainer .event-filters--location .event-dropdown--date .event-dropdown-menu--date {
        width: min(320px, calc(100vw - 20px));
        max-width: calc(100vw - 20px);
    }

    .ctcontainer .event-filters--location .event-dropdown--friendly .event-dropdown-menu {
        width: min(300px, calc(100vw - 20px));
        max-width: calc(100vw - 20px);
    }

    .ctcontainer .event-filters--location .event-dropdown--date .event-calendar-title {
        font-size: 0.75rem;
    }

    .ctcontainer .event-filters--location .event-dropdown--date .event-calendar-weekdays span {
        font-size: 0.55rem;
    }

    .ctcontainer .accordion-header {
        padding: 10px;
    }

    .page-template-template-event .ctcontainer .accordion-header,
    .page-template-template-event .ctcontainer .accordion-header.business,
    .page-template-template-event-php .ctcontainer .accordion-header,
    .page-template-template-event-php .ctcontainer .accordion-header.business {
        grid-template-columns: 50px minmax(0, 1fr) 82px;
        gap: 8px 10px;
        padding: 12px;
    }

    .page-template-template-event .ctcontainer .event-image,
    .page-template-template-event-php .ctcontainer .event-image {
        width: 82px;
        height: 62px;
    }

    .page-template-template-business .ctcontainer .accordion-header,
    .page-template-template-business .ctcontainer .accordion-header.business,
    .page-template-template-business-php .ctcontainer .accordion-header,
    .page-template-template-business-php .ctcontainer .accordion-header.business {
        grid-template-columns: minmax(0, 1fr) 82px;
        gap: 8px 10px;
        padding: 12px;
    }

    .page-template-template-business .ctcontainer .event-image,
    .page-template-template-business-php .ctcontainer .event-image {
        width: 82px;
        height: 62px;
    }

    .ctcontainer .event-detail-title {
        font-size: 1.875rem;
    }

    .gform_wrapper.gravity-theme .gfield:not(.gfield--width-full) {
        grid-column: 1 / -1 !important;
    }

}

@media (max-width: 1024px) and (min-width: 768px) {
    .mg-top {
        margin-top: 0 !important;
    }

    .mg-left {
        margin-left: 0 !important;
    }

    .mg-right {
        margin-right: 0 !important;
    }

    .custom-events-wrapper.events-magazine {
        margin-bottom: 0 !important;
        padding: 15px 25px 0 25px;
    }

    .event-card-last,
    .place-card-last {
        margin-left: -25px !important;
        margin-right: -25px !important;
    }

    .gd-places-grid {
        margin-bottom: 0 !important;
        padding: 15px 25px 0 25px;
    }
}

@media (max-width: 768px) {
    .mg-top {
        margin-top: 0 !important;
    }

    .mg-left {
        margin-left: 0 !important;
    }

    .mg-right {
        margin-right: 0 !important;
    }

    .event-card-first,
    .place-card-first {
        margin-top: 15px !important;
    }


    .custom-events-wrapper.events-magazine .event-box,
    .gd-places-grid .event-box {
        margin-left: 25px !important;
        margin-right: 25px !important;
    }
}

@media (max-width: 768px) and (min-width: 642px) {

    .lbf_field_style_select select,
    .se_field_style_select select {
        min-height: 40px !important;
    }
}

@media (max-width: 642px) {

    .lbf_field_style_select select,
    .se_field_style_select select {
        min-height: 50px !important;
    }
}

/* Events */