/*
 * MAK - Location Page Builder
 * Front-end + Elementor editor styles
 * Version 1.0.1
 */

.mak-lpb,
.mak-lpb * {
    box-sizing: border-box;
}

.mak-lpb {
    --mak-primary: #0D2B5C;
    --mak-accent: #1478D4;
    --mak-text: #18345F;
    --mak-muted: #5E7190;
    --mak-grid-columns: 2;
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    padding: 24px;
    color: var(--mak-text);
    background: #F5FAFF;
    font-family: inherit;
}

.mak-lpb img,
.mak-lpb iframe,
.mak-lpb svg {
    display: block;
    max-width: 100%;
}

.mak-lpb a {
    text-decoration: none;
}

.mak-lpb-inner {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ---------- Header / intro ---------- */
.mak-lpb-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr);
    align-items: center;
    gap: clamp(28px, 4vw, 70px);
    width: 100%;
    overflow: hidden;
    padding: 34px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--mak-primary) 6%, transparent);
}

.mak-lpb-header-copy,
.mak-lpb-global-copy,
.mak-lpb-card-content {
    min-width: 0;
}

.mak-lpb-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    color: var(--mak-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .24em;
    line-height: 1.3;
    text-transform: uppercase;
}

.mak-lpb-eyebrow::after {
    content: "";
    width: 38px;
    height: 1px;
    background: currentColor;
    opacity: .65;
}

.mak-lpb-header-title,
.mak-lpb-global-title,
.mak-lpb-card-title {
    margin: 0;
    color: var(--mak-primary);
    overflow-wrap: anywhere;
}

.mak-lpb-header-title {
    font-size: clamp(32px, 4vw, 58px);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -.035em;
}

.mak-lpb-header-description,
.mak-lpb-global-description {
    margin-top: 16px;
    color: var(--mak-muted);
    font-size: 16px;
    line-height: 1.65;
}

.mak-lpb-header-description > :first-child,
.mak-lpb-global-description > :first-child {
    margin-top: 0;
}

.mak-lpb-header-description > :last-child,
.mak-lpb-global-description > :last-child {
    margin-bottom: 0;
}

.mak-lpb-header-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
}

.mak-lpb-header-stat {
    min-width: 0;
    position: relative;
    padding: 12px 22px;
    text-align: center;
}

.mak-lpb-header-stat + .mak-lpb-header-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8%;
    bottom: 8%;
    width: 1px;
    background: color-mix(in srgb, var(--mak-accent) 22%, transparent);
}

.mak-lpb-stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--mak-primary);
    background: color-mix(in srgb, var(--mak-accent) 9%, transparent);
}

.mak-lpb-stat-icon svg,
.mak-lpb-info-icon svg,
.mak-lpb-button-icon svg,
.mak-lpb-metric-icon svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.mak-lpb-stat-icon svg {
    width: 26px;
    height: 26px;
}

.mak-lpb-header-stat-title {
    color: var(--mak-primary);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.mak-lpb-header-stat-subtitle {
    margin-top: 4px;
    color: var(--mak-muted);
    font-size: 13px;
    line-height: 1.35;
}

/* ---------- Location list / cards ---------- */
.mak-lpb-locations {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    min-width: 0;
}

.mak-lpb-location-card {
    width: 100%;
    min-width: 0;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #E1EBF5;
    box-shadow: 0 7px 22px color-mix(in srgb, var(--mak-primary) 6%, transparent);
}

.mak-lpb-map {
    width: 100%;
    min-width: 0;
    min-height: 330px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #EAF2F9;
}

.mak-lpb-map iframe {
    width: 100%;
    height: 100%;
    min-height: inherit;
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: 10px;
    background: #EAF2F9;
}

.mak-lpb-map-placeholder {
    min-height: inherit;
    width: 100%;
    padding: 28px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--mak-muted);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--mak-accent) 4%, transparent) 25%, transparent 25%) 0 0 / 24px 24px,
        linear-gradient(315deg, color-mix(in srgb, var(--mak-accent) 4%, transparent) 25%, transparent 25%) 0 0 / 24px 24px,
        #F5FAFF;
}

.mak-lpb-card-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 30px;
}

.mak-lpb-badge-wrap {
    width: 100%;
    margin: 0 0 14px;
}

.mak-lpb-badge {
    display: inline-flex;
    max-width: 100%;
    padding: 7px 17px;
    margin: 0;
    border-radius: 999px;
    color: #0D5EAA;
    background: #E4F2FF;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.mak-lpb-card-title {
    font-size: clamp(22px, 2.1vw, 34px);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -.02em;
}

.mak-lpb-info-row {
    width: 100%;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
    gap: 13px;
    margin-top: 14px;
    line-height: 1.55;
}

.mak-lpb-meta {
    color: #1F3D68;
    font-size: 15px;
    font-weight: 500;
}

.mak-lpb-address {
    color: #627592;
    font-size: 15px;
}

.mak-lpb-info-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: #0879D3;
    font-size: 20px;
    margin-top: 1px;
}

.mak-lpb-info-icon svg {
    width: 20px;
    height: 20px;
}

