:root {
    --primary: #0891b2;
    --primary-dark: #0e7490;
    --primary-light: #22d3ee;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(15, 23, 42, .08);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, .10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    color: var(--text-dark);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 700;
    color: var(--dark);
}

p {
    margin: 0;
}

.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .9rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
}

.btn-outline {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(8, 145, 178, .08);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-dark {
    background: var(--dark);
    color: #fff;
}

.btn-dark:hover {
    background: var(--dark-2);
}

.btn-hero-primary {
    background: var(--primary-light);
    color: var(--dark);
    font-weight: 700;
}

.btn-hero-primary:hover {
    background: #67e8f9;
}

.btn-hero-outline {
    background: rgba(255, 255, 255, .08);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, .25);
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, .15);
}

/* Top bar */
.site-topbar {
    background: var(--dark);
    color: #cbd5e1;
    font-size: .75rem;
    padding: 8px 0;
}

.site-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.site-topbar-contact {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.site-topbar-contact i {
    color: var(--primary-light);
    margin-right: 6px;
}

.site-topbar-social {
    display: flex;
    gap: 14px;
}

.site-topbar-social a {
    color: #cbd5e1;
    transition: color .15s ease;
}

.site-topbar-social a:hover {
    color: #fff;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-logo img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
}

.site-logo-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.1;
}

.site-logo-text span {
    color: var(--primary);
}

