/* ==========================================================================
   RevX Directory — Stylesheet
   Brand tokens: Gold #9b8b68 | Black #000000 | Off-white #F7F6F2
   Fonts: Montserrat (headings) + Open Sans (body)
   ========================================================================== */

/* ── Google Fonts import ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Open+Sans:wght@400;600;700&display=swap');

/* ── CSS Custom Properties ───────────────────────────────────────────────── */
:root {
    --revx-gold:       #9b8b68;
    --revx-navy:       #000000;
    --revx-white:      #fff;
    --revx-off-white:  #F7F6F2;
    --revx-text:       #2C2C2C;
    --revx-muted:      #6B6B6B;
    --revx-border:     #E8E0CC;
}

/* ==========================================================================
   DIRECTORY / ARCHIVE PAGE
   ========================================================================== */

/* Full-bleed white canvas: break out of Astra's constrained content container
   so the hero and grid span the entire viewport width, edge to edge.
   Mirrors the child theme's .revx-blog-wrap archive pattern. */
.revx-agents-page {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: var(--revx-white);
}

.revx-agents-page .site-main {
    background: var(--revx-white);
}

/* ── Hero — team group photo background with logo + "Meet Our Team" ──────── */
.revx-agents-hero {
    background-color: var(--revx-navy); /* fallback while the photo loads */
    background-image: linear-gradient( rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3) ), url('../img/team-hero-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: var(--revx-white);
    text-align: center;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    padding: 4rem 1.5rem;
}

.revx-agents-hero-logo {
    width: clamp(300px, 40vw, 540px);
    max-width: 85%;
    height: auto;
    display: block;
    /* Soft shadow keeps the white lockup readable over lighter parts of the photo */
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
}

.revx-agents-hero h1 {
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.revx-agents-hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--revx-white);
    margin: 0;
    line-height: 1.1;
}

/* ── Container ───────────────────────────────────────────────────────────── */
.revx-agents-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem;
}

/* ── Directory intro ─────────────────────────────────────────────────────── */
.revx-directory-intro {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 2.5rem;
}

.revx-directory-intro h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--revx-navy);
    margin: 0 0 0.6rem;
}

.revx-directory-intro p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--revx-muted);
    margin: 0;
}

/* Short gold accent rule under the intro heading */
.revx-directory-intro h2::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    margin: 0.75rem auto 0;
    background: var(--revx-gold);
    border-radius: 2px;
}

/* ── Island filter buttons ───────────────────────────────────────────────── */
.revx-island-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
}

