/**
 * Wives Editorial — Dark High-Fashion Tier System
 * "Dangerous & Beautiful" — Vogue meets true-crime dossier
 */

/* ═══════════════════════════════════════════════════════════════
   TIER COLOR SYSTEM
   ═══════════════════════════════════════════════════════════════ */

.archive-wives,
.single-housewife,
.franchise-archive {
    --wives-bg: #060608;
    --wives-surface: #0c0c10;
    --wives-surface-up: #141418;
    --wives-text: rgba(255, 255, 255, 0.92);
    --wives-text-soft: rgba(255, 255, 255, 0.55);
    --wives-text-muted: rgba(255, 255, 255, 0.30);
    --wives-serif: 'Playfair Display', Georgia, serif;
    --wives-sans: 'Inter', system-ui, sans-serif;
    --wives-mono: 'JetBrains Mono', monospace;
    --wives-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --wives-ease-dramatic: cubic-bezier(0.16, 1, 0.3, 1);

    /* Default: sovereign gold */
    --tier-accent: #D4AF37;
    --tier-accent-rgb: 212, 175, 55;
    --tier-accent-dim: rgba(212, 175, 55, 0.15);
    --tier-accent-glow: rgba(212, 175, 55, 0.35);
    --tier-accent-text: #1a1206;
    --tier-gradient: linear-gradient(135deg, #D4AF37, #F2D06B);
    --tier-border: rgba(212, 175, 55, 0.25);
    --tier-hero-tint: rgba(212, 175, 55, 0.06);
}

/* SOVEREIGN — gold/amber, opulent */
.tier-sovereign {
    --tier-accent: #D4AF37;
    --tier-accent-rgb: 212, 175, 55;
    --tier-accent-dim: rgba(212, 175, 55, 0.15);
    --tier-accent-glow: rgba(212, 175, 55, 0.40);
    --tier-accent-text: #1a1206;
    --tier-gradient: linear-gradient(135deg, #D4AF37, #F2D06B);
    --tier-border: rgba(212, 175, 55, 0.30);
    --tier-hero-tint: rgba(212, 175, 55, 0.08);
}

/* PROVINCIAL — deep amethyst, refined */
.tier-provincial {
    --tier-accent: #9b72cf;
    --tier-accent-rgb: 155, 114, 207;
    --tier-accent-dim: rgba(155, 114, 207, 0.15);
    --tier-accent-glow: rgba(155, 114, 207, 0.35);
    --tier-accent-text: #f0e6ff;
    --tier-gradient: linear-gradient(135deg, #7c3aed, #a78bfa);
    --tier-border: rgba(124, 58, 237, 0.25);
    --tier-hero-tint: rgba(124, 58, 237, 0.06);
}

/* WORKING ROYAL — silver/slate, structured */
.tier-working_royal {
    --tier-accent: #94a3b8;
    --tier-accent-rgb: 148, 163, 184;
    --tier-accent-dim: rgba(148, 163, 184, 0.12);
    --tier-accent-glow: rgba(148, 163, 184, 0.25);
    --tier-accent-text: #1e293b;
    --tier-gradient: linear-gradient(135deg, #94a3b8, #cbd5e1);
    --tier-border: rgba(148, 163, 184, 0.20);
    --tier-hero-tint: rgba(148, 163, 184, 0.05);
}


/* ═══════════════════════════════════════════════════════════════
   HOUSEWIFE CARD — Editorial Magazine Cover
   ═══════════════════════════════════════════════════════════════ */

.housewife-card {
    position: relative;
    background: var(--wives-surface, #0c0c10);
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.6s var(--wives-ease-dramatic);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.housewife-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(var(--tier-accent-rgb, 212, 175, 55), 0.10);
    border-color: var(--tier-border);
}

.housewife-card .card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.housewife-card .card-image-wrap {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
}

.housewife-card .card-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--wives-ease-dramatic), filter 0.6s ease;
    filter: saturate(0.85) contrast(1.05);
}

.housewife-card:hover .card-portrait {
    transform: scale(1.08);
    filter: saturate(1) contrast(1.1);
}

.housewife-card .card-portrait-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--wives-surface) 0%, var(--wives-surface-up) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tier-accent);
}

.housewife-card .card-portrait-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.3;
}

