/* Rehab landing page: one calm, trust-led visual system. */
:root {
    --rehab-ink: #10283a;
    --rehab-ink-soft: #314d5c;
    --rehab-paper: #f5f7f4;
    --rehab-white: #ffffff;
    --rehab-line: #d8e1df;
    --rehab-accent: #d47b50;
    --rehab-accent-dark: #9e4f31;
    --rehab-mint: #dceae4;
    --rehab-shadow: 0 18px 50px rgba(16, 40, 58, .12);
    --rehab-radius: 18px;
    --rehab-max: 1240px;
}

.content.innerpage:has(.hero_rehab) {
    background: var(--rehab-paper);
    color: var(--rehab-ink);
}

.content.innerpage:has(.hero_rehab) .article.box {
    overflow: hidden;
}

.container {
    width: min(var(--rehab-max), calc(100% - 48px));
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hero_rehab {
    position: relative;
    min-height: 720px;
    padding: 88px 24px 130px;
    overflow: hidden;
    background: #10283a url('https://narcologic.ru/wp-content/uploads/2018/11/bg_1.png') center / cover no-repeat;
    isolation: isolate;
}

.hero_rehab::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, rgba(10, 28, 42, .96) 0%, rgba(16, 40, 58, .88) 48%, rgba(16, 40, 58, .58) 100%);
}

.hero_rehab::after {
    content: '';
    position: absolute;
    left: -12%;
    bottom: -28%;
    width: 62vw;
    height: 55vw;
    border-radius: 50%;
    background: rgba(212, 123, 80, .13);
    filter: blur(2px);
    z-index: -1;
}

.hero_rehab-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr);
    gap: clamp(40px, 7vw, 112px);
    align-items: center;
    width: min(var(--rehab-max), 100%);
    margin-inline: auto;
}

.hero_rehab-content {
    max-width: 720px;
    text-align: left;
}

.hero-eyebrow,
.section-kicker,
.hero-form_kicker {
    margin: 0 0 18px;
    color: var(--rehab-accent);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .14em;
    line-height: 1.3;
    text-transform: uppercase;
}

.hero_rehab h1 {
    max-width: 740px;
    margin: 0;
    color: var(--rehab-white);
    font-size: clamp(2.6rem, 5.4vw, 5.55rem);
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: .98;
}

.hero_rehab-description {
    max-width: 620px;
    margin: 28px 0 0;
    color: rgba(255, 255, 255, .82);
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    line-height: 1.6;
}

.hero-proof-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 30px;
    color: rgba(255, 255, 255, .76);
    font-size: .88rem;
}

.hero-proof-row span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-proof-row span::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--rehab-accent);
    content: '';
}

.hero-form {
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: var(--rehab-radius);
    background: rgba(255, 255, 255, .1);
    box-shadow: 0 26px 60px rgba(0, 0, 0, .2);
    backdrop-filter: blur(16px);
}

