/* ============================================================
   Investors Page — page-investors.php
   Design: investor-charter-redesign reference
   ============================================================ */

/* ── Astra layout reset ── */
body.page-template-page-investors #content.site-content {
    display: block;
    padding: 0;
    margin: 0;
    background: #f4f7fb;
}
body.page-template-page-investors #primary,
body.page-template-page-investors #secondary {
    display: none !important;
}

/* ── Root scope ── */
.cp-investor-page {
    --cp-ink:       #071638;
    --cp-muted:     #5f6a7c;
    --cp-blue:      #073b8f;
    --cp-blue-deep: #012a68;
    --cp-line:      #dfe7f2;
    --cp-panel:     #ffffff;
    --cp-soft:      #f5f8fc;
    --cp-gold:      #ffc72c;
    background: #f4f7fb;
    color: var(--cp-ink);
    font-family: "Graphik-Font", "Segoe UI", Roboto, Arial, sans-serif;
    overflow-x: hidden;
    width: 100%;
}
.cp-investor-page,
.cp-investor-page * {
    box-sizing: border-box;
}

/* ── Hero ── */
.cp-investor-hero {
    min-height: 385px;
    padding: 50px 0 92px;
    background-image:
        linear-gradient(90deg, rgba(0,20,56,0.98) 0%, rgba(0,33,82,0.9) 38%, rgba(0,37,88,0.24) 72%, rgba(0,28,76,0.08) 100%),
        url("../images/investor-hero-documents.png");
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

.cp-investor-shell {
    width: min(1416px, calc(100% - 120px));
    margin: 0 auto;
}

.cp-investor-hero__content {
    max-width: 690px;
}

.cp-investor-hero__title {
    margin: 0;
    color: #ffffff;
    font-family: "Graphik-Font", "Segoe UI", Roboto, Arial, sans-serif;
    font-size: clamp(44px, 6vw, 72px);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.01em;
    text-transform: none;
}

.cp-investor-hero__rule {
    width: 52px;
    height: 3px;
    margin: 28px 0 18px;
    background: var(--cp-gold);
    border-radius: 99px;
}

.cp-investor-hero__copy {
    max-width: 560px;
    margin: 0;
    color: rgba(255,255,255,0.94);
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.45;
}

.cp-investor-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 28px;
}

.cp-investor-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 12px 16px;
    color: #ffffff;
    background: rgba(3,36,86,0.54);
    border: 1px solid rgba(212,229,255,0.48);
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
    backdrop-filter: blur(10px);
}

.cp-investor-badge__mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    color: var(--cp-gold);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    border: 2px solid rgba(255,199,44,0.9);
    border-radius: 8px;
}

.cp-investor-badge__text {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
}

/* ── Document Panel ── */
.cp-document-panel {
    width: min(1416px, calc(100% - 120px));
    margin: -36px auto 72px;
    padding: 18px min(7vw, 104px) 24px;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(191,205,224,0.8);
    border-radius: 8px;
    box-shadow: 0 22px 54px rgba(10,28,64,0.13);
}

/* ── Tabs ── */
.cp-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(652px, 100%);
    margin: 0 auto 16px;
    border: 1px solid #0d4f9c;
    border-radius: 5px;
    overflow: hidden;
}

