/* TASK Modul public Agenti (FAZA 8) - stiluri pentru [crd_estate_agents], [crd_estate_agent] si pagina
   publica de profil (/agenti/{slug}/). Mobile-first (min. 360px), clase scopate (fara stiluri globale
   agresive), compatibil Elementor (containerul e un simplu <div>, fara dependinte de alt markup). */

/* ------------------------------------------------------------------ */
/* [crd_estate_agents] - lista/grid de carduri */
/* ------------------------------------------------------------------ */

/* Coloanele au o latime MAXIMA fixa (nu 1fr, care ar intinde cardul cat tot containerul cand exista
   putini agenti - simptomul semnalat initial: carduri/poze uriase). `justify-content: start` aliniaza
   randul la stanga containerului (cerinta explicita - nu mai centrat). Latimea cardului: 264px (220px
   + 20%, cerinta explicita "cartele cu 20% mai late").
   Pragul minim foloseste `min(190px, 100%)`, nu `190px` fix: cand cartela e pusa intr-o coloana
   Elementor ingusta (ex. fiecare agent in propria coloana de 25% langa harta), containerul poate fi mai
   ingust de 190px pe mobil/tableta - fara aceasta functie cartela nu se mai putea micsora sub prag si
   depasea coloana (simptomul "nu sunt responsive pe mobil"). */
.crd-estate-agents {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 264px));
    justify-content: start;
    gap: 20px;
    margin: 0 0 20px;
}

.crd-estate-agents-empty {
    padding: 16px;
    color: #666;
    font-style: italic;
}

/* [crd_estate_agent_card] - o singura cartela, plasata separat (ex. propria coloana Elementor per
   agent) - fara margine proprie, ca sa se poata alinia exact cu elemente vecine (ex. harta).
   NU mosteneste grid-ul de mai sus (`minmax(..., 264px)`) - acel plafon de latime a fost gandit pentru
   LISTA cu mai multe carduri intr-un container lat (sa nu se intinda un singur card cat tot ecranul).
   Aici e mereu UN SINGUR card, plasat de utilizator in propria lui coloana Elementor (a carei latime o
   controleaza chiar el) - cardul trebuie sa umple acea coloana, nu sa ramana ingust si lipit la stanga
   cu spatiu gol langa el (simptomul raportat: "nu se latesc pe mobil, raman inguste si spre stanga"). */
.crd-estate-agents-single-card {
    display: block;
    margin: 0;
}

.crd-estate-agents-single-card .crd-estate-agent-card {
    width: 100%;
    max-width: 420px;
}

@media (min-width: 1024px) {
    /* Atributul shortcode-ului `columns` ramane un plafon (numarul MAXIM de coloane pe un rand), nu o
       lățime fortata - cardul individual isi pastreaza latimea maxima de 264px indiferent de cate
       coloane incap in container. */
    .crd-estate-agents-columns-1 {
        grid-template-columns: repeat(1, minmax(min(190px, 100%), 264px));
    }
    .crd-estate-agents-columns-2 {
        grid-template-columns: repeat(2, minmax(min(190px, 100%), 264px));
    }
    .crd-estate-agents-columns-3 {
        grid-template-columns: repeat(3, minmax(min(190px, 100%), 264px));
    }
    .crd-estate-agents-columns-4 {
        grid-template-columns: repeat(4, minmax(min(190px, 100%), 264px));
    }
}

.crd-estate-agent-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    width: 100%;
}

/* Fotografia din cartela e cu 20% mai mica decat latimea cardului (cerinta explicita) - padding in
   jurul ei (10% pe fiecare parte = 20% mai mica per total), centrata. */
.crd-estate-agent-card-photo-link {
    display: flex;
    justify-content: center;
    padding: 10% 10% 0;
    box-sizing: border-box;
    background: #fff;
}

.crd-estate-agent-card-photo-link img {
    width: 80%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.crd-estate-agent-card-photo-placeholder {
    width: 80%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2f7;
    color: #90a0b0;
    font-size: 28px;
    font-weight: 700;
    border-radius: 50%;
    box-sizing: border-box;
}

.crd-estate-agent-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.crd-estate-agent-card-name {
    margin: 0;
    font-size: 18px;
}

.crd-estate-agent-card-name a {
    text-decoration: none;
    color: inherit;
}

.crd-estate-agent-card-role {
    margin: 0;
    color: #5f6b7a;
    font-size: 13px;
    font-weight: 600;
}

.crd-estate-agent-card-description {
    margin: 4px 0;
    font-size: 14px;
    color: #444;
}

.crd-estate-agent-card-phone a,
.crd-estate-agent-card-email a {
    color: #1a73e8;
    text-decoration: none;
}

.crd-estate-agent-card-count {
    margin: 0;
    font-size: 13px;
    color: #777;
}

.crd-estate-agent-card-cta {
    margin-top: 8px;
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
    background: #1a73e8;
    color: #fff !important;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.crd-estate-agent-card-cta:hover {
    background: #1558b0;
}

.crd-estate-agents-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    font-size: 14px;
}

