/* Shared enhanced page components — innovators, leadership, policies, programmes */

/* ── Intro cards ── */
.cp-intro-grid .cp-intro-card {
    padding: 1.5rem 1.5rem 1.35rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(26, 102, 166, 0.1);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-interactive);
    height: 100%;
}

.cp-intro-grid .cp-intro-card:hover {
    border-color: rgba(26, 102, 166, 0.2);
    box-shadow: var(--shadow-md);
}

.cp-intro-card__label {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
}

.cp-intro-card p {
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 0;
}

.cp-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.cp-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ── Flow / pathway strip ── */
.cp-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 0;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(26, 102, 166, 0.08) 0%, rgba(251, 178, 37, 0.12) 100%);
    border: 1px solid rgba(26, 102, 166, 0.12);
}

.cp-flow__step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cp-flow__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--secondary);
    box-shadow: 0 0 0 4px rgba(251, 178, 37, 0.25);
}

.cp-flow__line {
    width: clamp(24px, 6vw, 56px);
    height: 2px;
    margin: 0 0.65rem;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* ── Icon / feature cards ── */
.cp-icon-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    height: 100%;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(26, 102, 166, 0.1);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-interactive);
}

.cp-icon-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(26, 102, 166, 0.18);
}

.cp-icon-card__icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(26, 102, 166, 0.08);
    font-size: 1.25rem;
}

.cp-icon-card h5,
.cp-icon-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.35rem;
}

.cp-icon-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted, #5a6a7a);
    margin-bottom: 0;
}

/* ── Level / pathway pills ── */
.cp-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.cp-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--primary);
    background: #fff;
    border: 1px solid rgba(26, 102, 166, 0.15);
    box-shadow: var(--shadow-sm);
}

.cp-pill--accent {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ── Content panel ── */
.cp-panel {
    padding: 1.75rem 1.75rem 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(26, 102, 166, 0.06) 0%, rgba(251, 178, 37, 0.08) 100%);
    border: 1px solid rgba(26, 102, 166, 0.12);
}

.cp-panel p:last-child {
    margin-bottom: 0;
}

/* ── Split block (text + image) ── */
.cp-split__img img {
    border-radius: 14px;
    width: 100%;
    object-fit: cover;
}

/* ── Leadership profiles ── */
.cp-leader-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(26, 102, 166, 0.1);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition-interactive);
}

.cp-leader-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(26, 102, 166, 0.18);
}

.cp-leader-card__photo img {
    width: 100%;
    max-width: 280px;
    border-radius: 14px;
    object-fit: cover;
    aspect-ratio: 4 / 5;
}

.cp-leader-card__role {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--secondary-dark, #c9921a);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.cp-quote {
    position: relative;
    padding: 1rem 1.25rem 1rem 1.5rem;
    margin-bottom: 1.25rem;
    border-left: 4px solid var(--secondary);
    background: rgba(251, 178, 37, 0.08);
    border-radius: 0 12px 12px 0;
}

.cp-quote p {
    margin: 0;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--primary);
}

.cp-leader-card__body p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text);
}

/* ── Policy cards ── */
.cp-policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.cp-policy-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(26, 102, 166, 0.1);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-interactive);
    height: 100%;
}

.cp-policy-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(26, 102, 166, 0.2);
}

.cp-policy-card__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
}

.cp-policy-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.cp-policy-card p {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted, #5a6a7a);
    margin-bottom: 1.25rem;
}

.cp-doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    align-self: flex-start;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: var(--primary);
    text-decoration: none;
    transition: var(--transition-interactive);
}

.cp-doc-btn:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

.cp-doc-btn svg {
    flex-shrink: 0;
}

/* Desktop table fallback — hidden, cards are primary UX */
.cp-policy-table-wrap {
    display: none;
}

/* ── Programme level cards ── */
.cp-level-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.35rem;
    height: 100%;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(26, 102, 166, 0.1);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-interactive);
}

.cp-level-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.cp-level-card__icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 1.2rem;
}

.cp-level-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.cp-level-card__age {
    font-size: 0.9rem;
    color: var(--text-muted, #5a6a7a);
    margin: 0;
}

/* ── IB / subject cards (high school) ── */
.cp-programme-card {
    padding: 1.5rem;
    height: 100%;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(26, 102, 166, 0.1);
    border-top: 3px solid var(--primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-interactive);
}

.cp-programme-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.cp-programme-card--ib {
    border-top-color: var(--secondary);
}

.cp-programme-card__icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.cp-programme-card h4,
.cp-programme-card h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.cp-programme-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted, #5a6a7a);
    margin-bottom: 0;
}

/* ── Next step / pathway teaser ── */
.cp-next-step {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    padding: 1.75rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(26, 102, 166, 0.12);
    box-shadow: var(--shadow-sm);
}

.cp-next-step__img {
    flex: 0 0 200px;
    max-width: 100%;
}

.cp-next-step__img img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.cp-next-step__content {
    flex: 1;
    min-width: 220px;
}

.cp-next-step__content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.cp-next-step__content p {
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 1rem;
}

/* ── Section divider ── */
.cp-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* ── Feature image tweaks ── */
.page-innovators .cp-feature-img img,
.page-elementary .cp-feature-img img,
.page-high-school .cp-feature-img img {
    /* max-height: 440px; */
    object-fit: cover;
}

@media (max-width: 767px) {
    .cp-flow__line {
        display: none;
    }

    .cp-flow {
        gap: 0.75rem;
    }

    .cp-next-step {
        flex-direction: column;
        text-align: center;
    }

    .cp-next-step__img {
        flex: none;
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cp-icon-card:hover,
    .cp-policy-card:hover,
    .cp-level-card:hover,
    .cp-programme-card:hover,
    .cp-intro-grid .cp-intro-card:hover {
        transform: none;
    }
}

/* Legal / policy document pages */
.cp-legal-doc {
    max-width: 820px;
    margin: 0 auto;
}

.cp-legal-doc__lead {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 2rem;
}

.cp-legal-doc section + section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(26, 102, 166, 0.1);
}

.cp-legal-doc h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.85rem;
}

.cp-legal-doc h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin: 1.25rem 0 0.5rem;
}

.cp-legal-doc p,
.cp-legal-doc li {
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--text);
}

.cp-legal-doc ul {
    padding-left: 1.25rem;
    margin-bottom: 0;
}

.cp-legal-doc ul li + li {
    margin-top: 0.45rem;
}

.cp-legal-doc a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.cp-legal-doc a:hover {
    text-decoration: underline;
}

.cp-legal-doc__contact {
    margin-top: 2rem;
    padding: 1.35rem 1.5rem;
    border-radius: 14px;
    background: rgba(26, 102, 166, 0.06);
    border: 1px solid rgba(26, 102, 166, 0.12);
}
