/* ============================================
   USER DIRECTORY V2 - BRAND GUIDELINES
   ============================================ */

:root {
    --brand-green: #4A7C59;
    --brand-gold: #D4A017;
    --brand-cream: #F9F7F2;
    --brand-charcoal: #2C2C2C;
    --brand-error: #EF4444;
}

/* ============================================
   HERO SECTION - BRAND GUIDELINES
   ============================================ */
.user-directory-hero-v2 {
    position: relative;
    padding: 36px 16px 64px;
    max-width: 1280px;
    margin: 0 auto;
    z-index: 10;
}

@media (min-width: 640px) {
    .user-directory-hero-v2 {
        padding: 48px 24px 80px;
    }
}

.user-directory-hero-container-v2 {
    background: var(--brand-green);
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(212, 160, 23, 0.2);
}

@media (min-width: 768px) {
    .user-directory-hero-container-v2 {
        padding: 64px;
    }
}

.user-directory-hero-decoration-v2 {
    position: absolute;
    top: -128px;
    right: -128px;
    width: 300px;
    height: 300px;
    background: var(--brand-gold);
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(60px);
    transition: opacity 0.7s ease;
}

@media (min-width: 768px) {
    .user-directory-hero-decoration-v2 {
        width: 600px;
        height: 600px;
        top: -256px;
        right: -256px;
    }
}

.user-directory-hero-container-v2:hover .user-directory-hero-decoration-v2 {
    opacity: 0.2;
}

.user-directory-hero-content-v2 {
    position: relative;
    z-index: 10;
    max-width: 672px;
}

.user-directory-hero-badge-v2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 160, 23, 0.4);
    color: var(--brand-gold);
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 24px;
    backdrop-filter: blur(4px);
    font-family: 'Lato', sans-serif;
}

.user-directory-hero-badge-dot-v2 {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-gold);
    animation: user-directory-hero-pulse-v2 2s ease-in-out infinite;
}

