/* ===========================================
   MEDCOPY — Lending Page Styles
   =========================================== */

.hero {
    background-color: var(--color-bg);
    padding-top: 0;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    height: 628px;
    position: relative;
}

.hero-content {
    padding-left: 44px;
    width: 100%;
    max-width: 850px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    display: block;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.05em;
    color: #81947E;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-title {
    color: var(--color-text);
    margin-bottom: 40px;
    white-space: nowrap;
}

.hero-desc {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 18px;
    color: var(--color-text);
    margin-bottom: 40px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 32px;
}

.hero-btn {
    padding: 18.5px 20px;
    max-width: 300px;
    white-space: nowrap;
    text-align: center;
}

.hero-link {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--color-text);
    text-decoration: none;
    position: relative;
    display: inline-block;
    padding-bottom: 6px;
}

.hero-link::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 0;
    height: 1px;
    background-color: rgba(63, 65, 62, 0.3);
    transition: background-color var(--transition-fast);
}

@media (hover: hover) and (pointer: fine) {
    .hero-link:hover::after {
        background-color: var(--color-text);
    }
}

.hero-image {
    position: absolute;
    right: -150px;
    /* Немного уходит за край контейнера 1200px */
    bottom: 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
    z-index: 1;
}

.hero-image img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Tablet responsive (up to iPad landscape) */
@media (max-width: 1024px) {
    .hero-container {
        height: auto;
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .hero-content {
        max-width: 60%;
    }

    .hero-title {
        font-size: 36px;
        line-height: 1.3;
        white-space: nowrap;
    }

    .hero-desc {
        text-wrap: balance;
    }

    .hero-desc br {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .hero-btn {
        width: 100%;
        max-width: 320px;
        padding: 16px 20px;
        border-radius: 12px;
    }

    .hero-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 320px;
        padding: 16px 20px;
        border: 1px solid var(--color-primary);
        border-radius: 12px;
        font-size: 16px;
        font-weight: 500;
        text-align: center;
    }

    .hero-link::after {
        display: none;
    }

    .hero-image img {
        max-height: 628px;
    }

    .text-main-section {
        margin-top: 40px;
    }
}

/* Mobile responsive (quick adjustments) */
@media (max-width: 768px) {
    .hero-container {
        height: auto;
        flex-direction: column;
        padding-top: 58px;
    }

    .hero-content {
        padding-left: 0;
        max-width: 100%;
    }

    .hero-subtitle {
        margin-bottom: 12px;
    }

    .hero-title {
        margin-bottom: 24px;
        line-height: 1.4;
        font-size: 36px;
        text-align: left;
        width: 100%;
        white-space: normal;
    }

    .hero-desc {
        font-size: 16px;
        margin-bottom: 28px;
    }

    .hero-desc br {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        width: 100%;
    }

    .hero-btn {
        width: 100%;
        max-width: none;
        padding: 16px 20px;
        font-size: 16px;
        border-radius: 12px;
    }

    .hero-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: none;
        padding: 16px 20px;
        border: 1px solid var(--color-primary);
        border-radius: 12px;
        font-size: 16px;
        font-weight: 500;
        text-align: center;
    }

    .hero-link::after {
        display: none;
    }

    .hero-image {
        position: relative;
        right: 0;
        margin-top: 40px;
        width: calc(100% + 32px);
        margin-left: -16px;
        margin-right: -16px;
        display: flex;
        justify-content: center;
        align-items: flex-end;
    }

    .hero-image img {
        width: 100%;
        max-width: 372px;
        height: 478px;
        object-fit: cover;
        object-position: bottom center;
    }
}

/* Контент лендинга — пока пустой, будет заполняться по секциям */
.lending-main {
    min-height: 60vh;
}

/* ===========================================
     TEXT MAIN SECTION
     =========================================== */
.text-main-section {
    position: relative;
    z-index: 10;
    margin-top: -40px;
    /* Наезжает на предыдущий фрейм */
}

.text-main-card {
    background-color: var(--color-surface);
    /* Белая карточка (если по дизайну белая) */
    padding: 52px 63px;
    border-radius: 24px;
    /* Скругление (подобрал оптимальное, можно изменить) */
    box-shadow: 0 1cap 20px rgba(0, 0, 0, 0.05);
    /* Легкая тень, чтобы отделить от фона */
    max-width: 964px;
    margin: 0 auto;
}

.text-main-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 40px;
    line-height: 1.60;
    color: var(--color-text);
    text-align: left;
    margin-bottom: 65px;

    /* Ограничение в 3 строки */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-main-content,