/* Cinematic gradient overlay */
.housewife-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(6, 6, 8, 0.05) 0%,
        rgba(6, 6, 8, 0.0) 25%,
        rgba(6, 6, 8, 0.55) 60%,
        rgba(6, 6, 8, 0.92) 100%
    );
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.housewife-card:hover .card-overlay {
    background: linear-gradient(
        180deg,
        rgba(6, 6, 8, 0.1) 0%,
        rgba(6, 6, 8, 0.0) 20%,
        rgba(6, 6, 8, 0.5) 55%,
        rgba(6, 6, 8, 0.95) 100%
    );
}

/* Franchise badge — top-left, glassmorphic */
.housewife-card .card-franchise-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(6, 6, 8, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--tier-accent);
    font-family: var(--wives-mono);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 12px;
    border: 1px solid var(--tier-border);
    border-radius: 1px;
    z-index: 4;
}

/* Status indicator — top-right */
.housewife-card .card-status {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(6, 6, 8, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-family: var(--wives-sans);
    font-size: 0.56rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 1px;
    color: rgba(255, 255, 255, 0.75);
    z-index: 4;
}

.housewife-card .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.housewife-card .status-active .status-dot {
    background: #22C55E;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    animation: wives-pulse-dot 2s infinite;
}

.housewife-card .status-former .status-dot {
    background: #6B7280;
}

.housewife-card .status-friend .status-dot {
    background: #F59E0B;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

@keyframes wives-pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Tier badge — reveals on hover */
.housewife-card .card-tier-badge {
    position: absolute;
    top: 44px;
    left: 16px;
    font-family: var(--wives-mono);
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 3px 10px;
    background: var(--tier-gradient);
    color: var(--tier-accent-text);
    border-radius: 1px;
    opacity: 0;
    transform: translateX(-6px);
    transition: all 0.4s var(--wives-ease-dramatic) 0.1s;
    z-index: 4;
}

.housewife-card:hover .card-tier-badge {
    opacity: 1;
    transform: translateX(0);
}

/* Content overlay at bottom */
.housewife-card .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 3;
}

.housewife-card .card-net-worth {
    display: block;
    font-family: var(--wives-serif);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--tier-accent);
    letter-spacing: 0.04em;
    margin-bottom: 2px;
    padding: 0;
    border: none;
}

.housewife-card .card-name {
    font-family: var(--wives-serif) !important;
    font-size: 1.15rem !important;
    font-weight: 500 !important;
    color: #fff !important;
    margin: 0 0 4px !important;
    line-height: 1.15 !important;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.housewife-card .card-tagline {
    font-size: 0.76rem !important;
    font-style: italic;
    color: rgba(255, 255, 255, 0.55) !important;
    margin: 0 0 10px !important;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.housewife-card .card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--tier-accent);
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.4s var(--wives-ease-dramatic) 0.05s;
}

.housewife-card:hover .card-cta {
    opacity: 1;
    transform: translateY(0);
}

/* Corner accents — tier-colored */
.housewife-card .card-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 1px solid var(--tier-accent);
    opacity: 0;
    transition: all 0.5s var(--wives-ease-dramatic);
    z-index: 5;
    pointer-events: none;
}

.housewife-card:hover .card-corner {
    opacity: 0.5;
    width: 26px;
    height: 26px;
}

.housewife-card .card-corner-tl {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
}

.housewife-card .card-corner-br {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
}


/* ═══════════════════════════════════════════════════════════════
   WIVES ARCHIVE — Dark Editorial
   ═══════════════════════════════════════════════════════════════ */

.archive-wives {
    background: var(--wives-bg);
}

/* Cinematic Header */
.wives-archive-header {
    position: relative;
    min-height: 42vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 2rem 80px;
    overflow: hidden;
    text-align: center;
}

.wives-archive-header .header-backdrop {
    position: absolute;
    inset: 0;
}

.wives-archive-header .header-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 0%, var(--tier-hero-tint) 0%, transparent 60%),
        linear-gradient(180deg, var(--wives-bg) 0%, rgba(6, 6, 8, 0.6) 50%, var(--wives-bg) 100%);
}

.wives-archive-header .header-noise {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.025) 1px, transparent 0);
    background-size: 40px 40px;
}