@keyframes user-directory-hero-pulse-v2 {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.user-directory-hero-title-v2 {
    font-size: 30px;
    line-height: 1.2;
    font-weight: 900;
    margin: 0 0 16px 0;
    font-family: 'Merriweather', serif;
}

@media (min-width: 640px) {
    .user-directory-hero-title-v2 {
        font-size: 36px;
        margin-bottom: 24px;
    }
}

@media (min-width: 768px) {
    .user-directory-hero-title-v2 {
        font-size: 60px;
        margin-bottom: 24px;
    }
}

.user-directory-hero-title-gold-v2 {
    background: linear-gradient(to right, #D4A017, #F2C94C, #D4A017);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: user-directory-hero-shine-v2 4s linear infinite;
    font-style: italic;
}

@keyframes user-directory-hero-shine-v2 {
    to {
        background-position: 200% center;
    }
}

.user-directory-hero-description-v2 {
    font-size: 16px;
    line-height: 1.75;
    color: rgba(249, 247, 242, 0.9);
    margin: 0 0 16px 0;
    max-width: 512px;
    font-family: 'Lato', sans-serif;
}

@media (min-width: 768px) {
    .user-directory-hero-description-v2 {
        font-size: 18px;
        margin-bottom: 24px;
    }
}

.user-directory-hero-description-v2 strong {
    color: #ffffff;
    font-weight: 600;
}

.user-directory-hero-subdescription-v2 {
    font-size: 14px;
    line-height: 1.75;
    color: rgba(249, 247, 242, 0.9);
    margin: 0 0 24px 0;
    max-width: 512px;
    font-family: 'Lato', sans-serif;
}

@media (min-width: 768px) {
    .user-directory-hero-subdescription-v2 {
        font-size: 16px;
        margin-bottom: 32px;
    }
}

/* Statistics Data Points */
.user-directory-hero-stats-v2 {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    margin-top: 24px;
}

@media (min-width: 768px) {
    .user-directory-hero-stats-v2 {
        padding-top: 24px;
        margin-top: 40px;
    }
}

.user-directory-hero-stats-grid-v2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .user-directory-hero-stats-grid-v2 {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

.user-directory-hero-stat-item-v2 {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-directory-hero-stat-label-v2 {
    display: block;
    color: var(--brand-gold);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 12px;
    margin-bottom: 4px;
    font-family: 'Lato', sans-serif;
}

.user-directory-hero-stat-value-v2 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Lato', sans-serif;
}

@media (min-width: 768px) {
    .user-directory-hero-stat-value-v2 {
        font-size: 18px;
    }
}

/* ============================================
   DIRECTORY CONTAINER
   ============================================ */
.flaeske-user-directory-v2 {
    font-family: 'Lato', sans-serif;
    color: var(--brand-charcoal);
    padding: 20px 0;
    max-width: 100%;
}

/* ============================================
   CONTROLS SECTION - BRAND GUIDELINES
   ============================================ */
.directory-controls-v2 {
    padding: 16px;
    background: rgba(249, 250, 251, 1);
    border-bottom: 1px solid rgba(229, 231, 235, 1);
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

@media (min-width: 640px) {
    .directory-controls-v2 {
        padding: 20px;
    }
}

.directory-search-row-v2 {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.directory-label-v2 {
    display: block;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(107, 114, 128, 1);
    margin-bottom: 6px;
    font-family: 'Lato', sans-serif;
}

.directory-search-wrapper-v2 {
    position: relative;
    display: flex;
    align-items: center;
}

.directory-search-icon-v2 {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: rgba(156, 163, 175, 1);
    pointer-events: none;
    z-index: 1;
}

.directory-search-input-v2 {
    width: 100% !important;
    padding: 10px 36px 10px 40px !important;
    border: 1px solid rgba(229, 231, 235, 1) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: var(--brand-charcoal) !important;
    transition: all 0.2s ease !important;
    font-family: 'Lato', sans-serif !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    outline: none !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    font-weight: normal !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.directory-search-input-v2:focus {
    outline: none !important;
    border-color: var(--brand-green) !important;
    box-shadow: 0 0 0 1px var(--brand-green), 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    background: #ffffff !important;
}

.directory-search-input-v2::placeholder {
    color: rgba(156, 163, 175, 1) !important;
    opacity: 1 !important;
}

.directory-clear-search-v2 {
    position: absolute;
    right: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: rgba(156, 163, 175, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 2;
}

.directory-clear-search-v2:hover {
    background: rgba(229, 231, 235, 1);
    color: var(--brand-charcoal);
}

.directory-clear-search-v2 svg {
    width: 16px;
    height: 16px;
}

.directory-filters-row-v2 {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 640px) {
    .directory-filters-row-v2 {
        flex-direction: row;
        align-items: end;
        gap: 16px;
    }
}

.directory-filter-group-v2 {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.directory-select-wrapper-v2 {
    position: relative;
}

.directory-select-v2 {
    width: 100% !important;
    padding: 10px 36px 10px 12px !important;
    border: 1px solid rgba(229, 231, 235, 1) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    color: var(--brand-charcoal) !important;
    background: #ffffff !important;
    appearance: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: 'Lato', sans-serif !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    outline: none !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    font-weight: normal !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.directory-select-v2:focus {
    outline: none !important;
    border-color: var(--brand-green) !important;
    box-shadow: 0 0 0 1px var(--brand-green), 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    background: #ffffff !important;
}

.directory-select-icon-v2 {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: rgba(156, 163, 175, 1);
    pointer-events: none;
}

/* ============================================
   STATS BAR
   ============================================ */
.directory-stats-v2 {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: var(--brand-green);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Lato', sans-serif;
}

.directory-stats-value-v2 {
    font-size: 20px;
    font-weight: bold;
}

.directory-stats-label-v2 {
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.directory-empty-v2 {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(229, 231, 235, 1);
}

.directory-empty-icon-v2 {
    width: 48px;
    height: 48px;
    color: rgba(156, 163, 175, 1);
    margin: 0 auto 16px;
}

.directory-empty-title-v2 {
    font-size: 18px;
    font-weight: bold;
    color: var(--brand-charcoal);
    margin: 0 0 8px;
    font-family: 'Merriweather', serif;
}

.directory-empty-text-v2 {
    color: rgba(107, 114, 128, 1);
    margin: 0;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
}

/* ============================================
   USER GRID
   ============================================ */
.directory-grid-v2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

@media (min-width: 640px) {
    .directory-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (min-width: 900px) {
    .directory-grid-v2 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .directory-grid-v2 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   USER CARD
   ============================================ */
.user-card-v2 {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(229, 231, 235, 1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.user-card-v2:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.user-card-link-v2 {
    display: flex;
    align-items: center;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    gap: 16px;
}

@media (min-width: 900px) {
    .user-card-link-v2 {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px 16px;
    }
}

.user-avatar-v2 {
    flex-shrink: 0;
    position: relative;
}

.user-avatar-v2 img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(229, 231, 235, 1);
    transition: border-color 0.2s ease;
}

@media (min-width: 900px) {
    .user-avatar-v2 img {
        width: 80px;
        height: 80px;
    }
}

.user-card-v2:hover .user-avatar-v2 img {
    border-color: var(--brand-green);
}

/* New member badge on avatar */
.user-new-badge-v2 {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: linear-gradient(135deg, var(--brand-gold), #e6b31a);
    color: var(--brand-charcoal);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    border: 2px solid #fff;
    font-family: 'Lato', sans-serif;
    animation: pulseNewBadge 2s ease-in-out infinite;
}

@keyframes pulseNewBadge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* New member card styling */
.user-card-new-member-v2 {
    border-color: rgba(212, 160, 23, 0.3);
    background: linear-gradient(to bottom right, #fff, rgba(212, 160, 23, 0.05));
}

.user-card-new-member-v2:hover {
    border-color: var(--brand-gold);
}

/* Welcome text for new members */
.user-new-member-text-v2 {
    font-size: 12px;
    color: var(--brand-gold);
    font-style: italic;
    margin: 0 0 8px;
    font-family: 'Lato', sans-serif;
}

@media (min-width: 900px) {
    .user-new-member-text-v2 {
        text-align: center;
    }
}

.user-info-v2 {
    flex: 1;
    min-width: 0;
}

.user-name-v2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--brand-charcoal);
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Lato', sans-serif;
}

@media (min-width: 900px) {
    .user-name-v2 {
        font-size: 18px;
        white-space: normal;
    }
}

.user-badges-v2 {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

@media (min-width: 900px) {
    .user-badges-v2 {
        justify-content: center;
    }
}

.user-badge-mini-v2 {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
    background: var(--brand-cream);
    padding: 2px;
    border: 1px solid rgba(229, 231, 235, 1);
    transition: transform 0.2s ease;
}

.user-badge-mini-v2:hover {
    transform: scale(1.15);
    z-index: 1;
}

.user-badges-more-v2 {
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-green);
    background: var(--brand-cream);
    padding: 4px 8px;
    border-radius: 10px;
    border: 1px solid rgba(229, 231, 235, 1);
    font-family: 'Lato', sans-serif;
}

.user-stats-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

@media (min-width: 900px) {
    .user-stats-v2 {
        justify-content: center;
    }
}

.user-stat-v2 {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: rgba(107, 114, 128, 1);
    font-family: 'Lato', sans-serif;
}

.user-stat-icon-v2 {
    width: 14px;
    height: 14px;
    color: var(--brand-gold);
    flex-shrink: 0;
}

.user-stat-value-v2 {
    font-weight: 600;
    color: var(--brand-charcoal);
}

.user-stat-label-v2 {
    font-size: 12px;
}

.user-social-stats-v2 {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: rgba(107, 114, 128, 1);
    font-family: 'Lato', sans-serif;
}

@media (min-width: 900px) {
    .user-social-stats-v2 {
        justify-content: center;
    }
}

.user-social-stats-v2 strong {
    color: var(--brand-charcoal);
    font-weight: 600;
}

/* ============================================
   USER CARD ACTIONS
   ============================================ */
.user-card-actions-v2 {
    padding: 0 20px 20px;
}

.user-follow-btn-v2 {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid var(--brand-green);
    border-radius: 8px;
    background: transparent;
    color: var(--brand-green);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lato', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.user-follow-btn-v2:hover {
    background: var(--brand-green);
    color: #ffffff;
}

.user-follow-btn-v2 .user-unfollow-text-v2 {
    display: none;
}

.user-follow-btn-following-v2 {
    background: var(--brand-green);
    color: #ffffff;
}

.user-follow-btn-following-v2:hover {
    background: var(--brand-error);
    border-color: var(--brand-error);
}

.user-follow-btn-following-v2:hover .user-follow-text-v2 {
    display: none;
}

.user-follow-btn-following-v2:hover .user-unfollow-text-v2 {
    display: inline;
}

.user-follow-btn-v2.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ============================================
   PAGINATION
   ============================================ */
.directory-pagination-v2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(229, 231, 235, 1);
}

.directory-pagination-btn-v2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid var(--brand-green);
    border-radius: 8px;
    background: transparent;
    color: var(--brand-green);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Lato', sans-serif;
}

.directory-pagination-btn-v2:hover:not(:disabled) {
    background: var(--brand-green);
    color: #ffffff;
}

.directory-pagination-btn-v2:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: rgba(229, 231, 235, 1);
    color: rgba(156, 163, 175, 1);
}

.directory-pagination-btn-v2 svg {
    width: 16px;
    height: 16px;
}

.directory-pagination-info-v2 {
    font-size: 14px;
    color: var(--brand-charcoal);
    font-family: 'Lato', sans-serif;
}

.directory-current-page-v2,
.directory-total-pages-v2 {
    font-weight: bold;
    color: var(--brand-green);
}

/* ============================================
   HIDDEN CARDS
   ============================================ */
.user-card-v2.hidden {
    display: none;
}

/* ============================================
   LOADING STATE
   ============================================ */
.flaeske-user-directory-v2.loading {
    position: relative;
    pointer-events: none;
}

.flaeske-user-directory-v2.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    border-radius: 12px;
}

.flaeske-user-directory-v2.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid rgba(74, 124, 89, 0.2);
    border-top-color: var(--brand-green);
    border-radius: 50%;
    z-index: 11;
    animation: directory-spin-v2 1s linear infinite;
}

@keyframes directory-spin-v2 {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

