/* =========================================================
   home.css
   Стилі головної сторінки та сторінок на її компонентах
   Підключати після base.css та header.css
   ========================================================= */

:root {
    --home-primary:       #0d6efd;
    --home-primary-dark:  #0a58ca;
    --home-primary-soft:  #e7f1ff;
    --home-text:          #212529;
    --home-text-muted:    #6c757d;
    --home-bg-light:      #f8f9fa;
    --home-bg-white:      #ffffff;
    --home-border:        #dee2e6;
    --home-radius:        8px;
    --home-max-width:     1200px;
    --home-section-pad:   64px 0;
}


/* =========================================================
   ПРИХОВАНІ БЛОКИ
   ========================================================= */

.home-mentoring-hidden,
.home-latest-hidden {
    display: none !important;
}


/* =========================================================
   ЗАГАЛЬНІ УТИЛІТИ
   ========================================================= */

.home-section {
    padding: var(--home-section-pad);
}

.home-section--light {
    background-color: var(--home-bg-light);
}

.home-container {
    max-width: var(--home-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.home-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--home-text);
    margin-top: 0;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.home-section-lead {
    font-size: 1.125rem;
    color: var(--home-text-muted);
    max-width: 700px;
    margin-top: 0;
    margin-bottom: 1.5em;
    line-height: 1.6;
}


/* =========================================================
   HERO
   ========================================================= */

.home-hero {
    background: linear-gradient(
        160deg,
        #f0f7ff 0%,
        #ffffff 55%,
        #f8f9fa 100%
    );

    padding: 72px 0 64px;

    border-bottom: 1px solid var(--home-border);
}

.home-hero__inner {
    max-width: var(--home-max-width);
    margin: 0 auto;
    padding: 0 20px;

    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 48px;
    align-items: center;
}

.home-hero__content {
    min-width: 0;
}

.home-hero__content h1 {
    font-size: 2.35rem;
    font-weight: 700;
    line-height: 1.25;

    color: var(--home-text);

    margin-top: 0;
    margin-bottom: 0.5em;
}

.home-hero__content .lead {
    font-size: 1.15rem;
    color: var(--home-text-muted);

    line-height: 1.65;

    margin-top: 0;
    margin-bottom: 0.75em;

    max-width: 540px;
}

.home-hero__content .lead--sub {
    font-size: 1.05rem;
    margin-bottom: 1.75em;
    opacity: 0.9;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.home-hero__image {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.home-hero__image img {
    display: block;

    width: 100%;
    max-width: 560px;
    height: auto;

    aspect-ratio: 4 / 3;
    object-fit: cover;

    border-radius: var(--home-radius);

    box-shadow:
        0 14px 36px rgba(13, 110, 253, 0.12);
}


/* =========================================================
   MEDIA BLOCK
   КАРТИНКА + ТЕКСТ У ДВА СТОВПЦІ
   ========================================================= */

.home-media-block {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 52px;

    align-items: center;

    margin-top: 36px;
}

.home-media-block__image {
    display: flex;

    align-items: center;
    justify-content: center;

    min-width: 0;
}

.home-media-block__image img {
    display: block;

    width: 100%;
    max-width: 560px;
    height: auto;

    aspect-ratio: 16 / 10;
    object-fit: cover;

    border-radius: var(--home-radius);

    box-shadow:
        0 12px 32px rgba(13, 110, 253, 0.10);
}

.home-media-block__content {
    min-width: 0;
    max-width: 560px;
}

.home-media-block__content h3 {
    font-size: 1.5rem;
    font-weight: 700;

    line-height: 1.3;

    color: var(--home-text);

    margin-top: 0;
    margin-bottom: 0.75em;
}

.home-media-block__content p {
    font-size: 1rem;

    line-height: 1.65;

    color: var(--home-text-muted);

    margin-top: 0;
    margin-bottom: 1em;
}

.home-media-block__content p:last-child {
    margin-bottom: 0;
}

.home-media-block__list {
    margin: 1.25rem 0 0;

    padding-left: 1.2rem;

    color: var(--home-text);

    line-height: 1.6;
}

.home-media-block__list li {
    margin-bottom: 8px;
}


/* ---------- Картинка справа / текст зліва ---------- */

.home-media-block--reverse .home-media-block__image {
    order: 2;
}

.home-media-block--reverse .home-media-block__content {
    order: 1;
}


/* ---------- Відступи після media block ---------- */

.home-features--after-media,
.home-steps--after-media {
    margin-top: 44px;
}


/* =========================================================
   КНОПКИ
   ========================================================= */

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 12px 24px;

    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;

    border-radius: 6px;

    border: 2px solid transparent;

    text-decoration: none;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;

    cursor: pointer;
}

.btn--primary {
    background-color: var(--home-primary);

    color: #fff;

    border-color: var(--home-primary);
}

.btn--primary:hover,
.btn--primary:focus-visible {
    background-color: var(--home-primary-dark);

    border-color: var(--home-primary-dark);

    color: #fff;

    text-decoration: none;
}

.btn--outline {
    background-color: transparent;

    color: var(--home-primary);

    border-color: var(--home-primary);
}

.btn--outline:hover,
.btn--outline:focus-visible {
    background-color: var(--home-primary-soft);

    color: var(--home-primary-dark);

    text-decoration: none;
}

.btn--lg {
    padding: 14px 28px;

    font-size: 1.05rem;
}


/* =========================================================
   БЛОК ДОДАТКОВИХ ПРИЧИН
   ========================================================= */

.home-reasons-box {
    margin-top: 2.5rem;

    background: var(--home-bg-light);

    border-radius: var(--home-radius);

    padding: 24px 28px;

    border-left: 4px solid var(--home-primary);
}

.home-section--light .home-reasons-box {
    background: var(--home-bg-white);
}

.home-reasons-box__title {
    margin: 0 0 12px;

    font-weight: 600;

    color: var(--home-text);
}

.home-reasons-list {
    margin: 0;

    padding-left: 1.2em;

    columns: 2;

    column-gap: 32px;

    color: var(--home-text);

    line-height: 1.6;
}

.home-reasons-list li {
    margin-bottom: 6px;

    break-inside: avoid;
}


/* =========================================================
   FEATURES
   ========================================================= */

.home-features {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 24px;
}

.home-features--4 {
    grid-template-columns: repeat(4, 1fr);
}

.home-feature-card {
    background: var(--home-bg-white);

    border: 1px solid var(--home-border);

    border-radius: var(--home-radius);

    padding: 28px 24px;

    text-align: left;

    height: 100%;

    box-sizing: border-box;
}

.home-feature-card__icon {
    width: 48px;
    height: 48px;

    border-radius: 10px;

    background: var(--home-primary-soft);

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 16px;

    font-size: 1.4rem;

    color: var(--home-primary);

    font-weight: 600;
}

.home-feature-card h3 {
    font-size: 1.2rem;

    margin-top: 0;
    margin-bottom: 0.5em;

    color: var(--home-text);
}

.home-feature-card p {
    font-size: 0.95rem;

    color: var(--home-text-muted);

    margin: 0;

    line-height: 1.55;
}


/* =========================================================
   OFFERS
   БЛОГ / УРОКИ / СВІЖІ ПУБЛІКАЦІЇ
   ========================================================= */

.home-offers {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 24px;
}

.home-offers--2col {
    grid-template-columns: 1fr 1fr;

    max-width: 800px;

    margin-left: auto;
    margin-right: auto;
}

.home-offer-card {
    background: var(--home-bg-white);

    border: 1px solid var(--home-border);

    border-radius: var(--home-radius);

    overflow: hidden;

    display: flex;

    flex-direction: column;

    height: 100%;

    box-sizing: border-box;
}

.home-offer-card__img {
    display: block;

    width: 100%;

    height: 180px;

    object-fit: cover;

    background: var(--home-bg-light);
}

.home-offer-card__body {
    padding: 20px 22px 24px;

    flex: 1;

    display: flex;

    flex-direction: column;
}

.home-offer-card__body h3 {
    font-size: 1.2rem;

    margin-top: 0;
    margin-bottom: 0.5em;

    color: var(--home-text);
}

.home-offer-card__body p {
    font-size: 0.95rem;

    color: var(--home-text-muted);

    margin-top: 0;
    margin-bottom: 1.25em;

    flex: 1;

    line-height: 1.55;
}

.home-offer-card__body .btn {
    align-self: flex-start;
}


/* =========================================================
   ЧОГО ТУТ НЕ БУДЕ
   ========================================================= */

.home-not-list {
    list-style: none;

    padding: 0;

    margin: 0;
}

.home-not-list li {
    position: relative;

    padding-left: 28px;

    margin-bottom: 12px;

    color: var(--home-text);

    line-height: 1.55;
}

.home-not-list li::before {
    content: "×";

    position: absolute;

    left: 0;
    top: 0;

    color: #dc3545;

    font-weight: 700;

    font-size: 1.25rem;

    line-height: 1.3;
}

.home-problem__grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 40px;

    align-items: start;
}

.home-problem__note {
    background: var(--home-bg-white);

    border: 1px solid var(--home-border);

    border-left: 4px solid var(--home-primary);

    border-radius: var(--home-radius);

    padding: 24px 24px;

    font-size: 1.05rem;

    color: var(--home-text);

    line-height: 1.6;

    box-sizing: border-box;
}


/* =========================================================
   КРОКИ
   ========================================================= */

.home-steps {
    display: grid;

    grid-template-columns: repeat(5, 1fr);

    gap: 16px;
}

.home-steps--3 {
    grid-template-columns: repeat(3, 1fr);

    max-width: 900px;

    margin-left: auto;
    margin-right: auto;

    margin-top: 42px;
}

.home-step {
    background: var(--home-bg-white);

    border: 1px solid var(--home-border);

    border-radius: var(--home-radius);

    padding: 20px 16px;

    text-align: center;

    box-sizing: border-box;
}

.home-step__num {
    width: 36px;
    height: 36px;

    border-radius: 50%;

    background: var(--home-primary);

    color: #fff;

    font-weight: 700;

    font-size: 1rem;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 12px;
}

.home-step h3 {
    font-size: 0.95rem;

    margin-top: 0;
    margin-bottom: 0.35em;

    line-height: 1.35;

    color: var(--home-text);
}

.home-step p {
    font-size: 0.85rem;

    color: var(--home-text-muted);

    margin: 0;

    line-height: 1.45;
}

.home-steps-cta {
    text-align: center;

    margin-top: 2rem;
}


/* =========================================================
   FINAL CTA
   ========================================================= */

.home-cta {
    background: linear-gradient(
        135deg,
        #0d6efd 0%,
        #0a58ca 100%
    );

    color: #fff;

    text-align: center;

    padding: 56px 20px;
}

.home-cta h2 {
    color: #fff;

    font-size: 1.75rem;

    margin-top: 0;
    margin-bottom: 0.5em;
}

.home-cta p {
    color: rgba(255, 255, 255, 0.9);

    font-size: 1.1rem;

    max-width: 560px;

    margin: 0 auto 1.75em;

    line-height: 1.6;
}

.home-cta .btn--primary {
    background: #fff;

    color: var(--home-primary);

    border-color: #fff;
}

.home-cta .btn--primary:hover,
.home-cta .btn--primary:focus-visible {
    background: var(--home-primary-soft);

    color: var(--home-primary-dark);
}

.home-cta .btn--outline {
    border-color: rgba(255, 255, 255, 0.7);

    color: #fff;
}

.home-cta .btn--outline:hover,
.home-cta .btn--outline:focus-visible {
    background: rgba(255, 255, 255, 0.15);

    border-color: #fff;

    color: #fff;
}

.home-cta__actions {
    display: flex;

    flex-wrap: wrap;

    gap: 12px;

    justify-content: center;
}


/* =========================================================
   FOOTER
   ========================================================= */

.home-footer {
    background: var(--home-bg-light);

    border-top: 1px solid var(--home-border);

    padding: 28px 20px;

    text-align: center;

    font-size: 0.9rem;

    color: var(--home-text-muted);
}

.home-footer p {
    margin-top: 0;
    margin-bottom: 0.6em;
}

.home-footer p:last-child {
    margin-bottom: 0;
}

.home-footer a {
    color: var(--home-primary);
}

.home-footer a:hover {
    text-decoration: underline;
}


/* =========================================================
   АДАПТИВ — ДО 1100 PX
   ========================================================= */

@media (max-width: 1100px) {

    .home-features--4 {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* =========================================================
   АДАПТИВ — ДО 992 PX
   ========================================================= */

@media (max-width: 992px) {

    /* ---------- Hero ---------- */

    .home-hero__inner {
        grid-template-columns: 1fr;

        gap: 32px;

        text-align: center;
    }

    .home-hero__content .lead {
        margin-left: auto;
        margin-right: auto;
    }

    .home-hero__actions {
        justify-content: center;
    }

    .home-hero__image {
        order: -1;
    }

    .home-hero__image img {
        max-width: 520px;
    }

    .home-hero__content h1 {
        font-size: 1.9rem;
    }


    /* ---------- Media blocks ---------- */

    .home-media-block {
        grid-template-columns: 1fr;

        gap: 28px;
    }

    .home-media-block--reverse .home-media-block__image,
    .home-media-block--reverse .home-media-block__content {
        order: initial;
    }

    .home-media-block__image {
        width: 100%;
    }

    .home-media-block__image img {
        max-width: 700px;
    }

    .home-media-block__content {
        max-width: 700px;

        margin-left: auto;
        margin-right: auto;
    }


    /* ---------- Features / Offers ---------- */

    .home-features,
    .home-features--4,
    .home-offers {
        grid-template-columns: 1fr;

        max-width: 520px;

        margin-left: auto;
        margin-right: auto;
    }

    .home-offers--2col {
        grid-template-columns: 1fr;

        max-width: 520px;
    }


    /* ---------- Steps ---------- */

    .home-steps,
    .home-steps--3 {
        grid-template-columns: 1fr 1fr;

        max-width: 700px;

        margin-left: auto;
        margin-right: auto;
    }


    /* ---------- Problem ---------- */

    .home-problem__grid {
        grid-template-columns: 1fr;

        gap: 24px;
    }


    /* ---------- Reasons ---------- */

    .home-reasons-list {
        columns: 1;
    }


    /* ---------- Sections ---------- */

    .home-section {
        padding: 48px 0;
    }

}


/* =========================================================
   АДАПТИВ — ДО 576 PX
   ========================================================= */

@media (max-width: 576px) {

    /* ---------- Hero ---------- */

    .home-hero {
        padding: 42px 0 40px;
    }

    .home-hero__content h1 {
        font-size: 1.7rem;
    }

    .home-hero__content .lead {
        font-size: 1.05rem;
    }

    .home-hero__image img {
        max-width: 100%;
    }


    /* ---------- Media ---------- */

    .home-media-block {
        gap: 20px;

        margin-top: 24px;
    }

    .home-media-block__content h3 {
        font-size: 1.3rem;
    }

    .home-media-block__image img {
        aspect-ratio: 4 / 3;
    }


    /* ---------- Cards ---------- */

    .home-features,
    .home-features--4,
    .home-offers,
    .home-offers--2col {
        max-width: 100%;
    }


    /* ---------- Steps ---------- */

    .home-steps,
    .home-steps--3 {
        grid-template-columns: 1fr;

        max-width: 100%;
    }


    /* ---------- Typography ---------- */

    .home-section-title {
        font-size: 1.45rem;
    }

    .home-section-lead {
        font-size: 1.05rem;
    }


    /* ---------- Buttons ---------- */

    .btn--lg {
        width: 100%;

        box-sizing: border-box;
    }

    .home-hero__actions {
        flex-direction: column;
    }

    .home-cta__actions {
        flex-direction: column;
        align-items: center;
    }

    .home-cta__actions .btn {
        width: 100%;
        max-width: 280px;
        box-sizing: border-box;
    }

    /* ---------- Reasons ---------- */

    .home-reasons-box {
        padding: 18px 16px;
    }


    /* ---------- Cards ---------- */

    .home-feature-card {
        padding: 22px 18px;
    }

    .home-problem__note {
        padding: 20px 18px;
    }


    /* ---------- CTA ---------- */

    .home-cta {
        padding: 46px 20px;
    }

    .home-cta h2 {
        font-size: 1.5rem;
    }

}