.wives-archive-header .header-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.wives-archive-header .header-eyebrow {
    display: block;
    font-family: var(--wives-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--tier-accent);
    margin-bottom: 20px;
}

.wives-archive-header .header-title {
    font-family: var(--wives-serif) !important;
    font-size: clamp(3.5rem, 9vw, 7rem) !important;
    font-weight: 400 !important;
    font-style: italic;
    color: #fff !important;
    margin: 0 0 16px !important;
    line-height: 0.95 !important;
    letter-spacing: -0.02em !important;
}

.wives-archive-header .header-subtitle {
    font-family: var(--wives-sans);
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--wives-text-soft);
    letter-spacing: 0.06em;
    margin: 0 0 32px;
    max-width: none;
}

.wives-archive-header .header-rule {
    width: 50px;
    height: 1px;
    background: var(--tier-accent);
    margin: 0 auto;
    opacity: 0.5;
}

/* Filter Nav — dark, sticky */
.wives-filter-nav {
    display: flex;
    justify-content: center;
    padding: 20px 2rem;
    background: rgba(6, 6, 8, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-bar .wives-filter-nav {
    top: 32px;
}

.wives-filter-nav .filter-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.wives-filter-nav .filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--wives-text-soft);
    font-family: var(--wives-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    border-radius: 2px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    text-decoration: none;
}

.wives-filter-nav .filter-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.08);
}

.wives-filter-nav .filter-pill.active {
    background: var(--tier-accent);
    color: var(--tier-accent-text);
    border-color: var(--tier-accent);
    font-weight: 600;
}

.wives-filter-nav .pill-count {
    font-size: 0.6rem;
    padding: 1px 5px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.wives-filter-nav .filter-pill.active .pill-count {
    background: rgba(0, 0, 0, 0.2);
}

/* Editorial Grid */
.wives-archive-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 48px clamp(20px, 4vw, 80px) 80px;
}

.wives-editorial-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* First card spans 2 cols + rows for magazine "feature" */
.wives-editorial-grid .housewife-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.wives-editorial-grid .housewife-card:first-child .card-name {
    font-size: 2.6rem !important;
}

.wives-editorial-grid .housewife-card:first-child .card-net-worth {
    font-size: 1.3rem;
}

.wives-editorial-grid .housewife-card:first-child .card-tagline {
    font-size: 1rem !important;
    -webkit-line-clamp: 3;
}

/* Empty state */
.wives-editorial-grid .no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
}

