/* Mega-menu, page sections and the course template. Colours come from the CSS variables in _Layout. */

/* ---------- Mega-menu ---------- */
.mega-dropdown { position: static; }
.mega-menu {
    width: min(1100px, calc(100vw - 2rem));
    left: 50% !important;
    transform: translateX(-50%);
    padding: 0;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .18);
    overflow: hidden;
}
.mega-menu.show { display: flex; }
.mega-cats {
    width: 250px;
    flex-shrink: 0;
    background: #f1f5ff;
    padding: .75rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    max-height: 70vh;
    overflow: auto;
}
.mega-cat {
    display: flex;
    align-items: center;
    gap: .6rem;
    border: 0;
    background: transparent;
    text-align: left;
    padding: .55rem .75rem;
    border-radius: 10px;
    font-weight: 600;
    color: #1f2a44;
}
.mega-cat.active, .mega-cat:hover { background: var(--brand-primary); color: #fff; }
.mega-all { margin-top: auto; padding: .6rem .75rem; font-weight: 600; text-decoration: none; }
.mega-panels { flex: 1; padding: 1rem; max-height: 70vh; overflow: auto; }
.mega-panel { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.mega-panel.active { display: grid; }
.mega-course {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .75rem;
    border-radius: 12px;
    background: #f8fafc;
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
}
.mega-course:hover { border-color: var(--brand-primary); background: #fff; }
.mega-course-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--brand-dark);
    color: #fff;
    font-weight: 800;
    overflow: hidden;
}
.mega-course-icon img { width: 100%; height: 100%; object-fit: cover; }
.mega-course-title { display: block; font-weight: 700; font-size: .9rem; color: var(--brand-dark); }
.mega-course-tag { display: block; font-size: .78rem; color: #64748b; }

@media (max-width: 991.98px) {
    .mega-menu { width: 100%; transform: none; left: 0 !important; box-shadow: none; }
    .mega-menu.show { flex-direction: column; }
    .mega-cats { width: 100%; flex-direction: row; flex-wrap: wrap; max-height: none; }
    .mega-all { margin-top: 0; }
    .mega-panel { grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-alt { background: #f6f8fc; }
.section-head { max-width: 720px; margin-bottom: 2rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-sub { color: #64748b; font-size: 1.05rem; }

.course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .05);
    transition: transform .15s, box-shadow .15s;
}
.course-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15, 23, 42, .1); }
.course-card-media {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--brand-dark), var(--brand-primary));
    color: #fff;
    display: grid;
    place-items: center;
    padding: 1rem;
    text-align: center;
    font-weight: 800;
    font-size: 1.15rem;
}
.course-card-media.has-image { padding: 0; }
.course-card-media img { width: 100%; height: 100%; object-fit: cover; }
.course-card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.course-card-title { font-weight: 800; font-size: 1.05rem; color: var(--brand-dark); margin: 0; }
.course-card-meta { font-size: .85rem; color: #64748b; }
.course-card-actions { margin-top: auto; display: flex; gap: .5rem; padding-top: .5rem; }

.stat-tile { text-align: center; padding: 1.5rem 1rem; border-radius: 16px; background: #fff; border: 1px solid #e5e7eb; height: 100%; }
.stat-value { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; color: var(--brand-primary); line-height: 1.1; }
.stat-label { color: #64748b; margin-top: .25rem; }

.feature-card { padding: 1.5rem; border-radius: 16px; background: #fff; border: 1px solid #e5e7eb; height: 100%; }
.feature-card h3 { font-size: 1.1rem; font-weight: 800; color: var(--brand-dark); }
.feature-card p { margin: 0; color: #475569; }
.feature-dot { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-accent); opacity: .9; margin-bottom: 1rem; }

.step-card { padding: 1.5rem; border-radius: 16px; background: #fff; border: 1px solid #e5e7eb; height: 100%; }
.step-num { font-size: 2rem; font-weight: 800; color: var(--brand-accent); line-height: 1; }
.step-card h3 { font-size: 1.1rem; font-weight: 800; margin: .5rem 0; color: var(--brand-dark); }
.step-card p { margin: 0; color: #475569; }

.faq .accordion-button { font-weight: 600; }
.faq .accordion-button:not(.collapsed) { color: var(--brand-dark); background: #eef2ff; }

.cta-banner {
    border-radius: 20px;
    padding: 2.5rem;
    background: linear-gradient(120deg, var(--brand-dark), var(--brand-primary));
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.cta-banner h2 { font-weight: 800; margin: 0 0 .25rem; }
.cta-banner p { margin: 0; opacity: .85; }

.contact-card { display: block; padding: 1.5rem; border-radius: 16px; background: #fff; border: 1px solid #e5e7eb; height: 100%; text-decoration: none; color: inherit; }
.contact-card:hover { border-color: var(--brand-primary); }
.contact-card h3 { font-size: 1.1rem; font-weight: 800; color: var(--brand-dark); }

.branch-card { padding: 1.25rem; border-radius: 16px; background: #fff; border: 1px solid #e5e7eb; height: 100%; }
.branch-card h3 { font-size: 1.1rem; font-weight: 800; color: var(--brand-dark); }
.branch-card iframe { width: 100%; height: 200px; border: 0; border-radius: 12px; margin-top: .75rem; }

/* ---------- Course page ---------- */
.course-hero { background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .08), transparent 40%), var(--brand-dark); color: #fff; padding: 4.5rem 0 3.5rem; }
.course-hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; line-height: 1.15; }
.course-hero .lead { opacity: .85; }
.course-facts { display: flex; flex-wrap: wrap; gap: 1.75rem; margin-top: 2rem; }
.course-fact strong { display: block; font-size: 1rem; }
.course-fact span { font-size: .8rem; opacity: .7; }
.course-hero-media { border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, .06); aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; text-align: center; padding: 1rem; }
.course-hero-media.has-image { padding: 0; }
.course-hero-media img { width: 100%; height: 100%; object-fit: cover; }

.course-tabs { position: sticky; top: 70px; z-index: 5; background: #fff; border-bottom: 1px solid #e5e7eb; }
.course-tabs .nav { flex-wrap: nowrap; overflow-x: auto; }
.course-tabs .nav-link { color: #475569; font-weight: 600; white-space: nowrap; }

.course-block { padding: 2.25rem 0; border-bottom: 1px solid #eef0f4; scroll-margin-top: 130px; }
.course-block:last-child { border-bottom: 0; }
.course-block h2 { font-size: 1.5rem; font-weight: 800; color: var(--brand-dark); margin-bottom: 1rem; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.check-list li { position: relative; padding-left: 1.75rem; }
.check-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--brand-accent); font-weight: 800; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.mini-card { padding: 1.1rem; border-radius: 14px; border: 1px solid #e5e7eb; background: #fff; }
.mini-card h3 { font-size: 1rem; font-weight: 800; color: var(--brand-dark); margin-bottom: .35rem; }
.mini-card p { margin: 0; color: #475569; font-size: .92rem; }
.trainer-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #e2e8f0; display: grid; place-items: center; font-weight: 800; color: var(--brand-dark); flex-shrink: 0; }

.side-card { position: sticky; top: 140px; border-radius: 18px; border: 1px solid #e5e7eb; padding: 1.5rem; background: #fff; box-shadow: 0 10px 30px rgba(15, 23, 42, .08); }
.side-card h2 { font-size: 1.2rem; font-weight: 800; color: var(--brand-dark); }

.certificate-preview { border-radius: 18px; padding: 2rem; border: 8px double #e2e8f0; background: linear-gradient(135deg, #fffdf7, #fff); text-align: center; }
.certificate-preview .cert-title { font-size: 1.6rem; font-weight: 800; color: var(--brand-dark); }

.category-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.category-pills a { padding: .45rem 1rem; border-radius: 999px; border: 1px solid #e2e8f0; text-decoration: none; color: #334155; font-weight: 600; }
.category-pills a.active, .category-pills a:hover { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

/* ---------- Lead forms & popup ---------- */
.lead-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lead-form { position: relative; }
.lead-form-title { font-size: 1.25rem; font-weight: 800; color: var(--brand-dark); margin-bottom: .25rem; }
.lead-form-sub { color: #64748b; font-size: .9rem; margin-bottom: 1rem; }
.popup-content { border: 0; border-radius: 20px; overflow: hidden; }
.popup-pitch { background: linear-gradient(140deg, var(--brand-dark), var(--brand-primary)); color: #fff; padding: 2.25rem; align-items: center; }
.popup-title { font-size: 1.9rem; font-weight: 800; line-height: 1.2; margin: .75rem 0; }
.popup-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1.25rem; }
.popup-stat { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px; padding: .6rem; text-align: center; }
.popup-stat strong { display: block; font-size: 1.15rem; }
.popup-stat span { font-size: .72rem; opacity: .8; }
.popup-chip { font-size: .75rem; padding: .25rem .6rem; border-radius: 999px; background: rgba(255, 255, 255, .15); }

/* ---------- Social proof ---------- */
.placement-card, .review-card { padding: 1.25rem; border-radius: 16px; background: #fff; border: 1px solid #e5e7eb; height: 100%; }
.placement-card h3 { font-size: 1rem; font-weight: 800; color: var(--brand-dark); margin: 0; }
.placement-meta { display: grid; gap: .25rem; margin: 1rem 0 .5rem; font-size: .88rem; }
.placement-meta div { display: flex; justify-content: space-between; gap: .5rem; }
.placement-meta dt { font-weight: 500; color: #64748b; }
.placement-meta dd { margin: 0; font-weight: 700; text-align: right; }
.review-stars { color: #f59e0b; letter-spacing: 2px; margin-bottom: .5rem; }
.logo-marquee { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logo-track { display: flex; gap: 1rem; padding: 0; margin: 0 1rem 0 0; list-style: none; flex-shrink: 0; animation: marquee 40s linear infinite; }
.logo-marquee:hover .logo-track { animation-play-state: paused; }
.logo-tile { width: 160px; height: 72px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; display: grid; place-items: center; padding: .75rem; font-weight: 700; color: #475569; text-align: center; }
.logo-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .logo-track { animation: none; } .logo-marquee { flex-wrap: wrap; } }
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; vertical-align: middle; animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.placement-toast { position: fixed; left: 1rem; bottom: 1rem; z-index: 1040; display: flex; align-items: center; gap: .5rem; max-width: 320px; padding: .75rem 1rem; border-radius: 14px; background: #fff; box-shadow: 0 12px 30px rgba(15, 23, 42, .18); font-size: .88rem; font-weight: 600; }
.batch-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: #64748b; }
.placement-toast[hidden] { display: none; }

/* ---------- Career quiz ---------- */
.quiz-progress { height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.quiz-progress-bar { height: 100%; width: 0; background: var(--brand-accent); transition: width .3s; }
.quiz-step { border: 0; padding: 0; margin: 1.5rem 0 0; }
.quiz-question { font-size: 1.5rem; font-weight: 800; color: var(--brand-dark); margin-bottom: 1rem; }
.quiz-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.quiz-option { display: flex; align-items: center; gap: .75rem; padding: 1rem; border: 2px solid #e2e8f0; border-radius: 14px; cursor: pointer; font-weight: 600; background: #fff; }
.quiz-option:hover { border-color: var(--brand-primary); }
.quiz-option:has(input:checked) { border-color: var(--brand-primary); background: #eef2ff; }
.quiz-option input { accent-color: var(--brand-primary); }
.quiz:not(.js-quiz) .quiz-nav { display: none !important; }

/* ---------- Blog & breadcrumbs ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 0; font-size: .85rem; color: #64748b; }
.crumbs li + li::before { content: "\203A"; margin-right: .35rem; }
.crumbs a { color: #475569; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.blog-card { height: 100%; border-radius: 16px; overflow: hidden; border: 1px solid #e5e7eb; background: #fff; display: flex; flex-direction: column; }
.blog-card-media { aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 1rem; text-align: center; font-weight: 800; color: #fff; text-decoration: none; background: linear-gradient(135deg, var(--brand-primary), var(--brand-dark)); }
.blog-card-media.has-image { padding: 0; }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-body { padding: 1rem 1.1rem 1.25rem; }
.blog-card-title { font-size: 1.1rem; font-weight: 800; margin: .35rem 0; }
.blog-card-title a { color: var(--brand-dark); text-decoration: none; }
.blog-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800; color: var(--brand-dark); }
.blog-toc { border: 1px solid #e5e7eb; border-radius: 14px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; background: #f8fafc; }
.blog-toc ol { margin: 0; padding-left: 1.1rem; }
.blog-body { font-size: 1.05rem; line-height: 1.75; }
.blog-body h2 { font-weight: 800; color: var(--brand-dark); margin-top: 2rem; scroll-margin-top: 90px; }
.blog-body h3 { font-weight: 700; margin-top: 1.5rem; scroll-margin-top: 90px; }
.blog-sidebar { position: sticky; top: 100px; }

/* ---------- Receipts & certificates ---------- */
.receipt { border: 1px solid #e5e7eb; border-radius: 16px; padding: 2rem; background: #fff; }
.verify-ok { border: 2px solid #16a34a; border-radius: 16px; padding: 1.5rem; background: #f0fdf4; }
@media print { .site-header, .site-footer, .floating-contact, .no-print, .placement-toast, #entryPopup { display: none !important; } .receipt { border: 0; padding: 0; } }
