/* ============================================================
   Петя Димова — фамилен психолог | modern redesign
   ============================================================ */

:root {
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --teal-light: #ccfbf1;
    --ink: #1e293b;
    --muted: #64748b;
    --bg: #f8fafc;
    --card: #ffffff;
    --radius: 18px;
    --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.14);
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.01em;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-align: center;
    margin: 0 0 8px;
    color: var(--ink);
}

.section-sub {
    text-align: center;
    color: var(--muted);
    margin: 0 0 36px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--teal), #14b8a6);
    color: #fff;
    box-shadow: 0 6px 18px rgba(13, 148, 136, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(13, 148, 136, 0.45);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.75);
    color: var(--teal-dark);
    border: 1.5px solid rgba(13, 148, 136, 0.4);
    backdrop-filter: blur(4px);
}

.btn-ghost:hover {
    background: #fff;
    border-color: var(--teal);
}

.btn-wide { width: 100%; text-align: center; }

/* ---------- Navigation ---------- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.07);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 62px;
    flex-wrap: wrap;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--ink);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    padding: 9px 14px;
    color: var(--muted);
    font-weight: 500;
    font-size: 0.93rem;
    text-decoration: none;
    border-radius: 10px;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
    color: var(--teal-dark);
    background: var(--teal-light);
}

.nav-links a.nav-cta {
    background: var(--teal);
    color: #fff;
    border-radius: 999px;
    padding: 9px 20px;
    margin-left: 8px;
}

.nav-links a.nav-cta:hover { background: var(--teal-dark); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--ink);
    padding: 8px;
    cursor: pointer;
    border-radius: 10px;
}

.nav-toggle:hover { background: var(--teal-light); }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 70px 20px 110px;
    text-align: center;
    background: linear-gradient(160deg, #f0fdfa 0%, #eef2ff 60%, #fdf2f8 100%);
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    width: 560px;
    top: -140px;
    right: -160px;
    pointer-events: none;
    animation: float 9s ease-in-out infinite;
}

.hero-blob--2 {
    width: 480px;
    top: auto;
    right: auto;
    bottom: -180px;
    left: -180px;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(3deg); }
}

.hero-inner {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    z-index: 1;
}

.hero-portrait {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 26px;
}

.hero-portrait img {
    position: absolute;
    inset: 10px;
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
}

.portrait-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: spin 40s linear infinite;
}

@keyframes spin { to { transform: rotate(-360deg); } }

.hero h1 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 18px;
}

.hero h1 .hero-name {
    display: block;
    color: var(--teal-dark);
    font-weight: 800;
    font-size: clamp(2rem, 5.8vw, 3.2rem);
}

.hero h1 .hero-role {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-weight: 500;
    font-size: clamp(2rem, 2.8vw, 1.7rem);
    letter-spacing: 0.01em;
}

.hero-sub {
    max-width: 560px;
    margin: 0 auto 30px;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-bio-link {
    color: var(--teal-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 28px;
}

.hero-social {
    display: flex;
    gap: 14px;
    justify-content: center;
}

.hero-social a,
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: var(--teal-dark);
    box-shadow: var(--shadow);
    transition: transform 0.2s, color 0.2s;
}

.hero-social a:hover,
.footer-social a:hover {
    transform: translateY(-3px);
    color: var(--teal);
}

.hero-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: 70px;
}

/* ---------- Approach cards ---------- */
.podhod {
    background: #fff;
    padding: 30px 0 50px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.card {
    background: var(--card);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--radius);
    padding: 28px 18px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-icon svg {
    width: 96px;
    height: 96px;
    margin: 0 auto;
}

.card h3 {
    margin: 16px 0 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ---------- Articles ---------- */
.articles {
    background: #fff;
    padding: 20px 0 60px;
}

.article {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: center;
    padding: 44px 0;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.article:first-child { border-top: none; }

.article--reverse .article-visual { order: 2; }
.article--reverse .article-body { order: 1; }

.article-visual svg {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.article-body h2 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.01em;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    margin: 0 0 14px;
    color: var(--ink);
}

.article-body p {
    color: #475569;
    margin: 0 0 14px;
}

/* unified content links (all pages) */
.article-body a,
.bio-card a:not(.btn),
.case-body a,
.case-terms a,
.term-card a,
.faq-item p a,
.disclaimer-note a,
.section-sub a,
.page-faq-more a,
.page-byline a,
.check-list a,
.dot-list a {
    color: var(--teal-dark);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(13, 148, 136, 0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s ease;
}

.article-body a:hover,
.bio-card a:not(.btn):hover,
.case-body a:hover,
.case-terms a:hover,
.term-card a:hover,
.faq-item p a:hover,
.disclaimer-note a:hover,
.section-sub a:hover,
.page-faq-more a:hover,
.page-byline a:hover,
.check-list a:hover,
.dot-list a:hover {
    text-decoration-color: var(--teal);
}

/* ---------- Кабинет ---------- */
.priemna {
    padding: 70px 0;
    background: linear-gradient(180deg, #f0fdfa 0%, var(--bg) 100%);
}

.priemna-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.priemna-map {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-height: 380px;
}

.priemna-map iframe {
    width: 100%;
    height: 100%;
    min-height: 380px;
    border: 0;
    display: block;
}

.priemna-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.priemna-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    flex: 1;
}

.priemna-photos .ph {
    border: none;
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    background: #e2e8f0;
    min-height: 130px;
}

.priemna-photos .ph-tall { grid-row: span 2; }

.priemna-photos .ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.priemna-photos .ph:hover img { transform: scale(1.06); }

/* ---------- Сертификати ---------- */
.sertifikati {
    padding: 70px 0;
    background: #fff;
}

.certs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.cert {
    border: 1px solid rgba(15, 23, 42, 0.07);
    background: var(--card);
    border-radius: var(--radius);
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    font-family: inherit;
}

.cert:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.cert img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.3s ease;
}

.cert:hover img { transform: scale(1.04); }

.cert span {
    display: block;
    padding: 14px 12px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--teal-dark);
    background: #fff;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

/* ---------- Био ---------- */
.bio {
    padding: 70px 0;
    background: linear-gradient(180deg, var(--bg) 0%, #eef2ff 100%);
}

.bio-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 30px 34px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.bio-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    margin: 0 0 14px;
}

.bio-card p { color: #475569; }

.bio-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.bio-columns .bio-card { margin-bottom: 0; }

.check-list,
.dot-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #475569;
}

.check-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
}

.check-list li,
.dot-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 8px;
}

.check-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--teal-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f766e' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4 10-11'/%3E%3C/svg%3E") center/11px no-repeat;
}