.mak-lpb-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: 13px;
    color: var(--mak-primary);
    font-size: 14px;
    line-height: 1.3;
}

.mak-lpb-star {
    color: #F4A000;
    font-size: 19px;
    line-height: 1;
}

.mak-lpb-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 22px;
}

.mak-lpb-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 30px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
    white-space: nowrap;
}

.mak-lpb-button:hover,
.mak-lpb-button:focus-visible {
    transform: translateY(-1px);
}

.mak-lpb-button:focus-visible {
    outline: 2px solid var(--mak-accent);
    outline-offset: 2px;
}

.mak-lpb-button-primary {
    color: #fff;
    background: #075EB4;
    box-shadow: 0 7px 16px color-mix(in srgb, #075EB4 16%, transparent);
}

.mak-lpb-button-secondary {
    color: #0D5EAA;
    background: #fff;
    border-color: #77B5F2;
}

.mak-lpb-button-icon {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    flex: 0 0 18px;
}

.mak-lpb-button-icon svg {
    width: 17px;
    height: 17px;
}

.mak-lpb-arrow {
    font-size: 18px;
    line-height: 1;
    transition: transform .2s ease;
}

.mak-lpb-button:hover .mak-lpb-arrow {
    transform: translateX(2px);
}

/* ---------- Design 1: Premium alternating ---------- */
.mak-lpb-design-1 .mak-lpb-location-card,
.mak-lpb-design-3 .mak-lpb-location-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
}

.mak-lpb-design-1 .mak-lpb-location-card {
    grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr);
}

.mak-lpb-design-1 .mak-lpb-location-card.mak-map-left > .mak-lpb-map,
.mak-lpb-design-3 .mak-lpb-location-card.mak-map-left > .mak-lpb-map {
    order: 1;
}

.mak-lpb-design-1 .mak-lpb-location-card.mak-map-left > .mak-lpb-card-content,
.mak-lpb-design-3 .mak-lpb-location-card.mak-map-left > .mak-lpb-card-content {
    order: 2;
}

.mak-lpb-design-1 .mak-lpb-location-card.mak-map-right > .mak-lpb-map,
.mak-lpb-design-3 .mak-lpb-location-card.mak-map-right > .mak-lpb-map {
    order: 2;
}

.mak-lpb-design-1 .mak-lpb-location-card.mak-map-right > .mak-lpb-card-content,
.mak-lpb-design-3 .mak-lpb-location-card.mak-map-right > .mak-lpb-card-content {
    order: 1;
}

/* Auto alternating: first card = text left / map right, second = map left / text right. */
.mak-lpb-design-1 .mak-lpb-location-card.mak-map-auto:nth-child(odd) > .mak-lpb-map,
.mak-lpb-design-3 .mak-lpb-location-card.mak-map-auto:nth-child(odd) > .mak-lpb-map {
    order: 2;
}

.mak-lpb-design-1 .mak-lpb-location-card.mak-map-auto:nth-child(odd) > .mak-lpb-card-content,
.mak-lpb-design-3 .mak-lpb-location-card.mak-map-auto:nth-child(odd) > .mak-lpb-card-content {
    order: 1;
}

.mak-lpb-design-1 .mak-lpb-location-card.mak-map-auto:nth-child(even) > .mak-lpb-map,
.mak-lpb-design-3 .mak-lpb-location-card.mak-map-auto:nth-child(even) > .mak-lpb-map {
    order: 1;
}

.mak-lpb-design-1 .mak-lpb-location-card.mak-map-auto:nth-child(even) > .mak-lpb-card-content,
.mak-lpb-design-3 .mak-lpb-location-card.mak-map-auto:nth-child(even) > .mak-lpb-card-content {
    order: 2;
}

.mak-lpb-design-1 .mak-lpb-location-card {
    box-shadow: 0 10px 30px color-mix(in srgb, var(--mak-primary) 8%, transparent);
}

.mak-lpb-design-1 .mak-lpb-card-content {
    min-height: 330px;
}

/* ---------- Design 2: two/three-column map cards ---------- */
.mak-lpb-design-2 .mak-lpb-locations {
    display: grid;
    grid-template-columns: repeat(var(--mak-grid-columns), minmax(0, 1fr));
    align-items: stretch;
}

.mak-lpb-design-2 .mak-lpb-location-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.mak-lpb-design-2 .mak-lpb-map {
    order: 1;
    min-height: 265px;
}

.mak-lpb-design-2 .mak-lpb-card-content {
    order: 2;
    flex: 1 1 auto;
    justify-content: flex-start;
}

.mak-lpb-design-2 .mak-lpb-card-title {
    font-size: clamp(21px, 1.9vw, 29px);
}

/* ---------- Design 3: clean alternating ---------- */
.mak-lpb-design-3 .mak-lpb-header {
    background: transparent;
    border-color: transparent;
}

.mak-lpb-design-3 .mak-lpb-location-card {
    box-shadow: 0 5px 18px color-mix(in srgb, var(--mak-primary) 5%, transparent);
}

.mak-lpb-design-3 .mak-lpb-card-content {
    min-height: 300px;
}

