/**
 * PROJECT: Partner Profile Styles
 * DESCRIPTION: Scoped CSS for the Partner Custom Post Type UI component.
 */

:root {
    /* Profile Specific Variables mapped to the global brand system */
    --profile-box-bg: var(--ast-global-color-5, #ffffff);
    --profile-border: var(--speaker-border-color, #e2e8f0);
    --profile-accent: var(--site-light-bg-color, #ff0187);
    --profile-action: var(--button-action-bg-color, #793DFF);
    --profile-text-dark: var(--speaker-name-color, #1a1a1a);
    --profile-text-muted: #475569;
    --profile-label: #64748b;
}

/* ==========================================
   MAIN WRAPPER & LAYOUT
   ========================================== */
.partner-profile-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 2em 0;
    font-family: var(--font-primary, inherit);
    width: 100%;
}

.partner-profile-container .partner-back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: transparent;
    color: #ffffff; /* Forced white color for contrast */
    padding: 10px 24px;
    border-radius: 999px; /* Fully rounded corners (pill shape) */
    border: 2px solid #ffffff; /* White border to match the text */
    font-weight: 600;
    text-transform: none;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    margin-bottom: 25px;
    align-self: flex-start;
}

.partner-profile-container .partner-back-link:hover {
    background-color: #ffffff;
    border-color: #ffffff;
    color: #ff2196;
}

.partner-profile-container .partner-top-section {
    display: grid;
    grid-template-columns: 350px 1fr;
    grid-template-rows: auto 1fr;
    gap: 0 30px;
    align-items: stretch;
}

.partner-profile-container .partner-top-section:not(:has(.partner-right-wrapper)) {
    grid-template-columns: 1fr;
}

/* Architectural Fix: Pull children into the main grid */
.partner-profile-container .partner-left-wrapper,
.partner-profile-container .partner-right-wrapper {
    display: contents; 
}

.partner-profile-container .partner-main-info {
    grid-column: 1;
    grid-row: 2;
}

/* Apply grid positioning directly to the right box so it inherits the stretch alignment */
.partner-profile-container .partner-right-wrapper .partner-box {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
}

/* ==========================================
   COMPONENTS
   ========================================== */
.partner-profile-container .partner-box {
    background-color: var(--profile-box-bg);
    border: 1px solid var(--profile-border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease-in-out;
    width: 100%;
    box-sizing: border-box;
    flex-grow: 1;
}

.partner-profile-container .partner-box:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
}

.partner-profile-container .partner-logo-wrapper {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px dashed var(--profile-border);
}

.partner-profile-container .partner-logo {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

/* Data Groups (Left Column) */
.partner-profile-container .partner-data-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--profile-border);
}

.partner-profile-container .partner-data-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.partner-profile-container .partner-label {
    display: block;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--profile-label);
    margin-bottom: 4px;
    font-weight: 600;
}

.partner-profile-container .partner-value {
    display: block;
    font-size: 1.1em;
    color: var(--profile-text-dark);
    font-weight: 500;
    line-height: 1.4;
}

/* Call To Action Button (Website Link) */
.partner-profile-container .partner-website-btn {
    display: block;
    text-align: center;
    background-color: var(--profile-action);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin-top: 20px;
}

.partner-profile-container .partner-website-btn:hover {
    background-color: #ff2598;
    color: #ffffff;
}

/* Right Column (Description) */
.partner-profile-container .partner-label-heading {
    font-size: 1.5em;
    color: var(--profile-text-dark);
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--profile-accent);
    display: inline-block;
}

.partner-profile-container .partner-bio-content {
    font-size: var(--p-font-size, 1.05em);
    line-height: var(--p-line-heght, 1.7);
    color: var(--profile-text-muted);
    font-weight: 400;
}

/* ==========================================
   RWD - RESPONSIVENESS (Mobile < 992px)
   ========================================== */
@media (max-width: 992px) {
    .partner-profile-container .partner-top-section {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    
    .partner-profile-container .partner-logo-wrapper {
        text-align: left;
    }
}
