/* ============================================================
   public-redesign.css — user-side UI refresh (loaded LAST)
   Brand stays BLUE (#132E75). Submit buttons GREEN (#38BB5B).
   Mobile-first. Colorful filled category icons. Uses existing markup.
   Reversible: remove the <link> in public_layout.php to revert CSS
   (the home-view trust/feature blocks stay hidden without it too).
   ============================================================ */

:root {
    --rd-blue: #132E75;
    --rd-blue-2: #21459c;
    --rd-green: #38BB5B;
    --rd-green-dark: #2ea34d;
    --rd-ink: #101828;
    --rd-muted: #667085;
    --rd-line: #e8edf5;
}

/* ---------- Submit / primary actions -> GREEN ---------- */
.app-primary-btn,
.js-run-web-service,
.auth-btn {
    background: var(--rd-green) !important;
    box-shadow: 0 10px 22px rgba(56, 187, 91, .26);
    transition: background .18s ease, transform .06s ease, box-shadow .18s ease;
}

.app-primary-btn:hover,
.js-run-web-service:hover,
.auth-btn:hover {
    background: var(--rd-green-dark) !important;
    filter: none;
}

.app-primary-btn:active,
.js-run-web-service:active,
.auth-btn:active {
    transform: translateY(1px) scale(.995);
}

/* ==========================================================
   HOME HERO — richer, taller, mobile-first
   ========================================================== */
.home-banner {
    padding: 30px 26px 26px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 88% -10%, rgba(56, 187, 91, .34), transparent 42%),
        linear-gradient(135deg, #16357f 0%, #132E75 55%, #0e2258 100%) !important;
    box-shadow: 0 26px 60px rgba(19, 46, 117, .34) !important;
}

.home-banner .dash-banner-badge {
    background: rgba(255, 255, 255, .16);
    letter-spacing: .2px;
}

.home-banner h1 {
    font-size: clamp(20px, 5.4vw, 30px) !important;
    line-height: 1.5 !important;
    margin-bottom: 8px !important;
}

.home-banner p {
    font-size: clamp(12.5px, 3.4vw, 15px) !important;
    line-height: 1.9 !important;
    margin-bottom: 16px !important;
}

.home-search {
    max-width: 100% !important;
    border-radius: 18px !important;
    padding: 7px !important;
    box-shadow: 0 16px 32px rgba(0, 0, 0, .16) !important;
}

.home-search input { font-size: 14px !important; padding: 4px 12px !important; }

.home-search button {
    width: 46px !important;
    height: 46px !important;
    border-radius: 14px !important;
    background: var(--rd-green) !important;
}

/* trust chips under the search */
.home-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    position: relative;
    z-index: 1;
}

.home-trust-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .16);
    color: #fff;
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.home-trust-chip svg { width: 15px; height: 15px; flex: 0 0 auto; }

/* ==========================================================
   SECTION HEADINGS
   ========================================================== */
.dash-section-head h2 {
    position: relative;
    padding-inline-start: 12px;
}

.dash-section-head h2::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--rd-green), var(--rd-blue));
}

.dash-section-head a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(19, 46, 117, .06);
    padding: 6px 12px;
    border-radius: 999px;
}

/* ==========================================================
   CARDS — cleaner tiles + colorful filled icons
   ========================================================== */
.svc-card {
    border-radius: 20px;
    padding: 15px 14px;
    border-color: var(--rd-line);
}

.svc-card small {
    font-weight: 800;
    color: var(--rd-blue);
}

/* colored icon chips (6-color rotation): home grid + services grid + services list */
.svc-card-icon,
.app-service-grid .app-svg-icon,
.app-service-list .app-service-list-item .app-svg-icon {
    color: #fff !important;
    background: var(--rd-blue) !important;
    box-shadow: 0 8px 16px rgba(19, 46, 117, .20);
}

