:root {
    --ld-font: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
    --ld-text: #0f172a;
    --ld-muted: #64748b;
    --ld-border: #e2e8f0;
    --ld-bg: #f8fafc;
    --ld-card: #fff;
    --ld-primary: #1d4ed8;
    --ld-primary-hover: #1e40af;
    --ld-accent: #0ea5e9;
    --ld-radius: 12px;
    --ld-shadow: 0 4px 24px rgb(15 23 42 / 8%);
    --ld-max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--ld-font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ld-text);
    background: var(--ld-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--ld-primary); text-decoration: none; }
a:hover { color: var(--ld-primary-hover); }
img { max-width: 100%; height: auto; }
.ld-main { flex: 1; }
.ld-container { max-width: var(--ld-max); margin: 0 auto; padding: 0 1rem; }
.ld-container--narrow { max-width: 720px; }

/* Hub header */
.ld-top { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--ld-border); }
.ld-demo-strip {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .35rem .6rem;
    padding: .4rem 1rem; font-size: .72rem; color: var(--ld-muted); background: #f1f5f9;
    border-bottom: 1px solid var(--ld-border); text-align: center;
}
.ld-demo-strip > span { flex: 1 1 100%; }
.ld-demo-strip a { font-weight: 600; white-space: nowrap; }
.ld-top-inner {
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .7rem 1rem; max-width: var(--ld-max); margin: 0 auto;
}
.ld-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; color: var(--ld-text); }
.ld-brand-icon {
    width: 2rem; height: 2rem; border-radius: 8px; background: linear-gradient(135deg, var(--ld-primary), var(--ld-accent));
    color: #fff; display: flex; align-items: center; justify-content: center;
}