.text-main-list {
    font-family: var(--font-body);
    font-weight: 500;
    /* Medium */
    font-size: 20px;
    line-height: 2.1;
    /* Увеличено со 140% до 160% */
    color: var(--color-text);
    text-align: left;
}

.text-main-content {
    margin-bottom: 24px;
}

.text-main-list {
    list-style: none;
}

.text-main-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 30px;
}

.text-main-list li:last-child {
    margin-bottom: 0;
}

.text-main-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-secondary);
    font-weight: bold;
    font-size: 24px;
    line-height: 1;
    top: 9px;
}

/* Адаптив для телефонов */
@media (max-width: 768px) {
    .text-main-section {
        margin-top: -150px;
    }

    .text-main-card {
        padding: 32px 24px;
    }

    .text-main-title {
        display: none;
    }

    .text-main-content,
    .text-main-list {
        display: block;
        text-align: left;
    }
}

/* ===========================================
   POINTS SECTION
   =========================================== */
.points-section {
    margin-top: 100px;
    position: relative;
    z-index: 5;
}

.points-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 40px;
    line-height: 1.15;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 40px;
}

.points-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Card Base */
.point-card {
    background-color: var(--color-surface);
    border-radius: 24px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    /* Легкая тень, как у предыдущей карточки */
    width: 100%;
    max-width: 580px;
    border: 2px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

@media (min-width: 769px) {
    .point-card:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
        border-color: var(--color-secondary);
    }

    .point-card:hover .point-number {
        color: var(--color-primary);
    }
}

.point-heading {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 22px;
    color: var(--color-text);
}

.point-desc {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    line-height: 2;
    color: #656765;
    /* Можно сделать #5a5c59 если нужен серый, но пока оставим основной */
}

@media (max-width: 768px) {
    .points-grid {
        grid-template-columns: 1fr;
    }

    .point-card {
        max-width: 100%;
    }

    .points-title {
        font-size: 32px;
        text-align: left;
        line-height: 1.7;
    }
}

@media (max-width: 1024px) {
    .point-card.is-active-card {
        transform: scale(1.02);
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
        border-color: var(--color-secondary);
    }

    .point-card.is-active-card .point-number {
        color: var(--color-primary);
    }
}

/* Если карточка 7-я, то она растягивается на всю ширину (заготовка на будущее) */
.point-card:last-child:nth-child(7) {
    grid-column: 1 / -1;
    max-width: 100%;
    align-items: flex-start;
    text-align: left;
}

.point-number {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 48px;
    line-height: 1;
    color: var(--color-secondary);
    transition: color 0.3s ease;
}

/* ===========================================
   CLIENTS SECTION
   =========================================== */
.clients-section {
    margin-top: 100px;
}

.clients-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 40px;
    color: var(--color-text);
    text-align: left;
    margin-bottom: 32px;
}

.clients-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
    margin: -20px 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.clients-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}

@media (hover: hover) and (pointer: fine) {
    .clients-track:hover {
        animation-play-state: paused;
    }
}

