.packages-page {
    background: #f6f6f8;
    color: #050917;
    min-height: 70vh;
    padding: 42px 0 72px;
    overflow-x: hidden;
}

.packages-container {
    width: min(1320px, calc(100% - 40px));
    margin-inline: auto;
}

.packages-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    gap: 56px;
    align-items: center;
    padding-bottom: 34px;
}

.packages-kicker {
    color: #7652d7;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.packages-hero__title {
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -.035em;
    max-width: 760px;
}

.packages-hero__description {
    margin-top: 18px;
    max-width: 720px;
    color: #596173;
    font-size: 17px;
    line-height: 1.7;
}

.packages-hero__actions {
    margin-top: 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.packages-hero__visual {
    min-height: 290px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 28px;
    overflow: hidden;
}

    .packages-hero__visual img {
        display: block;
        width: 100%;
        max-height: 360px;
        object-fit: contain;
    }

.packages-panel {
    background: #fff;
    border: 1px solid #e7e0f6;
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(35, 20, 78, .05);
}

.standard-package {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(430px, 1.08fr);
    gap: 26px;
    padding: 28px 30px;
    border-color: #9d79ee;
    background: linear-gradient(120deg, #fff 0%, #fff 52%, #f7f2ff 100%);
}

.standard-package__intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.packages-badge {
    display: inline-flex;
    width: max-content;
    align-items: center;
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 12px;
    font-weight: 700;
}

.packages-badge--mandatory {
    background: #efe8ff;
    color: #603d8d;
}

.standard-package__identity {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-top: 18px;
}

.package-photo {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(145deg, #f2eaff, #e2d6ff);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #603d8d;
    font-weight: 800;
}

.package-photo--large {
    width: 68px;
    height: 68px;
    border-radius: 20px;
}

.package-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.standard-package__title {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
}

.standard-package__description {
    margin-top: 8px;
    color: #626a7a;
    line-height: 1.6;
    max-width: 620px;
}

.package-free-months {
    display: inline-flex;
    margin-top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e9fbf2;
    color: #178454;
    font-size: 12px;
    font-weight: 700;
}

.standard-package__pricing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.standard-price-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 23px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid #e9e1f7;
    border-radius: 18px;
    min-width: 0;
}

.standard-price-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #eee7ff;
    color: #603d8d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    flex: 0 0 auto;
}

.standard-price-card__label {
    font-weight: 700;
    font-size: 15px;
}

.standard-price-card__price {
    font-size: 32px;
    font-weight: 800;
    color: #542198;
    margin-top: 5px;
    line-height: 1.15;
}

.standard-price-card__text {
    font-size: 13px;
    color: #707789;
    line-height: 1.5;
    margin-top: 8px;
}

.optional-packages-section {
    padding-top: 44px;
}

.packages-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

    .packages-section-header h2,
    .modules-panel__header h2 {
        font-size: 31px;
        font-weight: 800;
        letter-spacing: -.02em;
    }

    .packages-section-header p,
    .modules-panel__header p {
        margin-top: 6px;
        color: #6c7381;
    }

.billing-toggle {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e3ddf2;
    border-radius: 999px;
    padding: 4px;
    box-shadow: 0 5px 16px rgba(27, 16, 57, .04);
}

.billing-toggle__button {
    min-width: 105px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: .18s ease;
}

    .billing-toggle__button.is-active {
        background: linear-gradient(90deg, #542198, #7138dc);
        color: #fff;
    }

.optional-packages-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.package-card {
    background: #fff;
    border: 1px solid #e6e1ef;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-shadow: 0 12px 28px rgba(24, 15, 48, .04);
}

.package-card__head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.package-card__name {
    font-size: 22px;
    font-weight: 800;
}

.package-card__price {
    margin-top: 7px;
    font-size: 31px;
    font-weight: 800;
    color: #542198;
}

    .package-card__price small {
        font-size: 14px;
        color: #697182;
        font-weight: 500;
    }

.package-card__old-price {
    margin-inline-start: 8px;
    font-size: 14px;
    color: #8b90a0;
    text-decoration: line-through;
}

.package-card__offer {
    display: inline-flex;
    margin-top: 8px;
    padding: 4px 9px;
    background: #eafaf3;
    color: #168556;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.package-card__description {
    margin: 18px 0;
    color: #636b7a;
    line-height: 1.55;
    min-height: 50px;
}

.package-card__modules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border-top: 1px solid #eeeaf5;
    padding-top: 17px;
    margin-top: auto;
}

.package-module-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #383d4d;
    min-width: 0;
}

    .package-module-pill::before {
        content: '✓';
        width: 22px;
        height: 22px;
        border-radius: 7px;
        background: #f0eaff;
        color: #603d8d;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        flex: 0 0 auto;
    }

.modules-section {
    padding-top: 28px;
}

