/* Run Engineering - site styles (on top of Bootstrap 5.3)
   Palette taken from the company logo: RUN navy (#02254f) and RUN green (#528d0d).
   Signature: course facts laid out as an engineering drawing title block. */

:root {
    --steel: #02254f;          /* logo navy */
    --steel-2: #0c3a70;
    --steel-3: #3a6199;
    --paper: #f3f5f4;
    --panel: #ffffff;
    --line: #c7cfd6;
    --line-strong: #02254f;
    --ink: #17202b;
    --muted: #55606c;
    --accent: #528d0d;         /* logo green: rules, highlights, focus */
    --accent-dark: #3d6b0a;
    --accent-btn: #467d0b;     /* darker green so white button text meets WCAG AA */
    --ok: #2f7d32;

    --font-display: "Archivo", "Arial Narrow", Arial, sans-serif;
    --font-body: "Public Sans", "Segoe UI", Arial, sans-serif;

    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--paper);
    --bs-link-color: var(--steel-2);
    --bs-link-color-rgb: 34, 57, 90;
    --bs-link-hover-color: var(--steel);
    --bs-border-color: var(--line);
    --bs-border-radius: 3px;
    --bs-border-radius-sm: 2px;
    --bs-border-radius-lg: 4px;
}

body {
    font-size: 1.0625rem;
    line-height: 1.6;
    background: var(--paper);
}

h1, h2, h3, h4, .display-font {
    font-family: var(--font-display);
    font-stretch: 112%;
    font-variation-settings: "wdth" 112;
    letter-spacing: -0.01em;
    color: var(--steel);
    line-height: 1.12;
}
h1 { font-weight: 800; }
h2 { font-weight: 750; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); }
h3 { font-weight: 700; font-size: 1.3rem; }
h4 { font-weight: 700; font-size: 1.05rem; }

.measure { max-width: 68ch; }
.text-muted-ink { color: var(--muted) !important; }
a { text-underline-offset: 3px; }

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ------------------------------------------------------------ buttons */
.btn { font-weight: 600; padding: .6rem 1.15rem; }
.btn-accent {
    --bs-btn-bg: var(--accent-btn);
    --bs-btn-border-color: var(--accent-btn);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--accent-dark);
    --bs-btn-hover-border-color: var(--accent-dark);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--accent-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: var(--accent-btn);
    --bs-btn-disabled-color: #fff;
}
.btn-steel {
    --bs-btn-bg: var(--steel);
    --bs-btn-border-color: var(--steel);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--steel-2);
    --bs-btn-hover-border-color: var(--steel-2);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--steel-2);
    --bs-btn-active-color: #fff;
}
.btn-outline-steel {
    --bs-btn-color: var(--steel);
    --bs-btn-border-color: var(--steel);
    --bs-btn-hover-bg: var(--steel);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--steel);
    --bs-btn-active-color: #fff;
}
.btn-outline-light-steel {
    --bs-btn-color: #fff;
    --bs-btn-border-color: rgba(255, 255, 255, .55);
    --bs-btn-hover-bg: #fff;
    --bs-btn-hover-color: var(--steel);
    --bs-btn-active-bg: #fff;
    --bs-btn-active-color: var(--steel);
}
.btn-whatsapp {
    --bs-btn-bg: #1f8f4e;
    --bs-btn-border-color: #1f8f4e;
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #187540;
    --bs-btn-hover-border-color: #187540;
    --bs-btn-hover-color: #fff;
}

/* ------------------------------------------------------------- header */
/* White header so the full-colour logo appears exactly as supplied. */
.site-header {
    background: #fff;
    color: var(--steel);
    border-bottom: 1px solid var(--line);
}
.site-header .navbar { padding-block: .45rem; }
.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex: none;
}
.brand-logo { display: block; height: 68px; width: auto; }
.site-footer .brand-logo { height: 96px; }
@media (max-width: 575px) { .site-header .brand-logo { height: 54px; } }
.site-header .nav-link {
    color: var(--steel);
    font-weight: 600;
    padding-inline: .8rem !important;
}
.site-header .nav-link:hover { color: var(--accent-dark); }
.site-header .nav-link.active { color: var(--steel); box-shadow: inset 0 -3px 0 var(--accent); }
.site-header .dropdown-menu { --bs-dropdown-link-active-bg: var(--steel); }