.dot-list li::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
}

/* ---------- FAQ ---------- */
.faq {
    padding: 70px 0;
    background: #fff;
}

.faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.faq-item {
    background: var(--card);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 48px 18px 22px;
    font-weight: 600;
    position: relative;
    color: var(--ink);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2.5px solid var(--teal);
    border-bottom: 2.5px solid var(--teal);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    transform: translateY(-30%) rotate(225deg);
}

.faq-item summary:hover { background: #f0fdfa; }

.faq-item p {
    margin: 0;
    padding: 0 22px 18px;
    color: #475569;
}

/* ---------- Service tiles (Консултации) ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.service-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    background: var(--card);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: var(--radius);
    padding: 26px 18px 22px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-tile:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.service-tile-icon svg {
    width: 88px;
    height: 88px;
}

.service-tile h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 14px 0 8px;
    color: var(--ink);
}

.service-tile p {
    font-size: 0.88rem;
    color: var(--muted);
    margin: 0 0 14px;
    flex: 1;
}

.service-tile-more {
    color: var(--teal-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.service-tile:hover .service-tile-more { text-decoration: underline; }

.cta-card { text-align: center; }

.cta-card .cta-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0 0;
}

/* ---------- Footer ---------- */
.site-footer {
    position: relative;
    background: var(--teal-dark);
    color: #ecfdf5;
    text-align: center;
}

.footer-wave {
    display: block;
    width: 100%;
    height: 60px;
    margin-top: -59px;
    position: relative;
}

.footer-body {
    padding: 40px 20px 32px;
}

.footer-body h2 {
    font-family: var(--font-display);
    margin: 0 0 16px;
    font-size: 1.7rem;
}

.footer-phone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.12);
    padding: 12px 28px;
    border-radius: 999px;
    transition: background 0.2s;
}