.revx-filter-btn {
    border: 2px solid var(--revx-gold);
    color: var(--revx-gold);
    background: transparent;
    padding: 0.6rem 1.6rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.revx-filter-btn:hover {
    background-color: var(--revx-gold);
    color: var(--revx-navy);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(155, 139, 104, 0.35);
}

.revx-filter-btn.active {
    background-color: var(--revx-gold);
    color: var(--revx-navy);
    box-shadow: 0 4px 14px rgba(155, 139, 104, 0.4);
}

/* ── Search input ────────────────────────────────────────────────────────── */
.revx-agent-search {
    display: block;
    width: 100%;
    border: 1px solid var(--revx-border);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    color: var(--revx-text);
    margin-bottom: 2rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.revx-agent-search:focus {
    outline: none;
    border-color: var(--revx-gold);
    box-shadow: 0 0 0 3px rgba(155, 139, 104, 0.2);
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.revx-agent-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 3.5rem;
}

/* Empty when there's only one page — collapse its top margin */
.revx-agent-pagination:empty {
    margin-top: 0;
}

.revx-page-btn {
    min-width: 42px;
    height: 42px;
    padding: 0 0.7rem;
    border: 1px solid var(--revx-border);
    background: var(--revx-white);
    color: var(--revx-text);
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.revx-page-btn:hover:not(:disabled):not(.active) {
    border-color: var(--revx-gold);
    color: var(--revx-gold);
}

.revx-page-btn.active {
    background: var(--revx-gold);
    border-color: var(--revx-gold);
    color: var(--revx-navy);
    cursor: default;
}

.revx-page-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.revx-page-ellipsis {
    padding: 0 0.3rem;
    color: var(--revx-muted);
}

/* ── Agent Grid — 3 columns, generous gutters, like the live page ────────── */
.revx-agent-grid {
    display: grid;
    gap: 3.5rem 2.5rem;
    grid-template-columns: repeat(3, 1fr);
}

.revx-agent-grid.revx-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.revx-agent-grid.revx-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.revx-agent-grid.revx-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Responsive breakpoints */
@media (max-width: 1100px) {
    .revx-agent-grid,
    .revx-agent-grid.revx-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .revx-agent-grid,
    .revx-agent-grid.revx-cols-4,
    .revx-agent-grid.revx-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .revx-agent-grid,
    .revx-agent-grid.revx-cols-4,
    .revx-agent-grid.revx-cols-3,
    .revx-agent-grid.revx-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* ── Agent Card — plain centered stack, like the live page ───────────────── */
.revx-agent-card {
    text-align: center;
}

/* Photo */
.revx-card-photo-link {
    display: block;
}

/* Photos already have a circular gold ring baked into the source image
   (transparent or white corners), so show them whole against the white page. */
.revx-agent-photo,
.revx-card-photo-link img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    display: block;
    background: var(--revx-white);
    transition: opacity 0.25s ease;
}

.revx-agent-card:hover .revx-agent-photo,
.revx-agent-card:hover .revx-card-photo-link img {
    opacity: 0.85;
}

/* Photo placeholder */
.revx-agent-photo-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--revx-navy);
    display: flex;
    align-items: center;
    justify-content: center;
}

.revx-agent-photo-placeholder span {
    color: var(--revx-gold);
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

/* Agent name */
.revx-agent-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1em 0 0;
    line-height: 1.2;
}

.revx-agent-name a {
    color: var(--revx-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.revx-agent-name a:hover {
    color: var(--revx-gold);
}

/* Excerpt lines: ISLAND / Phone / Email — muted gray labels, gold values */
.revx-card-excerpt {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--revx-muted);
    margin-top: 0.75em;
    line-height: 1.6;
}

.revx-card-excerpt p {
    margin: 0 0 0.35em;
}

.revx-agent-label {
    text-transform: uppercase;
}

.revx-card-excerpt a {
    color: var(--revx-gold);
    text-decoration: none;
    transition: color 0.2s ease;
}

.revx-card-excerpt a:hover {
    text-decoration: underline;
}

/* No results message */
.revx-no-agents {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--revx-muted);
    font-family: 'Open Sans', sans-serif;
    padding: 2rem 0;
}

/* ==========================================================================
   SINGLE AGENT PROFILE PAGE
   ========================================================================== */

/* Full-bleed warm canvas so the profile reads as a designed page, not a
   column floating on the theme's grey. Mirrors the archive full-bleed trick. */
.revx-agent-profile {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 3.5rem 1.5rem 4.5rem;
    background:
        radial-gradient(1200px 480px at 50% -120px, rgba(155, 139, 104, 0.10), transparent 70%),
        linear-gradient(180deg, var(--revx-off-white) 0%, #ffffff 60%);
    font-family: 'Open Sans', sans-serif;
    color: var(--revx-text);
}

.revx-profile-inner {
    max-width: 1080px;
    margin: 0 auto;
}

/* ── Profile Hero — dark gold-accented card ──────────────────────────────── */
.revx-profile-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, #161616 0%, #2b2b2b 55%, #343331 100%);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.55);
    position: relative;
    overflow: hidden;
}

/* Subtle gold hairline along the top edge of the hero. */
.revx-profile-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--revx-gold), transparent);
}

@media (max-width: 700px) {
    .revx-profile-hero {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        padding: 2rem 1.5rem;
        text-align: center;
    }
}

/* Profile photo */
.revx-profile-photo img,
.revx-photo-placeholder {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--revx-gold);
    display: block;
    box-shadow:
        0 0 0 10px rgba(255, 255, 255, 0.04),
        0 22px 40px -16px rgba(0, 0, 0, 0.6);
}

.revx-photo-placeholder {
    background: var(--revx-navy);
    display: flex;
    align-items: center;
    justify-content: center;
}

.revx-photo-placeholder span {
    color: var(--revx-gold);
    font-family: 'Montserrat', sans-serif;
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 700px) {
    .revx-profile-photo img,
    .revx-photo-placeholder {
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }
}

/* Profile info */
.revx-profile-info h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 4vw, 2.85rem);
    font-weight: 800;
    letter-spacing: -0.015em;
    color: var(--revx-white);
    margin: 0 0 0.6rem;
    line-height: 1.1;
}

.revx-profile-title {
    font-size: 1.05rem;
    color: var(--revx-white);
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid rgba(155, 139, 104, 0.5);
}

