:root {
    --amp-accent: #e91e63;
    --amp-accent-soft: #fdc700;
    --amp-pill-border: #633960;
    --amp-hero-start: #112b64;
    --amp-card-bg: #ffffff;
    --amp-text-dark: #101828;
    --amp-text-grey: #4a5565;
    --amp-text-muted: #6a7282;
    --amp-text-body: #364153;
    --amp-filter-bg: #f3f4f6;
    --amp-rating-bg: #00a63e;
    --amp-rating-border: #ffe6c7;
    --amp-stat-label: #fbeaac;
    --amp-border-light: #e5e7eb;
}

/* ---------- Page wrapper ---------- */
.amp-page {
    background: #fff;
    max-width: 100%;
}

.amp-shell {
    max-width: 100%;
    margin: 0 auto;
}

/* ---------- Hero ---------- */
.amp-hero {
    background: linear-gradient(178.65deg, var(--amp-hero-start) 17.7%, var(--amp-accent) 97.1%);
    padding: 62px 10px 15px;
    color: #fff;
}

.amp-hero__inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.amp-hero__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    background-image: linear-gradient(90deg, var(--amp-accent-soft) 0%, var(--amp-accent) 100%);
    border: 1px solid var(--amp-pill-border);
    border-radius: 37px;
    padding: 8px 17px;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.amp-hero__pill em {
    font-style: italic;
    font-weight: 600;
    margin-left: 4px;
}

.amp-hero__tagline {
    font-size: 20px;
    line-height: 1.2;
    font-style: italic;
    font-weight: 200;
    color: #fff;
    margin: 0;
}

.amp-stats {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-top: 4px;
}

.amp-stats__cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 5px 6px;
}

.amp-stats__num {
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
    color: #fff;
}

.amp-stats__lbl {
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.2;
    color: var(--amp-stat-label);
    text-transform: uppercase;
}

/* ---------- Body ---------- */
.amp-body {
    background: #fff;
    padding: 10px 16px 24px;
}

.amp-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0;
}

.amp-section-title__left {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.amp-section-title__left::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 25px;
    border-radius: 2px;
    background: var(--amp-accent);
}

.amp-section-title__text {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    line-height: 1.4;
}

.amp-filter-btn {
    width: 27px;
    height: 27px;
    border: 0;
    background: transparent;
    color: var(--amp-text-dark);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
}

.amp-filter-btn:hover,
.amp-filter-btn:focus {
    color: var(--amp-accent);
    outline: none;
}

/* ---------- City filter pills ---------- */
.amp-city-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 0 8px;
    margin: 0 -16px 12px;
    padding-left: 16px;
    padding-right: 16px;
}

.amp-city-pills::-webkit-scrollbar {
    display: none;
}

.amp-city-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    background: var(--amp-filter-bg);
    color: var(--amp-text-body);
    border: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.amp-city-pill__count {
    color: var(--amp-text-muted);
    font-size: 12px;
    font-weight: 500;
}

.amp-city-pill.is-active {
    background: var(--amp-accent);
    color: #fff;
}

.amp-city-pill.is-active .amp-city-pill__count {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 700;
}

/* ---------- Agency grid ---------- */
.amp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 10px 0;
}

.amp-card {
    position: relative;
    background: var(--amp-card-bg);
    border: 1px solid var(--amp-accent);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.amp-card--highlight {
    box-shadow: 0 1px 9px 2px rgba(233, 30, 99, 0.18), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
}

.amp-card:hover,
.amp-card:focus {
    text-decoration: none;
    color: inherit;
    transform: translateY(-1px);
    transition: transform 0.15s ease;
}

.amp-card__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
}

.amp-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.amp-card__rating {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 18px;
    padding: 0 6px;
    background: var(--amp-rating-bg);
    border: 1px solid var(--amp-rating-border);
    border-radius: 13px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.amp-card__rating i {
    font-size: 8px;
}

.amp-card__body {
    padding: 6px 10px 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.amp-card__name-row {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
}

.amp-card__name {
    font-size: 10px;
    font-weight: 600;
    color: var(--amp-text-dark);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amp-card__verified {
    flex: 0 0 8px;
    color: var(--amp-rating-bg);
    font-size: 8px;
    line-height: 1;
}

.amp-card__location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--amp-text-dark);
    line-height: 1.4;
}

.amp-card__location i {
    color: var(--amp-accent);
    font-size: 9px;
}

.amp-card__profiles {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--amp-text-grey);
    line-height: 1.2;
    margin-top: 2px;
}

.amp-card__profiles i {
    color: var(--amp-accent);
    font-size: 9px;
}

.amp-card__profiles b {
    color: #000;
    font-size: 11px;
    font-weight: 700;
    margin-right: 2px;
}

.amp-card__profiles .amp-card__arrow {
    margin-left: auto;
    color: #3b82f6;
    font-size: 11px;
}