.wives-editorial-grid .empty-state h3 {
    color: #fff !important;
    font-family: var(--wives-serif);
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.wives-editorial-grid .empty-state p {
    color: var(--wives-text-soft);
    max-width: none;
}

/* Pagination — dark */
.wives-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.wives-pagination ul {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.wives-pagination li {
    list-style: none;
}

.wives-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 8px;
    background: var(--wives-surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--wives-text-soft);
    font-family: var(--wives-mono);
    font-size: 0.8rem;
    border-radius: 2px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.wives-pagination .page-numbers:hover,
.wives-pagination .page-numbers.current {
    background: var(--tier-accent);
    color: var(--tier-accent-text);
    border-color: var(--tier-accent);
}

@media (max-width: 1200px) {
    .wives-editorial-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .wives-editorial-grid .housewife-card:first-child {
        grid-column: span 2;
        grid-row: span 2;
    }
}

@media (max-width: 900px) {
    .wives-editorial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .wives-editorial-grid .housewife-card:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }
    .housewife-card .card-name {
        font-size: 1.35rem !important;
    }
}

@media (max-width: 640px) {
    .wives-archive-header {
        min-height: 30vh;
        padding: 80px 1.5rem 60px;
    }
    .wives-editorial-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .wives-editorial-grid .housewife-card:first-child {
        grid-column: span 1;
    }
    .wives-editorial-grid .housewife-card:first-child .card-name {
        font-size: 1.5rem !important;
    }
    .wives-filter-nav {
        padding: 16px 1rem;
    }
    .wives-filter-nav .filter-pill {
        font-size: 0.7rem;
        padding: 6px 12px;
    }
    .wives-archive-content {
        padding: 32px 16px 60px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   SINGLE WIFE — Cinematic Editorial Profile
   ═══════════════════════════════════════════════════════════════ */

.single-housewife {
    background: var(--wives-bg) !important;
    color: var(--wives-text);
}

/* Hero — full-bleed cinematic, sharp image */
.single-housewife .profile-hero {
    min-height: 75vh;
}

.single-housewife .profile-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.single-housewife .hero-bg-image {
    filter: saturate(0.75) contrast(1.1) !important;
    transform: scale(1.02) !important;
    opacity: 0.5 !important;
}

.single-housewife .hero-gradient {
    background: linear-gradient(
        180deg,
        rgba(6, 6, 8, 0.25) 0%,
        rgba(6, 6, 8, 0.4) 35%,
        var(--tier-hero-tint) 65%,
        rgba(6, 6, 8, 0.96) 100%
    ) !important;
}

/* Add vignette for cinematic framing */
.single-housewife .hero-pattern {
    background-image: none !important;
    background: radial-gradient(ellipse at center, transparent 35%, rgba(6, 6, 8, 0.5) 100%) !important;
}

/* Portrait frame — tier accent */
.single-housewife .portrait-frame {
    border-color: var(--tier-accent) !important;
    opacity: 0.35;
}

.single-housewife .hero-portrait::after {
    background: linear-gradient(
        180deg,
        rgba(var(--tier-accent-rgb), 0.1) 0%,
        transparent 20%,
        transparent 80%,
        rgba(6, 6, 8, 0.5) 100%
    ) !important;
}

/* Franchise badge — tier color */
.single-housewife .franchise-badge {
    background: var(--tier-accent) !important;
    color: var(--tier-accent-text) !important;
}

.single-housewife .franchise-badge:hover {
    filter: brightness(1.15);
}

/* Profile name */
.single-housewife .profile-name {
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}

/* Tagline */
.single-housewife .profile-tagline {
    text-align: center;
}

/* Rating badge — unified tier styling */
.single-housewife .sovereign-rating-badge {
    background: var(--tier-gradient) !important;
    border-color: var(--tier-accent) !important;
    color: var(--tier-accent-text) !important;
    box-shadow: 0 2px 16px rgba(var(--tier-accent-rgb), 0.3) !important;
}

.single-housewife .sovereign-rating-badge svg {
    fill: var(--tier-accent-text) !important;
}

/* Stat icons */
.single-housewife .stat-icon {
    color: var(--tier-accent) !important;
    border-color: rgba(var(--tier-accent-rgb), 0.25) !important;
    background: rgba(var(--tier-accent-rgb), 0.08) !important;
}

/* Social links */
.single-housewife .social-link:hover {
    background: var(--tier-accent) !important;
    border-color: var(--tier-accent) !important;
    color: var(--tier-accent-text) !important;
}

/* Iconic Quote — tier-tinted */
.single-housewife .iconic-quote-section {
    background: linear-gradient(
        135deg,
        var(--wives-surface) 0%,
        rgba(var(--tier-accent-rgb), 0.04) 50%,
        var(--wives-surface) 100%
    ) !important;
    border-top: 1px solid var(--tier-border);
    border-bottom: 1px solid var(--tier-border);
}

.single-housewife .quote-mark {
    color: var(--tier-accent) !important;
}

.single-housewife .quote-attribution {
    color: var(--tier-accent) !important;
}

/* Content area */
.single-housewife .profile-content-wrap {
    background: var(--wives-bg);
}

.single-housewife .section-header-inline h2 {
    color: #fff !important;
}

.single-housewife .header-line {
    background: linear-gradient(90deg, var(--tier-border) 0%, transparent 100%) !important;
}

.single-housewife .bio-content {
    color: var(--wives-text);
}

.single-housewife .bio-content p:first-of-type::first-letter {
    color: var(--tier-accent) !important;
}

/* Gallery — masonry */
.single-housewife .gallery-grid {
    columns: 3 !important;
    column-gap: 12px !important;
    display: block !important;
}

.single-housewife .gallery-item {
    break-inside: avoid;
    margin-bottom: 12px;
    aspect-ratio: auto !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2px !important;
}

.single-housewife .gallery-item img {
    border-radius: 2px;
}

.single-housewife .gallery-item:hover img {
    filter: brightness(1.1);
}

@media (max-width: 768px) {
    .single-housewife .gallery-grid {
        columns: 2 !important;
    }
}

/* Sidebar — dark cards */
.single-housewife .sidebar-card {
    background: var(--wives-surface) !important;
    border-color: var(--tier-border) !important;
}

.single-housewife .card-header {
    border-bottom-color: var(--tier-border) !important;
    color: var(--tier-accent) !important;
}

.single-housewife .card-header h3 {
    color: #fff !important;
}

.single-housewife .business-item {
    background: var(--wives-surface-up) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
}

.single-housewife .business-name {
    color: #fff !important;
}

.single-housewife .business-desc {
    color: var(--wives-text-soft) !important;
}

.single-housewife .btn-shop {
    background: var(--tier-accent) !important;
    color: var(--tier-accent-text) !important;
}

.single-housewife .btn-shop:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}

.single-housewife .affiliate-disclosure,
.single-housewife .affiliate-disclosure small {
    color: var(--wives-text-muted) !important;
}

.single-housewife .affiliate-disclosure a {
    color: var(--tier-accent) !important;
}

/* Related wives */
.single-housewife .related-item:hover {
    background: var(--wives-surface-up) !important;
}

.single-housewife .related-name {
    color: #fff !important;
}

.single-housewife .related-nw {
    color: var(--tier-accent) !important;
}

.single-housewife .view-all-link {
    border-top-color: var(--tier-border) !important;
    color: var(--tier-accent) !important;
}

/* Profile Footer */
.single-housewife .profile-footer {
    background: var(--wives-surface) !important;
    border-top-color: var(--tier-border) !important;
}

.single-housewife .ftc-disclosure {
    color: var(--wives-text-muted) !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .single-housewife .profile-hero {
        min-height: 55vh;
    }
    .single-housewife .profile-hero-inner {
        flex-direction: column;
        text-align: center;
    }
}


/* ═══════════════════════════════════════════════════════════════
   SPARKLE EFFECT — For Dark Jurisdiction Backgrounds
   ═══════════════════════════════════════════════════════════════ */

@keyframes sparkle-twinkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(45deg);
    }
}