.footer-phone:hover { background: rgba(255, 255, 255, 0.22); }

.footer-body > p,
.footer-body > address {
    margin: 16px 0;
    color: #99f6e4;
    font-style: normal;
}

.footer-body > address {
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-body > address a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.footer-body > address a:hover { text-decoration: underline; }

.footer-social {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin: 8px 0 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
    margin: 4px 0 14px;
}

.footer-links a {
    color: #99f6e4;
    text-decoration: none;
    font-size: 0.92rem;
}

.footer-links a:hover { color: #fff; text-decoration: underline; }

.footer-social a {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: none;
}

.footer-copy {
    font-size: 0.85rem;
    color: #5eead4;
    margin: 0;
}

/* ---------- Modal ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal[hidden] { display: none; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
}

.modal-box {
    position: relative;
    background: #fff;
    border-radius: 22px;
    padding: 40px 34px 32px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: pop 0.25s ease;
}

@keyframes pop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-box svg { margin: 0 auto 8px; }

.modal-box h3 { margin: 0 0 10px; font-size: 1.15rem; }

.modal-phone {
    display: inline-block;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--teal-dark);
    text-decoration: none;
    margin-bottom: 8px;
}

.modal-box p { color: var(--muted); margin: 8px 0 0; font-size: 0.95rem; }

.modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
}

.modal-close:hover { color: var(--ink); background: #f1f5f9; }

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox[hidden] { display: none; }

.lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 20, 0.92);
}

.lb-figure {
    position: relative;
    margin: 0;
    max-width: min(92vw, 1100px);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.lb-figure img {
    max-width: 100%;
    max-height: calc(88vh - 56px);
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    user-select: none;
    -webkit-user-drag: none;
}

.lb-figure figcaption {
    display: flex;
    gap: 16px;
    align-items: baseline;
    color: #e2e8f0;
    padding: 14px 6px 0;
    font-size: 0.95rem;
}

#lbCounter { color: #94a3b8; font-size: 0.85rem; }

.lb-btn {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.lb-btn:hover { background: rgba(255, 255, 255, 0.25); }

.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }

/* ---------- Subpages ---------- */
.page-hero {
    background: linear-gradient(160deg, #f0fdfa 0%, #eef2ff 60%, #fdf2f8 100%);
    text-align: center;
    padding: 48px 20px 42px;
}

.page-hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: clamp(1.9rem, 4.5vw, 2.7rem);
    margin: 10px 0 10px;
    color: var(--ink);
}

.page-hero p {
    max-width: 640px;
    margin: 0 auto;
    color: var(--muted);
}

.page-hero .terms-intro {
    max-width: 1000px;
    margin-top: 12px;
}

.breadcrumbs {
    font-size: 0.85rem;
    color: var(--muted);
}

.breadcrumbs a {
    color: var(--teal-dark);
    text-decoration: none;
}

.breadcrumbs a:hover { text-decoration: underline; }

.page-body {
    padding: 44px 0 60px;
    background: var(--bg);
}

.service-card h2,
.case-card h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.4rem;
    margin: 0 0 14px;
    color: var(--teal-dark);
}

.bio-card > h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.4rem;
    margin: 0 0 14px;
    color: var(--ink);
}

.disclaimer-note {
    max-width: 760px;
    margin: 0 auto 28px;
    padding: 14px 20px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    color: #92400e;
    font-size: 0.92rem;
}

.case-note {
    font-size: 0.85rem;
    color: var(--muted);
    font-style: italic;
}

/* collapsible case cards */
details.case-card {
    background: var(--card);
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: hidden;
    scroll-margin-top: 80px;
    transition: box-shadow 0.2s ease;
}

details.case-card:hover { box-shadow: var(--shadow-lg); }

details.case-card summary {
    list-style: none;
    cursor: pointer;
    padding: 20px 56px 20px 26px;
    position: relative;
}

details.case-card summary::-webkit-details-marker { display: none; }

details.case-card summary h2 {
    margin: 0;
    font-size: 1.15rem;
}