.clients-group {
    display: flex;
    gap: 16px;
    padding-right: 16px;
    /* gap between group 1 and 2 */
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.client-tag {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    color: var(--color-text);
    border: 1px solid var(--color-secondary);
    border-radius: 40px;
    padding: 10px 24px;
    display: inline-block;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.client-tag.is-active-tag {
    opacity: 1;
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(71, 95, 69, 0.12);
}

@keyframes clientFocus {

    0%,
    100% {
        opacity: 0.6;
        border-color: var(--color-secondary);
        color: var(--color-text);
        transform: scale(1);
        box-shadow: none;
    }

    5%,
    14% {
        opacity: 1;
        border-color: var(--color-primary);
        color: var(--color-primary);
        transform: scale(1.03);
        box-shadow: 0 6px 16px rgba(71, 95, 69, 0.12);
    }

    19%,
    95% {
        opacity: 0.6;
        border-color: var(--color-secondary);
        color: var(--color-text);
        transform: scale(1);
        box-shadow: none;
    }
}

@media (min-width: 769px) {
    .clients-marquee {
        padding: 0;
        margin: 0;
        overflow: visible;
        mask-image: none;
        -webkit-mask-image: none;
    }

    .clients-track {
        animation: none !important;
        width: 100%;
        display: block;
    }

    .clients-group:nth-child(2) {
        display: none;
    }

    .clients-group:nth-child(1) {
        flex-wrap: wrap;
        padding-right: 0;
    }

    .client-tag {
        animation: clientFocus 16.8s infinite ease-in-out;
    }

    .clients-group:nth-child(1) .client-tag:nth-child(1) {
        animation-delay: 0s;
    }

    .clients-group:nth-child(1) .client-tag:nth-child(2) {
        animation-delay: 2.4s;
    }

    .clients-group:nth-child(1) .client-tag:nth-child(3) {
        animation-delay: 4.8s;
    }

    .clients-group:nth-child(1) .client-tag:nth-child(4) {
        animation-delay: 7.2s;
    }

    .clients-group:nth-child(1) .client-tag:nth-child(5) {
        animation-delay: 9.6s;
    }

    .clients-group:nth-child(1) .client-tag:nth-child(6) {
        animation-delay: 12s;
    }

    .clients-group:nth-child(1) .client-tag:nth-child(7) {
        animation-delay: 14.4s;
    }
}

.clients-portfolio-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 18px;
    color: #FFFFFF;
    background-color: var(--color-secondary);
    text-decoration: none;
    padding: 18px 24px;
    border-radius: 100px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.portfolio-arrow {
    transition: transform 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .clients-portfolio-link:hover {
        background-color: var(--color-primary);
        color: #FFFFFF;
        transform: translateY(-2px);
    }
}

@media (hover: hover) and (pointer: fine) {
    .clients-portfolio-link:hover .portfolio-arrow {
        transform: translateX(6px);
    }
}

@media (max-width: 768px) {
    .clients-title {
        font-size: 32px;
        text-align: left;
        line-height: 1.7;
    }
}

/* ===========================================
   PRACTICE SECTION
   =========================================== */
.practice-section {
    margin-top: 100px;
}

.practice-card {
    background-color: #FAFAFA;
    border-radius: 24px;
    padding: 60px;
    box-shadow: 0 4px 15px rgba(71, 95, 69, 0.1);
}

.practice-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 36px;
    color: var(--color-text);
    margin-bottom: 24px;
    text-align: left;
    line-height: 1.4;
}

.practice-desc {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    color: #848684;
    margin-bottom: 40px;
    text-align: left;
    line-height: 1.9;
}

.practice-actions {
    display: flex;
    gap: 16px;
}

.practice-actions .btn {
    padding: 22px 36px;
}

@media (max-width: 768px) {
    .practice-card {
        padding: 32px 20px;
    }

    .practice-title {
        font-size: 28px;
        text-align: left;
        line-height: 1.4;
    }

    .practice-actions {
        flex-direction: column;
    }
}

/* ===========================================
   FAQ SECTION
   =========================================== */
.faq-section {
    margin-top: 100px;
    margin-bottom: 100px;
}

.faq-card {
    background-color: #FAFAFA;
    border-radius: 24px;
    padding: 28px 60px;
    /* 28px + 32px (question padding) = 60px visual spacing */
    box-shadow: 0 4px 15px rgba(71, 95, 69, 0.1);
}

.faq-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 40px;
    color: var(--color-text);
    margin-bottom: 30px;
    text-align: center;
    /* based on image */
}

.faq-list {
    display: flex;
    flex-direction: column;
}

.faq-item {
    border-bottom: 1px solid #D5DDD5;
    /* subtle green-gray border from image */
}

.faq-item:first-child {
    border-top: none;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 32px 0;
    font-family: var(--font-body);
    font-weight: 600;
    /* semi-bold */
    font-size: 18px;
    color: var(--color-text);
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .faq-question:hover {
        color: var(--color-primary);
    }
}

.faq-arrow {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    padding-bottom: 0;
    opacity: 0;
    transition: grid-template-rows 0.4s ease-in-out, padding 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.faq-item.active .faq-answer {
    grid-template-rows: 1fr;
    padding-bottom: 32px;
    opacity: 1;
}

.faq-answer p {
    overflow: hidden;
    font-family: var(--font-body);
    font-weight: 400;
    /* regular */
    font-size: 16px;
    color: #656765;
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .faq-card {
        padding: 32px 20px;
    }

    .faq-title {
        font-size: 32px;
        text-align: left;
        line-height: 1.7;
    }

    .faq-question {
        font-size: 16px;
        line-height: 1.5;
    }

    .faq-answer p {
        font-size: 16px;
        line-height: 2;
    }

    .points-section,
    .clients-section,
    .practice-section {
        margin-top: 60px;
    }

    .faq-section {
        margin-top: 60px;
        margin-bottom: 60px;
    }
}