/* ============================================
   Pagina Transparenta — matches old Next.js GetTransparency
   White background, black borders, Manrope font
   ============================================ */

.page-transparenta {
    background: var(--color-white);
    color: var(--color-black);
    padding: 120px 0 80px;
}

/* ── Page title (hidden — old Next.js didn't show page title) ── */
.transparenta-page__title {
    display: none;
}

/* ── Banner announcements ──
   Only border-top + sides. The next element (another banner or a grid) provides
   its own border-top, so the divider line is a single source — not two overlapping
   borders, which sum to 2px on HiDPI displays. */
.tp-banner {
    border-top: 1px solid var(--color-black);
    border-left: 1px solid var(--color-black);
    border-right: 1px solid var(--color-black);
    padding: 20px 99px;
    font-family: var(--font-primary);
    font-size: 30px;
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    color: var(--color-black);
}
/* Last banner (or any banner not followed by a grid/banner) needs a bottom edge. */
.tp-banner:last-child {
    border-bottom: 1px solid var(--color-black);
}
.tp-banner p {
    margin: 0;
}
.tp-banner h3 {
    font-size: inherit;
    font-weight: inherit;
    border: none;
    padding: 0;
}

/* ── Variant-2 Grid (link items) ──
   No container borders — they would offset inner content by 1px (= 1.5 device px at HiDPI),
   pushing the column divider to a half-pixel position and rendering as a 2px-wide antialiased line.
   Each border lives directly on cards so column boundaries land on integer device pixels. */
.tp-grid--v2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: -1px;
}
.tp-grid--v2 > .tp-card-v2 {
    border-right: 1px solid var(--color-black);
    border-bottom: 1px solid var(--color-black);
    margin: 0;
    background: var(--color-white);
}
/* Outer top edge */
.tp-grid--v2 > .tp-card-v2:nth-child(-n+2) {
    border-top: 1px solid var(--color-black);
}
/* Outer left edge */
.tp-grid--v2 > .tp-card-v2:nth-child(odd) {
    border-left: 1px solid var(--color-black);
}
/* Last item alone in left col — span both columns to align right edge */
.tp-grid--v2 > .tp-card-v2:nth-child(odd):last-child {
    grid-column: 1 / -1;
}
/* Last row: no border-bottom — the next element's border-top provides the divider.
   Without this, two 1px borders would overlap to 2px on HiDPI displays. */
.tp-grid--v2 > .tp-card-v2:last-child,
.tp-grid--v2 > .tp-card-v2:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
}

/* ── Card Variant-2 (link items) ── */
.tp-card-v2 {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 26px 46px 22px 46px;
}
.tp-card-v2__title {
    font-family: var(--font-primary);
    font-size: 30px;
    font-weight: 400;
    color: var(--color-black);
    margin-top: 30px;
    line-height: 1.3;
}
.tp-card-v2__desc {
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 300;
    line-height: 25px;
    color: var(--color-black);
    margin-top: 16px;
    overflow-y: auto;
    word-break: break-word;
}
.tp-card-v2__desc p {
    margin-bottom: 12px;
}
.tp-card-v2__desc table,
.tp-card-v1__desc table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 14px;
}
.tp-card-v2__desc table td,
.tp-card-v2__desc table th,
.tp-card-v1__desc table td,
.tp-card-v1__desc table th {
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 6px 10px;
    text-align: left;
    vertical-align: top;
}
.tp-card-v2__action {
    display: flex;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 20px;
}

/* ── Button (Deschide) ── */
.tp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 220px;
    padding: 16px 40px;
    border: 1px solid var(--color-black);
    border-radius: 100px;
    color: var(--color-black);
    font-family: var(--font-primary);
    font-size: 1.25rem;
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
}
.tp-btn:hover {
    background: var(--color-black);
    color: var(--color-white);
}

/* ── Variant-1 Grid (document items: pair/unpair columns) ──
   Same approach — borders only on cards so they land on integer device pixels. */
.tp-grid--v1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: -1px;
}
.tp-pair-col,
.tp-unpair-col {
    display: flex;
    flex-direction: column;
    margin: 0;
}
/* Column divider: a single source on the pair-col container so it spans the
   full grid height regardless of which column is taller. */
