/* ═══════════════════════════════════════
   GUARANTEE PAGE — у загальному стилі сайту
   (токени зведені до брендових з main.css; статусні кольори — свої)
═══════════════════════════════════════ */
:root {
    --navy: var(--black);
    --navy2: var(--dark);
    --cyan: var(--blue-light);
    --green: #16a34a;
    --greenp: #dcfce7;
    --orange: #d97706;
    --orangep: #fef3c7;
    --red: #dc2626;
    --redp: #fee2e2;
    --bg: var(--gray-pale);
    --g05: var(--gray-05);
    --g10: var(--gray-10);
    --g20: var(--gray-light);
    --g40: #8A8A8A;
    --g60: var(--gray-60);
    --shm: 0 6px 28px rgba(0,0,0,.11);
}

/* Override body for guarantee page */
.page-template-page-guarantee #da-main { background: var(--bg); }

/* ── HERO: стандартна .page-hero (services.css) ── */
.guarantee-main { scroll-margin-top: 90px; }
.guarantee-hero .ph-actions .da-ico { vertical-align: -3px; }

/* ── MAIN ── */
.guarantee-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
    padding: 40px 48px 0;
}
.gm-right { position: sticky; top: 92px; }
.admin-bar .gm-right { top: 124px; }
.help-card {
    background: var(--white);
    border: 1px solid var(--gray-10);
    border-radius: var(--r-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.help-icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: var(--blue-pale); color: var(--blue);
    display: flex; align-items: center; justify-content: center;
}
.help-title { font-family: var(--font-serif); font-size: 20px; font-weight: 700; color: var(--black); line-height: 1.25; }
.help-sub { font-size: 14px; color: var(--gray-60); line-height: 1.6; margin: 0 0 4px; }
.help-btn { width: 100%; }

/* ── SEARCH CARD ── */
.search-card {
    background: var(--white);
    border-radius: var(--r-lg);
    padding: 28px 32px 24px;
    margin-bottom: 20px;
    border: 1px solid var(--gray-10);
}
.sc-title { font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--black); margin-bottom: 4px; }
.sc-sub { font-size: 13px; color: var(--g60); margin-bottom: 22px; line-height: 1.5; }
.sc-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.sc-field { flex: 1; min-width: 190px; }
.sc-label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-60); margin-bottom: 6px; }
/* GP: input[type=text|tel] специфічніший за клас — піднімаємо вагу, висота = кнопці (52px) */
.search-card input.sc-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1.5px solid #D4D4D4;
    border-radius: var(--r-sm);
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    background: var(--white);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.search-card input.sc-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27,90,158,.1); }
.search-card input.sc-input::placeholder { color: #9A9A9A; font-weight: 400; font-size: 14px; }
.search-card input.sc-input.err { border-color: var(--red); }
.sc-hint { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--red); }
.sc-or { font-size: 13px; color: var(--gray-60); font-weight: 600; padding-bottom: 15px; flex-shrink: 0; white-space: nowrap; }