.modules-panel {
    padding: 24px;
}

.modules-panel__header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.modules-packages-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.module-package-card {
    border: 1px solid #e8e3f2;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    min-width: 0;
}

.module-package-card__header {
    padding: 16px 18px;
    background: linear-gradient(90deg, #faf8ff, #f0ebff);
}

    .module-package-card__header h3 {
        font-size: 18px;
        font-weight: 800;
    }

    .module-package-card__header p {
        font-size: 12px;
        color: #747b89;
        margin-top: 3px;
    }

.module-package-card__body {
    padding: 17px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 16px;
}

.module-block {
    min-width: 0;
}

    .module-block h4 {
        font-size: 14px;
        font-weight: 800;
        margin-bottom: 5px;
        color: #272c39;
    }

    .module-block ul {
        padding-inline-start: 17px;
        color: #636b79;
        font-size: 12px;
        line-height: 1.55;
        list-style: disc;
    }

.packages-empty {
    padding: 30px;
    text-align: center;
    color: #737989;
    background: #fff;
    border: 1px dashed #d9d2e7;
    border-radius: 18px;
}

.packages-skeleton-line,
.packages-image-skeleton,
.is-loading {
    position: relative;
    overflow: hidden;
}

    .packages-skeleton-line:empty,
    .packages-image-skeleton:has(img[hidden]),
    .is-loading {
        background: #ececf1;
    }

        .packages-skeleton-line:empty::after,
        .packages-image-skeleton:has(img[hidden])::after,
        .is-loading::after {
            content: '';
            position: absolute;
            inset: 0;
            transform: translateX(-100%);
            background: linear-gradient( 90deg, transparent, rgba(255, 255, 255, .75), transparent );
            animation: packages-shimmer 1.35s infinite;
        }

.packages-skeleton-line--title:empty {
    display: block;
    height: 115px;
    border-radius: 16px;
}

.packages-skeleton-line--paragraph:empty {
    display: block;
    height: 82px;
    border-radius: 14px;
}

.is-loading {
    min-height: 190px;
}

    .is-loading > * {
        visibility: hidden;
    }

@keyframes packages-shimmer {
    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 1023px) {
    .packages-page {
        padding-top: 28px;
    }

    .packages-hero {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .packages-hero__visual {
        min-height: 220px;
        order: -1;
    }

    .standard-package {
        grid-template-columns: 1fr;
    }

    .optional-packages-grid,
    .modules-packages-grid {
        grid-template-columns: 1fr 1fr;
    }

    .standard-package__pricing {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .packages-container {
        width: min(100% - 28px, 1320px);
    }

    .packages-page {
        padding-bottom: 45px;
    }

    .packages-hero__title {
        font-size: 36px;
    }

    .packages-hero__description {
        font-size: 15px;
    }

    .standard-package {
        padding: 20px;
    }

    .standard-package__identity {
        flex-direction: column;
    }

    .standard-package__pricing {
        grid-template-columns: 1fr;
    }

    .packages-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .billing-toggle {
        width: 100%;
    }

    .billing-toggle__button {
        flex: 1;
    }

    .optional-packages-grid,
    .modules-packages-grid {
        grid-template-columns: 1fr;
    }

    .package-card__modules,
    .module-package-card__body {
        grid-template-columns: 1fr;
    }

    .modules-panel {
        padding: 16px;
    }

    .packages-section-header h2,
    .modules-panel__header h2 {
        font-size: 26px;
    }
}

/* Package page skeleton cards */
.package-card--skeleton,
.module-package-card--skeleton {
    pointer-events: none;
}

.package-skeleton {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #ececf1;
}

.package-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .78), transparent);
    animation: packages-shimmer 1.35s infinite;
}

.package-skeleton-head-content {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.package-skeleton--photo {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 16px;
}

.package-skeleton--name {
    width: 58%;
    height: 22px;
}

.package-skeleton--price {
    width: 46%;
    height: 31px;
    margin-top: 10px;
}

.package-skeleton--badge {
    width: 84px;
    height: 22px;
    margin-top: 10px;
    border-radius: 999px;
}

.package-skeleton--description {
    width: 100%;
    height: 50px;
    margin: 18px 0;
}

.package-card__modules--skeleton {
    margin-top: auto;
}

.package-skeleton--module {
    width: 84%;
    height: 24px;
}

.package-skeleton--module-title {
    width: 46%;
    height: 20px;
}

.package-skeleton--module-subtitle {
    width: 72%;
    height: 13px;
    margin-top: 8px;
}

.module-skeleton-block {
    min-width: 0;
}

.package-skeleton--module-heading {
    width: 70%;
    height: 16px;
    margin-bottom: 10px;
}

.package-skeleton--page {
    width: 92%;
    height: 11px;
    margin-top: 7px;
}

.package-skeleton--page-short {
    width: 68%;
}
