/**
 * @file
 * White Paper page layout with shared semantic CSS.
 *
 * Reuses shared components:
 *   - base/forms.css   -> .wp-input, .wp-checkbox
 *   - base/buttons.css -> .btn-pill, .btn-pill--outline, .btn-dark, .nav-arrow
 *   - faq.css          -> .accordion_rmaa
 *   - contact-form.css -> featured-bottom dark background pattern
 */

/* ========================================================================
   Shared content container (800px centered)
   ======================================================================== */
.wp-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

/* ========================================================================
   Hero Banner -> matches featured-bottom dark background
   ======================================================================== */
.wp-hero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 176px 0;
    overflow: hidden;
}

.wp-hero::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background: linear-gradient(180deg, #11121B 59.43%, rgba(17, 18, 27, 0) 100%),
        url('../../img/gradinet-bg.png') no-repeat bottom right,
        linear-gradient(0deg, #11121B, #11121B);
    z-index: 0;
}

.wp-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 112px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.wp-hero__covers {
    width: 596px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 44px;
}

.wp-hero__carousel {
    flex: 0 0 364px;
    width: 364px;
    overflow: hidden;
}

/* Add 24px visible gap between slides during carousel transition */
.wp-hero__carousel .carousel-item-next:not(.carousel-item-start),
.wp-hero__carousel .active.carousel-item-end {
    transform: translateX(calc(100% + 24px));
}

.wp-hero__carousel .carousel-item-prev:not(.carousel-item-end),
.wp-hero__carousel .active.carousel-item-start {
    transform: translateX(calc(-100% - 24px));
}

.wp-hero__cover-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.wp-hero__cover-img {
    width: 364px;
    height: auto;
    border-radius: var(--radius-card);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.wp-hero__form-col {
    flex: 1;
    max-width: 483px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    overflow: hidden;
}

.wp-hero__title {
    color: var(--white);
    font-family: var(--fontbold);
    font-weight: 700;
    font-size: var(--H1);
    line-height: 110%;
    letter-spacing: -0.02em;
    margin: 0;
}

.wp-hero__subtitle {
    color: var(--white);
    font-family: var(--fontreg);
    font-weight: 500;
    font-size: var(--BodyL);
    line-height: 140%;
    margin: 0;
}

.wp-hero__form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.wp-hero__form-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wp-hero__field {
    position: relative;
}

.wp-hero__form-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

.wp-hero__cta {
    width: 100%;
    max-width: 173px;
}

.wp-hero__consent-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wp-hero__consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 286px;
}

.wp-hero__error {
    min-height: 18px;
}

.wp-hero__field {
    position: relative;
}

.wp-hero__field .form-required-message {
    position: absolute;
    top: 13px;
    right: 16px;
    font-family: var(--fontreg);
    font-weight: 500;
    font-size: 10px;
    line-height: 140%;
    color: #EC221F;
    display: none;
    pointer-events: none;
}

.wp-hero__field.has-error .form-required-message {
    display: block;
}

.wp-hero__consent-label {
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--fontreg);
    font-weight: 500;
    font-size: var(--BodyM);
    line-height: 140%;
}

.wp-hero__consent-label a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: underline;
}

/* ========================================================================
   Executive Summary
   ======================================================================== */
.wp-summary {
    background: var(--white);
}

.wp-summary__inner {
    width: min(1550px, calc(90vw - 32px));
    margin: 0 auto;
    padding: 120px 0 80px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px;
}

.wp-summary__top {
    width: 100%;
    display: flex;
    gap: 16px;
}

.wp-summary__title {
    width: 42%;
    flex-shrink: 0;
    font-family: var(--fontbold);
    font-weight: 700;
    font-size: var(--H1);
    line-height: 110%;
    letter-spacing: -0.02em;
    color: var(--black);
    margin: 0;
}

.wp-summary__lead {
    width: auto;
    flex: 1;
    font-family: var(--fontreg);
    font-weight: 500;
    font-size: var(--BodyL);
    line-height: 140%;
    color: var(--black);
    max-width: 930px;
}

.wp-summary__lead > :last-child,
.wp-summary__body > :last-child {
    margin-bottom: 0;
}

.wp-summary__body-card {
    padding: 28px 24px;
    background: var(--grayMoreLight);
    border-radius: var(--radius-card);
}

.wp-summary__body {
    font-family: var(--fontreg);
    font-weight: 500;
    font-size: var(--BodyL);
    line-height: 140%;
    color: var(--black);
}

/* ========================================================================
   Contents -> reuses .accordion_rmaa from faq.css
   ======================================================================== */
.wp-contents {
    padding: 28px 65px;
    background: var(--white);
    border-radius: var(--radius-card);
    outline: 1px solid rgba(0, 0, 0, 0.1);
    outline-offset: -1px;
}

.wp-contents__title {
    font-family: var(--fontbold);
    font-weight: 700;
    font-size: var(--H1);
    line-height: 110%;
    text-align: center;
    color: var(--black);
    margin: 0 0 40px;
}

.wp-contents .accordion_rmaa .accordion-button {
    min-height: 56px;
    font-family: var(--fontbold);
    font-weight: 700;
    font-size: var(--BodyL);
    line-height: 140%;
}