/* ---------- Filter centered modal ---------- */
#ampFilterModal {
    padding: 0 !important;
}

#ampFilterModal .modal-dialog {
    max-width: 600px;
    width: calc(100% - 24px);
    /* Top margin = 84px so the close button (60px tall, sitting at top:-64px)
       fully clears the viewport top while leaving a 4px gap between the button
       and the modal top edge. */
    margin: 84px auto 1.75rem;
    position: relative;
}

#ampFilterModal .modal-content {
    border-radius: 16px;
    border: 0;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.10);
    padding: 20px 14px 28px;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    width: 100%;
    position: relative;
}

.amp-filter-close {
    position: absolute;
    top: -64px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    border: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    color: #000;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.amp-filter-close:hover,
.amp-filter-close:focus {
    color: var(--amp-accent);
    outline: none;
}

.amp-filter-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    padding: 4px 4px 0;
}

.amp-filter-title::before {
    content: '';
    flex: 0 0 4px;
    width: 4px;
    height: 22px;
    background: var(--amp-accent);
    border-radius: 2px;
}

.amp-filter-title__text {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    line-height: 1.1;
}

.amp-filter-section {
    margin-top: 18px;
    padding: 0 4px;
}

.amp-filter-section__label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    line-height: 20px;
    margin: 0 0 10px;
}

.amp-filter-section__label::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: var(--amp-border-light);
}

.amp-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.amp-filter-pill {
    display: inline-flex;
    align-items: center;
    background: #f7f7f7;
    border: 1px solid #99a1af;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    padding: 3px 10px;
    border-radius: 12px;
    cursor: pointer;
    margin: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.amp-filter-pill input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.amp-filter-pill:has(input:checked) {
    background: var(--amp-accent);
    border-color: #c1275f;
    color: #fff;
}

.amp-filter-pill input[type="radio"]:focus-visible + span {
    outline: 2px solid var(--amp-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.amp-filter-search {
    width: 100%;
    height: 48px;
    background: #fafafa;
    border: 1px solid #99a1af;
    border-radius: 8px;
    padding: 0 16px 0 16px;
    font-size: 14px;
    color: #000;
    text-align: center;
    outline: none;
}

.amp-filter-search::placeholder {
    color: #000;
    opacity: 1;
}

.amp-filter-search-wrap {
    position: relative;
}

.amp-filter-search-wrap i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #4a5565;
    font-size: 12px;
    pointer-events: none;
}

.amp-filter-location {
    display: flex;
    gap: 10px;
}

.amp-filter-location__col {
    flex: 1 1 0;
    min-width: 0;
}

.amp-filter-location__label {
    font-size: 14px;
    font-weight: 700;
    color: var(--amp-text-grey);
    line-height: 20px;
    margin: 0 0 8px;
}

.amp-filter-location__select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 36px;
    background: #f3f3f5;
    border: 1.323px solid var(--amp-border-light);
    border-radius: 8px;
    padding: 0 13px;
    font-size: 14px;
    font-weight: 500;
    color: var(--amp-text-grey);
    cursor: pointer;
}

.amp-filter-location__select i {
    color: var(--amp-text-grey);
    font-size: 14px;
}

/* ---------- Desktop / tablet ---------- */
@media (min-width: 768px) {
    .amp-shell {
        max-width: 100%;
    }

    .amp-hero {
        padding: 80px 32px 36px;
    }

    .amp-hero__inner {
        max-width: 1100px;
        margin: 0 auto;
        width: 100%;
    }

    .amp-hero__tagline {
        font-size: 28px;
    }

    .amp-stats__num {
        font-size: 26px;
    }

    .amp-stats__lbl {
        font-size: 11px;
    }

    .amp-body {
        max-width: 1200px;
        margin: 0 auto;
        padding: 28px 32px 48px;
    }

    .amp-section-title__text {
        font-size: 22px;
    }

    .amp-city-pills {
        flex-wrap: wrap;
        overflow-x: visible;
        margin: 0 0 16px;
        padding-left: 0;
        padding-right: 0;
    }

    .amp-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 1280px) {
    .amp-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* ---------- Load More button ----------
   The legacy markup used class="load-more" which was styled implicitly by the
   global jQuery handler in layouts/frontend.blade.php. We renamed the agency
   button to .amp-load-more so that handler no longer binds (fixes duplicate
   AJAX fetches → duplicate cards). These rules restore the pill-shaped pink
   button that the listing page expects. */
.amp-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 10px 28px;
    border: 0;
    border-radius: 999px;
    background: var(--amp-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.25);
    transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.amp-load-more:hover,
.amp-load-more:focus {
    filter: brightness(1.05);
    box-shadow: 0 6px 18px rgba(233, 30, 99, 0.32);
    outline: none;
}

.amp-load-more:active {
    transform: translateY(1px);
}

.amp-load-more.hide {
    display: none;
}