/* Lang dropdown */
.ld-lang-dd { position: relative; }
.ld-lang-btn {
    display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .65rem;
    border: 1px solid var(--ld-border); border-radius: 8px; background: #fff; cursor: pointer; font-weight: 600; font-size: .82rem;
}
.ld-lang-menu {
    position: absolute; top: calc(100% + 6px); right: 0; min-width: 10rem;
    list-style: none; margin: 0; padding: .35rem; background: #fff; border: 1px solid var(--ld-border);
    border-radius: 10px; box-shadow: var(--ld-shadow); z-index: 200;
}
.ld-lang-menu[hidden] { display: none !important; }
.ld-lang-menu a { display: block; padding: .45rem .55rem; border-radius: 6px; color: var(--ld-text); }
.ld-lang-menu a.active, .ld-lang-menu a:hover { background: #eff6ff; color: var(--ld-primary); font-weight: 600; }

/* Hub */
.ld-hub-hero { padding: 2.5rem 0 1.5rem; text-align: center; }
.ld-hub-badge { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 99px; background: #eff6ff; color: var(--ld-primary); font-size: .78rem; font-weight: 700; }
.ld-hub-hero h1 { font-size: clamp(1.6rem, 4vw, 2.35rem); margin: .75rem 0; }
.ld-hub-lead { color: var(--ld-muted); max-width: 40rem; margin: 0 auto .5rem; }
.ld-hub-hint { font-size: .85rem; color: var(--ld-muted); }
.ld-template-gallery { padding: 1rem 0 3rem; }
.ld-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.ld-template-card { background: var(--ld-card); border: 1px solid var(--ld-border); border-radius: var(--ld-radius); overflow: hidden; box-shadow: var(--ld-shadow); }
.ld-template-preview { display: block; height: 140px; text-decoration: none; }
.ld-preview-mock {
    height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
    color: #fff; font-weight: 700; text-align: center; padding: 1rem;
}
.ld-preview-icon { font-size: 1.75rem; }
.ld-preview-title { font-size: .72rem; opacity: .9; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-preview-01 { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.ld-preview-02 { background: linear-gradient(135deg, #ea580c, #f97316); }
.ld-preview-03 { background: linear-gradient(135deg, #15803d, #22c55e); }
.ld-preview-04 { background: linear-gradient(135deg, #0f172a, #334155); }
.ld-preview-05 { background: linear-gradient(135deg, #f8fafc, #cbd5e1); color: #0f172a; }
.ld-preview-06 { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.ld-preview-07 { background: linear-gradient(135deg, #6d28d9, #a855f7); }
.ld-preview-08 { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.ld-preview-09 { background: linear-gradient(135deg, #ca8a04, #facc15); color: #422006; }
.ld-preview-10 { background: linear-gradient(135deg, #334155, #64748b); }
.ld-template-meta { padding: 1rem; }
.ld-template-meta h2 { margin: 0 0 .25rem; font-size: 1rem; }
.ld-template-num { color: var(--ld-muted); font-weight: 700; }
.ld-template-meta p { margin: 0 0 .75rem; font-size: .78rem; color: var(--ld-muted); text-transform: capitalize; }

.ld-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .55rem 1rem; border-radius: 8px; font-weight: 700; font-size: .88rem;
    border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.ld-btn-primary { background: var(--ld-primary); color: #fff; }
.ld-btn-primary:hover { background: var(--ld-primary-hover); color: #fff; }
.ld-btn-ghost { background: transparent; border-color: var(--ld-border); color: var(--ld-text); }
.ld-btn-ghost:hover { border-color: var(--ld-primary); color: var(--ld-primary); }
.ld-btn-sm { padding: .4rem .75rem; font-size: .8rem; }
.ld-btn-block { width: 100%; }

.ld-footer, .ld-landing-footer {
    padding: 1.5rem 1rem; text-align: center; font-size: .82rem; color: var(--ld-muted);
    border-top: 1px solid var(--ld-border); background: #fff;
}
.ld-footer-links { margin-top: .35rem; }

/* Landing header */
.ld-landing-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--ld-header-bg, rgba(255,255,255,.92));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ld-border);
}
.ld-landing-header-inner {
    max-width: var(--ld-max); margin: 0 auto; padding: .65rem 1rem;
    display: flex; align-items: center; gap: .75rem; flex-wrap: nowrap;
}
.ld-landing-logo {
    display: flex; align-items: center; gap: .5rem; font-weight: 800; color: var(--ld-text);
    flex: 1 1 auto; min-width: 0; text-decoration: none;
}
.ld-landing-logo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-landing-logo i { color: var(--ld-primary); flex-shrink: 0; }
.ld-landing-nav { display: none; gap: .15rem; margin-left: auto; }
.ld-landing-nav a {
    padding: .4rem .55rem; border-radius: 8px; font-weight: 600; font-size: .82rem;
    color: var(--ld-muted); text-decoration: none;
}
.ld-landing-nav a:hover { color: var(--ld-primary); background: var(--ld-primary-light, #eff6ff); }
.ld-landing-tools { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.ld-back-link {
    width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--ld-border); border-radius: 8px; color: var(--ld-muted);
}
.ld-menu-btn {
    display: inline-flex; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center;
    border: 1px solid var(--ld-border); border-radius: 8px; background: #fff; cursor: pointer;
}
.ld-mobile-nav {
    display: flex; flex-direction: column; padding: .5rem 1rem 1rem;
    border-top: 1px solid var(--ld-border); background: var(--ld-card);
}
.ld-mobile-nav[hidden] { display: none !important; }
.ld-mobile-nav a { padding: .65rem .25rem; font-weight: 600; color: var(--ld-text); border-bottom: 1px solid var(--ld-border); }
body.ld-nav-open { overflow: hidden; }

/* Landing sections */
.ld-hero {
    padding: 2.5rem 0 2rem;
    background: var(--ld-hero-bg, linear-gradient(180deg, var(--ld-primary-light, #eff6ff), var(--ld-bg)));
    color: var(--ld-hero-text, var(--ld-text));
}
.ld-hero-badge {
    display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700;
    color: var(--ld-primary); margin-bottom: .75rem;
}
.ld-hero h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); line-height: 1.15; margin: 0 0 .75rem; }
.ld-hero-lead { font-size: 1.05rem; color: var(--ld-hero-muted, var(--ld-muted)); max-width: 36rem; margin: 0 0 1.25rem; }
.ld-hero-cta { display: flex; flex-wrap: wrap; gap: .65rem; }
.ld-hero-grid { display: grid; gap: 1.5rem; align-items: center; }
.ld-hero--split .ld-hero-grid { grid-template-columns: 1fr; }
.ld-hero-visual { display: flex; justify-content: center; }
.ld-hero-card {
    width: min(220px, 100%); aspect-ratio: 1; border-radius: var(--ld-radius);
    background: var(--ld-card); box-shadow: var(--ld-shadow);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
    font-weight: 800; font-size: 1.5rem; color: var(--ld-primary);
}
.ld-stats-bar {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem;
    margin-top: 1.5rem; padding: 1rem; background: var(--ld-card); border-radius: var(--ld-radius);
    border: 1px solid var(--ld-border); box-shadow: var(--ld-shadow);
}
.ld-stat { text-align: center; }
.ld-stat strong { display: block; font-size: 1.35rem; color: var(--ld-primary); }
.ld-stat span { font-size: .72rem; color: var(--ld-muted); }

.ld-section { padding: 2.5rem 0; }
.ld-section--alt { background: var(--ld-section-alt, #fff); }
.ld-section--contact { background: var(--ld-contact-bg, var(--ld-primary-light, #eff6ff)); }
.ld-section h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); margin: 0 0 .5rem; text-align: center; }
.ld-section-lead { text-align: center; color: var(--ld-muted); max-width: 36rem; margin: 0 auto 1.5rem; }

.ld-course-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.ld-course-card {
    position: relative; background: var(--ld-card); border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius); padding: 1.25rem; box-shadow: var(--ld-shadow);
}
.ld-course-badge {
    position: absolute; top: .75rem; right: .75rem; font-size: .65rem; font-weight: 800;
    padding: .2rem .45rem; border-radius: 99px; background: var(--ld-primary); color: #fff;
}
.ld-course-icon {
    width: 2.5rem; height: 2.5rem; border-radius: 10px; background: var(--ld-primary-light, #eff6ff);
    color: var(--ld-primary); display: flex; align-items: center; justify-content: center; margin-bottom: .75rem;
}
.ld-course-card h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.ld-course-card p { margin: 0 0 .75rem; font-size: .88rem; color: var(--ld-muted); }
.ld-course-price { margin-bottom: .75rem; font-size: .88rem; }
.ld-course-price strong { font-size: 1.25rem; color: var(--ld-primary); }

.ld-instructor-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.ld-instructor-card {
    background: var(--ld-card); border: 1px solid var(--ld-border); border-radius: var(--ld-radius);
    padding: 1rem; text-align: center;
}
.ld-avatar {
    width: 3rem; height: 3rem; margin: 0 auto .5rem; border-radius: 50%;
    background: var(--ld-primary); color: #fff; font-weight: 800;
    display: flex; align-items: center; justify-content: center; font-size: .85rem;
}
.ld-instructor-card h3 { margin: 0 0 .2rem; font-size: .95rem; }
.ld-instructor-role { margin: 0; font-size: .78rem; color: var(--ld-muted); }
.ld-instructor-years { margin: .25rem 0 0; font-size: .72rem; color: var(--ld-primary); font-weight: 600; }

.ld-faq-list { display: flex; flex-direction: column; gap: .5rem; }
.ld-faq-item {
    background: var(--ld-card); border: 1px solid var(--ld-border); border-radius: var(--ld-radius); padding: .75rem 1rem;
}
.ld-faq-item summary { cursor: pointer; font-weight: 700; }
.ld-faq-item p { margin: .5rem 0 0; color: var(--ld-muted); font-size: .9rem; }

.ld-contact-grid { display: grid; gap: 1.5rem; }
.ld-contact-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.ld-contact-list li { display: flex; gap: .65rem; margin-bottom: .65rem; font-size: .9rem; }
.ld-contact-list i { color: var(--ld-primary); width: 1rem; margin-top: .15rem; }
.ld-form {
    background: var(--ld-card); border: 1px solid var(--ld-border); border-radius: var(--ld-radius);
    padding: 1.25rem; box-shadow: var(--ld-shadow);
}
.ld-form label { display: block; margin-bottom: .75rem; font-size: .82rem; font-weight: 600; }
.ld-form input, .ld-form select {
    width: 100%; margin-top: .3rem; padding: .55rem .65rem; border: 1px solid var(--ld-border);
    border-radius: 8px; font: inherit;
}
.ld-form-note { margin: .65rem 0 0; font-size: .72rem; color: var(--ld-muted); text-align: center; }

@media (min-width: 640px) {
    .ld-stats-bar { grid-template-columns: repeat(4, 1fr); }
    .ld-course-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
    .ld-landing-nav { display: flex; }
    .ld-menu-btn { display: none; }
    .ld-hero--split .ld-hero-grid { grid-template-columns: 1.1fr .9fr; }
    .ld-instructor-grid { grid-template-columns: repeat(4, 1fr); }
    .ld-contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }
    .ld-demo-strip > span { flex: 0 1 auto; }
}
@media (min-width: 900px) {
    .ld-course-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 767px) {
    .ld-landing-header-inner { padding: .6rem max(.75rem, env(safe-area-inset-left)) .6rem max(.75rem, env(safe-area-inset-right)); }
    .ld-lang-label { display: none; }
    .ld-lang-btn { width: 2.5rem; height: 2.5rem; padding: 0; justify-content: center; }
}