/* =========================================================
   Cristalina Cleaning Services — Cleaner Cards V2
   Load AFTER /css/app.css
   Purpose: improve registered cleaner cards without editing app.css.
   ========================================================= */

/* ---------- Grid sizing ---------- */
.cleaner-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

/* Homepage cards should feel like marketplace cards, not giant banners. */
.home-cleaner-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

/* ---------- Card shell ---------- */
.cleaner-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-width: 0;
    min-height: 100%;
    border: 1px solid #d7e6e2;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 7px 24px rgba(16, 45, 53, .055);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cleaner-card.card-hover:hover {
    transform: translateY(-3px);
    border-color: #b8d5cd;
    box-shadow: 0 18px 42px rgba(16, 45, 53, .10);
}

/* ---------- Media area ---------- */
.cleaner-card .cleaner-cover-link {
    display: block;
    flex: 0 0 auto;
}

.cleaner-card .cleaner-cover {
    position: relative;
    height: 248px;
    overflow: hidden;
    background: linear-gradient(145deg, #e4f4ef, #edf3f7);
    display: grid;
    place-items: center;
}

.cleaner-card .cleaner-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .35s ease;
}

.cleaner-card:hover .cleaner-cover img {
    transform: scale(1.025);
}

.cleaner-card .cleaner-cover::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 72px;
    background: linear-gradient(180deg, rgba(16,45,53,0), rgba(16,45,53,.10));
    pointer-events: none;
}

.cleaner-card .cleaner-cover-placeholder {
    position: relative;
    z-index: 1;
    height: 100%;
    width: 100%;
    display: grid;
    place-items: center;
    color: #68827c;
    font-size: 13px;
    font-weight: 800;
}

.cleaner-card .cleaner-cover-top {
    z-index: 3;
    top: 14px;
    left: 14px;
    right: 14px;
    gap: 8px;
}

.cleaner-card .cleaner-cover-top .pill {
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
    box-shadow: 0 5px 16px rgba(16,45,53,.08);
}

.cleaner-card .cleaner-cover-top .pill.green {
    background: rgba(235, 250, 246, .96);
    border-color: #aee2d5;
    color: #086b5a;
}

.cleaner-card .cleaner-cover-top .pill.dark {
    background: rgba(16, 45, 53, .96);
    border-color: rgba(16, 45, 53, .96);
    color: #fff;
}

.cleaner-card .cleaner-card-top-right {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

/* ---------- White information panel ---------- */
.cleaner-card .cleaner-card-body {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    flex: 1;
    margin: 0;
    padding: 0 24px 24px;
    background: #fff;
    color: var(--text);
}

.cleaner-card .cleaner-identity-row {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: -46px;
}

.cleaner-card .cleaner-avatar-card {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    border: 6px solid #fff;
    border-radius: 24px;
    background: linear-gradient(145deg, #e3f6f0, #eff8f6);
    color: #14735f;
    box-shadow: 0 12px 28px rgba(16, 45, 53, .12);
    font-size: 22px;
}

.cleaner-card .cleaner-avatar-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cleaner-card .cleaner-identity-copy {
    min-width: 0;
    flex: 1;
    padding-top: 55px;
}

.cleaner-card .rating-line {
    gap: 7px;
    margin: 0 0 4px;
    line-height: 1.25;
}

.cleaner-card .rating-line .stars {
    color: #af6900;
    font-size: 12px;
    font-weight: 850;
}

.cleaner-card .rating-line .count {
    color: #718387;
    font-size: 11px;
    font-weight: 700;
}

.cleaner-card h3 {
    margin: 0 0 5px;
    color: #102d35;
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: -.035em;
}

.cleaner-card h3 a {
    color: inherit;
}

.cleaner-card h3 a:hover {
    color: var(--brand-dark);
}

.cleaner-card .job-meta {
    display: flex;
    gap: 7px 13px;
    flex-wrap: wrap;
    color: #6c7f83;
    font-size: 12px;
    font-weight: 700;
}

/* ---------- Description ---------- */
.cleaner-card .cleaner-headline {
    min-height: 46px;
    margin: 18px 0 14px;
    color: #5b7075;
    font-size: 14px;
    line-height: 1.62;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* ---------- Service chips ---------- */
.cleaner-card .service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 18px;
}

.cleaner-card .service-tags span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #f1f5f4;
    border: 1px solid #edf2f0;
    color: #536a6f;
    font-size: 11px;
    font-weight: 800;
}

/* ---------- Plus price menu ---------- */
.cleaner-card .cleaner-price-menu {
    display: grid;
    gap: 0;
    overflow: hidden;
    margin: 2px 0 18px;
    border: 1px solid #dbeae6;
    border-radius: 14px;
    background: #fbfdfc;
}

.cleaner-card .cleaner-price-menu > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 42px;
    padding: 9px 12px;
    border-bottom: 1px solid #e7efed;
}