.sc-btn {
    background: var(--blue);
    color: #fff;
    border: none;
    padding: 0 28px;
    height: 52px;
    border-radius: var(--r-sm);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.sc-btn:hover { background: var(--blue-light); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(27,90,158,.3); }
.sc-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── STATES ── */
.state-box {
    background: var(--white);
    border-radius: var(--r-lg);
    padding: 52px 24px;
    text-align: center;
    border: 1px solid var(--gray-10);
    margin-bottom: 20px;
}
.state-icon { display: block; margin-bottom: 12px; color: var(--blue); opacity: .45; }
.sc-btn .da-ico { vertical-align: -3px; margin-right: 4px; }
.state-title { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.state-sub { font-size: 14px; color: var(--g60); max-width: 360px; margin: 0 auto 24px; line-height: 1.6; }
.state-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.spinner {
    width: 42px; height: 42px;
    border: 3px solid var(--g10);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESULT CARDS ── */
.patient-card {
    background: var(--white);
    border-radius: var(--r-lg);
    padding: 22px 28px;
    margin-bottom: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.pc-name { font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.pc-meta { font-size: 13px; color: var(--g60); }
.pc-meta b { color: var(--blue); font-weight: 700; }

.sbadge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}
.sbadge-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.s-active { background: var(--greenp); color: var(--green); }
.s-active .sbadge-dot { background: var(--green); }
.s-expiring { background: var(--orangep); color: var(--orange); }
.s-expiring .sbadge-dot { background: var(--orange); }
.s-expired { background: var(--redp); color: var(--red); }
.s-expired .sbadge-dot { background: var(--red); }

/* Next visit */
.nv-card {
    background: var(--white);
    border-radius: var(--r-lg);
    padding: 18px 24px;
    margin-bottom: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    display: flex;
    align-items: center;
    gap: 16px;
}
.nv-ico {
    width: 50px; height: 50px; border-radius: 12px;
    background: var(--blue); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.nv-lbl { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--g40); margin-bottom: 3px; }
.nv-date { font-size: 21px; font-weight: 700; color: var(--navy); }
.nv-hint { font-size: 12px; color: var(--g60); margin-top: 2px; }

/* Guarantee items */
.gc { background: var(--white); border-radius: var(--r-lg); padding: 24px 28px; margin-bottom: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.07); }
.gc-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 18px; }
.gc-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--g10); }
.gc-row:last-of-type { border-bottom: none; }
.gc-chk { width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.chk-ok { background: var(--greenp); color: var(--green); }
.chk-warn { background: var(--orangep); color: var(--orange); }
.chk-exp { background: var(--redp); color: var(--red); }
.gc-name { font-size: 14px; font-weight: 700; color: var(--navy); }
.gc-sub { font-size: 12px; color: var(--g60); margin-top: 1px; }
.gc-right { text-align: right; flex-shrink: 0; }
.gc-date { font-size: 14px; font-weight: 700; }
.gc-remain { font-size: 11px; color: var(--g60); margin-top: 2px; }
.date-ok { color: var(--green); }
.date-warn { color: var(--orange); }
.date-exp { color: var(--red); }

/* ── TERMS ── */
.terms-section { background: var(--gray-05); border-top: 1px solid var(--g10); padding: 80px 48px; margin-top: 56px; }
.terms-inner { max-width: none; }
.sec-sub { font-size: 15px; color: var(--g60); margin-bottom: 44px; max-width: 520px; line-height: 1.7; }
.terms-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tc {
    background: var(--white);
    border-radius: var(--r-lg);
    padding: 26px 22px;
    border: 1px solid var(--g10);
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.tc:hover { box-shadow: var(--shm); border-color: rgba(27,90,158,.2); transform: translateY(-3px); }
.tc::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}
.tc:hover::before { transform: scaleX(1); }
.tc-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.tc-name { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.tc-dur { font-family: var(--font-serif); font-size: 32px; font-weight: 700; color: var(--blue); line-height: 1; margin-bottom: 10px; }
.tc-dur small { font-size: 15px; font-weight: 600; color: var(--g60); }
.tc-desc { font-size: 12px; color: var(--g60); line-height: 1.5; padding-top: 10px; border-top: 1px solid var(--g10); }

/* ── HOW ── */
.how-section { padding: 80px 48px; }
.how-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 44px; position: relative; }
.how-steps::before {
    content: '';
    position: absolute;
    top: 27px; left: 12.5%; right: 12.5%;
    height: 1px;
    background: var(--g10);
    z-index: 0;
}
.how-step { text-align: center; padding: 0 12px; position: relative; z-index: 1; }
.hs-n {
    width: 54px; height: 54px; border-radius: 50%;
    background: var(--blue); color: #fff;
    font-size: 20px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 16px rgba(27,90,158,.3);
}
.hs-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.hs-desc { font-size: 13px; color: var(--g60); line-height: 1.6; }

/* ── FAQ ── */
.guarantee-faq { background: var(--gray-05); border-top: 1px solid var(--g10); padding: 80px 48px; }
.guarantee-faq .faq-inner { max-width: none; }
.guarantee-faq .faq-list { max-width: 960px; }
.guarantee-faq .faq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 36px; }
.guarantee-faq .faq-item { background: var(--white); border-radius: var(--r); border: 1px solid var(--g10); overflow: hidden; cursor: pointer; }
.guarantee-faq .faq-q { padding: 17px 22px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; color: var(--navy); gap: 16px; transition: background var(--transition); }
.guarantee-faq .faq-q:hover { background: var(--bg); }
.guarantee-faq .faq-ch { width: 26px; height: 26px; border-radius: 50%; background: var(--bg); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; transition: transform .3s, background .2s; }
.guarantee-faq .faq-item.open .faq-ch { transform: rotate(180deg); background: var(--blue); color: #fff; }
.guarantee-faq .faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.guarantee-faq .faq-a-in { padding: 0 22px 16px; font-size: 13px; line-height: 1.7; color: var(--g60); }
.guarantee-faq .faq-item.open .faq-a { max-height: 220px; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1100px) {
    .terms-grid { grid-template-columns: 1fr 1fr; }
    .how-steps { grid-template-columns: 1fr 1fr; gap: 20px; }
    .how-steps::before { display: none; }
}
@media (max-width: 900px) {
    .guarantee-main { grid-template-columns: 1fr; padding: 24px 20px 0; }
    .gm-right { position: static; }
    .search-card { padding: 22px 20px 20px; }
    .sc-form { flex-direction: column; gap: 10px; }
    .sc-field { min-width: unset; width: 100%; }
    .sc-or { padding-bottom: 0; text-align: center; align-self: center; }
    .sc-btn { width: 100%; justify-content: center; }
    .terms-section { padding: 48px 20px; }
    .terms-grid { grid-template-columns: 1fr; }
    .how-section { padding: 48px 20px; }
    .guarantee-faq { padding: 48px 20px; }
    .patient-card { flex-direction: column; align-items: flex-start; }
    .nv-card { flex-wrap: wrap; }
}
@media (max-width: 600px) {
    .how-steps { grid-template-columns: 1fr; }
}

/* Анульована гарантія: окремий стан, щоб пацієнт бачив рішення клініки, а не «помилку» */
.s-void { background: #ECECEC; color: #4A4A4A; }
.s-void .sbadge-dot { background: #4A4A4A; }
.chk-void { background: #ECECEC; color: #4A4A4A; }
.date-void { color: #8A8A8A; text-decoration: line-through; }
.gc-void { margin-top: 6px; padding: 6px 10px; border-left: 2px solid #8A8A8A; background: #F5F5F5; font-size: 13px; color: #4A4A4A; line-height: 1.45; }