/* Contact lines inside the dark hero */
.revx-profile-contact {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.revx-profile-contact a,
.revx-profile-contact span {
    color: var(--revx-white);
    text-decoration: none;
    transition: color 0.2s ease;
}

.revx-profile-contact a:hover {
    color: var(--revx-gold);
}

@media (max-width: 700px) {
    .revx-profile-contact {
        align-items: center;
    }
}

/* Island badge (profile page) */
.revx-island-badge {
    display: inline-block;
    background: var(--revx-gold);
    color: var(--revx-navy);
    font-family: 'Open Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
}

.revx-profile-info .revx-island-badge {
    margin-bottom: 0.75rem;
}

.revx-license {
    font-size: 0.9rem;
    color: var(--revx-muted);
    margin-bottom: 1rem;
}

/* Action buttons */
.revx-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 700px) {
    .revx-profile-actions {
        justify-content: center;
    }
}

.revx-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem 1.6rem;
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.revx-btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.revx-btn-call {
    background: var(--revx-gold);
    color: var(--revx-navy);
    border: 2px solid var(--revx-gold);
}

.revx-btn-call:hover {
    background: var(--revx-navy);
    color: var(--revx-gold);
    border-color: var(--revx-navy);
}

.revx-btn-email {
    background: transparent;
    border: 2px solid var(--revx-gold);
    color: var(--revx-gold);
}

.revx-btn-email:hover {
    background: var(--revx-gold);
    color: var(--revx-navy);
}

/* ── Bio ─────────────────────────────────────────────────────────────────── */
.revx-profile-bio {
    max-width: 780px;
    margin-bottom: 2rem;
    line-height: 1.75;
}

.revx-profile-bio h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    color: var(--revx-navy);
    margin-bottom: 1rem;
}

/* ── Details / Pills ─────────────────────────────────────────────────────── */
.revx-profile-details {
    margin-bottom: 2rem;
}

.revx-detail-group {
    margin-bottom: 1.5rem;
}

.revx-detail-group h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: var(--revx-navy);
    border-bottom: 2px solid var(--revx-gold);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.revx-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.revx-pill {
    background: var(--revx-navy);
    color: var(--revx-gold);
    padding: 0.3rem 0.9rem;
    border-radius: 50px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

/* ── Social links ────────────────────────────────────────────────────────── */
.revx-profile-social {
    margin-bottom: 2rem;
}

.revx-profile-social h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: var(--revx-navy);
    margin-bottom: 1rem;
}

.revx-profile-social > a {
    display: inline-flex;
    align-items: center;
}

/* Flex row wrapper for the links */
.revx-profile-social {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

/* Re-declare h3 inside social as a full-width row header */
.revx-profile-social h3 {
    width: 100%;
    margin: 0 0 0.25rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: var(--revx-navy);
}

.revx-social-link {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    border: 1px solid var(--revx-border);
    color: var(--revx-text);
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.revx-social-link:hover {
    border-color: var(--revx-gold);
    color: var(--revx-gold);
}


/* ── Home search band ──────────────────────────────────────────────────────── */
.revx-search-band {
    background: #ffffff;
    border: 1px solid var(--revx-border);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    margin-bottom: 2.5rem;
    text-align: center;
    box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.35);
}

.revx-search-band h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--revx-navy);
    margin: 0 0 0.5rem;
}

.revx-search-band h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin: 0.85rem auto 0;
    background: var(--revx-gold);
    border-radius: 2px;
}

/* The Ylopo search bar renders into this container; constrain + center it. */
.revx-search-band .YLOPO_searchWidget {
    max-width: 680px;
    margin: 1.75rem auto 0;
}

/* ── Back link ───────────────────────────────────────────────────────────── */
.revx-back-link {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--revx-border);
}

.revx-back-link a {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--revx-gold);
    text-decoration: none;
    transition: color 0.2s ease;
}

.revx-back-link a:hover {
    color: var(--revx-navy);
}

/* ==========================================================================
   ADMIN METABOX STYLES
   (These are also output inline via admin_head — kept here for reference)
   ========================================================================== */

.revx-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem;
}

.revx-meta-field {
    display: flex;
    flex-direction: column;
}

.revx-meta-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 13px;
}

.revx-meta-field input[type="text"],
.revx-meta-field input[type="email"],
.revx-meta-field input[type="url"],
.revx-meta-field input[type="number"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
}
