/* Category & Sub Page Styles */
.cat-hero {
    position: relative; min-height: 75vh;
    display: flex; align-items: flex-end; overflow: hidden;
    background: #1a1a1a;
}
.cat-hero-img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0.5;
}
.cat-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(10,15,28,0.9) 0%, rgba(10,15,28,0.5) 50%, rgba(10,15,28,0.3) 100%);
}
.cat-hero-text {
    position: relative; z-index: 2; max-width: var(--max-w); margin: 0 auto;
    padding: 0 var(--px, clamp(20px,4vw,48px)) 60px; width: 100%;
}
.breadcrumb {
    font-family: var(--heading); font-size: 0.75rem; color: rgba(255,255,255,0.5);
    margin-bottom: 16px; letter-spacing: 0.05em;
}
.breadcrumb a { color: rgba(255,255,255,0.5); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.cat-hero-text h1 {
    font-family: var(--heading); font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700; color: #fff; letter-spacing: -0.02em; margin-bottom: 12px;
}
.cat-hero-text h1 span { color: var(--accent); }
.cat-hero-text > p {
    font-family: var(--body); font-size: 1rem; color: rgba(255,255,255,0.6);
    max-width: 55ch; line-height: 1.7;
}

/* Answer Capsule (AEO) */
.answer-capsule {
    max-width: var(--max-w); margin: 0 auto; padding: 60px var(--px, clamp(20px,4vw,48px));
    text-align: center;
}
.answer-capsule h2 {
    font-family: var(--heading); font-size: 1.5rem; font-weight: 600;
    color: var(--text-heading, #18181b); margin-bottom: 16px;
}
.answer-capsule p {
    font-size: 0.95rem; color: var(--text); line-height: 1.8; max-width: 70ch;
    margin-left: auto; margin-right: auto;
}

/* Procedure Grid */
.proc-section {
    max-width: var(--max-w); margin: 0 auto;
    padding: 0 var(--px, clamp(20px,4vw,48px)) 80px;
}
.proc-section-label {
    font-family: var(--heading); font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.15em; text-align: center;
    color: var(--accent); margin-bottom: 40px;
}
.proc-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px;
}
.proc-card {
    border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s; text-decoration: none; color: inherit; display: block;
}
.proc-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
.proc-card-img {
    height: 200px; background: var(--bg-elevated, #f8f8f6); overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.proc-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.proc-card:hover .proc-card-img img { transform: scale(1.05); }
.proc-card-img .placeholder {
    font-family: var(--heading); font-size: 0.8rem; color: var(--text-muted); text-align: center;
}
.proc-card-body { padding: 24px; }
.proc-card-body h3 {
    font-family: var(--heading); font-size: 1.1rem; font-weight: 600;
    margin-bottom: 8px; color: var(--text-heading, #18181b);
}
.proc-card-body p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.proc-card-link {
    font-family: var(--heading); font-size: 0.8rem; font-weight: 600; color: var(--accent);
    display: flex; align-items: center; gap: 6px;
}
.proc-card-link::after { content: '\2192'; transition: transform 0.3s; }
.proc-card:hover .proc-card-link::after { transform: translateX(4px); }

/* Why Section */
.why-section { background: var(--bg-elevated, #f8f8f6); padding: 80px 0; }
.why-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--px, clamp(20px,4vw,48px)); }
.why-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 32px; }
.why-item h3 {
    font-family: var(--heading); font-size: 1rem; font-weight: 600;
    color: var(--text-heading, #18181b); margin-bottom: 8px;
}
.why-item p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.7; }

/* CTA */
.cat-cta {
    max-width: var(--max-w); margin: 0 auto;
    padding: 80px var(--px, clamp(20px,4vw,48px)); text-align: center;
}
.cat-cta h2 {
    font-family: var(--heading); font-size: 1.8rem; font-weight: 700;
    color: var(--text-heading, #18181b); margin-bottom: 12px;
}
.cat-cta p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 32px; }
.cat-cta-btn {
    display: inline-block; padding: 16px 40px; background: var(--accent); color: #fff;
    font-family: var(--heading); font-size: 0.9rem; font-weight: 600;
    border-radius: 8px; text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}
.cat-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,169,110,0.3); }

/* Sub Page: Detail Grid */
.detail-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px;
}
.detail-item {
    padding: 24px; border: 1px solid var(--border); border-radius: 12px;
    background: var(--bg, #fff);
}
.detail-item h3 {
    font-family: var(--heading); font-size: 0.9rem; font-weight: 600;
    color: var(--accent); margin-bottom: 8px;
}
.detail-item p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.6; }