.cleaner-card .cleaner-price-menu > div:last-child {
    border-bottom: 0;
}

.cleaner-card .cleaner-price-menu span {
    min-width: 0;
    overflow: hidden;
    color: #586d71;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cleaner-card .cleaner-price-menu strong {
    flex: 0 0 auto;
    color: #086b5a;
    font-size: 12px;
}

/* ---------- Plus contact details ---------- */
.cleaner-card .cleaner-plus-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.cleaner-card .cleaner-plus-contact a {
    min-width: 0;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid #d8e8e3;
    border-radius: 10px;
    background: #f8fcfb;
    color: #315f56;
    font-size: 11px;
    font-weight: 800;
}

.cleaner-card .cleaner-plus-contact a:hover {
    border-color: #acd6ca;
    background: #eff9f6;
}

/* ---------- Bottom facts ---------- */
.cleaner-card .cleaner-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid #dbe6e3;
}

.cleaner-card .cleaner-card-stat {
    min-width: 0;
    padding-right: 18px;
}

.cleaner-card .cleaner-card-stat + .cleaner-card-stat {
    padding-right: 0;
    padding-left: 18px;
    border-left: 1px solid #e6eeec;
}

.cleaner-card .cleaner-card-stat small {
    display: block;
    color: #77898d;
    font-size: 11px;
    font-weight: 650;
}

.cleaner-card .cleaner-card-stat strong {
    display: block;
    margin-top: 4px;
    color: #102d35;
    font-size: 17px;
    line-height: 1.25;
    font-weight: 850;
}

/* ---------- CTA ---------- */
.cleaner-card .cleaner-card-cta,
.cleaner-card .cleaner-card-cta.btn-primary,
.cleaner-card .cleaner-card-cta.btn-outline {
    min-height: 52px;
    margin-top: 20px;
    border: 1px solid #bcd3cd;
    border-radius: 15px;
    background: #fff;
    color: #102d35;
    box-shadow: none;
    font-size: 14px;
    font-weight: 850;
}

.cleaner-card .cleaner-card-cta:hover,
.cleaner-card .cleaner-card-cta.btn-primary:hover,
.cleaner-card .cleaner-card-cta.btn-outline:hover {
    border-color: #78bbaa;
    background: #f2faf7;
    color: #075f50;
    box-shadow: none;
}

/* ---------- Cristal Plus refinement ---------- */
.cleaner-card-plus {
    border-color: #b9ddd4;
    box-shadow: 0 10px 30px rgba(8,127,108,.075);
}

.cleaner-card-plus::before {
    content: "";
    position: absolute;
    z-index: 8;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand);
}

.cleaner-card .plus-pill {
    background: rgba(244, 239, 255, .96) !important;
    border-color: #ddd2ff !important;
    color: #5b3bd0 !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .home-cleaner-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .cleaner-grid,
    .home-cleaner-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .cleaner-card {
        border-radius: 20px;
    }

    .cleaner-card .cleaner-cover {
        height: 220px;
    }

    .cleaner-card .cleaner-card-body {
        padding: 0 18px 20px;
    }

    .cleaner-card .cleaner-identity-row {
        gap: 12px;
        margin-top: -38px;
    }

    .cleaner-card .cleaner-avatar-card {
        width: 76px;
        height: 76px;
        flex-basis: 76px;
        border-width: 5px;
        border-radius: 21px;
        font-size: 19px;
    }

    .cleaner-card .cleaner-identity-copy {
        padding-top: 45px;
    }

    .cleaner-card h3 {
        font-size: 21px;
    }

    .cleaner-card .cleaner-headline {
        margin-top: 15px;
    }
}

@media (max-width: 420px) {
    .cleaner-card .cleaner-cover {
        height: 205px;
    }

    .cleaner-card .cleaner-cover-top {
        top: 11px;
        left: 11px;
        right: 11px;
    }

    .cleaner-card .cleaner-cover-top .pill {
        min-height: 31px;
        padding: 6px 9px;
        font-size: 11px;
    }

    .cleaner-card .cleaner-card-stats {
        gap: 12px;
    }

    .cleaner-card .cleaner-card-stat,
    .cleaner-card .cleaner-card-stat + .cleaner-card-stat {
        padding-left: 0;
        padding-right: 0;
        border-left: 0;
    }
}