/* ------------------------------------------------------------------ */
/* Pagina/profil complet de agent (/agenti/{slug}/ si [crd_estate_agent]) */
/* ------------------------------------------------------------------ */

/* BUG REAL GASIT (2026-07-30) - spre deosebire de pagina de proprietate (.crd-estate-pd, margin-bottom
   96px) sau grila de agenti (.crd-estate-agents, margin-bottom 20px), aceasta pagina nu avea NICIO
   margine jos - continutul se lipea direct de footer pe orice ecran unde nu exista suficient continut
   ca sa umple singur spatiul (exact simptomul raportat: "aproape toate lipite de footer"). */
.crd-estate-agent-profile {
    max-width: 960px;
    margin: 0 auto 64px;
    padding: 16px;
    box-sizing: border-box;
}

.crd-estate-agent-breadcrumb {
    font-size: 13px;
    color: #666;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.crd-estate-agent-breadcrumb a {
    color: #1a73e8;
    text-decoration: none;
}

.crd-estate-agent-hero {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.crd-estate-agent-photo {
    width: 160px;
    max-width: 100%;
}

.crd-estate-agent-photo img {
    width: 160px;
    height: 160px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.crd-estate-agent-photo-placeholder {
    width: 160px;
    height: 160px;
    border-radius: 50%;
}

.crd-estate-agent-hero-info h1 {
    margin: 0 0 4px;
    font-size: 26px;
}

.crd-estate-agent-role {
    margin: 0 0 8px;
    color: #5f6b7a;
    font-weight: 600;
}

.crd-estate-agent-areas,
.crd-estate-agent-languages,
.crd-estate-agent-stats {
    margin: 0 0 6px;
    font-size: 14px;
    color: #444;
}

.crd-estate-agent-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.crd-estate-agent-btn {
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
}

.crd-estate-agent-btn-outline {
    border: 1px solid #1a73e8;
    color: #1a73e8 !important;
    background: #fff;
}

.crd-estate-agent-btn-outline:hover {
    background: #1a73e8;
    color: #fff !important;
}

.crd-estate-agent-description {
    margin: 20px 0;
    line-height: 1.6;
}

.crd-estate-agent-short-description {
    font-weight: 600;
    font-size: 16px;
}

.crd-estate-agent-properties h2 {
    font-size: 20px;
    margin-bottom: 12px;
}

.crd-estate-agent-missing {
    padding: 16px;
    color: #666;
    font-style: italic;
}

@media (min-width: 768px) {
    .crd-estate-agent-hero {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* ==========================================================================
   DARK MODE (2026-07-30) - comutatorul real de pe site e `body.dark-mode`/
   `body.light-mode` (evimo-toggle.js, tema astra-child, buton DAY/NIGHT).
   Modulul Agenti nu avea NICIUN stil pentru acest mod - cartele albe fixe cu
   text inchis fix ramaneau neschimbate pe fundal navy (noapte), exact
   simptomul semnalat ("cand navy cand alb, text culoare pe culoare"). Paleta
   e aceeasi folosita si in public.css (fundal panouri #102943/#0d2340, text
   #f1f7ff/#d9e7f5, accente pastrate ca in modul de zi - #1a73e8 e deja
   suficient de vizibil pe navy, doar usor mai deschis pentru contrast). */

body.dark-mode .crd-estate-agents-empty,
body.dark-mode .crd-estate-agent-missing,
body.dark-mode .crd-estate-agent-breadcrumb {
    color: #a9bdd0;
}

body.dark-mode .crd-estate-agent-card {
    background: #0d2340;
    border-color: rgba(0, 207, 166, .28);
}

body.dark-mode .crd-estate-agent-card-photo-link {
    background: #0d2340;
}

body.dark-mode .crd-estate-agent-card-photo-placeholder,
body.dark-mode .crd-estate-agent-photo-placeholder {
    background: #0b2036;
    color: #6f88a0;
}

body.dark-mode .crd-estate-agent-card-name,
body.dark-mode .crd-estate-agent-hero-info h1 {
    color: #f1f7ff;
}

body.dark-mode .crd-estate-agent-card-role,
body.dark-mode .crd-estate-agent-role,
body.dark-mode .crd-estate-agent-card-count {
    color: #a9bdd0;
}

body.dark-mode .crd-estate-agent-card-description,
body.dark-mode .crd-estate-agent-areas,
body.dark-mode .crd-estate-agent-languages,
body.dark-mode .crd-estate-agent-stats,
body.dark-mode .crd-estate-agent-description {
    color: #d9e7f5;
}

body.dark-mode .crd-estate-agent-card-phone a,
body.dark-mode .crd-estate-agent-card-email a,
body.dark-mode .crd-estate-agent-breadcrumb a {
    color: #4d9fff;
}

body.dark-mode .crd-estate-agent-btn-outline {
    border-color: #4d9fff;
    background: #0d2340;
    color: #4d9fff !important;
}

body.dark-mode .crd-estate-agent-btn-outline:hover {
    background: #4d9fff;
    color: #081a36 !important;
}