.wp-contents .accordion_rmaa .accordion-body {
    padding: 0 0 16px;
}

.wp-contents .accordion_rmaa .accordion-item {
    border-bottom: none;
}

.wp-contents .accordion_rmaa .accordion-item:last-child {
    border-bottom: none;
}

.wp-contents__sub-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wp-contents__sub {
    padding-left: 24px;
    padding-block: 4px;
    font-family: var(--fontreg);
    font-weight: 500;
    font-size: var(--BodyM);
    line-height: 140%;
    color: var(--black);
}

/* ========================================================================
   Section Summaries — dropdown-tab pattern
   ======================================================================== */
.wp-sections {
    min-width: 0;
}

/* --- Dropdown selector --- */
.wp-sections-select {
    position: relative;
    margin-bottom: 10px;
}

.wp-sections-select__trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: var(--grayMoreLight);
    color: var(--black);
    border: none;
    border-radius: var(--radius-card);
    padding: 10px 18px;
    min-height: 44px;
    cursor: pointer;
    font-family: var(--fontbold);
    font-weight: 700;
    font-size: var(--BodyL);
    line-height: 140%;
    text-align: left;
}

.wp-sections-select__chevron {
    width: 12px;
    height: 8px;
    flex-shrink: 0;
    transition: transform .2s;
    color: var(--black);
}

.wp-sections-select.is-open .wp-sections-select__chevron {
    transform: rotate(180deg);
}

.wp-sections-select__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--white);
    border-radius: var(--radius-card);
    box-shadow: 0px 6px 15px 0px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility .2s;
    z-index: 10;
    overflow: hidden;
}

.wp-sections-select.is-open .wp-sections-select__dropdown {
    opacity: 1;
    visibility: visible;
}

.wp-sections-select__option {
    padding: 10px 18px;
    font-family: var(--fontbold);
    font-weight: 700;
    font-size: var(--BodyL);
    line-height: 140%;
    color: var(--black);
    cursor: pointer;
    transition: background .15s, color .15s;
}

.wp-sections-select__option.is-active {
    display: none;
}

.wp-sections-select__option:hover {
    background: var(--grayMoreLight);
    color: var(--blue);
}

/* --- Tab panels --- */
.wp-sections__panels {
    position: relative;
}

.wp-sections__panel {
    display: none;
}

.wp-sections__panel.is-active {
    display: block;
}

.wp-section-card {
    position: relative;
    padding: 28px 24px;
    background: var(--grayMoreLight);
    border-radius: var(--radius-card);
    min-width: 0;
    overflow: hidden;
}

