/* ==========================================================================
   UPDATED: Celebrity Archive Styling v4.1
   - FIX: Mobile card layout improved for cleanliness.
   - MODIFIED: Card title now wraps instead of getting cut.
   - MODIFIED: Card meta (age/net worth) font size and gap reduced to fit on one line.
   ========================================================================== */

/* --- 1. Brand Colors & Layout Variables --- */
:root {
    --primary-color: #ff6285;
    --primary-color-dark: #e64a6d;
    --filter-bg: #ffffff;
    --filter-border: #e9e9e9;
    --filter-bg-inactive: #f0f2f5;
    --text-color: #222;
    --text-light: #666;
    --body-bg: #f9f9f9;
}

/* --- 2. Main Page Layout --- */
.celebrity-archive-page { background-color: var(--body-bg); }
.celebrity-archive-page .site-main { max-width: 1200px; margin: 0 auto; padding: 0 20px 40px; }

/* --- 3. Archive Hero Section --- */
.celebrity-archive-page .archive-header { text-align: center; padding: 80px 20px; margin-bottom: 50px; color: #fff; background: linear-gradient(135deg, var(--primary-color-dark), var(--primary-color)); border-radius: 0 0 50% 50% / 25px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); }
.celebrity-archive-page .archive-title { font-family: var(--font-secondary); font-size: 2rem; font-weight: 700; color: #fff; margin: 0 0 15px 0; text-transform: uppercase; line-height: 1.2; }
.celebrity-archive-page .archive-description { font-size: 1.1rem; color: #fff; opacity: 0.9; max-width: 750px; margin: 0 auto; line-height: 1.7; }

/* --- 4. Filter Deck --- */
#filter-deck { background-color: var(--filter-bg); padding: 20px; border-radius: 12px; margin-bottom: 40px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07); border: 1px solid var(--filter-border); }
.filter-group { display: flex; align-items: center; gap: 10px; }
.filter-group label { font-weight: 700; font-size: 0.9rem; }
.sort-btn, .filter-btn { padding: 6px 12px; font-size: 0.9rem; border: 1px solid #ddd; background-color: var(--filter-bg-inactive); color: var(--text-light); font-weight: 500; cursor: pointer; border-radius: 50px; transition: all 0.3s ease; }
.sort-btn:hover, .filter-btn:hover { background-color: #e5e7eb; }
.sort-btn.active, .filter-btn.active { background-color: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* --- 5. Celebrity Grid & Cards --- */
.profile-grid-container { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; min-height: 400px; position: relative; }
.celebrity-card { background-color: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; border: 1px solid var(--filter-border); display: flex; flex-direction: column; }
.celebrity-card:hover { transform: translateY(-5px); }
.card-link-wrapper { text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.card-image-container { position: relative; }
.card-image { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.card-content-container { padding: 15px; text-align: center; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.card-title { font-size: 1rem; font-weight: 600; margin: 0 0 10px 0; display: flex; align-items: center; justify-content: center; gap: 6px; }
.card-meta { display: flex; justify-content: center; gap: 15px; margin-bottom: 15px; color: var(--text-light); font-size: 0.8rem; }
.card-cta { background-color: var(--primary-color); color: #fff; padding: 10px 15px; border-radius: 5px; font-weight: 600; margin-top: auto; transition: background-color 0.2s; }
.card-link-wrapper:hover .card-cta { background-color: var(--primary-color-dark); }
.card-rank-badge { position: absolute; top: -8px; left: -8px; width: 50px; height: 50px; background-size: contain; background-repeat: no-repeat; background-position: center; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 0.9rem; line-height: 1; background-color: transparent; padding: 0; border-radius: 0; backdrop-filter: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23222' d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E"); }
.rank-1 .card-rank-badge { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23FFD700' d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E"); color: #333; }
.rank-2 .card-rank-badge { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23C0C0C0' d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E"); color: #333; }
.rank-3 .card-rank-badge { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23CD7F32' d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E"); color: #fff; }
.verified-tick-small { background-color: var(--primary-color); color: #fff; font-size: 0.3rem; width: 10px; height: 10px; border-radius: 40%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* --- 6. Pagination & Loader --- */
.pagination-wrapper { text-align: center; margin-top: 40px; }
.btn-load-more { background-color: var(--primary-color); color: #fff; border: none; padding: 12px 30px; font-size: 1rem; font-weight: 700; border-radius: 50px; cursor: pointer; transition: all 0.3s ease; }
.loader-spinner { display: inline-block; width: 40px; height: 40px; border: 4px solid rgba(0,0,0,0.1); border-left-color: var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   7. RESPONSIVE LOGIC
   ========================================================================== */

/* --- Desktop and Tablet --- */
@media (min-width: 769px) {
    .btn-toggle-filters, .filters-panel-header { display: none; }
    #filter-deck { display: block !important; }
    #filter-content { display: flex; align-items: center; justify-content: space-between; }
}

@media (max-width: 992px) and (min-width: 769px) {
    .profile-grid-container { grid-template-columns: repeat(3, 1fr); }
    #filter-content { flex-direction: column; align-items: stretch; gap: 15px; }
}

/* --- Mobile --- */
@media (max-width: 768px) {
    /* HERO */
    .celebrity-archive-page .archive-header { padding: 60px 20px; margin-bottom: 30px; }
    .celebrity-archive-page .archive-title { font-size: 1.2rem; }
    .celebrity-archive-page .archive-description { font-size: 0.75rem; line-height: 1.2; }

    /* GRID */
    .profile-grid-container { grid-template-columns: repeat(2, 1fr); gap: 15px; }

    /* === CARD CLEANUP: START === */
    .card-content-container {
        padding: 12px; /* Thora kam padding taake content ko jagah miley */
    }
    .card-title {
        font-size: 0.7rem; /* Naam ka font size thora chota */
        white-space: normal;  /* YEH ZAROORI HAI: Naam ko cutne se bachata hai */
        overflow: visible;
        text-overflow: unset;
        width: 100%;
        line-height: 1.25; /* Agar naam 2 line ka ho to ajeeb na lage */
    }
    .card-meta {
        font-size: 0.6rem; /* Details ka font size chota */
        gap: 8px;          /* Details ke darmiyan gap kam */
        flex-wrap: nowrap; /* YEH ZAROORI HAI: Details ko ek line mein rakhta hai */
    }
    /* === CARD CLEANUP: END === */
    
    .card-cta { padding: 8px 12px; font-size: 0.8rem; }
    
    /* FILTERS */
    .btn-toggle-filters { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; font-size: 0.8rem; font-weight: 500; background-color: var(--primary-color); color: #fff; border: none; border-radius: 8px; cursor: pointer; margin-bottom: 20px; }
    #filter-deck { display: none; margin-bottom: 30px; }
    #filter-content { display: flex; flex-direction: column; gap: 15px; padding-top: 60px; position: relative; }
    .filters-panel-header { position: absolute; top: 0; left: -20px; width: calc(100% + 40px); display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid var(--filter-border); }
    .btn-close-filters { background: none; border: none; font-size: 1.5rem; color: var(--text-light); cursor: pointer; }
    .filter-group { flex-direction: column; align-items: flex-start; gap: 15px; padding-bottom: 15px; border-bottom: 1px solid #f0f0f0; }
    .filter-group:last-child { border-bottom: none; padding-bottom: 0; }
}

/* --- 1. NUMERIC PAGINATION STYLE --- */
.pagination-wrapper-std {
    margin-top: 60px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-links a, 
.nav-links span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    border-color: #ff3366;
    color: #ff3366;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 51, 102, 0.15);
}

.nav-links span.current {
    background: #ff3366;
    color: #fff;
    border-color: #ff3366;
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.3);
}

.pg-page-nav { display: flex; align-items: center; gap: 5px; }


/* --- 2. PINK STAR BADGE (CSS Only Solution) --- */
.card-rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    /* Star Shape using FontAwesome content logic or SVG background */
    background: transparent; 
}

/* Star Shape Background */
.card-rank-badge::before {
    content: '\f005'; /* FontAwesome Star */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 38px; /* Bara Star */
    color: #ff3366;  /* Pink Color */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    text-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Number inside Star */
.card-rank-badge .rank-icon, 
.card-rank-badge .rank-text {
    position: relative;
    z-index: 2; /* Star ke oopar */
    color: #ffffff; /* White Text */
    font-size: 13px;
    font-weight: 800;
    margin-top: 1px; /* Center alignment adjustment */
}

/* Rank 1, 2, 3 Colors override */
.rank-1 .card-rank-badge::before { color: #FFD700; } /* Gold */
.rank-2 .card-rank-badge::before { color: #C0C0C0; } /* Silver */
.rank-3 .card-rank-badge::before { color: #CD7F32; } /* Bronze */


/* --- 3. SEO CONTENT SECTION STYLE --- */
.archive-seo-content-wrapper {
    margin-top: 60px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.seo-section-title {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 20px;
    border-bottom: 2px solid #ff3366;
    display: inline-block;
    padding-bottom: 5px;
}

.seo-text-block p {
    font-size: 16px;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 20px;
}

.pg-archive-faq {
    margin-top: 40px;
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
}

.pg-archive-faq h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.pg-faq-item {
    margin-bottom: 20px;
}
.pg-faq-item:last-child { margin-bottom: 0; }

.pg-faq-item h4 {
    font-size: 16px;
    color: #334155;
    margin-bottom: 8px;
    font-weight: 700;
}

.pg-faq-item p {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}