.site-search-form {
    flex: 1;
    max-width: 320px;
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.site-search-form input {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 10px 12px;
    font-size: .85rem;
    font-family: inherit;
    outline: none;
    min-width: 0;
}

.site-search-form button {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    padding: 0 14px;
    cursor: pointer;
    font-size: .85rem;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 500;
    font-size: .92rem;
    color: var(--dark-2);
    margin-left: auto;
}

.site-nav a:hover {
    color: var(--primary);
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-nav-toggle {
    display: none;
    border: 1px solid var(--border-color);
    background: #fff;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--dark);
    cursor: pointer;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 55%, #0c4a6e 100%);
    color: #fff;
    padding: 60px 0;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 211, 238, .12);
    color: var(--primary-light);
    border: 1px solid rgba(34, 211, 238, .3);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.hero-copy h1 {
    color: #fff;
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-copy h1 span {
    color: var(--primary-light);
}

.hero-copy p {
    color: #cbd5e1;
    font-size: 1.02rem;
    max-width: 520px;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-stats-card {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius);
    padding: 26px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    backdrop-filter: blur(6px);
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-stat-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(34, 211, 238, .14);
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.hero-stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.hero-stat-label {
    font-size: .72rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-top: 2px;
}

/* Trust strip */
.trust-strip {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 26px 0;
}

.trust-strip-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.trust-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.trust-item i {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(8, 145, 178, .1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.trust-item h4 {
    font-size: .9rem;
    margin-bottom: 2px;
}

.trust-item p {
    font-size: .78rem;
    color: var(--text-muted);
}

/* About */
.about {
    padding: 70px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}

.about h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 16px;
}

.about h2 span {
    color: var(--primary);
}

.about > .about-grid > div:first-child > p {
    color: var(--text-muted);
    margin-bottom: 22px;
}

.about-checklist {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.about-checklist li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .92rem;
    font-weight: 500;
    color: var(--dark-2);
}

.about-checklist i {
    color: #059669;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.about-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.about-stat-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.about-stat-value {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.about-stat-label {
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* Courses */
.courses {
    background: var(--bg-light);
    padding: 70px 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 28px;
}

.section-heading h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.section-heading p {
    color: var(--text-muted);
    font-size: .9rem;
    margin-top: 4px;
}

.courses-results {
    transition: opacity .15s ease;
}

.courses-results.is-loading {
    opacity: .45;
    pointer-events: none;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.category-chip {
    padding: 8px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border-color);
    font-size: .82rem;
    font-weight: 600;
    color: var(--dark-2);
    transition: all .15s ease;
}

.category-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-chip.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.course-filter-note {
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.course-filter-note a {
    color: var(--primary);
    font-weight: 600;
}

.courses-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.courses-empty i {
    font-size: 2rem;
    margin-bottom: 14px;
    color: #cbd5e1;
}

.courses-empty a {
    color: var(--primary);
    font-weight: 600;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

.course-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow .2s ease, transform .2s ease;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.course-card-thumb {
    position: relative;
    height: 160px;
    background: var(--bg-light);
}

.course-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-card-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #cbd5e1;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.course-card-price {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--dark);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
}

.course-card-price.is-free {
    background: #059669;
}

.course-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.course-card-category {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-card-body h3 {
    font-size: 1rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.course-card-body p {
    font-size: .8rem;
    color: var(--text-muted);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.course-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: .74rem;
    color: var(--text-muted);
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.course-card-meta i {
    color: var(--primary);
    margin-right: 4px;
}

.course-card-instructor {
    font-size: .74rem;
    color: var(--text-muted);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-card-instructor i {
    color: var(--primary);
    margin-right: 4px;
}

.course-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
}

.course-card-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 0 18px 18px;
}

.cart-add-form {
    margin: 0;
    flex-shrink: 0;
}

.course-card-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: .72rem;
    font-weight: 700;
    color: var(--primary);
    background: transparent;
    border: 1px solid var(--primary);
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s ease;
}

.course-card-cart-btn:hover {
    background: var(--primary);
    color: #fff;
}

.course-card-cart-btn.is-in-cart {
    color: #059669;
    border-color: #059669;
    background: #ecfdf5;
    cursor: default;
}

.course-card-cart-btn.is-in-cart:hover {
    background: #ecfdf5;
    color: #059669;
}

.site-cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--dark);
    font-size: 1rem;
    flex-shrink: 0;
    transition: border-color .15s ease, color .15s ease;
}

.site-cart-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.site-cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    border-radius: 999px;
    line-height: 1;
}

/* CTA */
.cta {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
    padding: 60px 0;
    text-align: center;
}

.cta h2 {
    color: #fff;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    margin-bottom: 10px;
}

.cta p {
    color: #cbd5e1;
    margin-bottom: 26px;
}

/* Course Detail Page */
.breadcrumb {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 0;
    font-size: .8rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
    transition: color .15s ease;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .sep {
    margin: 0 8px;
    color: #cbd5e1;
}

.breadcrumb .current {
    color: var(--dark-2);
    font-weight: 600;
}

.course-hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 55%, #0c4a6e 100%);
    color: #fff;
    padding: 44px 0;
}

.course-hero-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.course-hero-category {
    display: inline-block;
    background: rgba(34, 211, 238, .14);
    color: var(--primary-light);
    border: 1px solid rgba(34, 211, 238, .3);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 5px 12px;
    border-radius: 999px;
    text-decoration: none;
}

.course-hero-category:hover {
    background: rgba(34, 211, 238, .24);
}

.course-hero h1 {
    color: #fff;
    font-size: clamp(1.6rem, 3.4vw, 2.4rem);
    line-height: 1.25;
    margin-bottom: 14px;
    max-width: 720px;
}

.course-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: .85rem;
    color: #cbd5e1;
}

.course-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.course-hero-meta i {
    color: var(--primary-light);
}

.detail-section {
    padding: 48px 0 64px;
    background: #fff;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

.detail-main h2 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.detail-main > * + * {
    margin-top: 32px;
}

.course-description {
    color: var(--text-dark);
    line-height: 1.75;
    white-space: pre-line;
}

.curriculum-summary {
    color: var(--text-muted);
    font-size: .85rem;
    margin-bottom: 16px;
}

.curriculum-section {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}

.curriculum-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-light);
    font-weight: 600;
    font-size: .9rem;
    color: var(--dark-2);
}

.curriculum-section-header span {
    font-weight: 500;
    font-size: .76rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.curriculum-lecture {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    font-size: .85rem;
    color: var(--text-dark);
    border-top: 1px solid var(--border-color);
}

.curriculum-lecture.is-preview {
    padding: 0;
    flex-direction: column;
    align-items: stretch;
}

.curriculum-lecture i {
    color: var(--primary);
    width: 16px;
    flex-shrink: 0;
}

.curriculum-lecture-title {
    flex: 1;
}

.curriculum-lock-icon {
    color: #cbd5e1 !important;
    font-size: .75rem;
}

.curriculum-preview-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 18px;
    cursor: pointer;
    transition: background .12s ease;
}

.curriculum-preview-trigger:hover {
    background: var(--bg-light);
}

.curriculum-preview-badge {
    font-size: .68rem;
    font-weight: 700;
    color: #059669;
    background: #d1fae5;
    padding: 2px 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

.curriculum-preview-badge i {
    font-size: .6rem;
    margin-right: 2px;
}

.curriculum-preview-panel {
    padding: 0 18px 16px;
}

.curriculum-preview-panel:empty {
    padding: 0;
}

.curriculum-preview-panel video,
.curriculum-preview-panel iframe {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: #000;
    display: block;
}

.curriculum-preview-panel video {
    max-height: 360px;
}

.curriculum-preview-panel iframe {
    height: 420px;
}

.curriculum-preview-panel iframe.stream-player {
    height: auto;
    aspect-ratio: 16 / 9;
}

.curriculum-empty {
    color: var(--text-muted);
    font-size: .85rem;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 18px;
}

.instructor-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    background: var(--bg-light);
}

.instructor-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.instructor-card h3 {
    font-size: .95rem;
    margin-bottom: 2px;
}

.instructor-expertise {
    font-size: .75rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.instructor-bio {
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.enroll-card {
    position: sticky;
    top: 90px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    background: var(--card-bg);
}

.enroll-card-thumb {
    height: 170px;
    background: var(--bg-light);
}

.enroll-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.enroll-card-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    color: #cbd5e1;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.enroll-card-body {
    padding: 22px;
}

.enroll-price {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
}

.enroll-price.is-free {
    color: #059669;
}

.enroll-card .btn {
    width: 100%;
    margin: 16px 0 18px;
}

.enroll-meta-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: .83rem;
    color: var(--text-dark);
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.enroll-meta-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.enroll-meta-list i {
    color: var(--primary);
    width: 16px;
    flex-shrink: 0;
}

/* Enrollment Form */
.enroll-section {
    background: var(--bg-light);
    padding: 48px 0 64px;
}

.enroll-wrap {
    max-width: 560px;
}

.form-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
}

.form-card h1 {
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.form-subtitle {
    color: var(--text-muted);
    font-size: .85rem;
    margin-bottom: 22px;
}

.form-alert {
    font-size: .82rem;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.form-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.form-group {
    margin-bottom: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--dark-2);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    font-family: inherit;
    font-size: .88rem;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: var(--text-dark);
    outline: none;
    transition: border-color .15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.form-group input.is-invalid,
.form-group select.is-invalid {
    border-color: #ef4444;
}

.form-group textarea {
    resize: vertical;
}

.form-static-value {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-light);
    font-size: .88rem;
    font-weight: 600;
    color: var(--dark-2);
}

.form-error {
    color: #dc2626;
    font-size: .74rem;
    margin-top: 5px;
}

.form-hp {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn-block {
    width: 100%;
    padding: 13px;
    font-size: .92rem;
}

.form-success-card {
    text-align: center;
    padding: 52px 32px;
}

.form-success-card i {
    font-size: 2.6rem;
    color: #059669;
    margin-bottom: 16px;
}

.form-success-card h1 {
    margin-bottom: 10px;
}

.form-success-card p {
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: 24px;
}

/* Cart */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.cart-item-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-light);
    flex-shrink: 0;
}

.cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #cbd5e1;
}

.cart-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cart-item-body a {
    font-size: .9rem;
    font-weight: 600;
    color: var(--dark);
}

.cart-item-body a:hover {
    color: var(--primary);
}

.cart-item-body span {
    font-size: .76rem;
    color: var(--text-muted);
}

.cart-item-price {
    font-size: .88rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
}

.cart-item-remove-form {
    margin: 0;
}

.cart-item-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: #dc2626;
    cursor: pointer;
    transition: background .15s ease;
}

.cart-item-remove:hover {
    background: #fef2f2;
}

.cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    font-size: 1rem;
    color: var(--dark);
}

