/* Politeia Course Group Styles */

.pcg-program-wrap {
    max-width: 1200px;
    margin: 32px auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 16px 40px -24px rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

#politeia-program-header {
    position: relative;
    color: #fff;
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 280px;
    background-color: #000;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#politeia-program-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

#politeia-program-header.has-featured-image::before {
    opacity: 1;
}

#politeia-program-header .politeia-program-header-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#politeia-program-header h1 {
    font-size: clamp(32px, 3vw, 48px);
    font-weight: 800;
    margin: 0;
    margin-bottom: 8px;
}

#politeia-program-header .program-meta {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
    margin: 0;
}

.pcg-program-title {
    color: inherit;
}

.pcg-header-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 840px;
}

.pcg-header-summary {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    margin: 0;
    opacity: 0.95;
}

.pcg-header-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pcg-header-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.pcg-header-tag--muted {
    background: rgba(15, 23, 42, 0.15);
}

.pcg-program-content {
    padding: 36px;
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr;
    border-bottom: 1px solid #e5e7eb;
}

@media (min-width: 992px) {
    .pcg-program-content {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        align-items: start;
    }
}

.pcg-program-description,
.pcg-program-ramos {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pcg-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(15, 23, 42, 0.08);
    color: #111827;
}

.pcg-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    padding: 24px;
}

.pcg-description-card {
    min-height: 160px;
    line-height: 1.7;
    color: #374151;
}

.pcg-description-card p:last-child {
    margin-bottom: 0;
}

.pcg-ramos-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pcg-ramo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pcg-ramo-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

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

.pcg-ramo-thumb__placeholder {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    padding: 0 8px;
}

.pcg-ramo-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pcg-ramo-title {
    font-size: 1.05rem;
    margin: 0;
    font-weight: 600;
}

.pcg-ramo-title a {
    color: var(--bb-primary, #2563eb);
    text-decoration: none;
}

.pcg-ramo-title a:hover,
.pcg-ramo-title a:focus {
    text-decoration: underline;
}

.pcg-ramo-meta {
    font-size: 0.85rem;
    color: #6b7280;
}

.pcg-ramos-empty {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

/* LearnDash Group: full-width top bar */
.pcg-ld-group-topbar {
    height: auto;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 30px;
    background: #000;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.pcg-ld-group-topbar__inner {
    height: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 0px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
}

.pcg-ld-group-topbar .entry-title {
    color: #fff;
    margin: 0;
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 800;
    line-height: 1.15;
}

.pcg-ld-group-topbar__subtitle {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 14px;
    max-width: 900px;
    font-size: 16px;
    line-height: 1.5;
}

.pcg-ld-group-topbar__subtitle p {
    margin: 0;
}

/* Hide the default theme title on group pages to avoid duplicate headings */
.single-groups header.entry-header {
    display: none;
}

.single-groups .pcg-ld-group-topbar header.entry-header {
    display: block;
}

/* Group template-only header tweaks */
.single-groups .pcg-ld-group-topbar .entry-title {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 0;
    letter-spacing: -.03rem;
}

.single-groups .pcg-ld-group-topbar header.entry-header {
    margin-bottom: 10px;
}

/* Group topbar kicker */
#pcg-ld-group-topbar-kicker {
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

/* Remove BuddyBoss top padding so the topbar touches the main navbar */
.single-groups .content-area {
    padding-top: 0 !important;
}

.single-groups .entry-content-wrap {
    padding-top: 0 !important;
}

/* Group description section (tab content when single tab) */
.pcg-ld-group-description {
    margin-bottom: 24px;
}

.pcg-ld-group-description__inner {
    max-width: 1180px;
    margin: 0 auto;
}

/* Make the group courses grid use full available width */
.single-groups.has-sidebar #primary {
    max-width: none !important;
}

.single-groups .ld-group__courses,
.single-groups .ld-course-grid__wrapper,
.single-groups .learndash-course-grid {
    width: 100%;
    max-width: none;
}

@media (min-width: 1100px) {
    .single-groups .learndash-course-grid--modern .items-wrapper.grid {
        grid-template-columns: repeat(4, minmax(0px, 1fr)) !important;
    }
}

.pcg-program-teachers {
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pcg-teachers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    padding: 28px;
}

.pcg-teacher {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.pcg-teacher-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.pcg-teacher-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pcg-teacher-initial {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--bb-primary, #2563eb);
}

.pcg-teacher-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.pcg-teacher-role {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

.pcg-teachers-empty {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

@media (max-width: 599px) {
    .pcg-program-wrap {
        margin: 16px;
    }

    #politeia-program-header {
        padding: 28px 24px;
    }

    .pcg-program-content,
    .pcg-program-teachers {
        padding: 28px 24px;
    }
}