.svc-grid .svc-card:nth-child(6n+1) .svc-card-icon,
.app-service-grid .app-service-tile:nth-child(6n+1) .app-svg-icon,
.app-service-list .app-service-list-item:nth-child(6n+1) .app-svg-icon {
    background: linear-gradient(145deg, #2f7fd6, #1f66b8) !important;
    box-shadow: 0 8px 16px rgba(47, 127, 214, .30);
}
.svc-grid .svc-card:nth-child(6n+2) .svc-card-icon,
.app-service-grid .app-service-tile:nth-child(6n+2) .app-svg-icon,
.app-service-list .app-service-list-item:nth-child(6n+2) .app-svg-icon {
    background: linear-gradient(145deg, #7b5cd6, #5f3fc4) !important;
    box-shadow: 0 8px 16px rgba(123, 92, 214, .30);
}
.svc-grid .svc-card:nth-child(6n+3) .svc-card-icon,
.app-service-grid .app-service-tile:nth-child(6n+3) .app-svg-icon,
.app-service-list .app-service-list-item:nth-child(6n+3) .app-svg-icon {
    background: linear-gradient(145deg, #e8912f, #d1791a) !important;
    box-shadow: 0 8px 16px rgba(232, 145, 47, .30);
}
.svc-grid .svc-card:nth-child(6n+4) .svc-card-icon,
.app-service-grid .app-service-tile:nth-child(6n+4) .app-svg-icon,
.app-service-list .app-service-list-item:nth-child(6n+4) .app-svg-icon {
    background: linear-gradient(145deg, #199e77, #12805f) !important;
    box-shadow: 0 8px 16px rgba(25, 158, 119, .30);
}
.svc-grid .svc-card:nth-child(6n+5) .svc-card-icon,
.app-service-grid .app-service-tile:nth-child(6n+5) .app-svg-icon,
.app-service-list .app-service-list-item:nth-child(6n+5) .app-svg-icon {
    background: linear-gradient(145deg, #d4537e, #bd3c67) !important;
    box-shadow: 0 8px 16px rgba(212, 83, 126, .30);
}
.svc-grid .svc-card:nth-child(6n+6) .svc-card-icon,
.app-service-grid .app-service-tile:nth-child(6n+6) .app-svg-icon,
.app-service-list .app-service-list-item:nth-child(6n+6) .app-svg-icon {
    background: linear-gradient(145deg, #d99413, #bd7d0c) !important;
    box-shadow: 0 8px 16px rgba(217, 148, 19, .30);
}

.svc-card-icon svg,
.app-service-grid .app-svg-icon svg,
.app-service-list .app-service-list-item .app-svg-icon svg { color: #fff; stroke: #fff; }

/* keep colors on hover instead of swapping to blue tint */
.svc-card:hover .svc-card-icon { filter: brightness(1.05); }
.app-service-tile:hover .app-svg-icon { filter: brightness(1.05); background: inherit; }
.app-service-list-item:hover .app-svg-icon { filter: brightness(1.05); }

/* ==========================================================
   SERVICES LIST PAGE — rows, price pill, category chips
   ========================================================== */
.app-service-list-item {
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: 0 8px 22px rgba(16, 24, 40, .04);
}

.app-service-list-item .service-text { flex: 1; min-width: 0; }
.app-service-list-item .service-text strong { font-size: 14px; }
.app-service-list-item .service-text small { color: #94a2b8; }

.svc-price-pill {
    flex: 0 0 auto;
    background: rgba(56, 187, 91, .12);
    color: var(--rd-green-dark);
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
    padding: 5px 11px;
    white-space: nowrap;
}

.svc-price-pill.is-free { background: rgba(19, 46, 117, .08); color: var(--rd-blue); }

.app-service-list-item i {
    margin: 0 !important;
    font-size: 22px !important;
    color: #c2c9d6 !important;
    transition: transform .15s ease;
}

.app-service-list-item:hover i { transform: translateX(-3px); }

/* category chips row */
.app-category-pill.active {
    background: var(--rd-blue) !important;
    border-color: var(--rd-blue) !important;
    color: #fff !important;
}

.app-category-pill .app-svg-icon.tiny { background: transparent !important; }
.app-category-row .app-category-pill:nth-child(6n+2) .app-svg-icon.tiny { color: #2f7fd6 !important; }
.app-category-row .app-category-pill:nth-child(6n+3) .app-svg-icon.tiny { color: #7b5cd6 !important; }
.app-category-row .app-category-pill:nth-child(6n+4) .app-svg-icon.tiny { color: #e8912f !important; }
.app-category-row .app-category-pill:nth-child(6n+5) .app-svg-icon.tiny { color: #199e77 !important; }
.app-category-row .app-category-pill:nth-child(6n+6) .app-svg-icon.tiny { color: #d4537e !important; }
.app-category-row .app-category-pill:nth-child(6n+1) .app-svg-icon.tiny { color: #d99413 !important; }
.app-category-pill.active .app-svg-icon.tiny { color: #fff !important; }

/* ==========================================================
   FEATURES STRIP (home)
   ========================================================== */
.home-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 26px;
}

.home-feature {
    display: flex;
    align-items: center;
    gap: 11px;
    background: #fff;
    border: 1px solid var(--rd-line);
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .05);
}

.home-feature-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 14px;
    color: #fff;
}

.home-feature-icon svg { width: 22px; height: 22px; }
.home-feature-icon.feat-blue { background: linear-gradient(145deg, #2f7fd6, #1f66b8); }
.home-feature-icon.feat-green { background: linear-gradient(145deg, #199e77, #12805f); }
.home-feature-icon.feat-orange { background: linear-gradient(145deg, #e8912f, #d1791a); }

.home-feature strong { display: block; font-size: 14px; font-weight: 800; }
.home-feature small { color: var(--rd-muted); font-size: 12px; line-height: 1.6; }

/* ==========================================================
   SERVICE PAGE — form polish
   ========================================================== */
.service-title-card { border-radius: 24px; }

.public-field input,
.public-field select,
.public-field textarea {
    border-radius: 14px;
    padding: 14px 15px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.public-field input:focus,
.public-field select:focus,
.public-field textarea:focus {
    border-color: var(--rd-green);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(56, 187, 91, .14);
}

/* ==========================================================
   SINGLE-SERVICE PAGE — back link, steps, secure note
   ========================================================== */
.service-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--rd-muted);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
    transition: color .15s ease;
}

.service-back:hover { color: var(--rd-blue); }
.service-back svg { width: 17px; height: 17px; }

.service-title-card {
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f3f7ff 100%) !important;
}

.service-form-head { margin-bottom: 16px; }
.service-form-head h2 { margin: 0 0 4px; }
.service-form-head p { margin: 0; color: var(--rd-muted); font-size: 13px; line-height: 1.8; }

/* secure note under submit */
.service-secure-note {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    color: var(--rd-muted);
    font-size: 12.5px;
    font-weight: 600;
}

.service-secure-note svg { width: 16px; height: 16px; color: var(--rd-green); flex: 0 0 auto; }

/* vehicle plate input styled like the report plate (.ir-plate) */
.plate-widget--ir {
    display: inline-flex !important;
    align-items: stretch;
    gap: 0 !important;
    height: 56px;
    max-width: 100%;
    border: 2px solid #101828;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 18px rgba(16, 24, 40, .14);
    direction: ltr;
}

.plate-ir-country {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 0 0 auto;
    width: 42px;
    background: #003DA5;
    color: #fff;
    padding: 0 6px;
}

.plate-ir-flag {
    width: 22px;
    height: 14px;
    border-radius: 2px;
    background: linear-gradient(to bottom, #239f40 0 33.33%, #fff 33.33% 66.66%, #da0000 66.66% 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .5);
}

.plate-ir-txt {
    font-size: 8px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .3px;
    text-align: center;
}

.plate-widget--ir .plate-ir-input {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    height: 100% !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    text-align: center;
    font-weight: 800 !important;
    font-size: 22px !important;
    color: #101828;
    padding: 0 6px !important;
    outline: 0;
}

.plate-widget--ir .plate-letter-btn {
    flex: 0 0 auto;
    min-width: 54px;
    min-height: 0 !important;
    height: 100%;
    border: 0 !important;
    border-inline: 2px dashed #dce2ec !important;
    border-radius: 0 !important;
    background: #fff !important;
    font-size: 20px !important;
    font-weight: 800;
    color: #101828;
}

.plate-ir-province {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 50px;
    background: #003DA5;
    color: #fff;
    border-inline-start: 2px solid #101828;
}

.plate-widget--ir .plate-ir-region {
    width: 100% !important;
    height: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #fff !important;
    text-align: center;
    font-weight: 800 !important;
    font-size: 18px !important;
    padding: 2px 0 !important;
    outline: 0;
}

.plate-widget--ir .plate-ir-region::placeholder { color: rgba(255,255,255,.6); }

.plate-ir-province small { font-size: 8px; font-weight: 800; line-height: 1; padding-bottom: 3px; }

/* focus feedback stays inside the plate, no ring breakout */
.plate-widget--ir:focus-within { box-shadow: 0 0 0 4px rgba(56,187,91,.18), 0 6px 18px rgba(16,24,40,.14); }

/* result card polish */
.result-card { border-radius: 20px; }
.result-card h3 {
    padding-bottom: 12px;
    border-bottom: 2px solid var(--rd-line);
}

/* ==========================================================
   MOBILE-FIRST DENSITY (like ghabzino)
   ========================================================== */
@media (max-width: 640px) {
    .svc-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 10px !important; }

    .svc-card { border-radius: 18px; padding: 13px 8px; gap: 8px; }

    .svc-card-icon,
    .app-service-grid .app-svg-icon { width: 46px; height: 46px; border-radius: 15px; }

    .svc-card strong { font-size: 12.5px; line-height: 1.35; }
    .svc-card small { font-size: 11px; }

    .home-features { grid-template-columns: 1fr; gap: 10px; margin-top: 22px; }
    .home-feature { border-radius: 16px; padding: 13px; }
}

@media (max-width: 380px) {
    .svc-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ==========================================================
   ANJOMAN FONT — remaps the `pfont` family to AnjomanMaxFN.
   Loaded last, so it overrides the earlier pfont @font-face
   declarations and switches the whole user-facing site over
   without touching any existing `font-family: pfont` rule.
   ========================================================== */
@font-face {
    font-family: pfont;
    src: url("../fonts/AnjomanMaxFN-Light.woff2") format("woff2");
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: pfont;
    src: url("../fonts/AnjomanMaxFN-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: pfont;
    src: url("../fonts/AnjomanMaxFN-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}