@keyframes sparkle-float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-10px) translateX(5px);
    }
    50% {
        transform: translateY(-5px) translateX(-5px);
    }
    75% {
        transform: translateY(-15px) translateX(3px);
    }
}

/* Sparkle container for dark sections */
.sparkle-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

/* Individual sparkle */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow:
        0 0 6px 2px rgba(255, 255, 255, 0.8),
        0 0 12px 4px rgba(212, 175, 55, 0.4);
    animation: sparkle-twinkle 3s ease-in-out infinite;
}

/* Cross sparkle shape (4-point star) */
.sparkle::before,
.sparkle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: inherit;
    box-shadow: inherit;
}

.sparkle::before {
    width: 12px;
    height: 2px;
}

.sparkle::after {
    width: 2px;
    height: 12px;
}

/* Varied sparkle positions and delays */
.sparkle:nth-child(1) { top: 15%; left: 10%; animation-delay: 0s; animation-duration: 2.5s; }
.sparkle:nth-child(2) { top: 25%; left: 85%; animation-delay: 0.5s; animation-duration: 3s; }
.sparkle:nth-child(3) { top: 45%; left: 5%; animation-delay: 1s; animation-duration: 2.8s; }
.sparkle:nth-child(4) { top: 65%; left: 92%; animation-delay: 1.5s; animation-duration: 3.2s; }
.sparkle:nth-child(5) { top: 80%; left: 15%; animation-delay: 0.3s; animation-duration: 2.7s; }
.sparkle:nth-child(6) { top: 10%; left: 70%; animation-delay: 0.8s; animation-duration: 3.5s; }
.sparkle:nth-child(7) { top: 35%; left: 95%; animation-delay: 1.2s; animation-duration: 2.6s; }
.sparkle:nth-child(8) { top: 55%; left: 8%; animation-delay: 1.8s; animation-duration: 3s; }
.sparkle:nth-child(9) { top: 75%; left: 80%; animation-delay: 0.2s; animation-duration: 2.9s; }
.sparkle:nth-child(10) { top: 90%; left: 40%; animation-delay: 1.3s; animation-duration: 3.1s; }
.sparkle:nth-child(11) { top: 20%; left: 50%; animation-delay: 0.7s; animation-duration: 2.8s; }
.sparkle:nth-child(12) { top: 40%; left: 25%; animation-delay: 1.6s; animation-duration: 3.3s; }

