/* howto.css — Shared styles for Tagasulat How-To section */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg:     #FFF0F5;
    --surf:   #ffffff;
    --border: #FFD1DC;
    --text:   #1e293b;
    --text2:  #475569;
    --text3:  #94a3b8;
    --pink:   #FFB6C1;
    --pink-d: #ffa0b0;
    --accent: #db2777;
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── NAV ───────────────────────────────────────── */
nav {
    position: sticky;
    top: 0;
    background: rgba(255, 240, 245, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}
.nav-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.nav-logo img { width: 34px; height: 34px; object-fit: contain; }
.nav-logo-name { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.nav-divider { width: 1px; height: 16px; background: var(--border); margin: 0 6px; flex-shrink: 0; }
.nav-section { font-size: 12px; color: var(--text3); white-space: nowrap; }
.nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.btn-nav {
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    transition: border-color .15s, background .15s;
    white-space: nowrap;
}
.btn-nav:hover { border-color: var(--pink); background: var(--pink); color: #6b1226; }
.btn-nav-signin { background: transparent; }
.btn-nav-cta { background: var(--pink); border-color: var(--pink); color: #6b1226; font-weight: 700; }
.btn-nav-cta:hover { background: var(--pink-d); border-color: var(--pink-d); }

/* Hamburger */
.hamburger {
    display: flex; align-items: center;
    background: transparent; border: none;
    font-size: 22px; cursor: pointer;
    padding: 4px 8px; color: var(--text2);
    line-height: 1; flex-shrink: 0;
    border-radius: 6px; transition: color .15s, background .15s;
}
.hamburger:hover { color: #be185d; background: var(--border); }

/* ── Overlay sidebar ──────────────────────────── */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px;
    background: var(--surf); border-right: 1px solid var(--border);
    box-shadow: 4px 0 32px rgba(219,39,119,.1);
    display: flex; flex-direction: column;
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
    z-index: 200;
}
.sidebar.open { transform: translateX(0); }
.sidebar-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; height: 60px; flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}
.sidebar-logo {
    display: flex; align-items: center; gap: 8px; text-decoration: none;
}
.sidebar-logo img { width: 26px; height: 26px; object-fit: contain; }
.sidebar-logo-name { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.sidebar-close {
    background: none; border: none; color: var(--text3);
    font-size: 20px; cursor: pointer; padding: 4px 6px; line-height: 1;
    border-radius: 6px; transition: color .15s, background .15s;
}
.sidebar-close:hover { color: var(--text); background: var(--border); }
.sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.sidebar-section-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: var(--text3);
    padding: 14px 20px 4px;
}
.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 0 20px; height: 46px;
    text-decoration: none; color: var(--text2);
    font-size: 14px; font-weight: 500;
    transition: background .12s, color .12s;
}
.sidebar-link:hover { background: #FFF0F5; color: var(--text); }
.sidebar-link.active { background: #FFF0F5; color: #be185d; border-right: 3px solid #be185d; font-weight: 600; }
.sidebar-link .s-icon { font-size: 17px; flex-shrink: 0; width: 22px; text-align: center; }
.sidebar-link-sm {
    height: 40px; font-size: 12px; color: var(--text3);
}
.sidebar-link-sm:hover { color: var(--text2); }
.sidebar-link-sm .s-icon { font-size: 14px; }
.sidebar-divider { height: 1px; background: var(--border); margin: 8px 0; }

/* ── On This Page — auto ToC ──────────────────────────────── */
.toc-link {
    display: flex; align-items: center; gap: 10px;
    padding: 0 20px 0 24px; height: 33px;
    text-decoration: none; color: var(--text2);
    font-size: 12.5px; font-weight: 500;
    border-left: 2px solid transparent;
    transition: color .12s, border-color .12s, background .12s;
    line-height: 1.3; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.toc-link:hover { color: #be185d; }
.toc-link.toc-active {
    color: #be185d; font-weight: 600;
    border-left-color: #be185d;
    background: #FFF5F8;
}
.toc-dot {
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--text3); flex-shrink: 0;
    transition: background .12s;
}
.toc-link.toc-active .toc-dot { background: #be185d; }

.nav-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.35); z-index: 199;
}
.nav-backdrop.open { display: block; }

/* ── PAGE WRAP ─────────────────────────────────── */
.page-wrap {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

/* ── BREADCRUMB ────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text3);
    margin-bottom: 36px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--accent); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── TIER BADGES ───────────────────────────────── */
.badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 5px;
    white-space: nowrap;
    line-height: 1.6;
}
.badge-basic  { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-pro    { background: #ffe4e6; color: #be185d; border: 1px solid #fecdd3; }
.badge-pocket { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.badge-sweldo { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }

/* ── CALLOUTS ──────────────────────────────────── */
.callout {
    border-radius: 12px;
    padding: 15px 18px;
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.7;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.callout-icon { flex-shrink: 0; font-size: 18px; margin-top: 1px; }
.callout-body { flex: 1; color: var(--text2); }
.callout-body a { font-weight: 600; text-decoration: none; }
.callout-body a:hover { text-decoration: underline; }
.callout-body strong { color: var(--text); }

.callout-upgrade { background: #fff8fa; border: 1.5px solid var(--pink); }
.callout-upgrade .callout-body a { color: var(--accent); }

.callout-info { background: #f0f9ff; border: 1.5px solid #bae6fd; }
.callout-info .callout-body { color: #0369a1; }
.callout-info .callout-body a { color: #0284c7; }

.callout-warn { background: #fffbeb; border: 1.5px solid #fde68a; }
.callout-warn .callout-body { color: #92400e; }

/* ── SCREENSHOT SLOT ───────────────────────────── */
.screenshot {
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    border-radius: 14px;
    padding: 40px 24px;
    text-align: center;
    color: var(--text3);
    font-size: 13px;
    margin: 16px 0 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 100px;
}
.screenshot-icon { font-size: 28px; }
/* When an actual image is inside: */
.screenshot img { width: 100%; border-radius: 10px; border: 1px solid var(--border); display: block; }

/* ── TABLE (comparison / reference grids) ───────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; margin: 16px 0 28px; -webkit-overflow-scrolling: touch; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table-wrap th, .table-wrap td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-wrap th { background: var(--bg); color: var(--text); font-weight: 700; font-size: 12px; white-space: nowrap; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap td { color: var(--text2); line-height: 1.55; }
.table-wrap td strong { color: var(--text); }

/* ── VIDEO EMBED ───────────────────────────────── */
.video-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin: 16px 0 28px;
    background: #000;
}
.video-wrap iframe,
.video-wrap video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
    border-radius: 12px;
}
.video-wrap video { object-fit: contain; }

/* ── STEP LIST ─────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 22px; margin: 28px 0; }
.step  { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
    width: 30px; height: 30px;
    background: var(--pink);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800; color: #6b1226;
    flex-shrink: 0; margin-top: 2px;
}
.step-body { flex: 1; }
.step-body p { font-size: 15px; color: var(--text2); line-height: 1.75; }
.step-body p + p { margin-top: 8px; }
.step-body strong { color: var(--text); }
.step-body ul, .step-body ol { margin: 8px 0 0 20px; display: flex; flex-direction: column; gap: 5px; }
.step-body li { font-size: 14px; color: var(--text2); line-height: 1.6; }
.step-body code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--text);
}

/* ── DETAIL PAGE HEADER ────────────────────────── */
.detail-title {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 12px;
}
.detail-context {
    font-size: 16px;
    color: var(--text2);
    line-height: 1.75;
    max-width: 680px;
    margin-bottom: 32px;
}
.detail-subhead {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 36px 0 12px;
}
.detail-p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.7;
    margin-bottom: 14px;
    max-width: 680px;
}
.detail-list {
    list-style: disc;
    padding-left: 22px;
    margin: 0 0 18px;
    max-width: 680px;
}
.detail-list li {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.7;
    margin-bottom: 8px;
}

/* ── PAGE NAV (next / prev) ────────────────────── */
.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 12px;
    margin-top: 64px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.page-nav-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    padding: 12px 18px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    transition: border-color .15s, background .15s;
    max-width: 260px;
    flex: 1;
}
.page-nav-link:hover { border-color: var(--pink); background: var(--surf); }
.page-nav-label { font-size: 11px; color: var(--text3); font-weight: 400; }
.page-nav-spacer { flex: 1; }
.page-nav-link.next { text-align: right; }

/* ── HUB PAGE ──────────────────────────────────── */
.hub-eyebrow {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--accent); margin-bottom: 12px;
}
.hub-title {
    font-size: clamp(28px, 4.5vw, 44px);
    font-weight: 800; color: var(--text);
    letter-spacing: -0.03em; line-height: 1.15;
    margin-bottom: 16px;
}
.hub-intro {
    font-size: 17px; color: var(--text2);
    line-height: 1.8; max-width: 660px;
    margin-bottom: 52px;
}

.hub-section { margin-bottom: 52px; }
.hub-section-title {
    font-size: 19px; font-weight: 800; color: var(--text);
    letter-spacing: -0.01em;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.hub-section-num {
    width: 28px; height: 28px; background: var(--pink); color: #6b1226;
    border-radius: 50%; display: inline-flex; align-items: center;
    justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0;
}

.hub-prose { font-size: 15px; color: var(--text2); line-height: 1.85; max-width: 700px; }
.hub-prose p { margin-bottom: 16px; }
.hub-prose p:last-child { margin-bottom: 0; }
.hub-prose a { color: var(--accent); font-weight: 600; text-decoration: none; }
.hub-prose a:hover { text-decoration: underline; }
.hub-prose strong { color: var(--text); }

.hub-pullquote {
    background: var(--surf);
    border-left: 4px solid var(--pink);
    border-radius: 0 10px 10px 0;
    padding: 14px 20px;
    margin: 20px 0;
    font-size: 14px; color: var(--text2); line-height: 1.7; font-style: italic;
}
.hub-pullquote strong { font-style: normal; color: var(--text); }

.hub-index { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 16px 0; }
.hub-index li { display: flex; align-items: center; gap: 8px; }
.hub-index a { font-size: 15px; color: var(--accent); font-weight: 600; text-decoration: none; }
.hub-index a:hover { text-decoration: underline; }
.hub-index-note { font-size: 13px; color: var(--text3); }

.hub-locked-block {
    background: #f9fafb; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 16px 20px; margin: 20px 0;
    font-size: 14px; color: var(--text2); line-height: 1.7;
}
.hub-locked-block a { color: var(--accent); font-weight: 600; text-decoration: none; }
.hub-locked-block a:hover { text-decoration: underline; }

/* ── FOOTER ────────────────────────────────────── */
.site-footer {
    background: #0f172a; color: #64748b;
    padding: 28px 24px; text-align: center;
    font-size: 12px; flex-shrink: 0;
}
.site-footer a { color: #FFB6C1; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── Nav search ──────────────────────────────── */
.nav-search {
    flex: 1;
    max-width: 240px;
    position: relative;
    margin-left: 4px;
}
.nav-search-input {
    width: 100%;
    background: var(--surf);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 6px 12px 6px 32px;
    font-size: 13px;
    color: var(--text);
    outline: none;
    transition: border-color .15s;
    font-family: inherit;
}
.nav-search-input::placeholder { color: var(--text3); }
.nav-search-input:focus { border-color: var(--accent); }
.nav-search-icon {
    position: absolute;
    left: 11px; top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: var(--text3);
    pointer-events: none;
    user-select: none;
}

/* ── Guide search dropdown ───────────────────── */
.guide-dropdown {
    position: absolute; top: calc(100% + 8px); left: 0;
    min-width: 360px; max-width: calc(100vw - 48px);
    background: var(--surf); border: 1.5px solid var(--border);
    border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.12);
    z-index: 400; overflow: hidden;
    max-height: 380px; overflow-y: auto;
}
.guide-drop-section-lbl {
    padding: 7px 14px 3px;
    font-size: 10px; font-weight: 700; color: var(--text3);
    text-transform: uppercase; letter-spacing: .1em;
    background: var(--bg); border-bottom: 1px solid var(--border);
}
.guide-drop-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 14px; cursor: pointer;
    text-decoration: none; color: inherit;
    border-bottom: 1px solid var(--border);
    transition: background .1s;
}
.guide-drop-item:last-child { border-bottom: none; }
.guide-drop-item:hover, .guide-drop-item.focused { background: var(--bg); }
.guide-drop-badge {
    flex-shrink: 0; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    padding: 2px 8px; border-radius: 20px; margin-top: 2px;
    white-space: nowrap;
}
.gdb-tagasulat { background: #FFE4E8; color: #be185d; }
.gdb-sweldo    { background: #DCFCE7; color: #15803d; }
.guide-drop-title { font-size: 13px; font-weight: 600; color: var(--text); }
.guide-drop-note  { font-size: 12px; color: var(--text3); margin-top: 1px; line-height: 1.4; }
.guide-drop-empty { padding: 20px 16px; text-align: center; font-size: 13px; color: var(--text3); }

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 640px) {
    .page-wrap { padding: 28px 16px 60px; }
    .nav-section { display: none; }
    .nav-divider  { display: none; }
    .nav-search   { max-width: none; }
    .guide-dropdown { min-width: unset; left: -80px; right: 0; }
    .hub-intro { margin-bottom: 36px; }
    .hub-section { margin-bottom: 36px; }
}