.cart-total strong {
    font-size: 1.15rem;
}

.cart-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 8px 0 22px;
}

.cart-checkout-heading {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

/* Payment method (Website/cart/payment.php) */
.payment-method {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 22px;
    cursor: pointer;
}

.payment-method input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--primary);
}

.payment-method-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.payment-method-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .92rem;
    font-weight: 600;
    color: var(--dark);
}

.payment-method-note {
    font-size: .78rem;
    color: var(--text-muted);
}

/* Order confirmation (Website/cart/confirmation.php) */
.order-confirmation-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.order-confirmation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: .88rem;
    color: var(--dark);
}

.order-confirmation-item span:last-child {
    color: var(--text-muted);
    font-size: .8rem;
    white-space: nowrap;
}

/* "Check your email" notice on the order confirmation page — selectors are scoped under
   .form-success-card so they win over its generic `i` / `p` rules. */
.form-success-card .email-notice-box {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    text-align: left;
    background: #ecfeff;
    border: 1px solid #a5f3fc;
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 26px;
}

.form-success-card .email-notice-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-success-card .email-notice-icon i {
    font-size: 1.15rem;
    color: #fff;
    margin: 0;
}

.form-success-card .email-notice-body h3 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 6px;
}

.form-success-card .email-notice-body p {
    font-size: .88rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.form-success-card .email-notice-body strong {
    color: var(--dark);
}

.form-success-card .email-notice-body .email-notice-hint {
    font-size: .8rem;
    margin-bottom: 0;
}

.form-success-card .email-notice-body a {
    color: var(--primary);
    font-weight: 600;
}

.form-success-card .email-notice-box--warning {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #d97706;
}

.form-success-card .email-notice-box--warning .email-notice-icon {
    background: #d97706;
}

@media (max-width: 480px) {
    .form-success-card .email-notice-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 56px 0 0;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 36px;
    padding-bottom: 40px;
}

.site-logo-footer {
    margin-bottom: 14px;
}

.site-footer-about {
    font-size: .8rem;
    line-height: 1.7;
}

.site-footer h4 {
    color: #fff;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 16px;
}

.site-footer ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: .82rem;
}

