/* Home page sections shared by index.html (landing page) and optilink.html (Home tab):
   partner clinics, services & prices, how it works, eye-care tip. */

.hs-section { margin-top: 24px; }
.hs-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    margin-bottom: 12px;
}
.hs-title { font-size: 16px; font-weight: 700; color: var(--ink); margin: 0; }
.hs-sub { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
.hs-more { font-size: 12.5px; font-weight: 600; color: var(--blue); white-space: nowrap; background: none; border: none; padding: 0; cursor: pointer; }

/* Sideways-scrolling strips (swipe on phones) */
.hs-strip {
    display: flex; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -16px; padding: 4px 16px 12px;
    scrollbar-width: none;
}
.hs-strip::-webkit-scrollbar { display: none; }
.hs-strip > * { scroll-snap-align: start; flex-shrink: 0; }

/* Partner clinic cards */
.hs-clinic {
    width: 262px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(60, 40, 130, 0.08);
    display: flex; flex-direction: column;
}
.hs-clinic-top {
    position: relative;
    padding: 16px 16px 12px;
    color: #fff;
    background: var(--gradient);
    overflow: hidden;
}
/* soft light circles for a bit of depth */
.hs-clinic-top::before, .hs-clinic-top::after {
    content: ''; position: absolute; border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}
.hs-clinic-top::before { width: 120px; height: 120px; right: -34px; top: -52px; }
.hs-clinic-top::after  { width: 70px; height: 70px; right: 46px; bottom: -44px; }
.hs-clinic:nth-child(3n+2) .hs-clinic-top { background: linear-gradient(120deg, #8B3FF0, #D946A8); }
.hs-clinic:nth-child(3n+3) .hs-clinic-top { background: linear-gradient(120deg, #0EA5A4, #3E7BFA); }
.hs-clinic-name { position: relative; font-weight: 700; font-size: 15px; line-height: 1.3; margin: 0; min-height: 39px; }
.hs-status {
    position: relative;
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 8px; padding: 4px 8px;
    border-radius: 999px; font-size: 11.5px; font-weight: 600;
    background: rgba(255, 255, 255, 0.22);
}
.hs-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #FFD7D7; }
.hs-status.open .dot { background: #5CF29B; box-shadow: 0 0 0 0 rgba(92, 242, 155, 0.7); animation: hs-pulse 1.8s infinite; }
@keyframes hs-pulse {
    70%  { box-shadow: 0 0 0 7px rgba(92, 242, 155, 0); }
    100% { box-shadow: 0 0 0 0 rgba(92, 242, 155, 0); }
}
.hs-clinic-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.hs-line { display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; margin: 0; }
.hs-line span:first-child { flex-shrink: 0; }
.hs-clinic-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.hs-btn {
    flex: 1;
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    padding: 8px 8px; border-radius: 10px;
    font-size: 13px; font-weight: 600; text-decoration: none;
    border: 1.5px solid var(--border); color: var(--ink); background: var(--surface);
    cursor: pointer;
}
.hs-btn.primary { border: none; color: #fff; background: var(--gradient); box-shadow: 0 4px 12px rgba(90, 60, 220, 0.22); }
.hs-btn:active { transform: scale(0.97); }

/* Services & prices cards */
.hs-service {
    width: 146px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    text-decoration: none; color: var(--ink);
    display: flex; flex-direction: column; gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.12s ease, border-color 0.15s ease;
}
.hs-service:active { transform: scale(0.97); border-color: var(--blue); }
.hs-service-pic {
    width: 100%; height: 78px; border-radius: 10px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-size: 30px;
    background: var(--tile-bg, linear-gradient(135deg, #EAF1FF, #F2E9FF));
}
.hs-service-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hs-service-name { font-size: 13px; font-weight: 600; line-height: 1.3; margin: 0; min-height: 34px; }
.hs-price { font-size: 13.5px; font-weight: 700; margin: 0; }
.hs-price small { font-weight: 500; color: var(--muted); font-size: 11px; }
.hs-price .grad {
    background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* How it works */
.hs-steps {
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    padding: 8px 16px; box-shadow: var(--shadow-sm);
}
.hs-step { display: flex; gap: 12px; padding: 12px 0; position: relative; }
.hs-step + .hs-step { border-top: 1px dashed var(--border); }
.hs-step-num {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: #fff; background: var(--gradient);
}
.hs-step h4 { margin: 0 0 2px; font-size: 14px; font-weight: 700; }
.hs-step p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

/* Eye-care tip */
.hs-tip {
    position: relative; overflow: hidden;
    margin-top: 16px; padding: 16px 16px 16px;
    border-radius: 16px; color: #fff;
    background: linear-gradient(135deg, #1B1730, #3B2A7A 60%, #3E7BFA);
    box-shadow: 0 10px 24px rgba(40, 25, 110, 0.25);
}
.hs-tip::after {
    content: '👁️'; position: absolute; right: -8px; bottom: -18px;
    font-size: 84px; opacity: 0.12; pointer-events: none;
}
.hs-tip-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; opacity: 0.75; margin: 0 0 8px; }
.hs-tip-title { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.hs-tip-text { font-size: 13px; line-height: 1.5; margin: 0; opacity: 0.92; min-height: 58px; }
.hs-tip-next {
    margin-top: 12px; padding: 8px 12px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.12);
    color: #fff; font-size: 12px; font-weight: 600; cursor: pointer;
}
.hs-tip-next:active { background: rgba(255, 255, 255, 0.25); }
.hs-note { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; }

/* Tablets and laptops: cards wrap into a grid instead of scrolling sideways */
@media (min-width: 700px) {
    .hs-strip {
        display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        overflow: visible; margin: 0; padding: 4px 0 12px;
    }
    .hs-strip > * { width: auto; }
    .hs-strip-services { grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); }
    .hs-swipe { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hs-status.open .dot { animation: none; }
}