/* ---------- Global presence ---------- */
.mak-lpb-global {
    width: 100%;
    min-width: 0;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(260px, .9fr) minmax(480px, 1.5fr) auto;
    align-items: center;
    gap: clamp(24px, 4vw, 66px);
    padding: 34px;
    border-radius: 16px;
    background-color: #F6FBFF;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border: 1px solid color-mix(in srgb, var(--mak-primary) 5%, transparent);
}

.mak-lpb-global-title {
    font-size: clamp(30px, 3.4vw, 50px);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -.03em;
}

.mak-lpb-metrics {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
}

.mak-lpb-metric {
    min-width: 0;
    position: relative;
    padding: 8px 18px;
    text-align: center;
    color: var(--mak-primary);
}

.mak-lpb-metric + .mak-lpb-metric::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: color-mix(in srgb, var(--mak-accent) 25%, transparent);
}

.mak-lpb-metric-icon {
    width: 34px;
    height: 34px;
    margin: 0 auto 7px;
    color: var(--mak-accent);
    display: grid;
    place-items: center;
}

.mak-lpb-metric-icon svg {
    width: 30px;
    height: 30px;
}

.mak-lpb-metric-value {
    color: inherit;
    font-size: 27px;
    font-weight: 800;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.mak-lpb-metric-label {
    margin-top: 5px;
    color: inherit;
    font-size: 12px;
    line-height: 1.25;
}

.mak-lpb-global-image-wrap {
    align-self: stretch;
    width: clamp(150px, 18vw, 310px);
    min-height: 180px;
    overflow: hidden;
}

.mak-lpb-global-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
    .mak-lpb {
        padding: 20px 18px;
    }

    .mak-lpb-map {
        min-height: 280px;
    }

    .mak-lpb-header {
        grid-template-columns: 1fr;
    }

    .mak-lpb-header-stats {
        max-width: 760px;
    }

    .mak-lpb-design-1 .mak-lpb-location-card,
    .mak-lpb-design-3 .mak-lpb-location-card {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .mak-lpb-global {
        grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
    }

    .mak-lpb-global-image-wrap {
        display: none;
    }

    .mak-lpb-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 24px;
    }

    .mak-lpb-metric:nth-child(3)::before {
        display: none;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    .mak-lpb {
        overflow: visible;
        padding: 14px 12px;
    }

    .mak-lpb-header,
    .mak-lpb-global {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .mak-lpb-header-title {
        font-size: clamp(29px, 10vw, 42px);
    }

    .mak-lpb-header-stats {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .mak-lpb-header-stat {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 13px;
        padding: 12px 0;
        text-align: left;
    }

    .mak-lpb-header-stat + .mak-lpb-header-stat::before {
        top: 0;
        left: 0;
        right: 0;
        bottom: auto;
        width: auto;
        height: 1px;
    }

    .mak-lpb-stat-icon {
        grid-row: 1 / span 2;
        width: 42px;
        height: 42px;
        margin: 0;
    }

    .mak-lpb-design-1 .mak-lpb-location-card,
    .mak-lpb-design-2 .mak-lpb-location-card,
    .mak-lpb-design-3 .mak-lpb-location-card {
        display: flex;
        flex-direction: column;
    }

    .mak-lpb-design-2 .mak-lpb-locations {
        --mak-grid-columns: 1;
    }

    /* Default when map-first switch is OFF: content first. */
    .mak-lpb-location-card > .mak-lpb-card-content {
        order: 1 !important;
    }

    .mak-lpb-location-card > .mak-lpb-map {
        order: 2 !important;
        min-height: 235px;
    }

    /* Elementor prefix_class generated when the switch is ON. */
    .mak-lpb-mobile-map-first-yes .mak-lpb-location-card > .mak-lpb-map {
        order: 1 !important;
    }

    .mak-lpb-mobile-map-first-yes .mak-lpb-location-card > .mak-lpb-card-content {
        order: 2 !important;
    }

    .mak-lpb-card-content {
        min-height: 0 !important;
    }

    .mak-lpb-actions {
        gap: 10px;
    }

    .mak-lpb-button {
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }

    .mak-lpb-mobile-buttons-yes .mak-lpb-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .mak-lpb-mobile-buttons-yes .mak-lpb-button {
        width: 100%;
    }

    .mak-lpb-hide-header-stats-mobile-yes .mak-lpb-header-stats {
        display: none !important;
    }

    .mak-lpb-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 22px;
    }

    .mak-lpb-metric {
        padding: 6px 12px;
    }

    .mak-lpb-metric:nth-child(3)::before {
        display: none;
    }

    .mak-lpb-global-image-wrap {
        display: block;
        width: 100%;
        min-height: 180px;
        max-height: 260px;
    }
}

@media (max-width: 420px) {
    .mak-lpb-metrics {
        grid-template-columns: 1fr;
    }

    .mak-lpb-metric + .mak-lpb-metric::before,
    .mak-lpb-metric:nth-child(3)::before {
        display: block;
        top: 0;
        left: 18%;
        right: 18%;
        bottom: auto;
        width: auto;
        height: 1px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mak-lpb-button,
    .mak-lpb-arrow {
        transition: none;
    }
}