.site-footer ul a:hover {
    color: #fff;
}

.site-footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.site-footer-contact i {
    color: var(--primary-light);
    margin-top: 3px;
}

.site-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 18px 0;
    text-align: center;
    font-size: .78rem;
}

/* ===================== Responsive ===================== */

@media (max-width: 991px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-copy p {
        max-width: 100%;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .trust-strip-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .enroll-card {
        position: static;
        max-width: 420px;
    }

    .site-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .site-topbar-contact span:last-child {
        display: none;
    }

    .site-header-inner {
        flex-wrap: wrap;
    }

    .site-search-form {
        order: 3;
        flex-basis: 100%;
        max-width: 100%;
    }

    .site-nav-toggle {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease;
    }

    .site-nav.is-open {
        max-height: 320px;
    }

    .site-nav a {
        padding: 14px 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .site-header-actions .btn-outline {
        display: none;
    }

    .hero-stats-card {
        grid-template-columns: 1fr 1fr;
        padding: 20px;
    }

    .about-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .site-logo-text {
        font-size: 1rem;
    }

    .site-header-actions .btn-primary {
        padding: 10px 16px;
        font-size: .82rem;
    }

    .course-hero {
        padding: 32px 0;
    }

    .instructor-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .form-card {
        padding: 24px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero {
        padding: 42px 0;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-stats-card {
        grid-template-columns: 1fr;
    }

    .trust-strip-grid {
        grid-template-columns: 1fr;
    }

    .about {
        padding: 48px 0;
    }

    .courses {
        padding: 48px 0;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }

    .site-footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* ===================== Website CMS (pages, sections, blog, menus) ===================== */

.cms-preview-bar {
    background: #fef3c7;
    color: #92400e;
    text-align: center;
    font-size: .85rem;
    font-weight: 600;
    padding: 8px 16px;
}

.page-banner {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 55%, #0c4a6e 100%);
    color: #fff;
    padding: 46px 0 40px;
}

.page-banner h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    line-height: 1.25;
    margin: 6px 0 0;
}

.page-banner p {
    color: #cbd5e1;
    margin-top: 10px;
    max-width: 720px;
}

.breadcrumb-inline {
    font-size: .8rem;
    color: #94a3b8;
}

.breadcrumb-inline a:hover {
    color: var(--primary-light);
}

.breadcrumb-inline span {
    margin: 0 4px;
}

.cms-section {
    padding: 64px 0;
}

.cms-section-alt {
    background: var(--bg-light);
}

.cms-narrow {
    max-width: 820px;
}

.cms-block-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 32px;
}

.trust-strip .cms-block-head {
    margin-bottom: 22px;
}

.cms-block-head h2,
.cms-contact h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.3;
}

.cms-block-head h2 span,
.cms-contact h2 span,
.section-heading h2 span {
    color: var(--primary);
}

.cta h2 span {
    color: var(--primary-light);
}

.cms-block-head p {
    color: var(--text-muted);
    margin-top: 8px;
}

.text-muted-center {
    text-align: center;
    color: var(--text-muted);
}

/* Typography for admin-authored rich text */
.cms-content {
    max-width: 780px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.8;
    color: #334155;
    overflow-wrap: break-word;
}

.cms-content-wide {
    max-width: none;
}

.cms-content-inline {
    margin: 0 0 18px;
    max-width: none;
    color: var(--text-muted);
}

.cms-content > :first-child {
    margin-top: 0;
}

.cms-content h2,
.cms-content h3,
.cms-content h4 {
    color: var(--text-dark);
    line-height: 1.35;
    margin: 1.8em 0 .6em;
}

.cms-content h2 { font-size: 1.6rem; }
.cms-content h3 { font-size: 1.3rem; }
.cms-content h4 { font-size: 1.1rem; }

.cms-content p,
.cms-content ul,
.cms-content ol,
.cms-content table,
.cms-content figure,
.cms-content blockquote,
.cms-content pre {
    margin: 0 0 1.2em;
}

.cms-content ul,
.cms-content ol {
    padding-left: 1.4em;
}

.cms-content li {
    margin-bottom: .35em;
}

.cms-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cms-content img {
    height: auto;
    border-radius: var(--radius);
    display: inline-block;
}

.cms-content figure {
    text-align: center;
}

.cms-content figcaption {
    font-size: .85rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.cms-content blockquote {
    border-left: 4px solid var(--primary);
    background: var(--bg-light);
    padding: 14px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.cms-content pre {
    background: var(--dark);
    color: #e2e8f0;
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: .88rem;
}

.cms-content table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}

.cms-content th,
.cms-content td {
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    text-align: left;
}

.cms-content th {
    background: var(--bg-light);
}

.cms-content iframe {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: var(--radius);
}

/* Hero / split variants */
.hero-centered .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
}

.hero-centered .hero-copy p {
    margin-left: auto;
    margin-right: auto;
}

.hero-centered .hero-actions {
    justify-content: center;
}

.hero-image img,
.cms-split-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    object-fit: cover;
}

.about-reverse .about-grid > div:first-child {
    order: 2;
}

/* Feature cards */
.cms-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.cms-feature-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 26px 22px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.cms-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.cms-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(8, 145, 178, .1);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 14px;
}