/* Smaller distant sparkles */
.sparkle.small {
    width: 2px;
    height: 2px;
    opacity: 0.6;
}

.sparkle.small::before {
    width: 6px;
    height: 1px;
}

.sparkle.small::after {
    width: 1px;
    height: 6px;
}

/* Golden tinted sparkles for accent areas */
.sparkle.gold {
    background: var(--franchise-color, #D4AF37);
    box-shadow:
        0 0 8px 2px rgba(212, 175, 55, 0.8),
        0 0 16px 4px rgba(212, 175, 55, 0.4);
}

/* ═══════════════════════════════════════════════════════════════
   FRANCHISE / JURISDICTION PAGE
   ═══════════════════════════════════════════════════════════════ */

.franchise-archive {
    background: var(--wives-bg);
    color: var(--wives-text);
    min-height: 100vh;
}

/* Franchise Hero */
.franchise-hero {
    position: relative;
    padding: 100px 0 60px;
    overflow: hidden;
    text-align: center;
}

.franchise-hero .hero-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.franchise-hero .hero-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, var(--franchise-color, #D4AF37) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, var(--franchise-color, #D4AF37) 0%, transparent 50%);
    opacity: 0.06;
}

.franchise-hero .hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--wives-bg) 0%, transparent 30%, transparent 70%, var(--wives-bg) 100%);
}

.franchise-hero .hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

.franchise-code-badge {
    display: inline-block;
    padding: 6px 20px;
    background: var(--franchise-color, #D4AF37);
    color: #000;
    font-family: var(--wives-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 2px;
    margin-bottom: 20px;
}

.franchise-title {
    font-family: var(--wives-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin: 0 0 12px;
}

.franchise-title .title-prefix {
    display: block;
    font-family: var(--wives-sans);
    font-size: 0.35em;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--wives-text-soft);
    margin-bottom: 8px;
}

.franchise-description {
    font-family: var(--wives-serif);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--wives-text-soft);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

/* Franchise Stats */
.franchise-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.franchise-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 24px;
}

.franchise-stats .stat-value {
    font-family: var(--wives-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--franchise-color, var(--tier-accent));
    line-height: 1;
}

.franchise-stats .stat-label {
    font-family: var(--wives-sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--wives-text-muted);
    margin-top: 6px;
}

.franchise-stats .stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.08);
}

/* Filter Bar */
.franchise-filter-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(6, 6, 8, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 12px 0;
}

.franchise-filter-bar .filter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.franchise-filter-bar .back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--wives-sans);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--wives-text-soft);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.franchise-filter-bar .back-link:hover {
    color: var(--franchise-color, var(--tier-accent));
}

.franchise-filter-bar .filter-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}

.franchise-filter-bar .filter-pills::-webkit-scrollbar {
    display: none;
}

.franchise-filter-bar .filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: var(--wives-surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    font-family: var(--wives-sans);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--wives-text-soft);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.franchise-filter-bar .filter-pill:hover {
    border-color: var(--pill-color, var(--tier-accent));
    color: var(--pill-color, var(--tier-accent));
    background: rgba(255, 255, 255, 0.03);
}

/* Franchise Content / Grid */
.franchise-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.franchise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Editorial Grid - Same as archive-wives.php (used when featured card is needed) */
.franchise-archive .wives-editorial-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* First card spans 2 cols + rows for magazine "feature" */
.franchise-archive .wives-editorial-grid .housewife-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.franchise-archive .wives-editorial-grid .housewife-card:first-child .card-name {
    font-size: 2.6rem !important;
}

.franchise-archive .wives-editorial-grid .housewife-card:first-child .card-net-worth {
    font-size: 1.3rem;
}

.franchise-archive .wives-editorial-grid .housewife-card:first-child .card-tagline {
    font-size: 1rem !important;
    -webkit-line-clamp: 3;
}