.tp-pair-col {
    border-right: 1px solid var(--color-black);
}
.tp-pair-col .tp-card-v1,
.tp-unpair-col .tp-card-v1 {
    border-bottom: 1px solid var(--color-black);
    margin: 0;
    background: var(--color-white);
}
/* Outer left edge */
.tp-pair-col .tp-card-v1 {
    border-left: 1px solid var(--color-black);
}
/* Outer right edge */
.tp-unpair-col .tp-card-v1 {
    border-right: 1px solid var(--color-black);
}
/* Outer top edge */
.tp-pair-col .tp-card-v1:first-child,
.tp-unpair-col .tp-card-v1:first-child {
    border-top: 1px solid var(--color-black);
}

/* ── Card Variant-1 (document items) ── */
.tp-card-v1 {
    color: var(--color-black);
}
.tp-card-v1__header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 75px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--color-black);
    text-align: center;
}
.tp-card-v1__title {
    font-family: var(--font-primary);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-black);
    text-align: center;
}
.tp-card-v1__desc {
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 300;
    line-height: 25px;
    color: var(--color-black);
    padding: 25px 32px;
}
.tp-card-v1__desc p {
    margin-bottom: 12px;
}

/* ── Document pill buttons ── */
.tp-doc-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--color-black);
    border-radius: 100px;
    padding: 10px 20px;
    margin-top: -1px;
}
/* Last pill in a card: pull card's border-bottom up so it merges with the
   pill's bottom border instead of leaving a 1px white gap below. */
.tp-doc-pill:last-child {
    margin-bottom: -1px;
}
.tp-doc-pill__name {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 400;
    color: var(--color-black);
    max-width: 90%;
}
.tp-doc-pill__link {
    display: flex;
    align-items: center;
    color: var(--color-black);
    transition: color 0.3s ease;
}
.tp-doc-pill__link:hover {
    color: var(--color-gold);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .page-transparenta {
        padding: 100px 0 40px;
    }

    /* Banners */
    .tp-banner {
        padding: 15px;
        font-size: 20px;
    }

    /* Grids: single column */
    .tp-grid--v2,
    .tp-grid--v1 {
        grid-template-columns: 1fr;
    }
    /* Alone-last override no longer needed in single-col */
    .tp-grid--v2 > .tp-card-v2:nth-child(odd):last-child {
        grid-column: auto;
    }

    /* V2 cards on mobile: every card gets full sides; only first card has top border */
    .tp-grid--v2 > .tp-card-v2 {
        border-left: 1px solid var(--color-black);
        border-top: none;
    }
    .tp-grid--v2 > .tp-card-v2:first-child {
        border-top: 1px solid var(--color-black);
    }
    /* On mobile (single col), only the very last card should skip border-bottom
       (next banner provides its own border-top). The 2nd-to-last odd rule only
       applies on desktop where alone-last spans both cols. */
    .tp-grid--v2 > .tp-card-v2:nth-last-child(2):nth-child(odd) {
        border-bottom: 1px solid var(--color-black);
    }

    /* V1 cards on mobile: pair-col container's border-right becomes the right edge.
       Unpair-col cards need their own border-left. Avoid double border between
       pair-col last card and unpair-col first card. */
    .tp-unpair-col .tp-card-v1 {
        border-left: 1px solid var(--color-black);
    }
    .tp-unpair-col .tp-card-v1:first-child {
        border-top: none;
    }

    .tp-card-v2 {
        padding: 18px 16px;
    }
    .tp-card-v2__title {
        font-size: 18px;
        line-height: 1.35;
        margin-top: 8px;
    }
    .tp-card-v2__desc {
        font-size: 14px;
        line-height: 22px;
        margin-top: 12px;
    }
    .tp-card-v2__action {
        margin-top: 20px;
    }
    .tp-btn {
        max-width: 100%;
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
        font-size: 0.875rem;
    }

    /* V1 cards: single column on mobile — gap trick still applies */

    .tp-card-v1__header {
        padding: 18px 16px;
    }
    .tp-card-v1__title {
        font-size: 15px;
        letter-spacing: 0.3px;
        line-height: 1.4;
    }
    .tp-card-v1__desc {
        padding: 16px;
        font-size: 14px;
        line-height: 22px;
    }
    /* Pills get breathing room on mobile — proper margins instead of -1px overlap */
    .tp-card-v1__docs {
        padding: 12px 16px 16px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .tp-doc-pill {
        padding: 10px 16px;
        margin-top: 0;
        margin-bottom: 0;
    }
    .tp-doc-pill:last-child {
        margin-bottom: 0;
    }
    .tp-doc-pill__name {
        font-size: 13px;
        line-height: 1.4;
    }
    .tp-doc-pill__link svg {
        width: 22px;
        height: 22px;
    }
}

/* Header handled by body.light-theme in theme.css */
