/* =========================================================
   م. خالد متولي — Hydraulic & Pneumatic Training
   Design language: engineering blueprint + hydraulic-oil amber
   ========================================================= */

:root {
    /* Steel navy */
    --steel-900: #0C1E2E;
    --steel-800: #12293C;
    --steel-700: #1B3A52;
    --steel-600: #2C536F;

    /* Hydraulic-oil amber (the accent — the color of hydraulic fluid) */
    --amber:      #E39B2E;
    --amber-deep: #C57F1E;

    /* Neutrals — technical paper */
    --paper:   #F3F1EB;
    --paper-2: #EAE7DE;
    --ink:     #14202B;
    --muted:   #5E6B76;
    --line:    #D8D3C7;
    --line-dark: rgba(255, 255, 255, 0.12);

    --white: #FFFFFF;

    --font-display: 'Cairo', system-ui, sans-serif;
    --font-body:    'Tajawal', system-ui, sans-serif;
    --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

    --radius: 4px;
    --radius-lg: 8px;
    --maxw: 1160px;
    --shadow: 0 10px 30px rgba(12, 30, 46, 0.08);
    --shadow-lg: 0 20px 48px rgba(12, 30, 46, 0.14);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

.ltr-inline { direction: ltr; unicode-bidi: embed; display: inline-block; }

/* =========================================================
   NAVBAR
   ========================================================= */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(12, 30, 46, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-dark);
}
.nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 16px;
    color: var(--steel-900);
    background: var(--amber);
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: var(--radius);
    letter-spacing: 1px;
}
.brand-mark--lg { width: 54px; height: 54px; font-size: 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { color: var(--white); font-weight: 700; font-size: 16px; }
.brand-sub {
    color: var(--amber);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.5px;
    direction: ltr;
}

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
    color: #CFD8E0;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--white); }
.nav-links a.is-active { color: var(--amber); }
.nav-links a.nav-cta {
    background: var(--amber);
    color: var(--steel-900);
    font-weight: 700;
    padding: 8px 20px;
}
.nav-links a.nav-cta:hover { background: #f0ab3d; color: var(--steel-900); }
.nav-links a.nav-cta.is-active { color: var(--steel-900); }

.nav-toggle-input { display: none; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--white); transition: .3s; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 15px;
    padding: 13px 28px;
    border-radius: var(--radius);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform .15s, background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--amber); color: var(--steel-900); }
.btn-primary:hover { background: var(--amber-deep); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.35); color: var(--white); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn-small { padding: 9px 20px; font-size: 14px; background: var(--steel-800); color: var(--white); }
.btn-small:hover { background: var(--amber); color: var(--steel-900); }
.btn-yt { margin-top: 24px; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
    position: relative;
    background: linear-gradient(160deg, var(--steel-900) 0%, var(--steel-700) 100%);
    color: var(--white);
    overflow: hidden;
}
.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line-dark) 1px, transparent 1px),
        linear-gradient(90deg, var(--line-dark) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 90% 80% at 70% 30%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 70% 30%, #000 40%, transparent 100%);
}
.hero-inner {
    position: relative;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 110px 24px 120px;
}
.eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--amber);
    direction: ltr;
    text-align: right;
    margin-bottom: 22px;
}
.hero-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    line-height: 1.1;
    margin-bottom: 14px;
}
.hero-role {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 700;
    color: #E5EAEF;
    margin-bottom: 10px;
    max-width: 720px;
}
.hero-tagline {
    color: #A9B6C1;
    font-size: 1.05rem;
    max-width: 620px;
    margin-bottom: 36px;
    padding-right: 18px;
    border-right: 3px solid var(--amber);
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* =========================================================
   STATS BAND
   ========================================================= */
.stats-band { background: var(--steel-800); }
.stats-band--inline { background: var(--steel-800); }
.stats-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.stat {
    padding: 34px 20px;
    text-align: center;
    border-left: 1px solid var(--line-dark);
    color: var(--white);
}
.stat:last-child { border-left: none; }
.stat-value {
    display: block;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--amber);
    direction: ltr;
    line-height: 1;
    margin-bottom: 8px;
}
.stat-label { font-size: 14px; color: #B7C2CC; }

/* =========================================================
   SECTIONS (shared)
   ========================================================= */
.section { padding: 84px 0; }
.section--alt { background: var(--paper-2); }
.section-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section-eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--amber-deep);
    margin-bottom: 10px;
    text-transform: uppercase;
}
.section-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    color: var(--steel-900);
    margin-bottom: 8px;
}
.section-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.link-arrow {
    font-weight: 700;
    color: var(--amber-deep);
    font-size: 15px;
    white-space: nowrap;
}
.link-arrow::after { content: ' ↩'; font-family: var(--font-mono); }
.link-arrow:hover { color: var(--steel-800); }

/* about summary */
.about-summary-head { margin-bottom: 20px; }
.about-summary-text {
    font-size: 1.15rem;
    color: #2C3A45;
    max-width: 860px;
    margin-bottom: 20px;
}

/* =========================================================
   COURSE CARDS
   ========================================================= */
.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.course-grid--full { grid-template-columns: repeat(3, 1fr); }

.course-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 26px;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    position: relative;
}
.course-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 3px;
    background: var(--amber);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .25s;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--amber); }
