/**
 * Anan Agents - Elementor widget styles.
 *
 * The card shell and the Call / Email / WhatsApp row are copied from the
 * WPResidence property card (.wpestate_property_card_contact_wrapper*) so the
 * two components read as one system. Own class names are used on purpose: the
 * theme binds click handlers to its own contact classes to open per-property
 * modals, which do not apply to an agent card.
 */

.anan-agents {
    --anan-accent: var(--wp-estate-main-color-option, var(--wp-estate-main-color, #6E6659));
    --anan-radius: var(--wp-estate-border-radius-corner-option, var(--wp_estate_border_radius_corner, 10px));
    --anan-ink: #252A2C;
    --anan-ink-muted: #5C727D;
    --anan-line: #E7E7E7;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.anan-agent-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: rgba(37, 42, 44, .08) 0 10px 27px;
}

/* ---- photo ---- */

.anan-agent-card__media {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    background: #E9E8E6;
    overflow: hidden;
}

.anan-agent-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- name + position ---- */

.anan-agent-card__body {
    flex: 1 1 auto;
    padding: 18px 20px 0;
}

.anan-agent-card__name {
    margin: 0;
    font-family: Fraunces, Georgia, serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.15;
    color: var(--anan-ink);
}

.anan-agent-card__name a {
    color: inherit;
    text-decoration: none;
}

.anan-agent-card__name a:hover,
.anan-agent-card__name a:focus-visible {
    color: var(--anan-accent);
}

.anan-agent-card__position {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--anan-ink-muted);
}

.anan-agent-card__bio {
    margin: 12px 0 0;
    /* Matches the site reading size (16px / 1.75) rather than the old 14px -
       this is a bio, not card chrome. */
    font-size: calc( 16px * var( --anan-text-scale, 1 ) );
    line-height: 1.75;
    color: var(--anan-ink-muted);
}

/* ---- contact row ---- */

.anan-agent-card__contact {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 20px 20px;
    padding-top: 15px;
    border-top: 1px solid var(--anan-line);
}

.anan-agent-card__btn {
    display: flex;
    flex: 1 1 0;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    padding: 5px 15px;
    border: 1px solid color-mix(in srgb, var(--anan-accent) 10%, transparent);
    border-radius: var(--anan-radius);
    background-color: color-mix(in srgb, var(--anan-accent) 10%, transparent);
    color: var(--anan-accent);
    font-size: 13px;
    font-weight: 400;
    line-height: 22px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.anan-agent-card__btn:hover,
.anan-agent-card__btn:focus-visible {
    background-color: var(--anan-accent);
    border-color: var(--anan-accent);
    color: #fff;
    text-decoration: none;
}

.anan-agent-card__btn:focus-visible {
    outline: 2px solid var(--anan-accent);
    outline-offset: 2px;
}

.anan-agent-card__btn i {
    font-size: 14px;
}

.anan-agent-card__btn svg {
    width: 14px;
    max-height: 17px;
    fill: var(--anan-accent);
    transition: fill .2s ease;
}

.anan-agent-card__btn:hover i,
.anan-agent-card__btn:focus-visible i {
    color: #fff;
}

.anan-agent-card__btn:hover svg,
.anan-agent-card__btn:focus-visible svg {
    fill: #fff;
}

.anan-agent-card__btn-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* WhatsApp is icon-only, so it keeps its natural width */
.anan-agent-card__btn--whatsapp {
    flex: 0 0 auto;
    padding: 5px 14px;
}

.anan-agent-card__btn--whatsapp i {
    font-size: 16px;
}

/* ---- fallback breakpoints (Elementor's column control overrides these) ---- */

@media (max-width: 1024px) {
    .anan-agents {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .anan-agents {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .anan-agent-card__btn,
    .anan-agent-card__btn svg {
        transition: none;
    }
}
