/**
 * Celebrity Profile Display — Frontend Styles
 * Plugin: Celebrity Profile Display
 * Version: 1.0.0
 * Theme: Black & Gold (Elegant / Premium)
 */

/* ============================================================
   Wrapper & Header
   ============================================================ */
.cpd-profile-wrapper {
    max-width: 1100px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    color: #f0e6c8;
}

.cpd-profile-header {
    background: linear-gradient(135deg, #111111 0%, #1a1a1a 100%);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-bottom: none;
    padding: 30px 40px;
    border-radius: 12px 12px 0 0;
}

.cpd-profile-eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #c9a84c;
    margin-bottom: 6px;
}

.cpd-profile-title {
    font-size: 2rem;
    font-weight: 700;
    color: #f0e6c8;
    margin: 0;
    line-height: 1.2;
}

/* ============================================================
   Body Layout
   ============================================================ */
.cpd-profile-body {
    display: flex;
    gap: 32px;
    padding: 32px;
    background: #161616;
    border: 1px solid #2a2a2a;
    border-top: none;
    border-radius: 0 0 12px 12px;
}

.cpd-profile-sidebar {
    flex: 0 0 240px;
    width: 240px;
}

.cpd-profile-content {
    flex: 1;
    min-width: 0;
}

/* Responsive: stack on small screens */
@media ( max-width: 700px ) {
    .cpd-profile-body {
        flex-direction: column;
    }
    .cpd-profile-sidebar {
        width: 100%;
        flex: none;
    }
}

/* ============================================================
   Profile Image
   ============================================================ */
.cpd-profile-image {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(201, 168, 76, 0.25);
    margin-bottom: 16px;
}

.cpd-profile-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ============================================================
   Social Links
   ============================================================ */
.cpd-social-links {
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 16px;
}

.cpd-social-links h3 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666;
    margin: 0 0 12px 0;
}

.cpd-social-btn {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin: 0 6px 6px 0;
    background: #1a1a1a;
    color: #c9a84c;
    border: 1px solid rgba(201, 168, 76, 0.25);
    transition: opacity 0.15s;
}

.cpd-social-btn:hover {
    opacity: 0.80;
    color: #c9a84c;
}

.cpd-facebook  { background: #1a1a1a; }
.cpd-instagram { background: #1a1a1a; }
.cpd-twitter   { background: #1a1a1a; }

/* ============================================================
   Section Headings
   ============================================================ */
.cpd-profile-content h3 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666;
    margin: 0 0 12px 0;
}

/* ============================================================
   Biography
   ============================================================ */
.cpd-bio {
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.cpd-bio p {
    font-size: 14px;
    line-height: 1.7;
    color: #a89878;
    margin: 0;
}

/* ============================================================
   Profile Details Grid
   ============================================================ */
.cpd-details {
    margin-bottom: 24px;
}

.cpd-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media ( max-width: 600px ) {
    .cpd-details-grid {
        grid-template-columns: 1fr;
    }
}

.cpd-detail-item {
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
}

.cpd-detail-label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cpd-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: #f0e6c8;
}

/* ============================================================
   Car Collection
   ============================================================ */
.cpd-cars {
    margin-bottom: 24px;
}

.cpd-cars-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
}

.cpd-cars-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 14px;
    color: #f0e6c8;
    border-bottom: 1px solid #2a2a2a;
    background: #1e1e1e;
}

.cpd-cars-list li:nth-child(even) {
    background: #1a1a1a;
}

.cpd-cars-list li:last-child {
    border-bottom: none;
}

.cpd-cars-list li::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c9a84c;
    flex-shrink: 0;
}

/* ============================================================
   Gallery — theme-safe, portrait-friendly
   All rules use !important to override Astra and other themes
   that apply conflicting image styles via .entry-content img
   ============================================================ */
.cpd-gallery {
    margin-bottom: 24px !important;
}

/* Grid layout — override any theme flex/block defaults */
.cpd-gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    float: none !important;
}

@media ( max-width: 500px ) {
    .cpd-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Item wrapper — self-contained, no height constraints */
.cpd-gallery-grid .cpd-gallery-item {
    display: block !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    border: 1px solid rgba(201, 168, 76, 0.25) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #111111 !important;
}

/* Image — strip all theme overrides, display in natural portrait ratio */
.cpd-gallery-grid .cpd-gallery-item .cpd-gallery-img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center top !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    vertical-align: bottom !important;
    aspect-ratio: auto !important;
}

/* ============================================================
   Profiles Grid — [celebrity_profiles_grid] shortcode
   Theme-safe, self-contained, works with Astra and any theme
   ============================================================ */
.cpd-profiles-grid-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 0 40px 0 !important;
    padding: 0 !important;
}

.cpd-profiles-grid {
    display: grid !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    grid-template-columns: repeat(4, 1fr) !important;
}

/* Column count variants via class */
.cpd-profiles-grid-cols-1 { grid-template-columns: repeat(1, 1fr) !important; }
.cpd-profiles-grid-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.cpd-profiles-grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.cpd-profiles-grid-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }

/* Tablet: 2 columns */
@media ( max-width: 900px ) {
    .cpd-profiles-grid,
    .cpd-profiles-grid-cols-1,
    .cpd-profiles-grid-cols-2,
    .cpd-profiles-grid-cols-3,
    .cpd-profiles-grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile: 1 column */
@media ( max-width: 600px ) {
    .cpd-profiles-grid,
    .cpd-profiles-grid-cols-1,
    .cpd-profiles-grid-cols-2,
    .cpd-profiles-grid-cols-3,
    .cpd-profiles-grid-cols-4 {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

/* Individual card */
.cpd-profiles-grid .cpd-profile-card {
    display: block !important;
    background: #161616 !important;
    border: 1px solid rgba(201, 168, 76, 0.25) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, transform 0.2s ease !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.cpd-profiles-grid .cpd-profile-card:hover {
    border-color: rgba(201, 168, 76, 0.7) !important;
    transform: translateY(-3px) !important;
}

/* Full-card link — no underline, no theme link colour */
.cpd-profiles-grid .cpd-profile-card-link {
    display: flex !important;
    flex-direction: column !important;
    text-decoration: none !important;
    color: inherit !important;
    height: 100% !important;
}

.cpd-profiles-grid .cpd-profile-card-link:hover {
    text-decoration: none !important;
    color: inherit !important;
}

/* Image area — natural ratio, no forced crop */
.cpd-profiles-grid .cpd-profile-card-image {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    background: #111111 !important;
    flex-shrink: 0 !important;
    line-height: 0 !important;
}

/* Image displays at natural uploaded ratio — no cropping */
.cpd-profiles-grid .cpd-profile-card-image .cpd-profile-card-img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: top center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    float: none !important;
    box-shadow: none !important;
    vertical-align: bottom !important;
    aspect-ratio: auto !important;
}

/* Placeholder when no featured image is set */
.cpd-profiles-grid .cpd-profile-card-placeholder {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 200px !important;
    background: #1e1e1e !important;
    color: #c9a84c !important;
    font-size: 3rem !important;
    font-weight: 700 !important;
    font-family: Georgia, serif !important;
}

/* Card title area — image + name only */
.cpd-profiles-grid .cpd-profile-card-body {
    padding: 12px 14px 14px !important;
    background: #161616 !important;
}

.cpd-profiles-grid .cpd-profile-card-name {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #f0e6c8 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.35 !important;
    font-family: Georgia, serif !important;
    border: none !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* No-profiles message */
.cpd-no-profiles {
    color: #a89878 !important;
    font-style: italic !important;
    padding: 20px 0 !important;
}
