/* ==========================================
   1. AGENCY ARCHIVE DIRECTORY (LUXURY LIST VIEW)
   ========================================== */
.agency-archive-main {
    background-color: #fcfcfc;
    padding-top: clamp(140px, 15vw, 180px);
    padding-bottom: 120px;
    min-height: 100vh;
}

.agency-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.directory-header {
    margin-bottom: 80px;
    padding-bottom: 40px;
    border-bottom: 1px solid #1a1a1a;
    text-align: center;
}

.directory-title {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 6vw, 5.5rem);
    color: #1a1a1a;
    margin: 0 0 20px 0;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.03em;
}

.directory-subtitle {
    font-family: var(--font-serif);
    font-size: 18px;
    color: #666666;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 600px;
    font-style: italic;
}

/* --- THE EDITORIAL LIST --- */
.agency-list-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 80px;
}

.agency-list-card {
    background: #ffffff;
    border: 1px solid #eeeeee;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.agency-list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.03);
    border-color: #1a1a1a; 
}

.agency-card-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.agency-list-logo {
    width: 250px;
    height: 160px;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #eeeeee;
    background: #fbfbfb;
}

.agency-list-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.4s ease;
}

.agency-list-card:hover .agency-list-logo img {
    filter: grayscale(0%);
    opacity: 1;
}

.agency-list-info {
    padding: 30px 40px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.agency-name {
    font-family: var(--font-serif);
    font-size: 28px;
    color: #1a1a1a;
    margin: 0;
    font-weight: 400;
}

/* VIP Badge on Directory */
.directory-vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
    padding: 6px 12px;
    border-radius: 2px;
}

.diamond-icon {
    color: #1a1a1a;
    font-size: 12px;
}

.agency-location {
    font-family: var(--font-sans);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #888888;
    margin-bottom: 25px;
    display: block;
}

.card-action-wrapper {
    margin-top: auto;
}

.card-action {
    font-family: var(--font-sans);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #888888;
    font-weight: 700;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.agency-list-card:hover .card-action {
    color: #1a1a1a; 
    letter-spacing: 0.25em; 
}

/* --- PAGINATION --- */
.agency-pagination {
    text-align: center;
    font-family: var(--font-sans);
    font-size: 14px;
    padding-top: 40px;
    border-top: 1px solid #eeeeee;
}

/* ==========================================
   2. SINGLE AGENCY PROFILE (ENTERPRISE UI)
   ========================================== */
.agency-profile-main {
    background-color: #fcfcfc;
    padding-bottom: 120px;
}

/* Force header to solid */
body.single-agency .site-header {
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05) !important;
}
body.single-agency .site-header,
body.single-agency .site-header a,
body.single-agency .site-header .site-branding a { color: #000000 !important; }
body.single-agency .site-header .nav-list a::after { background-color: #000000 !important; }

/* --- 1. THE CINEMATIC COVER --- */
.agency-cover-wrap {
    width: 100%;
    height: 45vh;
    min-height: 380px;
    max-height: 500px;
    position: relative;
    overflow: hidden;
    background-color: #1a1a1a;
    margin-top: 80px; 
}

.agency-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.6) 100%);
}

/* --- 2. THE MASTER CONTAINER --- */
.agency-profile-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* --- 3. THE IDENTITY CARD (HEADER) --- */
.agency-identity-card {
    display: flex;
    background: #ffffff;
    border: 1px solid #eaeaea;
    box-shadow: 0 15px 40px rgba(0,0,0,0.04);
    padding: 40px;
    gap: 40px;
    align-items: center;
    margin-top: -100px; /* Pulls card up over the cover image */
    margin-bottom: 60px;
    border-radius: 4px;
}

.agency-id-logo {
    width: 200px;
    height: 180px;
    flex-shrink: 0;
    border: 1px solid #f0f0f0;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-radius: 2px;
}

.agency-id-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.agency-id-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.agency-id-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.agency-id-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: #1a1a1a;
    margin: 0;
    line-height: 1;
    letter-spacing: -0.02em;
}

/* THE EDITORIAL COMPLIANCE ROW */
.agency-id-compliance {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-family: var(--font-sans);
    font-size: 11px;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
    margin-top: 10px;
}

.compliance-vip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1a1a1a; /* Darker than the license text for subtle hierarchy */
    font-weight: 700;
}

.compliance-vip svg {
    width: 13px;
    height: 13px;
    stroke-width: 1.8px;
    margin-top: -1px;
}

.compliance-separator {
    color: #cccccc;
}

/* --- 4. THE 2-COLUMN BODY LAYOUT --- */
.agency-body-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Left bio is 2x wider than right sidebar */
    gap: 80px;
    margin-bottom: 80px;
}

/* Main Content (Bio) */
.agency-bio-section h3 {
    font-family: var(--font-serif);
    font-size: 26px;
    color: #1a1a1a;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
}

.agency-bio-content {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.8;
    color: #444444;
}

/* Sidebar (Contact Info) */
.agency-sidebar {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.sidebar-widget {
    display: flex;
    flex-direction: column;
}

.sidebar-label {
    font-family: var(--font-sans);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #999999;
    margin-bottom: 15px;
    font-weight: 700;
}

.sidebar-value {
    font-family: var(--font-sans);
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.6;
}

/* Contact List inside Sidebar */
.sidebar-contact-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-contact-link {
    font-family: var(--font-sans);
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    color: #1a1a1a;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.sidebar-contact-link:hover {
    opacity: 0.5;
}

.sidebar-contact-link svg {
    width: 18px;
    height: 18px;
    stroke: #888888;
    stroke-width: 1.5px;
    flex-shrink: 0;
}

/* Socials inside Sidebar */
.sidebar-socials-row {
    display: flex;
    gap: 20px;
}

.sidebar-socials-row a {
    color: #1a1a1a;
    transition: opacity 0.3s ease;
    display: flex;
}

.sidebar-socials-row a:hover {
    opacity: 0.5;
}

.sidebar-socials-row svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.2px;
}

/* --- 5. PORTFOLIO GRID --- */
.portfolio-header {
    margin-bottom: 40px;
    padding-top: 60px;
    border-top: 1px solid #eaeaea;
}

.section-label {
    display: block;
    font-family: var(--font-serif);
    font-size: 28px;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.listing-count {
    font-family: var(--font-sans);
    font-size: 13px;
    color: #888888;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .agency-identity-card { flex-direction: column; align-items: flex-start; gap: 25px; padding: 30px; margin-top: -60px; }
    .agency-id-logo { width: 160px; height: 140px; }
    .agency-body-layout { grid-template-columns: 1fr; gap: 60px; }
}