.cp-tab {
    min-height: 40px;
    padding: 10px 16px;
    color: #063174;
    background: #ffffff;
    border: 0;
    border-radius: 0;
    font: inherit;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.1;
    white-space: normal;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    box-shadow: none !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

.cp-tab.is-active {
    color: #ffffff;
    background: linear-gradient(180deg, #073f97, #042f78);
}

/* ── Filters ── */
.cp-controls {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    align-items: stretch;
    margin: 0 auto 22px;
}

.cp-field {
    position: relative;
    min-height: 58px;
    background: #ffffff;
    border: 1px solid #d9e4f2;
    border-radius: 7px;
    box-shadow: 0 10px 24px rgba(8,34,75,0.045);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.cp-field:focus-within {
    background: #fbfdff;
    border-color: #6f9bd8;
    box-shadow: 0 12px 26px rgba(8,54,123,0.11);
}

.cp-field:has(.cp-select)::after {
    content: "";
    position: absolute;
    top: 23px;
    right: 18px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #18315a;
    border-bottom: 2px solid #18315a;
    pointer-events: none;
    transform: rotate(45deg);
}

.cp-field__label {
    position: absolute;
    top: 9px;
    left: 16px;
    z-index: 1;
    color: #6b7890;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.1;
}

.cp-search,
.cp-select {
    width: 100%;
    min-height: 56px;
    padding: 13px 16px;
    color: var(--cp-ink);
    background: transparent;
    border: 0;
    border-radius: 7px;
    box-shadow: none !important;
    font: inherit;
    font-size: 15px;
    line-height: 1.25;
    outline: none;
}

.cp-select {
    appearance: none;
    padding: 25px 44px 8px 16px;
    cursor: pointer;
}

/* ── Document Grid ── */
.cp-doc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 28px;
}

/* ── Document Card ── */
.cp-doc-card {
    display: block;
    padding: 18px 20px 16px;
    background: #ffffff;
    border: 1px solid var(--cp-line);
    border-top: 3px solid #1a3a5c;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(8,32,72,0.07);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.cp-doc-card:hover {
    transform: translateY(-3px);
    border-top-color: #2d5fa0;
    box-shadow: 0 12px 28px rgba(8,32,72,0.13);
}

.cp-doc-card[hidden],
.cp-empty[hidden] {
    display: none !important;
}

.cp-doc-card__icon {
    display: none;
}

.cp-doc-card__title {
    margin: 0 0 6px;
    color: #071638;
    font-family: "Graphik-Font", "Segoe UI", Roboto, Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    overflow-wrap: anywhere;
}

.cp-doc-card__meta {
    margin: 0 0 2px;
    color: #1a3a5c;
    font-family: "Graphik-Font", "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.cp-doc-card__date {
    margin: 0;
    color: #8a95a3;
    font-family: "Graphik-Font", "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 11.5px;
    line-height: 1.4;
}

.cp-doc-card__action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: 14px;
    padding: 6px 16px;
    color: #1a3a5c;
    background: #f0f5ff;
    border: 1px solid #c0cfe8;
    border-radius: 4px;
    font-family: "Graphik-Font", "Segoe UI", Roboto, Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 650;
    line-height: 1;
    letter-spacing: 0 !important;
    text-transform: none !important;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none !important;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.cp-doc-card__action:hover,
.cp-doc-card__action:focus {
    color: #ffffff !important;
    background: #1a3a5c;
    border-color: #1a3a5c;
}

.cp-doc-card__action--none {
    cursor: default;
    opacity: 0.45;
    pointer-events: none;
    background: #f5f7fa;
    border-color: #dde3ed;
    color: #7a8799;
}

/* ── Empty state ── */
.cp-empty {
    grid-column: 1 / -1;
    padding: 30px;
    color: var(--cp-muted);
    text-align: center;
    background: var(--cp-soft);
    border: 1px dashed #c7d5e9;
    border-radius: 6px;
    font-size: 15px;
}

/* ── Grievance Strip ── */
.cp-grievance {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 22px;
    padding: 13px 28px;
    color: #051a45;
    background: linear-gradient(180deg, #f8fbff, #edf5ff);
    border: 1px solid #0d55b2;
    border-radius: 6px;
}

.cp-grievance__mark {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    color: #ffffff;
    background: #063c9a;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.cp-grievance__copy {
    flex: 1 1 200px;
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
}

.cp-grievance__copy strong {
    font-size: 15px;
}

.cp-grievance__link {
    color: #003b91 !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
}

.cp-grievance__link:hover {
    text-decoration: underline !important;
}

.cp-grievance__divider {
    width: 1px;
    height: 22px;
    background: #9eb4d5;
    flex-shrink: 0;
}

/* ── PDF Modal ── */
.cp-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-modal[hidden] {
    display: none !important;
}

.cp-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.cp-modal__box {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 580px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
    animation: cpModalIn 0.25s ease;
}

@keyframes cpModalIn {
    from { transform: translateY(-24px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

.cp-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #1c447e;
    flex-shrink: 0;
}

.cp-modal__title {
    margin: 0;
    color: #ffffff;
    font-family: "Graphik-Font", "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 17px !important;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.cp-modal__close {
    background: none !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 26px !important;
    line-height: 1;
    padding: 2px 6px !important;
    cursor: pointer;
    border-radius: 50% !important;
    box-shadow: none !important;
    transition: background 0.18s;
    flex-shrink: 0;
}

.cp-modal__close:hover {
    background: rgba(255,255,255,0.2) !important;
}

.cp-modal__body {
    padding: 12px 20px 20px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.cp-modal__pdf-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 8px;
}

.cp-modal__pdf-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid #1c447e;
    color: #1a1b1d !important;
    text-decoration: none !important;
    transition: background 0.18s, color 0.18s;
    border-radius: 2px;
}

.cp-modal__pdf-item:hover {
    background: #1c447e;
    color: #ffffff !important;
}

.cp-modal__pdf-item:hover .cp-modal__pdf-arrow {
    color: #ffffff;
}

.cp-modal__pdf-icon {
    flex-shrink: 0;
    color: #1c447e;
    display: flex;
    align-items: center;
}

.cp-modal__pdf-title {
    flex: 1;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}

.cp-modal__pdf-arrow {
    flex-shrink: 0;
    color: #1c447e;
    font-size: 16px;
    display: flex;
    align-items: center;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
    .cp-investor-shell,
    .cp-document-panel {
        width: min(100% - 48px, 1080px);
    }
    .cp-document-panel {
        padding-right: 28px;
        padding-left: 28px;
    }
    .cp-doc-grid {
        gap: 14px;
    }
}

@media (max-width: 960px) {
    .cp-investor-hero {
        min-height: 410px;
        padding-top: 44px;
        background-position: 62% center;
    }
    .cp-investor-hero__content {
        max-width: 540px;
    }
    .cp-controls {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .cp-doc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .cp-grievance__divider {
        display: none;
    }
}

@media (max-width: 640px) {
    .cp-investor-shell,
    .cp-document-panel {
        width: calc(100vw - 28px);
    }
    .cp-investor-hero {
        min-height: 475px;
        padding: 34px 0 82px;
        background-position: 70% center;
    }
    .cp-investor-hero__rule {
        margin-top: 20px;
    }
    .cp-investor-hero__copy {
        max-width: 100%;
    }
    .cp-investor-badges {
        gap: 10px;
        margin-top: 22px;
    }
    .cp-investor-badge {
        width: 100%;
        min-height: 56px;
    }
    .cp-document-panel {
        margin-top: -30px;
        margin-bottom: 48px;
        padding: 14px;
    }
    .cp-tabs {
        margin-bottom: 14px;
    }
    .cp-tab {
        min-height: 42px;
        padding: 8px;
        font-size: 14px;
    }
    .cp-controls {
        grid-template-columns: 1fr;
    }
    .cp-doc-grid {
        grid-template-columns: 1fr;
    }
    .cp-doc-card__inner {
        padding: 14px 14px 12px;
        gap: 10px;
    }
    .cp-doc-card__icon-svg {
        flex: 0 0 30px;
        width: 30px;
        height: 36px;
    }
    .cp-grievance {
        margin-top: 14px;
        padding: 14px;
    }
    .cp-grievance__link {
        width: 100%;
        white-space: normal;
    }
    .cp-modal__box {
        max-width: 96vw;
        margin: 0 8px;
    }
}