/* --------------------------------------------------------------- hero */
.hero {
    background-color: var(--steel);
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 28px 28px;
    color: #e6ebf1;
    padding-block: clamp(3rem, 2rem + 5vw, 6rem);
    border-bottom: 6px solid var(--accent);
}
.hero h1 {
    color: #fff;
    font-size: clamp(2.3rem, 1.4rem + 3.6vw, 4.4rem);
    font-variation-settings: "wdth" 125;
    font-weight: 850;
    line-height: 1.02;
    letter-spacing: -0.02em;
    max-width: 14ch;
}
.hero-lead {
    font-size: 1.18rem;
    max-width: 52ch;
    color: #cfd8e3;
}
.hero-services {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.4rem;
    color: #aebbca;
    font-size: .95rem;
}
.hero-services li::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent);
    margin-right: .5rem;
    vertical-align: 1px;
}

.page-hero {
    background: var(--steel);
    color: #d6dee8;
    padding-block: 2.75rem 2.5rem;
    border-bottom: 6px solid var(--accent);
}
.page-hero h1 {
    color: #fff;
    font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
    font-variation-settings: "wdth" 120;
}
.page-hero .breadcrumb { --bs-breadcrumb-divider-color: #8fa0b4; --bs-breadcrumb-item-active-color: #aebbca; margin-bottom: .75rem; font-size: .9rem; }
.page-hero .breadcrumb a { color: #d6dee8; }

/* ------------------------------------------------ title block (signature) */
.title-block {
    background: var(--panel);
    border: 2px solid var(--line-strong);
    color: var(--ink);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.title-block-head {
    padding: 1.1rem 1.2rem 1rem;
    flex: 1;
}
.title-block-head .tb-category {
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: .35rem;
}
.title-block-head h3 {
    font-size: 1.22rem;
    margin-bottom: .5rem;
}
.title-block-head h3 a { color: var(--steel); text-decoration: none; }
.title-block-head h3 a::after { content: ""; position: absolute; inset: 0; }
.title-block-head p { color: var(--muted); font-size: .96rem; margin: 0; }
.title-block { position: relative; }
.title-block:hover { border-color: var(--steel-3); box-shadow: 6px 6px 0 var(--accent); }
.title-block:has(a:focus-visible) { box-shadow: 6px 6px 0 var(--accent); }

.tb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 2px solid var(--line-strong);
}
.tb-cell {
    padding: .5rem .7rem .55rem;
    border-right: 1px solid var(--line);
    min-width: 0;
}
.tb-cell:last-child { border-right: 0; }
.tb-label {
    display: block;
    font-size: .72rem;
    color: var(--muted);
    line-height: 1.2;
}
.tb-value {
    display: block;
    font-weight: 700;
    font-size: .92rem;
    color: var(--ink);
    overflow-wrap: anywhere;
}
.tb-cell.fee .tb-value { color: var(--steel); }
/* Narrow cards: the title block folds into a 2 x 2 grid so no value is truncated. */
.title-block { container-type: inline-size; }
@container (max-width: 440px) {
    .tb-grid { grid-template-columns: repeat(2, 1fr); }
    .tb-cell:nth-child(2) { border-right: 0; }
    .tb-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* Intake schedule in hero - a title block sheet */
.intake-sheet {
    background: var(--panel);
    border: 2px solid #fff;
    color: var(--ink);
}
.intake-sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: .8rem 1.1rem;
    border-bottom: 2px solid var(--line-strong);
    background: var(--accent-btn);
}
.intake-sheet-head h2 {
    font-size: 1.1rem;
    margin: 0;
    color: #fff;
}
.intake-row {
    display: grid;
    grid-template-columns: 5.2rem 1fr;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
}
.intake-row:last-of-type { border-bottom: 0; }
.intake-row:hover { background: #f7f9fb; }
.intake-date {
    border-right: 1px solid var(--line);
    padding: .8rem .5rem;
    text-align: center;
    font-family: var(--font-display);
    font-variation-settings: "wdth" 110;
    color: var(--steel);
    line-height: 1.05;
}
.intake-date strong { display: block; font-size: 1.6rem; font-weight: 800; }
.intake-date span { font-size: .8rem; font-weight: 600; }
.intake-body { padding: .8rem 1rem; }
.intake-body h3 { font-size: 1rem; margin: 0 0 .2rem; color: var(--ink); font-variation-settings: "wdth" 100; }
.intake-body p { font-size: .86rem; color: var(--muted); margin: 0; }
.intake-sheet-foot { border-top: 2px solid var(--line-strong); padding: .7rem 1.1rem; font-size: .92rem; }

/* ----------------------------------------------------------- sections */
.section { padding-block: clamp(3rem, 2rem + 3vw, 5rem); }
.section-alt { background: #e8ecef; }
.section-dark { background: var(--steel); color: #d6dee8; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { margin-bottom: 2rem; max-width: 62ch; }
.section-head p { color: var(--muted); margin: .6rem 0 0; }
.section-dark .section-head p { color: #aebbca; }

/* Services as a specification list rather than cards */
.spec-list { border-top: 2px solid var(--line-strong); }
.spec-item {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
}
.spec-item:hover h3 { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
.spec-item .bi { font-size: 1.6rem; color: var(--steel-3); line-height: 1; }
.spec-item h3 { font-size: 1.15rem; margin: 0 0 .25rem; }
.spec-item p { margin: 0; color: var(--muted); font-size: .98rem; }
.spec-item .spec-more { font-size: .9rem; font-weight: 600; color: var(--steel-2); white-space: nowrap; align-self: center; }
@media (max-width: 575px) { .spec-item { grid-template-columns: 2.2rem 1fr; } .spec-item .spec-more { display: none; } }

/* Projects */
.project {
    border-left: 4px solid var(--accent);
    padding: .3rem 0 .3rem 1.1rem;
    height: 100%;
}
.project-meta { font-size: .88rem; color: var(--muted); margin-bottom: .35rem; }
.section-dark .project-meta { color: #9fb0c3; }
.project h3 { font-size: 1.15rem; }
.project h3 a { color: inherit; text-decoration: none; }
.project h3 a:hover { text-decoration: underline; }

/* Testimonials */
.quote {
    margin: 0;
    padding: 1.4rem 1.5rem;
    background: var(--panel);
    border: 1px solid var(--line);
    height: 100%;
}
.quote blockquote { font-size: 1.05rem; margin-bottom: 1rem; }
.quote figcaption { font-size: .92rem; color: var(--muted); }
.quote figcaption strong { color: var(--ink); display: block; }

.client-strip {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.client-strip li {
    border: 1px solid var(--line);
    background: var(--panel);
    padding: .75rem 1.25rem;
    min-width: 9rem;
    text-align: center;
    color: var(--muted);
    font-weight: 600;
}
.client-strip img { max-height: 36px; max-width: 120px; filter: grayscale(1); }

/* ---------------------------------------------------------- catalogue */
.filter-bar {
    background: var(--panel);
    border: 2px solid var(--line-strong);
    padding: 1rem;
}
.filter-bar .form-label { font-size: .85rem; color: var(--muted); margin-bottom: .2rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    padding: .3rem .8rem;
    font-size: .9rem;
    text-decoration: none;
    border-radius: 2px;
}
.chip:hover { border-color: var(--steel); color: var(--steel); }
.chip.active { background: var(--steel); border-color: var(--steel); color: #fff; }

.level-badge {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    padding: .1rem .5rem;
    border: 1px solid currentColor;
    border-radius: 2px;
}
.lvl-beginner { color: #1f7a4d; }
.lvl-intermediate { color: #8a6100; }
.lvl-advanced { color: #9b2c2c; }

/* Course page */
.course-facts { border: 2px solid var(--line-strong); background: var(--panel); position: sticky; top: 1rem; }
.course-facts .price-row { padding: 1.1rem 1.2rem; border-bottom: 2px solid var(--line-strong); }
.course-facts .price { font-family: var(--font-display); font-variation-settings: "wdth" 115; font-size: 2rem; font-weight: 800; color: var(--steel); line-height: 1; }
.course-facts dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; }
.course-facts dl div { padding: .6rem 1.2rem; border-bottom: 1px solid var(--line); }
.course-facts dl div:nth-child(odd) { border-right: 1px solid var(--line); }
.course-facts dt { font-size: .75rem; font-weight: 400; color: var(--muted); }
.course-facts dd { margin: 0; font-weight: 700; }
.course-facts .actions { padding: 1.1rem 1.2rem; }

.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 1.8rem; margin-bottom: .5rem; }
.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .45em;
    width: .9rem;
    height: .5rem;
    border-left: 3px solid var(--ok);
    border-bottom: 3px solid var(--ok);
    transform: rotate(-45deg);
}

.syllabus { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--line-strong); counter-reset: mod; }
.syllabus li {
    display: grid;
    grid-template-columns: 2.4rem 1fr auto;
    gap: .75rem;
    align-items: center;
    padding: .7rem 0;
    border-bottom: 1px solid var(--line);
    counter-increment: mod;
}
.syllabus li::before {
    content: counter(mod);
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--steel-3);
    text-align: center;
}
.syllabus .meta { font-size: .85rem; color: var(--muted); white-space: nowrap; }

.prose p, .prose li { max-width: 70ch; }
.prose ol, .prose ul { padding-left: 1.3rem; }

/* -------------------------------------------------------------- forms */
.form-control, .form-select { padding: .6rem .8rem; border-color: #aeb8c1; background-color: #fff; }
.form-control:focus, .form-select:focus { border-color: var(--steel); box-shadow: 0 0 0 .2rem rgba(242, 183, 5, .45); }
.form-label { font-weight: 600; font-size: .95rem; }
.form-text { color: var(--muted); }
.form-check-input:checked { background-color: var(--steel); border-color: var(--steel); }

.auth-wrap { min-height: 70vh; display: grid; place-items: center; padding-block: 3rem; }
.auth-card { width: 100%; max-width: 440px; background: var(--panel); border: 2px solid var(--line-strong); }
.auth-card-head { padding: 1.3rem 1.5rem; border-bottom: 2px solid var(--line-strong); }
.auth-card-head h1 { font-size: 1.6rem; margin: 0; }
.auth-card-body { padding: 1.5rem; }

.panel { background: var(--panel); border: 1px solid var(--line); padding: 1.4rem; }
.panel-strong { border: 2px solid var(--line-strong); }

.flash-wrap .alert { border-radius: 0; margin: 0; border-left-width: 6px; }
.alert-info { border-left-color: var(--steel-3); }

/* ------------------------------------------------------------ portal */
.progress { height: .55rem; border-radius: 0; background: #dde3e8; }
.progress-bar { background: var(--ok); }
.progress-bar.in-progress { background: var(--steel-2); }

.module-nav { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--line-strong); }
.module-nav a {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    padding: .6rem .2rem;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
    font-size: .95rem;
}
.module-nav a:hover { background: #eef2f5; }
.module-nav a.current { font-weight: 700; box-shadow: inset 4px 0 0 var(--accent); padding-left: .7rem; }
.module-nav .bi { color: var(--muted); margin-top: 2px; }
.module-nav .done .bi { color: var(--ok); }

.ratio-video { border: 2px solid var(--line-strong); background: #000; }

.quiz-q { border: 1px solid var(--line); background: var(--panel); padding: 1.2rem 1.3rem; margin-bottom: 1rem; }
.quiz-q legend { font-size: 1.05rem; font-weight: 600; float: none; }
.quiz-q .form-check { padding: .45rem .5rem .45rem 2.2rem; border: 1px solid transparent; }
.quiz-q .form-check:has(input:checked) { border-color: var(--steel); background: #eef2f6; }

/* --------------------------------------------------------------- footer */
.site-footer { background: #011a3a; color: #b3c0cf; padding-block: 3rem 1.5rem; font-size: .95rem; }
.site-footer h2 { color: #fff; font-size: 1rem; font-variation-settings: "wdth" 100; margin-bottom: .8rem; }
.site-footer a { color: #d6dee8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer .legal { border-top: 1px solid #1d3a60; margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; }

.wa-float {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1030;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #1f8f4e;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.wa-float:hover { color: #fff; background: #187540; }

/* ------------------------------------------------------------ certificate */
.certificate-page { background: #dfe4e8; padding: 2rem 1rem; }
.certificate {
    max-width: 960px;
    margin: 0 auto;
    background: #fff;
    border: 3px solid var(--steel);
    outline: 1px solid var(--steel);
    outline-offset: -12px;
    padding: 3.5rem 3rem 2rem;
    position: relative;
}
.certificate-logo .brand-logo { height: 150px; }
.certificate h1 { font-size: clamp(1.8rem, 1rem + 3vw, 3rem); font-variation-settings: "wdth" 125; }
.certificate .recipient { font-family: var(--font-display); font-variation-settings: "wdth" 110; font-size: clamp(1.8rem, 1rem + 3vw, 2.8rem); font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--accent); display: inline-block; padding: 0 1rem .2rem; }
.certificate .tb-grid { border: 2px solid var(--steel); margin-top: 2.5rem; }

@media print {
    .no-print { display: none !important; }
    .certificate-page { background: #fff; padding: 0; }
    .certificate { border-width: 3px; }
    @page { size: A4 landscape; margin: 10mm; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
}