.hero-form_kicker { color: #f2b190; }

.hero-form_title {
    margin: 0 0 22px;
    color: var(--rehab-white);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
}

.hero-form_contact {
    display: grid;
    gap: 10px;
}

.form-group_rehab input {
    box-sizing: border-box;
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 10px;
    outline: 0;
    background: rgba(255, 255, 255, .96);
    color: var(--rehab-ink);
    font: inherit;
}

.form-group_rehab input::placeholder { color: #5b6a70; }

.form-submit {
    min-height: 54px;
    padding: 14px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--rehab-accent);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    transition: background .2s ease, transform .2s ease;
}

.form-submit:hover { background: #bd6641; transform: translateY(-2px); }
.form-submit:active { transform: translateY(0); }
.form-submit:disabled { cursor: not-allowed; opacity: .55; transform: none; }

.hero-form_note {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, .7);
    font-size: .9rem;
    line-height: 1.5;
}

.hero-form_note a { color: #fff; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.reviews-section {
    position: relative;
    z-index: 2;
    width: min(var(--rehab-max), 100%);
    margin: 74px auto 0;
}

.carousel-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 16px 50px 24px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.carousel-container::-webkit-scrollbar { display: none; }

.polaroid-card {
    min-width: 220px;
    max-width: 240px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
    scroll-snap-align: start;
    transform: none !important;
    transition: transform .2s ease, box-shadow .2s ease;
}

.polaroid-card:hover { z-index: 3; transform: translateY(-5px) !important; box-shadow: 0 18px 34px rgba(0, 0, 0, .24); }
.polaroid-card img { display: block; width: 100%; height: 150px; margin: 0 0 12px; border-radius: 7px; object-fit: cover; }
.card-caption { padding-top: 0; border: 0; color: var(--rehab-ink); font-size: .9rem; font-weight: 700; line-height: 1.35; }
.card-caption a { color: inherit; text-decoration: none; }
.card-caption a:hover { color: var(--rehab-accent-dark); text-decoration: underline; }

.carousel-btn {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 50%;
    background: #fff;
    color: var(--rehab-ink);
    cursor: pointer;
    font-size: 1.2rem;
    place-items: center;
    transform: translateY(-50%);
}

.carousel-btn:hover { background: var(--rehab-accent); color: #fff; }
.carousel-btn:disabled { cursor: not-allowed; opacity: .4; }
.carousel-btn.prev { left: 10px; }
.carousel-btn.next { right: 10px; }

.floating-btn {
    position: absolute;
    right: 32px;
    bottom: 30px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    background: rgba(16, 40, 58, .8);
    color: #fff !important;
    font-size: .9rem;
    font-weight: 800;
    text-decoration: none;
    backdrop-filter: blur(8px);
}

.floating-btn:hover { background: var(--rehab-accent); }
.arrow-icon { font-size: 1.2rem; }

.rehab-trust { padding: 112px 0 100px; }
.section-intro { max-width: 650px; }
.section-intro h2 { margin: 0; color: var(--rehab-ink); font-size: clamp(2rem, 3.6vw, 3.5rem); letter-spacing: -.045em; line-height: 1.05; }
.section-intro p:not(.section-kicker) { margin: 22px 0 0; color: var(--rehab-ink-soft); font-size: 1.08rem; line-height: 1.7; }
.section-intro--wide { max-width: 760px; }

.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
.trust-card { min-height: 235px; padding: 28px; border: 1px solid var(--rehab-line); border-radius: var(--rehab-radius); background: var(--rehab-white); }
.trust-card--featured { border-color: var(--rehab-accent); background: var(--rehab-ink); color: #fff; }
.trust-index, .process-number { display: block; margin-bottom: 34px; color: var(--rehab-accent); font-size: .8rem; font-weight: 800; letter-spacing: .12em; }
.trust-card h3, .process-item h3 { margin: 0 0 12px; color: inherit; font-size: 1.3rem; letter-spacing: -.025em; }
.trust-card p, .process-item p { margin: 0; color: var(--rehab-ink-soft); line-height: 1.65; }
.trust-card--featured p { color: rgba(255,255,255,.76); }

.rehab-process { padding: 112px 0 120px; background: var(--rehab-mint); }
.process-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 66px 0 0; padding: 0; list-style: none; }
.process-item { position: relative; padding: 0 22px 0 0; }
.process-item:not(:last-child)::after { position: absolute; top: 11px; right: 15px; width: calc(100% - 70px); height: 1px; background: #a9c4b9; content: ''; transform: translateX(100%); }
.process-item h3 { min-height: 58px; color: var(--rehab-ink); }
.process-item p { padding-right: 20px; font-size: .95rem; }

/* Existing content blocks inherit the same rhythm without changing their data. */
.content.innerpage:has(.hero_rehab) .ar-row { width: min(var(--rehab-max), calc(100% - 48px)); margin-inline: auto; padding-top: 60px; }
.content.innerpage:has(.hero_rehab) .quick_links__block { border-color: var(--rehab-line); }
.content.innerpage:has(.hero_rehab) .faq-section { margin-top: 72px; }

button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #f2b190; outline-offset: 3px; }

@media (max-width: 980px) {
    .hero_rehab { padding-top: 64px; }
    .hero_rehab-inner { grid-template-columns: 1fr; gap: 46px; }
    .hero-form { max-width: 620px; }
    .trust-grid { grid-template-columns: 1fr; }
    .trust-card { min-height: auto; }
    .process-list { grid-template-columns: 1fr; gap: 28px; margin-top: 46px; }
    .process-item { display: grid; grid-template-columns: 60px 1fr; gap: 10px; padding: 0 0 28px; border-bottom: 1px solid #a9c4b9; }
    .process-item:not(:last-child)::after { display: none; }
    .process-number { margin: 0; }
    .process-item h3 { min-height: 0; }
}

@media (max-width: 640px) {
    .container, .content.innerpage:has(.hero_rehab) .ar-row { width: min(100% - 32px, var(--rehab-max)); }
    .hero_rehab { min-height: 0; padding: 52px 16px 100px; }
    .hero_rehab h1 { font-size: clamp(2.45rem, 13vw, 4rem); }
    .hero-proof-row { display: grid; gap: 9px; }
    .hero-form { padding: 22px; }
    .reviews-section { margin-top: 48px; }
    .carousel-container { padding-inline: 36px; }
    .polaroid-card { min-width: 205px; max-width: 220px; }
    .polaroid-card img { height: 132px; }
    .carousel-btn.prev { left: 4px; }
    .carousel-btn.next { right: 4px; }
    .floating-btn { right: 16px; bottom: 22px; }
    .rehab-trust, .rehab-process { padding: 76px 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