.course-card:hover::before { transform: scaleX(1); }

.course-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.course-code {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--steel-900);
    background: var(--paper-2);
    padding: 4px 10px;
    border-radius: var(--radius);
    direction: ltr;
    align-self: flex-start;
    margin-bottom: 14px;
}
.course-card-top .course-code { margin-bottom: 0; }
.course-level { font-size: 13px; color: var(--muted); }

.course-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--steel-900);
    margin-bottom: 10px;
    line-height: 1.4;
}
.course-desc { color: var(--muted); font-size: 15px; flex-grow: 1; margin-bottom: 20px; }

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--muted);
}
.course-price {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--amber-deep);
    font-size: 15px;
}

.course-footer { padding-top: 18px; border-top: 1px solid var(--line); }
.course-footer-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.course-duration { font-size: 14px; color: var(--muted); }
.course-footer .btn-small { width: 100%; }

.courses-note {
    margin-top: 40px;
    padding: 20px 24px;
    background: var(--white);
    border-right: 4px solid var(--amber);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 15px;
}

/* =========================================================
   VIDEOS
   ========================================================= */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.video-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.video-frame { position: relative; padding-top: 56.25%; background: var(--steel-900); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-title {
    padding: 16px 18px;
    font-weight: 700;
    font-size: 15px;
    color: var(--steel-900);
}

/* =========================================================
   PAGE HEAD (inner pages)
   ========================================================= */
.page-head {
    background: linear-gradient(160deg, var(--steel-900) 0%, var(--steel-700) 100%);
    color: var(--white);
    position: relative;
}
.page-head-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 80px 24px 70px;
}
.page-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: 12px;
}
.page-sub { color: #A9B6C1; font-size: 1.1rem; max-width: 640px; }

/* =========================================================
   BIO / TIMELINE / CERTS
   ========================================================= */
.bio-text { font-size: 1.2rem; color: #2C3A45; max-width: 900px; }

.timeline { position: relative; padding-right: 28px; }
.timeline::before {
    content: '';
    position: absolute;
    top: 6px; bottom: 6px; right: 5px;
    width: 2px;
    background: var(--line);
}
.timeline-item { position: relative; padding-bottom: 34px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute;
    right: -28px; top: 6px;
    width: 12px; height: 12px;
    background: var(--amber);
    border: 3px solid var(--paper);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--amber);
}
.section--alt .timeline-dot { border-color: var(--paper-2); }
.timeline-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--steel-900);
    margin-bottom: 4px;
}
.timeline-meta { color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.timeline-note {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--amber-deep);
    direction: ltr;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 820px;
}
.cert-chip {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 22px;
    font-weight: 500;
    font-size: 16px;
    color: var(--steel-900);
}
.cert-tick {
    width: 26px; height: 26px;
    flex-shrink: 0;
    background: var(--amber);
    color: var(--steel-900);
    display: grid; place-items: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.contact-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 40px 28px;
    text-align: center;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--amber); }
.contact-icon { font-size: 34px; display: block; margin-bottom: 16px; }
.contact-label { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--steel-900); margin-bottom: 8px; }
.contact-value { color: var(--muted); font-size: 15px; direction: ltr; }

/* =========================================================
   CTA BAND
   ========================================================= */
.cta-band {
    background:
        linear-gradient(160deg, rgba(12,30,46,.96), rgba(27,58,82,.96)),
        var(--steel-900);
    position: relative;
}
.cta-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 72px 24px;
    text-align: center;
    color: var(--white);
}
.cta-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    margin-bottom: 12px;
}
.cta-text { color: #A9B6C1; font-size: 1.05rem; max-width: 560px; margin: 0 auto 28px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--steel-900); color: #B7C2CC; }
.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 60px 24px 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}
.footer-brand .brand-mark { margin-bottom: 16px; }
.footer-name { color: var(--white); font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 6px; }
.footer-role { font-size: 14px; max-width: 340px; }
.footer-head { color: var(--white); font-weight: 700; margin-bottom: 16px; font-size: 15px; }
.footer-col a { display: block; padding: 5px 0; font-size: 14px; transition: color .2s; }
.footer-col a:hover { color: var(--amber); }
.footer-base {
    border-top: 1px solid var(--line-dark);
    text-align: center;
    padding: 22px 24px;
    font-size: 13px;
    color: #7C8994;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
    .stat:nth-child(2) { border-left: none; }
    .course-grid, .course-grid--full, .video-grid, .contact-grid { grid-template-columns: repeat(2, 1fr); }
    .cert-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: 72px; right: 0; left: 0;
        background: var(--steel-900);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 16px 16px;
        border-bottom: 1px solid var(--line-dark);
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
    }
    .nav-toggle-input:checked ~ .nav-links { max-height: 360px; }
    .nav-links a { padding: 12px 8px; }
    .nav-links a.nav-cta { margin-top: 6px; text-align: center; }

    .hero-inner { padding: 70px 20px 80px; }
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
    .stat { padding: 24px 12px; }
    .course-grid, .course-grid--full, .video-grid, .contact-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .section { padding: 60px 0; }
    .section-head-row { flex-direction: column; align-items: flex-start; }
}

/* Accessibility */
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