/* Responsive Editorial Grid */
@media (max-width: 1200px) {
    .franchise-archive .wives-editorial-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .franchise-archive .wives-editorial-grid .housewife-card:first-child {
        grid-column: span 2;
        grid-row: span 2;
    }
}

@media (max-width: 900px) {
    .franchise-archive .wives-editorial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .franchise-archive .wives-editorial-grid .housewife-card:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }
    .franchise-archive .wives-editorial-grid .housewife-card:first-child .card-name {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 640px) {
    .franchise-archive .wives-editorial-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .franchise-archive .wives-editorial-grid .housewife-card:first-child {
        grid-column: span 1;
    }
}

/* Pagination */
.archive-pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.archive-pagination ul {
    display: flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-pagination li {
    display: flex;
}

.archive-pagination a,
.archive-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    background: var(--wives-surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    font-family: var(--wives-mono);
    font-size: 0.85rem;
    color: var(--wives-text-soft);
    text-decoration: none;
    transition: all 0.3s ease;
}

.archive-pagination a:hover {
    border-color: var(--franchise-color, var(--tier-accent));
    color: var(--franchise-color, var(--tier-accent));
    background: rgba(255, 255, 255, 0.03);
}

.archive-pagination .current {
    background: var(--franchise-color, var(--tier-accent));
    border-color: var(--franchise-color, var(--tier-accent));
    color: #000;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   JURISDICTION WEAR SECTION — Dark with Sparkles
   ═══════════════════════════════════════════════════════════════ */

.jurisdiction-wear-section {
    position: relative;
    background: var(--wives-bg);
    padding: 80px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.jurisdiction-wear-section .section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
}

.jurisdiction-wear-section .section-eyebrow {
    display: block;
    font-family: var(--wives-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--franchise-color, var(--tier-accent));
    margin-bottom: 16px;
}

.jurisdiction-wear-section h2 {
    font-family: var(--wives-serif);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 500;
    color: #fff;
    margin: 0 0 12px;
}

.jurisdiction-wear-section .section-subtitle {
    font-family: var(--wives-sans);
    font-size: 1rem;
    color: var(--wives-text-soft);
    margin: 0;
}

.jurisdiction-wear-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.wear-card {
    background: var(--wives-surface);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.4s var(--wives-ease-dramatic);
}

.wear-card:hover {
    transform: translateY(-4px);
    border-color: var(--franchise-color, var(--tier-accent));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(var(--tier-accent-rgb, 212, 175, 55), 0.1);
}

.wear-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.wear-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--wives-surface-up);
}

.wear-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.wear-card:hover .wear-image img {
    transform: scale(1.05);
}

.wear-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--franchise-color, var(--tier-accent));
    opacity: 0.3;
}

.wear-info {
    padding: 16px;
}

.wear-brand {
    display: block;
    font-family: var(--wives-mono);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--franchise-color, var(--tier-accent));
    margin-bottom: 6px;
}

.wear-title {
    font-family: var(--wives-sans);
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    margin: 0 0 8px;
    line-height: 1.3;
}

.wear-wife {
    display: block;
    font-size: 0.75rem;
    color: var(--wives-text-soft);
    margin-bottom: 8px;
}

.wear-price {
    display: block;
    font-family: var(--wives-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wives-text);
}

.no-wear-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 40px;
    color: var(--wives-text-soft);
    font-style: italic;
}

