/* =========================================================
   GLOBAL LAYOUT
========================================================= */

.shell {
    width: calc(100% - 80px);
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   HEADER
========================================================= */

.header {
    gap: 28px;
    min-height: 82px;
}

.menu {
    flex: 1;
    justify-content: space-evenly;
    gap: 10px;
}

.menu a {
    white-space: nowrap;
}


/* =========================================================
   MAIN PAGE
========================================================= */

.hero {
    overflow: hidden;
}

.hero-grid {
    align-items: center;
}

.intro {
    min-width: 0;
}


/* Заголовок главной страницы */

.intro h1 {
    font-size: clamp(44px, 4.4vw, 64px) !important;
    line-height: 1.07 !important;
    letter-spacing: -1.3px;
    margin-bottom: 20px;
}

.intro h1 strong {
    font-size: inherit !important;
}


/* Текст под заголовком */

.intro p {
    max-width: 570px;
    margin-top: 0;

    font-size: 16px;
    line-height: 1.7;

    color: #58698f;
}


/* =========================================================
   PORTRAIT
========================================================= */

.portrait {
    min-width: 0;
}

.portrait img {
    display: block;
    max-width: 100%;
    height: auto;
}



/* =========================================================
   PROFILE
========================================================= */

.profile {
    min-width: 0;
}

.profile-head {
    min-width: 0;
}

.profile-head h2 {
    line-height: 1.25;
}

.profile li {
    min-width: 0;
}

.profile li span {
    min-width: 0;
}


/* =========================================================
   DETAILS
========================================================= */

.details {
    width: calc(100% - 80px);
    max-width: 1500px;

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

.about {
    min-width: 0;
}

.numbers {
    min-width: 0;
}


/* =========================================================
   USEFUL
========================================================= */

.useful {
    width: calc(100% - 80px);
    max-width: 1500px;

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

.useful-grid {
    display: grid;

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

    gap: 20px;
}

.useful-grid button {
    width: 100%;
    min-width: 0;
    min-height: 105px;
}


/* =========================================================
   OLD INNER PAGES
========================================================= */

.page-hero {
    padding: 68px 0 48px;

    background:
        linear-gradient(
            115deg,
            #edf5ff,
            #f1efff
        );

    text-align: center;
}

.page-hero h1 {
    font-size: 42px;

    margin: 0 0 12px;

    letter-spacing: -1px;
}

.page-hero p {
    max-width: 640px;

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

    font-size: 16px;
}


.page-content {
    padding: 42px 0 55px;
}

.page-content h2 {
    font-size: 23px;
}


.page-card {
    border: 1px solid #ebeafa;

    border-radius: 18px;

    background: #fff;

    box-shadow:
        0 5px 18px rgba(120, 128, 178, .12);

    padding: 28px;
}


/* =========================================================
   TWO COLUMNS
========================================================= */

.two-columns {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 25px;
}


.teacher-details {
    display: grid;

    gap: 14px;

    margin-top: 22px;
}

.teacher-details div {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    padding: 13px 0;

    border-bottom:
        1px solid #ecebfa;
}

.teacher-details b {
    color: #5b43ed;
}



/* =========================================================
   PLANS / VIDEOS
========================================================= */

.plans-grid,
.video-grid {
    display: grid;

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

    gap: 22px;

    margin-top: 24px;
}


.plan-card,
.video-card {
    display: flex;

    flex-direction: column;

    gap: 14px;

    border: 1px solid #ecebfa;

    border-radius: 16px;

    padding: 22px;

    background: #fff;

    box-shadow:
        0 4px 14px rgba(114, 114, 165, .10);
}


.plan-card i {
    font-style: normal;

    font-size: 35px;
}


.plan-card h3,
.video-card h3 {
    margin: 0;

    font-size: 17px;
}


.plan-card p,
.video-card p {
    margin: 0;

    color: #3e4768;
}


.plan-card button,
.video-card button {
    margin-top: auto;

    align-self: flex-start;
}


.video-preview {
    height: 145px;

    display: grid;

    place-items: center;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #5a43e9,
            #81a7fa
        );

    font-size: 42px;

    color: #fff;
}



/* =========================================================
   CONTACTS
========================================================= */

.contact-layout {
    display: grid;

    grid-template-columns:
        1fr 1.2fr;

    gap: 24px;
}


.contact-list {
    display: grid;

    gap: 18px;

    margin-top: 20px;
}


.contact-list p {
    margin: 0;

    padding: 15px;

    border-radius: 10px;

    background: #f5f4ff;

    font-weight: 700;
}



/* =========================================================
   FORMS
========================================================= */

.form-grid {
    display: grid;

    gap: 13px;
}


.form-grid input,
.form-grid textarea,
.chat-input input {
    width: 100%;

    box-sizing: border-box;

    border:
        1px solid #dcd9f7;

    border-radius: 9px;

    padding: 13px;

    font: inherit;

    color: var(--ink);

    background: #fff;

    outline: none;
}


.form-grid input:focus,
.form-grid textarea:focus,
.chat-input input:focus {
    border-color: #6548ee;

    box-shadow:
        0 0 0 3px rgba(101, 72, 238, .10);
}


.form-grid textarea {
    min-height: 120px;

    resize: vertical;
}



/* =========================================================
   CHAT
========================================================= */

.chat-shell {
    width: min(
        1050px,
        calc(100% - 80px)
    );

    margin:
        42px auto;
}


.chat-window {
    min-height: 450px;

    display: flex;

    flex-direction: column;

    overflow: hidden;
}


.chat-messages {
    flex: 1;

    background: #f7f7ff;

    padding: 25px;

    display: grid;

    align-content: start;

    gap: 13px;
}


.message {
    max-width: 72%;

    padding: 11px 15px;

    border-radius: 13px;

    background: #fff;

    box-shadow:
        0 2px 7px rgba(119,119,119,.18);
}


.message.mine {
    margin-left: auto;

    background: #5942e9;

    color: #fff;
}


.chat-input {
    display: flex;

    gap: 12px;

    padding: 15px;

    border-top:
        1px solid #eae9f7;
}


.chat-input button {
    flex: none;
}



/* =========================================================
   NOTICE
========================================================= */

.notice {
    display: none;

    position: fixed;

    right: 25px;
    bottom: 25px;

    z-index: 10;

    background: #201b53;

    color: #fff;

    padding: 13px 18px;

    border-radius: 9px;

    box-shadow:
        0 8px 25px rgba(0,0,0,.20);
}


.notice.show {
    display: block;
}



/* =========================================================
   LIGHT THEME
========================================================= */


/* Hero */

body:not(.dark) .hero {
    background:
        radial-gradient(
            circle at 8% 20%,
            rgba(103, 76, 242, .10),
            transparent 28%
        ),
        radial-gradient(
            circle at 92% 80%,
            rgba(103, 76, 242, .08),
            transparent 28%
        ),
        #f5f6ff !important;
}


body:not(.dark) .intro h1 {
    color: #18295f !important;
}


body:not(.dark) .intro h1 strong {
    color: #6548ee !important;
}


body:not(.dark) .intro p {
    color: #58698f !important;
}


/* Profile */

body:not(.dark) .profile {
    background: #ffffff !important;

    color: #18295f !important;

    border:
        1px solid #e4e0fa;

    box-shadow:
        0 18px 40px rgba(53, 42, 140, .08);
}


body:not(.dark) .profile-head h2 {
    color: #18295f !important;
}


body:not(.dark) .profile-head p {
    color: #69779a !important;
}


body:not(.dark) .profile li {
    color: #6045eb !important;
}


body:not(.dark) .profile li span {
    color: #263866 !important;
}


body:not(.dark) .profile-head > span {
    background: #eeeaff !important;

    color: #6045eb !important;
}



/* Details */

body:not(.dark) .details {
    background: #f7f6ff !important;

    color: #18295f !important;
}


body:not(.dark) .about {
    background: #ffffff !important;

    color: #18295f !important;

    border:
        1px solid #e4e0fa;

    box-shadow:
        0 15px 35px rgba(55, 43, 150, .06);
}


body:not(.dark) .about h2 {
    color: #18295f !important;
}


body:not(.dark) .about p {
    color: #617099 !important;
}


/* Computer */

body:not(.dark) .computer {
    background:
        linear-gradient(
            145deg,
            #f1eeff,
            #e8e3ff
        ) !important;

    border:
        1px solid #ddd6ff;

    color: #6045eb !important;
}


body:not(.dark) .computer small {
    color: #6045eb !important;
}


body:not(.dark) .computer b {
    color: #6045eb !important;
}



/* Numbers */

body:not(.dark) .numbers {
    background: transparent !important;

    color: #18295f !important;
}


body:not(.dark) .numbers h2 {
    color: #18295f !important;
}


body:not(.dark) .stat-grid article {
    background: #ffffff !important;

    color: #18295f !important;

    border:
        1px solid #e3def9;

    box-shadow:
        0 12px 28px rgba(50, 40, 130, .07);
}


body:not(.dark) .stat-grid article b {
    color: #18295f !important;
}


body:not(.dark) .stat-grid article span {
    color: #68769a !important;
}



/* Useful */

body:not(.dark) .useful {
    background: #f7f6ff !important;

    color: #18295f !important;
}


body:not(.dark) .useful h2 {
    color: #18295f !important;
}


body:not(.dark) .useful-grid button {
    background: #ffffff !important;

    color: #18295f !important;

    border:
        1px solid #e3def9;

    box-shadow:
        0 12px 30px rgba(50, 40, 130, .07);
}


body:not(.dark) .useful-grid button b {
    color: #18295f !important;
}


body:not(.dark) .useful-grid button small {
    color: #68769a !important;
}



/* Outline button */

body:not(.dark) .outline {
    background: #ffffff !important;

    color: #5f45e8 !important;

    border:
        1px solid #cfc6ff !important;
}


body:not(.dark) .outline:hover {
    background: #f0edff !important;
}



/* Portrait */

body:not(.dark) .portrait {
    background: transparent !important;
}


body:not(.dark) .portrait img {
    box-shadow:
        0 20px 50px rgba(50, 40, 130, .13);
}



/* Footer */

body:not(.dark) footer {
    border-top:
        1px solid #e0dcf7;
}



/* =========================================================
   DARK THEME SUPPORT FOR OLD INNER PAGES
========================================================= */

body.dark .page-hero,
body.dark-theme .page-hero {
    background:
        linear-gradient(
            115deg,
            #111027,
            #171333
        );

    color: #fff;
}


body.dark .page-hero h1,
body.dark-theme .page-hero h1 {
    color: #fff;
}


body.dark .page-hero p,
body.dark-theme .page-hero p {
    color: #a3aac5;
}


body.dark .page-card,
body.dark-theme .page-card {
    background: #191632;

    border-color: #302958;

    color: #fff;
}


body.dark .plan-card,
body.dark-theme .plan-card,
body.dark .video-card,
body.dark-theme .video-card {
    background: #191632;

    border-color: #302958;

    color: #fff;
}


body.dark .plan-card h3,
body.dark-theme .plan-card h3,
body.dark .video-card h3,
body.dark-theme .video-card h3 {
    color: #fff;
}


body.dark .plan-card p,
body.dark-theme .plan-card p,
body.dark .video-card p,
body.dark-theme .video-card p {
    color: #a1a9c6;
}


body.dark .teacher-details div,
body.dark-theme .teacher-details div {
    border-color: #302958;
}


body.dark .contact-list p,
body.dark-theme .contact-list p {
    background: #24203e;

    color: #fff;
}


body.dark .form-grid input,
body.dark-theme .form-grid input,
body.dark .form-grid textarea,
body.dark-theme .form-grid textarea,
body.dark .chat-input input,
body.dark-theme .chat-input input {
    background: #111027;

    border-color: #39335f;

    color: #fff;
}


body.dark .chat-messages,
body.dark-theme .chat-messages {
    background: #111027;
}


body.dark .message:not(.mine),
body.dark-theme .message:not(.mine) {
    background: #191632;

    color: #fff;
}



/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1050px) {

    .shell,
    .details,
    .useful {
        width: calc(100% - 48px);
    }


    .menu a {
        font-size: 12px;

        padding:
            10px 8px;
    }


    .plans-grid,
    .video-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .useful-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .intro h1 {
        font-size:
            clamp(42px, 4.5vw, 58px) !important;
    }

}


@media (max-width: 850px) {

    .hero-grid {
        grid-template-columns:
            1fr 1fr;
    }


    .intro h1 {
        font-size:
            42px !important;
    }

}


@media (max-width: 700px) {

    .shell,
    .details,
    .useful {
        width: calc(100% - 32px);
    }


    .menu {
        gap: 0;
    }


    .menu a {
        font-size: 10px;
    }


    .menu a span {
        display: none;
    }


    .hero-grid {
        grid-template-columns:
            1fr;
    }


    .portrait {
        order: 2;
    }


    .profile {
        order: 3;
    }


    .intro {
        order: 1;
    }


    .intro h1 {
        font-size:
            40px !important;

        line-height:
            1.1 !important;
    }


    .two-columns,
    .contact-layout {
        grid-template-columns:
            1fr;
    }


    .plans-grid,
    .video-grid,
    .useful-grid {
        grid-template-columns:
            1fr;
    }


    .teacher-details div {
        display: block;
    }


    .teacher-details span {
        display: block;

        margin-top: 4px;
    }


    .chat-shell {
        width:
            calc(100% - 32px);
    }


    .chat-input {
        flex-direction:
            column;
    }


    .chat-input button {
        width: 100%;
    }

}


@media (max-width: 480px) {

    .intro h1 {
        font-size:
            34px !important;

        letter-spacing:
            -.5px;
    }


    .intro p {
        font-size:
            15px;
    }


    .page-hero {
        padding:
            45px 0 35px;
    }


    .page-hero h1 {
        font-size:
            32px;
    }


    .page-content {
        padding:
            32px 0 45px;
    }


    .page-card {
        padding:
            20px;
    }

}



/* =========================================================
   ФИНАЛЬНО УМЕНЬШАЕМ ЗАГОЛОВОК ГЛАВНОЙ
========================================================= */

.hero .intro h1 {
    font-size: 46px !important;
    line-height: 1.08 !important;
    letter-spacing: -1px !important;
    margin: 0 0 18px !important;
}

.hero .intro h1 strong {
    font-size: 46px !important;
    line-height: 1.08 !important;
}


/* Для средних экранов */

@media (max-width: 1200px) {

    .hero .intro h1 {
        font-size: 42px !important;
    }

    .hero .intro h1 strong {
        font-size: 42px !important;
    }

}


/* Для планшета */

@media (max-width: 800px) {

    .hero .intro h1 {
        font-size: 38px !important;
    }

    .hero .intro h1 strong {
        font-size: 38px !important;
    }

}


/* Для телефона */

@media (max-width: 500px) {

    .hero .intro h1 {
        font-size: 32px !important;
    }

    .hero .intro h1 strong {
        font-size: 32px !important;
    }

}