.wp-section-card__badge {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.wp-section-card__badge-dot {
    width: 24px;
    height: 24px;
    background: url('../../img/ellipse.svg') no-repeat center;
    background-size: 24px;
    flex-shrink: 0;
}

.wp-section-card__badge-text {
    font-family: var(--fontbold);
    font-weight: 700;
    font-size: var(--BodyM);
    line-height: 140%;
    color: var(--black);
}

.wp-section-card__title {
    font-family: var(--fontbold);
    font-weight: 700;
    font-size: var(--H3);
    line-height: 110%;
    letter-spacing: -0.02em;
    color: var(--black);
    margin: 0 0 24px;
}

.wp-section-card__content {
    font-family: var(--fontreg);
    font-weight: 500;
    font-size: var(--BodyL);
    line-height: 140%;
    color: var(--black);
}

/* --- Show More: collapsed card --- */
.wp-section-card--collapsed {
    max-height: 500px;
}

.wp-section-card__gradient {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 250px;
    background: linear-gradient(to top, var(--grayMoreLight) 40%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.wp-section-card--collapsed .wp-section-card__gradient {
    display: block;
}

.wp-section-card__show-more {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: transparent;
    border: 1px solid var(--blue);
    border-radius: 52px;
    color: var(--blue);
    font-family: var(--fontreg);
    font-weight: 500;
    font-size: var(--BodyM);
    line-height: 140%;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s, color 0.2s;
}

.wp-section-card--collapsed .wp-section-card__show-more {
    display: flex;
    align-items: center;
    justify-content: center;
    left: 5%;
    right: 5%;
    width: 90%;
    bottom: 16px;
}

.wp-section-card__show-more:hover {
    background: var(--blue);
    color: var(--white);
}

/* --- Show More: expanded state --- */
.wp-section-card--expanded {
    max-height: none;
}

.wp-section-card--expanded .wp-section-card__show-more {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 90%;
    margin: 24px auto 0;
}

/* --- WYSIWYG tables inside section content --- */
.wp-section-content {
    min-width: 0;
}

.wp-section-content table {
    border-collapse: separate;
    border-spacing: 0;
    margin: 24px 0;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.wp-section-content table tbody {
    display: table;
    width: max-content;
    min-width: 100%;
}

.wp-section-content table td,
.wp-section-content table th {
    white-space: nowrap;
}

/* Header row — works with <thead> or first <tbody> row */
.wp-section-content thead tr,
.wp-section-content tbody tr:first-child {
    background: var(--blue);
}

.wp-section-content thead th,
.wp-section-content thead td,
.wp-section-content tbody tr:first-child td {
    font-family: var(--fontbold);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
    color: var(--white);
    padding: 12px 24px;
    text-align: left;
    vertical-align: middle;
    border: none;
}

.wp-section-content thead tr th:first-child,
.wp-section-content tbody tr:first-child td:first-child {
    border-radius: 12px 0 0 12px;
}

.wp-section-content thead tr th:last-child,
.wp-section-content tbody tr:first-child td:last-child {
    border-radius: 0 12px 12px 0;
}

/* Body rows */
.wp-section-content tbody tr:not(:first-child) {
    background: var(--white);
    padding-bottom: 10px;
}

.wp-section-content thead + tbody tr {
    background: var(--white);
}

.wp-section-content tbody tr:not(:first-child) td,
.wp-section-content thead + tbody tr td {
    font-family: var(--fontbold);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
    color: var(--black);
    padding: 12px 24px;
    text-align: left;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid #00000014;
}

.wp-section-content th > :last-child,
.wp-section-content td > :last-child {
    margin-bottom: 0;
}

/* Last body row — no bottom border */
.wp-section-content tbody tr:last-child td {
    border-bottom: none;
}

/* Body corners (no-thead variant) */
.wp-section-content tbody tr:nth-child(2) td:first-child {
    border-radius: 12px 0 0 0;
}

.wp-section-content tbody tr:nth-child(2) td:last-child {
    border-radius: 0 12px 0 0;
}

.wp-section-content tbody tr:last-child td:first-child {
    border-radius: 0 0 0 12px;
}

.wp-section-content tbody tr:last-child td:last-child {
    border-radius: 0 0 12px 0;
}

/* Body corners (thead variant) */
.wp-section-content thead + tbody tr:first-child td:first-child {
    border-radius: 12px 0 0 0;
}

.wp-section-content thead + tbody tr:first-child td:last-child {
    border-radius: 0 12px 0 0;
}

/* 12px free space between header row and body rows */
.wp-section-content tbody tr:first-child td {
    border-bottom: 12px solid var(--grayMoreLight, #F5F5F7);
}

.wp-section-content thead th,
.wp-section-content thead td {
    border-bottom: 12px solid var(--grayMoreLight, #F5F5F7);
}

/* ========================================================================
   Director Quote
   ======================================================================== */
.wp-director {
    padding-bottom: 180px;
}

.wp-director__card {
    padding: 24px;
    background: var(--grayMoreLight);
    border-radius: var(--radius-card);
    outline: 1px solid rgba(0, 0, 0, 0.1);
    outline-offset: -1px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.wp-director__quote {
    font-family: var(--fontbold);
    font-weight: 700;
    font-size: var(--H3);
    line-height: 110%;
    color: var(--black);
    margin: 0;
}

.wp-director__person {
    display: flex;
    align-items: center;
    gap: 16px;
}

.wp-director__person-text {
    display: flex;
    flex-direction: column;
}

.wp-director__photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.wp-director__name {
    font-family: var(--fontbold);
    font-weight: 700;
    font-size: var(--BodyS);
    line-height: 140%;
    color: var(--black);
}

.wp-director__title-text {
    font-family: var(--fontreg);
    font-weight: 500;
    font-size: var(--BodyS);
    line-height: 140%;
    color: var(--black);
}

/* ========================================================================
   Responsive
   ======================================================================== */
@media screen and (max-width: 1200px) {
    .wp-hero__inner {
        flex-direction: column;
        align-items: center;
    }

    .wp-hero__covers {
        width: auto;
    }

    .wp-hero__form-col {
        max-width: 596px;
        width: 100%;
    }
}

@media screen and (max-width: 992px) {
    .wp-hero {
        padding: 96px 0;
    }

    .wp-hero__inner {
        padding: 0 16px;
    }

    .wp-hero__covers {
        width: 100%;
    }

    .wp-hero__cover-img {
        width: 256px;
    }

    .wp-hero__carousel {
        flex: 0 0 256px;
        width: 256px;
    }

    .wp-hero__cover-row .nav-arrow {
        --arrow-size: 40px;
    }

    .wp-hero__cover-row .nav-arrow svg {
        width: 8px;
        height: 14px;
    }

    .wp-hero__title {
        font-size: var(--H3);
        line-height: 110%;
    }

    .wp-summary__inner {
        width: auto;
        max-width: none;
        padding: 80px 16px 40px;
    }

    .wp-summary__top {
        flex-direction: column;
    }

    .wp-summary__title,
    .wp-summary__lead {
        width: 100%;
    }

    .wp-summary__title {
        font-size: var(--H2);
    }

    .wp-container {
        gap: 48px;
    }

    .wp-contents {
        padding-left: 10px;
        padding-right: 10px;
    }

    .wp-director {
        padding-bottom: 100px;
    }

    .wp-director__quote {
        font-size: var(--H4);
    }
}

@media screen and (max-width: 480px) {
    .wp-hero__consent {
        max-width: 100%;
    }

    .wp-hero__form-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .wp-contents__title {
        font-size: var(--H2);
    }
}