.cms-feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.cms-feature-card p {
    color: var(--text-muted);
    font-size: .9rem;
}

/* FAQ */
.cms-faq {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cms-faq-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.cms-faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.cms-faq-item summary::-webkit-details-marker {
    display: none;
}

.cms-faq-item summary i {
    color: var(--primary);
    font-size: .8rem;
    transition: transform .2s ease;
}

.cms-faq-item[open] summary i {
    transform: rotate(180deg);
}

.cms-faq-answer {
    padding: 0 20px 18px;
    color: var(--text-muted);
    font-size: .93rem;
}

/* Testimonials */
.cms-testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 20px;
}

.cms-testimonial {
    margin: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 26px;
    display: flex;
    flex-direction: column;
}

.cms-testimonial > i {
    color: var(--primary-light);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.cms-testimonial blockquote {
    margin: 0 0 18px;
    color: #334155;
    font-size: .94rem;
    flex-grow: 1;
}

.cms-testimonial figcaption {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cms-testimonial figcaption img,
.cms-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.cms-avatar {
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.cms-testimonial small {
    display: block;
    color: var(--text-muted);
}

/* Gallery */
.cms-gallery {
    display: grid;
    gap: 14px;
}

.cms-gallery-2 { grid-template-columns: repeat(2, 1fr); }
.cms-gallery-3 { grid-template-columns: repeat(3, 1fr); }
.cms-gallery-4 { grid-template-columns: repeat(4, 1fr); }

.cms-gallery figure {
    margin: 0;
}

.cms-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 12px;
    transition: opacity .2s ease;
}

.cms-gallery a:hover img {
    opacity: .88;
}

.cms-gallery figcaption {
    font-size: .82rem;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: center;
}

/* Contact */
.cms-contact {
    display: grid;
    gap: 36px;
    align-items: center;
}

.cms-contact.has-map {
    grid-template-columns: 1fr 1.2fr;
}

.cms-contact-text {
    color: var(--text-muted);
    margin: 10px 0 20px;
}

.cms-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cms-contact-list li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cms-contact-list i {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(8, 145, 178, .1);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cms-contact-list a:hover {
    color: var(--primary);
}

.cms-map iframe {
    width: 100%;
    height: 340px;
    border: 0;
    border-radius: 14px;
}

/* Header menu dropdowns (Admin → Menus) */
.site-nav-item {
    position: relative;
}

.site-nav-item > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.site-nav-item > a .fa-chevron-down {
    font-size: .65rem;
}

.site-nav-sub {
    position: absolute;
    top: calc(100% + 12px);
    left: -14px;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    display: none;
    flex-direction: column;
    z-index: 120;
}

.site-nav-sub::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
}

.site-nav-item:hover > .site-nav-sub,
.site-nav-item:focus-within > .site-nav-sub {
    display: flex;
}

.site-nav-sub a {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: .88rem;
}

.site-nav-sub a:hover {
    background: var(--bg-light);
}

.site-nav a.is-active {
    color: var(--primary);
}

@media (max-width: 991px) {
    .cms-contact.has-map {
        grid-template-columns: 1fr;
    }

    .about-reverse .about-grid > div:first-child {
        order: 0;
    }

    .cms-gallery-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .site-nav.is-open {
        max-height: 80vh;
        overflow-y: auto;
    }

    .site-nav-item > a {
        padding: 14px 20px;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        justify-content: space-between;
    }

    .site-nav-sub {
        position: static;
        display: flex;
        border: 0;
        box-shadow: none;
        border-radius: 0;
        padding: 0 0 0 16px;
        background: var(--bg-light);
    }

    .site-nav-sub::before {
        display: none;
    }

    .site-nav-sub a {
        border-radius: 0;
    }

    .cms-gallery-3,
    .cms-gallery-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .cms-section {
        padding: 48px 0;
    }
}

@media (max-width: 480px) {
    .cms-gallery-2,
    .cms-gallery-3,
    .cms-gallery-4 {
        grid-template-columns: 1fr;
    }
}

/* Footer: the number of menu columns is set by the admin (Menus), so let the grid size itself. */
@media (min-width: 992px) {
    .site-footer-grid {
        grid-template-columns: minmax(220px, 1.4fr);
        grid-auto-columns: minmax(0, 1fr);
        grid-auto-flow: column;
    }
}

.site-footer-social {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.site-footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease;
}

.site-footer-social a:hover {
    background: var(--primary);
    color: #fff;
}

.site-footer-social:empty {
    display: none;
}

/* ===================== Blog ===================== */
.blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: start;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.blog-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, box-shadow .2s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.blog-card-thumb {
    aspect-ratio: 16 / 9;
    background: var(--bg-light);
    overflow: hidden;
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.blog-card:hover .blog-card-thumb img {
    transform: scale(1.04);
}

.blog-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #cbd5e1;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.blog-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-category {
    align-self: flex-start;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--primary);
    background: rgba(8, 145, 178, .1);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.blog-card h3 {
    font-size: 1.05rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.blog-card h3 a:hover {
    color: var(--primary);
}

.blog-card p {
    color: var(--text-muted);
    font-size: .88rem;
    flex-grow: 1;
    margin-bottom: 14px;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: .78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.blog-card-more {
    color: var(--primary);
    font-weight: 600;
}

.blog-pager {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 32px;
}

.blog-pager a {
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: .88rem;
    background: #fff;
}

.blog-pager a.is-active,
.blog-pager a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 96px;
}

.blog-widget {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
}

.blog-widget h4 {
    font-size: .95rem;
    margin-bottom: 12px;
}

.blog-search {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.blog-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 10px 12px;
    font: inherit;
    font-size: .88rem;
    outline: none;
}

.blog-search button {
    border: 0;
    background: var(--primary);
    color: #fff;
    padding: 0 14px;
    cursor: pointer;
}

.blog-cat-list,
.blog-recent {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-cat-list a {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: .88rem;
}

.blog-cat-list li:last-child a {
    border-bottom: 0;
}

.blog-cat-list a:hover,
.blog-cat-list a.is-active {
    color: var(--primary);
}

.blog-cat-list span {
    background: var(--bg-light);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 0 9px;
    font-size: .75rem;
    line-height: 1.8;
}

.blog-recent li + li {
    margin-top: 12px;
}

.blog-recent a {
    display: flex;
    gap: 10px;
    align-items: center;
}

.blog-recent img {
    width: 58px;
    height: 46px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.blog-recent strong {
    display: block;
    font-size: .84rem;
    line-height: 1.35;
    font-weight: 600;
}

.blog-recent a:hover strong {
    color: var(--primary);
}

.blog-recent small {
    color: var(--text-muted);
    font-size: .74rem;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.blog-tags a {
    font-size: .78rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--dark-2);
}

.blog-tags a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Single post */
.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: #cbd5e1;
    font-size: .85rem;
    margin-top: 14px;
}

.blog-featured {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
}

.blog-article .cms-content {
    font-size: 1.02rem;
}

.blog-post-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: 32px;
    padding-top: 20px;
}

.blog-share {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: var(--text-muted);
}

.blog-share a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--dark-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.blog-share a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.blog-related {
    margin-top: 48px;
}

.blog-related h2 {
    font-size: 1.35rem;
    margin-bottom: 18px;
}

@media (max-width: 1100px) {
    .blog-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .blog-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .blog-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .blog-grid,
    .blog-grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* 404 */
.cms-not-found {
    text-align: center;
    max-width: 560px;
    padding-top: 30px;
    padding-bottom: 30px;
}

.cms-not-found-code {
    font-size: clamp(4rem, 14vw, 7rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cms-not-found h1 {
    font-size: 1.6rem;
    margin: 12px 0 8px;
}

.cms-not-found p {
    color: var(--text-muted);
    margin-bottom: 26px;
}

.cms-not-found .hero-actions {
    justify-content: center;
}

/* Hero with a full-width background image (Page Builder → Hero → Background image).
   The inline style sets background-image; a gradient overlay keeps the white text readable. */
.hero-has-bg {
    position: relative;
    background-color: var(--dark);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 110px 0;
    isolation: isolate;
}

.hero-has-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-overlay-strong::before {
    background: linear-gradient(90deg, rgba(15, 23, 42, .92) 0%, rgba(15, 23, 42, .80) 55%, rgba(15, 23, 42, .65) 100%);
}

.hero-overlay-medium::before {
    background: linear-gradient(90deg, rgba(15, 23, 42, .82) 0%, rgba(15, 23, 42, .55) 60%, rgba(15, 23, 42, .35) 100%);
}

.hero-overlay-light::before {
    background: linear-gradient(90deg, rgba(15, 23, 42, .65) 0%, rgba(15, 23, 42, .30) 60%, rgba(15, 23, 42, .10) 100%);
}

.hero-centered.hero-overlay-medium::before {
    background: rgba(15, 23, 42, .6);
}

.hero-centered.hero-overlay-strong::before {
    background: rgba(15, 23, 42, .78);
}

.hero-centered.hero-overlay-light::before {
    background: rgba(15, 23, 42, .38);
}

.hero-has-bg .hero-copy h1,
.hero-has-bg .hero-copy p {
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.hero-has-bg .hero-stats-card {
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(6px);
}

@media (max-width: 768px) {
    .hero-has-bg {
        padding: 64px 0;
    }

    /* Text sits over the whole photo on small screens — always darken evenly. */
    .hero-overlay-medium::before,
    .hero-overlay-light::before {
        background: rgba(15, 23, 42, .62);
    }
}

/* Hero "None" darkness: photo exactly as uploaded (overrides the gradient + mobile rule above). */
.hero-overlay-light::before,
.hero-centered.hero-overlay-light::before {
    background: none;
}

@media (max-width: 768px) {
    .hero-overlay-light::before {
        background: none;
    }
}

/* Hero with only a background image and no text: full banner, never cropped. */
.hero-banner-only {
    background: var(--dark);
    line-height: 0;
}

.hero-banner-only img {
    width: 100%;
    height: auto;
    display: block;
}

/* Gallery tile hover + lightbox (public/assets/website/js/cms-lightbox.js) */
.cms-gallery a {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    cursor: zoom-in;
}

.cms-gallery img {
    transition: transform .35s ease, opacity .2s ease;
}

.cms-gallery a:hover img {
    transform: scale(1.05);
    opacity: 1;
}

.cms-gallery-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .35);
    color: #fff;
    font-size: 1.6rem;
    opacity: 0;
    transition: opacity .2s ease;
}

.cms-gallery a:hover .cms-gallery-zoom,
.cms-gallery a:focus-visible .cms-gallery-zoom {
    opacity: 1;
}

html.cms-lb-open {
    overflow: hidden;
}

.cms-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(2, 6, 23, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s ease;
    -webkit-user-select: none;
    user-select: none;
}

.cms-lightbox[hidden] {
    display: none;
}

.cms-lightbox.is-open {
    opacity: 1;
}

.cms-lb-stage {
    margin: 0;
    width: 100%;
    height: 100%;
    padding: 64px 80px 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cms-lb-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    transform: scale(.94);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
}

.cms-lb-stage img.is-loaded {
    transform: scale(1);
    opacity: 1;
}

.cms-lb-stage figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    display: flex;
    justify-content: center;
    gap: 16px;
    color: #e2e8f0;
    font-size: .9rem;
    padding: 0 20px;
    text-align: center;
}

.cms-lb-counter {
    color: #94a3b8;
    white-space: nowrap;
}

.cms-lb-spinner {
    position: absolute;
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255, 255, 255, .2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cms-lb-spin .8s linear infinite;
}

.cms-lb-spinner[hidden] {
    display: none;
}

@keyframes cms-lb-spin {
    to { transform: rotate(360deg); }
}

.cms-lb-close,
.cms-lb-nav {
    position: absolute;
    z-index: 2;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s ease;
}

.cms-lb-close:hover,
.cms-lb-nav:hover {
    background: rgba(255, 255, 255, .25);
}

.cms-lb-close:focus-visible,
.cms-lb-nav:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

.cms-lb-close {
    top: 16px;
    right: 16px;
    width: 46px;
    height: 46px;
    font-size: 1.3rem;
}

.cms-lb-nav {
    top: 50%;
    width: 52px;
    height: 52px;
    margin-top: -26px;
    font-size: 1.1rem;
}

.cms-lb-nav[hidden] {
    display: none;
}

.cms-lb-prev {
    left: 16px;
}

.cms-lb-next {
    right: 16px;
}

@media (max-width: 640px) {
    .cms-lb-stage {
        padding: 64px 12px 72px;
    }

    .cms-lb-nav {
        top: auto;
        bottom: 14px;
        margin-top: 0;
        width: 44px;
        height: 44px;
    }

    .cms-lb-stage figcaption {
        bottom: 70px;
    }
}

/* Page / blog banners: the global h1-h4 colour (var(--dark)) made titles invisible on the dark banner. */
.page-banner h1 {
    color: #fff;
    max-width: 900px;
    letter-spacing: -0.01em;
}

.blog-post-banner h1 {
    font-size: clamp(1.5rem, 3.4vw, 2.3rem);
    line-height: 1.3;
}

.blog-post-banner .breadcrumb-inline a,
.page-banner .breadcrumb-inline a {
    color: #cbd5e1;
}

.blog-post-banner .breadcrumb-inline a:hover,
.page-banner .breadcrumb-inline a:hover {
    color: var(--primary-light);
}

/* Header menu items come from Admin → Menus, so there can be many of them. Labels never wrap,
   and below 1200px the menu collapses into the hamburger dropdown (same rules as the 768px
   mobile block above) instead of pushing "Get Started" off-screen. */
.site-nav > a,
.site-nav-item > a {
    white-space: nowrap;
}

@media (max-width: 1199px) {
    .site-header-actions {
        margin-left: auto;
    }

    .site-nav-toggle {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease;
        margin-left: 0;
    }

    .site-nav.is-open {
        max-height: 80vh;
        overflow-y: auto;
    }

    .site-nav > a,
    .site-nav-item > a {
        padding: 14px 20px;
        border-bottom: 1px solid var(--border-color);
    }

    .site-nav-item > a {
        display: flex;
        justify-content: space-between;
    }

    .site-nav-sub {
        position: static;
        display: flex;
        border: 0;
        box-shadow: none;
        border-radius: 0;
        padding: 0 0 0 16px;
        background: var(--bg-light);
    }

    .site-nav-sub::before {
        display: none;
    }

    .site-nav-sub a {
        border-radius: 0;
        padding: 12px 20px;
        border-bottom: 1px solid var(--border-color);
    }
}

/* Jumping to #courses (header search, menu links) — keep the heading clear of the sticky header. */
#courses,
#about,
#contact-info {
    scroll-margin-top: 96px;
}