/* Related Links */
.related-section {
    max-width: var(--max-w); margin: 0 auto;
    padding: 40px var(--px, clamp(20px,4vw,48px)) 80px;
}
.related-links {
    display: flex; flex-wrap: wrap; gap: 12px;
}
.related-links a {
    padding: 10px 20px; border: 1px solid var(--border); border-radius: 8px;
    font-family: var(--heading); font-size: 0.84rem; color: var(--text);
    text-decoration: none; transition: border-color 0.3s, color 0.3s;
}
.related-links a:hover { border-color: var(--accent); color: var(--accent); }
.related-link {
    padding: 10px 20px; border: 1px solid var(--border); border-radius: 8px;
    font-family: var(--heading); font-size: 0.84rem; color: var(--text);
    text-decoration: none; transition: border-color 0.3s, color 0.3s;
}
.related-link:hover { border-color: var(--accent); color: var(--accent); }

/* Responsive */
/* Doctor Video Button */
.doctor-video-btn {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 14px; padding: 0; background: none; border: none; cursor: pointer;
    font-family: var(--heading); font-size: 0.7rem; font-weight: 400;
    color: var(--text-dim, #a1a1aa); letter-spacing: 0.02em;
    transition: color 0.3s;
}
.doctor-video-btn:hover { color: #cc0000; }
.doctor-video-btn svg { flex-shrink: 0; width: 10px; height: 10px; }

/* Video Overlay Popup */
.video-overlay {
    position: fixed; inset: 0; z-index: 9000;
    background: rgba(0,0,0,0.85);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.video-overlay.active { opacity: 1; visibility: visible; }
.video-overlay-inner {
    position: relative; width: 90vw; max-width: 900px;
}
.video-overlay-close {
    position: absolute; top: -40px; right: 0;
    background: none; border: none; color: #fff;
    font-size: 2rem; cursor: pointer; line-height: 1;
}
.video-overlay-frame {
    position: relative; padding-bottom: 56.25%; height: 0;
}
.video-overlay-frame iframe {
    position: absolute; inset: 0; width: 100%; height: 100%;
    border-radius: 8px;
}

/* Doctor anchor offset for fixed nav */
.doctor-card[id] { scroll-margin-top: 80px; }

/* Doctor Details (about page) */
.doctor-details { margin-top: 20px; }
.doctor-detail-group { margin-bottom: 14px; }
.doctor-detail-label {
    font-family: var(--heading); font-size: 0.68rem; font-weight: 600;
    color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase;
    margin-bottom: 4px;
}
.doctor-credentials {
    list-style: none; padding: 0; margin: 0;
    font-size: 0.8rem; color: var(--text-muted); line-height: 1.9;
}
.doctor-credentials li {
    padding-left: 12px; position: relative;
}
.doctor-credentials li::before {
    content: ''; position: absolute; left: 0; top: 0.78em;
    width: 3px; height: 3px;
    background: var(--border); border-radius: 50%;
}

/* ===== SUB PAGE: Section labels override ===== */
.split-section .sec-label,
.split-text .sec-label { text-align: left; }
.proc-section .sec-label,
.proc-section .sec-title,
.proc-section .proc-section-label { text-align: center; }
.gallery-section .sec-label,
.gallery-section .sec-title { text-align: center; }
.why-section .sec-label,
.why-section .sec-title { text-align: center; }

/* ===== SUB PAGE: SPLIT SECTION ===== */
.split-section {
    max-width: var(--max-w); margin: 0 auto;
    padding: 80px var(--px, clamp(20px,4vw,48px));
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.split-section.reverse { direction: rtl; }
.split-section.reverse > * { direction: ltr; }
.split-text h2 {
    font-family: var(--heading); font-size: 1.5rem; font-weight: 700;
    color: var(--text-heading, #18181b); margin-bottom: 16px; line-height: 1.4;
}
.split-text p {
    font-size: 0.9rem; color: var(--text-muted); line-height: 1.8;
}
.split-img {
    border-radius: 16px; overflow: hidden;
}
.split-img img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    border-radius: 16px; max-height: 400px;
}

/* ===== SUB PAGE: COMPARE CARDS ===== */
.compare-grid {
    max-width: var(--max-w); margin: 0 auto;
    padding: 0 var(--px, clamp(20px,4vw,48px)) 80px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.compare-card {
    padding: 32px; border-radius: 16px; position: relative;
    border: 1px solid var(--border); background: var(--bg, #fff);
    transition: transform 0.3s, box-shadow 0.3s;
}
.compare-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.06); }
.compare-card-badge {
    display: inline-block; padding: 4px 12px; border-radius: 20px;
    font-family: var(--heading); font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px;
}
.compare-card-badge.type-a { background: rgba(201,169,110,0.12); color: var(--accent); }
.compare-card-badge.type-b { background: rgba(100,116,139,0.1); color: #64748b; }
.compare-card h3 {
    font-family: var(--heading); font-size: 1.1rem; font-weight: 600;
    color: var(--text-heading, #18181b); margin-bottom: 12px;
}
.compare-card p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.7; }
.compare-card ul {
    list-style: none; padding: 0; margin: 16px 0 0;
}
.compare-card ul li {
    font-size: 0.82rem; color: var(--text-muted); line-height: 1.8;
    padding-left: 16px; position: relative;
}
.compare-card ul li::before {
    content: ''; position: absolute; left: 0; top: 9px;
    width: 6px; height: 6px; border-radius: 50%;
}
.compare-card.pro ul li::before { background: var(--accent); }
.compare-card.con ul li::before { background: #94a3b8; }

/* ===== SUB PAGE: STYLE CARDS (horizontal scroll) ===== */
.style-scroll {
    max-width: var(--max-w); margin: 0 auto;
    padding: 0 var(--px, clamp(20px,4vw,48px)) 80px;
    display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
    justify-content: center;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.style-scroll::-webkit-scrollbar { display: none; }
.style-card {
    flex: 0 0 260px; scroll-snap-align: start;
    padding: 28px; border-radius: 16px;
    border: 1px solid var(--border); background: var(--bg, #fff);
    transition: transform 0.3s, box-shadow 0.3s;
}
.style-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.style-card-num {
    font-family: var(--heading); font-size: 2rem; font-weight: 700;
    color: var(--accent); opacity: 0.3; margin-bottom: 8px; line-height: 1;
}
.style-card h3 {
    font-family: var(--heading); font-size: 0.95rem; font-weight: 600;
    color: var(--text-heading, #18181b); margin-bottom: 8px;
}
.style-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.7; }

/* ===== SUB PAGE: B/A SLIDER ===== */
.ba-slider-section {
    max-width: var(--max-w); margin: 0 auto;
    padding: 0 var(--px, clamp(20px,4vw,48px)) 80px;
}
.ba-slider {
    display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 8px;
}
.ba-slider::-webkit-scrollbar { display: none; }
.ba-slide {
    flex: 0 0 280px; scroll-snap-align: start;
    border-radius: 16px; overflow: hidden; border: 1px solid var(--border);
    transition: transform 0.3s;
}
.ba-slide:hover { transform: scale(1.02); }
.ba-slide img { width: 100%; display: block; }

/* ===== SUB PAGE: TIMELINE ===== */
.timeline {
    max-width: 680px; margin: 0 auto; position: relative;
    padding: 0 0 0 40px;
}
.timeline::before {
    content: ''; position: absolute; left: 15px; top: 8px; bottom: 8px;
    width: 2px; background: linear-gradient(to bottom, var(--accent), var(--border));
}
.timeline-step { position: relative; padding: 0 0 40px; }
.timeline-step:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute; left: -40px; top: 4px;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--heading); font-size: 0.75rem; font-weight: 700;
    box-shadow: 0 0 0 4px var(--bg, #fff);
}
.timeline-step h3 {
    font-family: var(--heading); font-size: 0.95rem; font-weight: 600;
    color: var(--text-heading, #18181b); margin-bottom: 6px;
}
.timeline-step p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.7; }

/* ===== SUB PAGE: FAQ (reusable) ===== */
.faq-section {
    max-width: 720px; margin: 0 auto;
}
.faq-section .faq-item {
    border-bottom: 1px solid var(--border); padding: 20px 0;
}
.faq-section .faq-item summary {
    font-family: var(--heading); font-size: 0.95rem; font-weight: 600;
    color: var(--text-heading, #18181b); cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; align-items: center;
}
.faq-section .faq-item summary::after {
    content: '+'; font-size: 1.2rem; color: var(--text-muted);
    transition: transform 0.3s; flex-shrink: 0; margin-left: 16px;
}
.faq-section .faq-item[open] summary::after { transform: rotate(45deg); }
.faq-section .faq-item p {
    font-size: 0.88rem; color: var(--text-muted); line-height: 1.8; margin-top: 12px;
}

@media (max-width: 768px) {
    .cat-hero { min-height: 75vh; }
    .proc-grid { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: repeat(2, 1fr); }
    .split-section { grid-template-columns: 1fr; gap: 24px; padding: 48px var(--px, clamp(20px,4vw,48px)); }
    .split-section.reverse { direction: ltr; }
    .split-img img { max-height: 280px; }
    .compare-grid { grid-template-columns: 1fr; }
    .compare-card { flex-direction: column !important; }
    .compare-card img { width: 100% !important; height: 200px !important; }
    .style-card { flex: 0 0 220px; }
    .style-scroll { justify-content: flex-start; }
    .ba-slide { flex: 0 0 240px; }
    .timeline { padding-left: 36px; }
    .timeline::before { left: 12px; }
    .timeline-dot { left: -36px; width: 28px; height: 28px; font-size: 0.7rem; }

    /* How it works step rows */
    .step-row { flex-direction: column !important; }
    .step-row img { width: 100% !important; height: 200px !important; }
    /* Compare card image top padding on mobile */
    .compare-card img { width: 100% !important; height: auto !important; margin-top: 16px; border-radius: 12px !important; }
    .step-row > span { position: absolute; top: 0; left: 0; z-index: 1; }
    .step-row { position: relative; padding-top: 0 !important; }

    /* Style scroll: don't center on mobile, show nav arrows */
    .style-scroll { justify-content: flex-start !important; }
    .style-scroll-nav { display: flex !important; }
}