details.case-card summary::after {
    content: '';
    position: absolute;
    right: 24px;
    top: 50%;
    width: 11px;
    height: 11px;
    border-right: 2.5px solid var(--teal);
    border-bottom: 2.5px solid var(--teal);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s ease;
}

details.case-card[open] summary::after {
    transform: translateY(-30%) rotate(225deg);
}

details.case-card summary:hover { background: #f0fdfa; }

details.case-card .case-body {
    padding: 0 26px 22px;
}

.case-terms {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed rgba(15, 23, 42, 0.12);
    font-size: 0.88rem;
    color: var(--muted);
}

.case-terms > p {
    margin: 0 0 8px;
    font-weight: 600;
}

.case-terms-list {
    margin: 0;
    padding-left: 1.35rem;
}

.case-terms-list li + li {
    margin-top: 4px;
}

.terms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.term-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px 26px;
    box-shadow: var(--shadow);
    scroll-margin-top: 80px;
}

.terms-category + .terms-category { margin-top: 32px; }

.terms-category-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin: 0 0 16px;
    color: var(--teal-dark);
}

.term-card h3 {
    font-size: 1.1rem;
    margin: 0 0 10px;
    color: var(--teal-dark);
}

.term-card p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

.related-links {
    display: flex;
    justify-content: center;
    gap: 26px;
    flex-wrap: wrap;
    margin-top: 34px;
}

.related-links a {
    color: var(--teal-dark);
    font-weight: 600;
    text-decoration: none;
}

.related-links a:hover { text-decoration: underline; }

/* author / last-updated line under subpage titles */
.page-hero .page-byline {
    margin-top: 12px;
    font-size: 0.85rem;
}

/* answer-first summary at the top of a service page */
.service-lead {
    font-size: 1.06em;
    margin: 0 0 22px;
}

/* FAQ block inside subpages */
.page-faq { margin-top: 40px; }

.page-faq .section-title {
    font-size: clamp(1.4rem, 3vw, 1.7rem);
    margin-bottom: 20px;
}

.page-faq-more {
    max-width: 760px;
    margin: 18px auto 0;
    text-align: center;
    font-size: 0.92rem;
    color: var(--muted);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 960px) {
    .nav-toggle { display: block; }

    .services-grid { grid-template-columns: repeat(2, 1fr); }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 8px 0 14px;
        gap: 2px;
    }

    .nav-links.open { display: flex; }

    .nav-links a { padding: 12px 14px; }

    .nav-links a.nav-cta {
        margin: 8px 0 0;
        text-align: center;
    }

    .cards-grid { grid-template-columns: repeat(2, 1fr); }

    .terms-grid { grid-template-columns: 1fr; }

    .article,
    .article--reverse {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .article--reverse .article-visual { order: 0; }
    .article--reverse .article-body { order: 1; }

    .priemna-grid { grid-template-columns: 1fr; }

    .certs-grid { grid-template-columns: repeat(2, 1fr); }

    .bio-columns { grid-template-columns: 1fr; }

    .check-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .hero { padding: 46px 16px 96px; }

    .hero-portrait {
        width: 176px;
        height: 176px;
    }

    .hero-portrait img {
        inset: 8px;
        width: 160px;
        height: 160px;
    }

    .hero-blob { width: 400px; }
    .hero-blob--2 { width: 340px; }

    .article-body p { font-size: 0.97rem; }

    .bio-card { padding: 24px 20px; }

    .lb-btn { width: 42px; height: 42px; }
    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
}

@media (max-width: 480px) {
    .cards-grid { grid-template-columns: 1fr 1fr; gap: 14px; }

    .services-grid { grid-template-columns: 1fr; }

    .card { padding: 20px 12px 14px; }

    .card-icon svg { width: 72px; height: 72px; }

    .card h3 { font-size: 1rem; }

    .certs-grid { grid-template-columns: 1fr; }

    .cert img { height: 200px; }

    .priemna-photos {
        grid-template-columns: 1fr 1fr;
    }

    .hero-actions .btn {
        flex: 1 1 100%;
        text-align: center;
    }

    .footer-phone { font-size: 1.25rem; }
}