.wear-cta {
    text-align: center;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    border: 1px solid var(--franchise-color, var(--tier-accent));
    color: var(--franchise-color, var(--tier-accent));
    font-family: var(--wives-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.btn-view-all:hover {
    background: var(--franchise-color, var(--tier-accent));
    color: #000;
}

/* ═══════════════════════════════════════════════════════════════
   JURISDICTION MAP SECTION — Dark with Sparkles
   ═══════════════════════════════════════════════════════════════ */

.jurisdiction-map-section {
    position: relative;
    background: var(--wives-bg);
    padding: 80px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.jurisdiction-map-section .section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
}

.jurisdiction-map-section .section-eyebrow {
    display: block;
    font-family: var(--wives-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--franchise-color, var(--tier-accent));
    margin-bottom: 16px;
}

.jurisdiction-map-section h2 {
    font-family: var(--wives-serif);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 500;
    color: #fff;
    margin: 0 0 12px;
}

.jurisdiction-map-section .section-subtitle {
    font-family: var(--wives-sans);
    font-size: 1rem;
    color: var(--wives-text-soft);
    margin: 0;
}

.map-container-full {
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .franchise-hero {
        padding: 80px 0 40px;
    }
    
    .jurisdiction-wear-section,
    .jurisdiction-map-section {
        padding: 60px 16px;
    }
    
    .jurisdiction-wear-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .franchise-stats {
        gap: 16px;
    }

    .franchise-stats .stat-divider {
        display: none;
    }

    .franchise-stats .stat-item {
        padding: 8px 16px;
    }

    .franchise-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }

    .franchise-filter-bar .filter-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   WIFE LOCATIONS SECTION — Map & Compact Grid
   ═══════════════════════════════════════════════════════════════ */

.profile-locations {
    margin-top: 48px;
}

.wife-locations-map {
    width: 100%;
    height: 320px;
    border-radius: 8px;
    margin-bottom: 32px;
    background: var(--wives-surface);
    border: 1px solid var(--wives-border);
}

/* Compact locations grid - NOT large */
.wife-locations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.wife-location-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--wives-surface);
    border: 1px solid var(--wives-border);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.wife-location-card:hover {
    border-color: var(--tier-accent);
    background: var(--wives-surface-up);
    transform: translateY(-2px);
}

.location-thumb {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.location-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.location-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 169, 110, 0.1);
    color: var(--tier-accent);
    font-size: 20px;
}

.location-info {
    min-width: 0;
}

.location-type {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tier-accent);
    margin-bottom: 2px;
}

.location-name {
    font-family: var(--wives-serif);
    font-size: 0.95rem;
    font-weight: 400;
    color: #fff;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-city {
    font-size: 0.75rem;
    color: var(--wives-text-soft);
}

@media (max-width: 768px) {
    .wife-locations-grid {
        grid-template-columns: 1fr;
    }
    
    .wife-locations-map {
        height: 250px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   STYLE DNA SECTION
   ═══════════════════════════════════════════════════════════════ */

.wife-dna-section {
    background: var(--wives-bg);
    border-top: 1px solid rgba(212, 175, 55, 0.12);
    border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.wife-dna-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 72px 48px;
}

.wife-dna-header {
    text-align: center;
    margin-bottom: 52px;
}

.wife-dna-eyebrow {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--wives-gold, #D4AF37);
    margin-bottom: 12px;
}

.wife-dna-title {
    font-family: var(--wives-serif);
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 400;
    color: var(--wives-text);
    margin: 0;
    line-height: 1.1;
}

.wife-dna-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 64px;
    align-items: center;
}

/* Radar canvas container */
.wife-dna-layout .dna-breakdown {
    width: 100%;
    aspect-ratio: 1;
}

.wife-dna-layout .dna-breakdown canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Stat bars */
.wife-dna-bars {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.wife-dna-bar-row {
    display: grid;
    grid-template-columns: 80px 1fr 36px;
    align-items: center;
    gap: 14px;
}

.wife-dna-bar-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--wives-text-soft);
}

.wife-dna-bar-track {
    height: 3px;
    background: rgba(212, 175, 55, 0.12);
    position: relative;
    overflow: hidden;
}

.wife-dna-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(212,175,55,0.5), #D4AF37);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.wife-dna-bar-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: var(--wives-gold, #D4AF37);
    text-align: right;
}

/* Net worth block */
.wife-dna-networth {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wife-dna-nw-amount {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 3.5vw, 44px);
    font-weight: 400;
    color: var(--wives-gold, #D4AF37);
    line-height: 1;
    letter-spacing: -0.02em;
}

.wife-dna-nw-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--wives-text-muted);
    margin-top: 4px;
}

.wife-dna-nw-rank {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: var(--wives-text-soft);
    margin-top: 8px;
    font-style: italic;
}

.wife-dna-nw-rank strong {
    color: var(--wives-text);
    font-style: normal;
    font-weight: 700;
}

@media (max-width: 900px) {
    .wife-dna-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .wife-dna-layout .dna-breakdown {
        max-width: 280px;
        margin: 0 auto;
    }
    .wife-dna-inner {
        padding: 56px 24px;
    }
}
