.ad-page,
.ad-home__inner {
    max-width: 1120px;
    margin: 0 auto;
}

.ad-page {
    padding-bottom: 48px;
}

.ad-lead {
    max-width: 720px;
    margin: 0 0 24px;
    color: #4a4a4a;
    font-size: 17px;
    line-height: 1.5;
}

.ad-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 28px;
}

.ad-subnav a {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #e4e4e4;
    border-radius: 999px;
    color: #222;
    background: #fff;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
}

.ad-subnav a.is-current {
    border-color: var(--theme-base-color, #f07d1a);
    color: #fff;
    background: var(--theme-base-color, #f07d1a);
}

.ad-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 8px;
    background: var(--theme-base-color, #f07d1a);
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
}

.ad-btn--ghost {
    background: #fff;
    color: #222 !important;
    border: 1px solid #ddd;
}

.ad-textlink {
    color: var(--theme-base-color, #f07d1a);
    font-weight: 600;
}

.ad-grid,
.ad-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.ad-card {
    overflow: hidden;
    border: 1px solid #ececec;
    border-radius: 16px;
    background: #fff;
}

.ad-card__photo {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: #f3f3f3;
}

.ad-card__body {
    padding: 18px 18px 20px;
}

.ad-card__body h2,
.ad-card__body h3,
.ad-empty h2,
.ad-home h2,
.ad-block h2,
.ad-social h2 {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.25;
}

.ad-card__story {
    margin: 0 0 12px;
    color: #333;
    line-height: 1.45;
}

.ad-meta {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ad-meta li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
    line-height: 1.35;
}

.ad-meta span {
    color: #888;
}

.ad-empty {
    padding: 28px;
    border: 1px dashed #e0e0e0;
    border-radius: 16px;
    background: #fafafa;
}

.ad-empty p {
    max-width: 680px;
    margin: 0 0 18px;
    color: #444;
    line-height: 1.5;
}

.ad-stages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.ad-stages li,
.ad-timeline__num {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f4f4f4;
    color: #333;
    font-size: 14px;
}

.ad-stages li.is-current {
    background: var(--theme-base-color, #f07d1a);
    color: #fff;
    font-weight: 700;
}

.ad-timeline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 8px 0 28px;
    padding: 0;
    list-style: none;
}

.ad-timeline li {
    padding: 18px;
    border: 1px solid #ececec;
    border-radius: 16px;
    background: #fff;
}

.ad-timeline h3 {
    margin: 10px 0 8px;
    font-size: 18px;
}

.ad-timeline p,
.ad-faq p,
.ad-social p,
.ad-home__card span {
    margin: 0;
    color: #444;
    line-height: 1.45;
}

.ad-faq details {
    border-bottom: 1px solid #ececec;
}

.ad-faq summary {
    padding: 16px 0;
    cursor: pointer;
    font-weight: 650;
    font-size: 17px;
}

.ad-faq p {
    margin: 0 0 16px;
}

.ad-social {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-top: 12px;
    padding: 22px;
    border-radius: 16px;
    background: #f7f7f7;
}

.ad-social__links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-right: 64px;
}

.ad-home {
    padding: 28px 16px 56px;
    background: #f6f6f6;
}

.ad-home__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.ad-home__card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 160px;
    padding: 18px;
    border-radius: 16px;
    background: #fff;
    color: #222;
    text-decoration: none;
}

.ad-home__card strong {
    font-size: 18px;
}

.ad-home__more {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0 0 22px;
}

.ad-home__more a {
    color: #222;
    font-weight: 600;
}

.ad-video {
    width: 100%;
    border-radius: 12px;
    background: #111;
}

.ad-block {
    margin-top: 36px;
}

.ad-note {
    margin-top: 18px;
    color: #666;
    font-size: 14px;
    line-height: 1.45;
}

.ad-roles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.ad-roles li {
    padding: 18px;
    border: 1px solid #ececec;
    border-radius: 16px;
    background: #fff;
}

.ad-roles strong {
    display: block;
    margin-bottom: 8px;
}

.ad-check {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.ad-check li {
    position: relative;
    margin: 0 0 12px;
    padding-left: 28px;
    line-height: 1.45;
}

.ad-check li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--theme-base-color, #f07d1a);
}

.ad-messengers {
    position: fixed;
    right: 16px;
    bottom: 24px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ad-messengers__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    min-height: 52px;
    padding: 0 14px;
    border-radius: 999px;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.ad-messengers__btn--tg { background: #2aabee; }
.ad-messengers__btn--vb { background: #7360f2; }
.ad-messengers__btn--wa { background: #25d366; }

@media (max-width: 991px) {
    .ad-home__grid,
    .ad-timeline,
    .ad-roles {
        grid-template-columns: 1fr 1fr;
    }

    .ad-social {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767px) {
    .ad-home__grid,
    .ad-timeline,
    .ad-roles,
    .ad-grid {
        grid-template-columns: 1fr;
    }

    .ad-messengers {
        right: 10px;
        bottom: 78px;
    }

    .ad-messengers__btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    .ad-messengers__btn {
        width: 52px;
        padding: 0;
    }

    .ad-messengers__btn--tg:after { content: "TG"; }
    .ad-messengers__btn--vb:after { content: "VB"; }
    .ad-messengers__btn--wa:after { content: "WA"; }
}

@media print {
    .ad-messengers { display: none; }
}

#popup_iframe_wrapper {
    top: 140px;
    right: auto;
    bottom: auto;
    left: 20px;
    width: 340px;
    max-width: calc(100vw - 40px);
    height: auto;
    max-height: min(520px, calc(100vh - 120px));
    align-items: flex-start;
    justify-content: flex-start;
}

#popup_iframe_wrapper .jqmWindow {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: 340px !important;
    min-width: 0 !important;
    max-width: calc(100vw - 40px) !important;
    min-height: 0 !important;
    max-height: min(520px, calc(100vh - 120px)) !important;
    margin: 0 !important;
    overflow-y: auto !important;
}

@media (max-width: 767px) {
    #popup_iframe_wrapper {
        top: 12px;
        bottom: auto;
        left: 12px;
        width: min(340px, calc(100vw - 24px));
        max-height: calc(100vh - 96px);
    }
}
