/**
 * HPRA Services Directory CSS
 * Matches Hurst Park card design spec v2.
 */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&family=DM+Sans:wght@400;500&display=swap');

/* ── Tokens ───────────────────────────────────────────────────────────── */
:root {
    --hp-primary:       #215732;
    --hp-teal:          #04aeb2;
    --hp-teal-mid:      #65d6ce;
    --hp-teal-soft:     rgba(101, 214, 206, 0.20);
    --hp-teal-border:   rgba(4, 174, 178, 0.50);
    --hp-card-bg:       #f8f8f8;
    --hp-text:          #5b5b5b;
    --hp-shadow:        5px 6px 35px 0px rgba(69, 85, 74, 0.12);
    --font-title:       'Roboto', sans-serif;
    --font-body:        'DM Sans', sans-serif;
}

/* ── Directory wrapper ────────────────────────────────────────────────── */
.hpra-services-directory {
    font-family: var(--font-body);
    margin: 30px 0;
}

/* ── Filter bar ───────────────────────────────────────────────────────── */
.hpra-services-filters {
    margin-bottom: 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.hpra-search-container {
    flex: 1;
    min-width: 240px;
    position: relative;
}

.hpra-search-container::before {
    content: '';
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304aeb2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-size: contain; background-repeat: no-repeat; pointer-events: none;
}

#hpra-search {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid rgba(4,174,178,0.35);
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--hp-text);
    background: #fff;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}
#hpra-search:focus {
    outline: none;
    border-color: var(--hp-teal);
    box-shadow: 0 0 0 3px rgba(4,174,178,.1);
}

.hpra-category-filter { flex: 1; min-width: 190px; }

#hpra-category-select {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1px solid rgba(4,174,178,0.35);
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--hp-text);
    background-color: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2304aeb2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}
#hpra-category-select:focus {
    outline: none;
    border-color: var(--hp-teal);
    box-shadow: 0 0 0 3px rgba(4,174,178,.1);
}

.hpra-results-count {
    padding: 8px 18px;
    background: rgba(4,174,178,.08);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--hp-teal);
    white-space: nowrap;
}

/* ── Grid ─────────────────────────────────────────────────────────────── */
.hpra-services-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 24px;
}
@media (min-width: 576px) {
    .hpra-services-grid[data-columns="2"],
    .hpra-services-grid[data-columns="3"],
    .hpra-services-grid[data-columns="4"] { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .hpra-services-grid[data-columns="3"],
    .hpra-services-grid[data-columns="4"] { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) {
    .hpra-services-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
}

/* ── Card wrapper ─────────────────────────────────────────────────────── */
/*
   The card is split into two pieces that sit flush together:
   1. .hpra-service-header  – green bar, rounded top corners only
   2. .hpra-service-body    – white/grey area, teal border, rounded bottom only
*/
.hpra-service-card {
    display: flex;
    flex-direction: column;
    transition: transform .22s ease, box-shadow .22s ease;
}
.hpra-service-card:hover {
    transform: translateY(-4px);
}
.hpra-service-card:hover .hpra-service-header,
.hpra-service-card:hover .hpra-service-body {
    box-shadow: 5px 10px 40px 0px rgba(69, 85, 74, 0.18);
}

/* ── Green header bar (.rectangle-29) ────────────────────────────────── */
.hpra-service-header {
    background-color: var(--hp-primary);
    border-radius: 18px 18px 0 0;
    box-shadow: var(--hp-shadow);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    min-height: 52px;
}

.hpra-service-title {
    margin: 0;
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 500;
    line-height: normal;
    letter-spacing: -0.01em;
    color: #ffffff;
}

/* ── Card body (.rectangle-1) ────────────────────────────────────────── */
.hpra-service-body {
    background-color: var(--hp-card-bg);
    border: 0.5px solid var(--hp-teal-border);
    border-radius: 0 0 18px 18px;
    box-shadow: var(--hp-shadow);
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-grow: 1;
}

/* Category badge (.frame-1) — teal border outline pill */
.hpra-service-category {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 2px 14px;
    border: 1px solid var(--hp-teal-border);
    border-radius: 129px;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hp-teal);
    background: transparent;
    min-height: 20px;
}

/* ── Info block (.rectangle-28 + .frame-9) ───────────────────────────── */
.hpra-service-info-block {
    border-radius: 8px;
    overflow: hidden;
}

/* Solid light-teal background panel */
.hpra-service-content {
    background-color: var(--hp-teal-soft);
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hpra-service-address,
.hpra-service-phone,
.hpra-service-email {
    font-family: var(--font-body);
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--hp-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Outline SVG icons via ::before */
.hpra-service-address::before {
    content: ''; width: 16px; height: 16px; flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b5b5b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E");
    background-size: contain; background-repeat: no-repeat;
}
.hpra-service-phone::before {
    content: ''; width: 16px; height: 16px; flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b5b5b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.56 1.18h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 8.72a16 16 0 0 0 6 6l.86-.86a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7a2 2 0 0 1 1.72 2.03z'/%3E%3C/svg%3E");
    background-size: contain; background-repeat: no-repeat;
}
.hpra-service-email::before {
    content: ''; width: 16px; height: 16px; flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b5b5b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7'/%3E%3C/svg%3E");
    background-size: contain; background-repeat: no-repeat;
}

/* Hide Font Awesome <i> tags — icons handled by ::before */
.hpra-service-content i { display: none; }

.hpra-service-content a { color: var(--hp-text); text-decoration: none; transition: color .15s; }
.hpra-service-content a:hover { color: var(--hp-teal); }

/* Notes strip (.frame-9) — solid teal, flush to bottom of info block */
.hpra-service-notes {
    background-color: var(--hp-teal-mid);
    padding: 6px 19px;
    min-height: 38px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hpra-service-notes i { display: none; }

/* ── Visit Website button (.frame-8) ─────────────────────────────────── */
.hpra-service-url {
    display: flex;
    justify-content: center;
    margin-top: 2px;
}
.hpra-service-url i { display: none; }

.hpra-service-url a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 58px;
    border: 1px solid var(--hp-teal);
    border-radius: 112px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--hp-teal);
    text-decoration: none;
    transition: background .2s, color .2s;
    white-space: nowrap;
    min-height: 42px;
}
.hpra-service-url a:hover {
    background: var(--hp-teal);
    color: #fff;
}

/* ── No results ───────────────────────────────────────────────────────── */
#hpra-no-results {
    padding: 40px 20px;
    background: rgba(4,174,178,.05);
    border-radius: 18px;
    text-align: center;
    color: var(--hp-teal);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    margin-top: 20px;
    border: 1.5px dashed rgba(4,174,178,.3);
}