/* ------------------------------------------------------------------
   polish.css — professional polish layer, loaded last so it wins.
   Fills in the half-finished "redesign" hero styles and lifts the
   service/course cards and buttons into a consistent system.
   Brand tokens kept close to the existing yellow / green palette.
------------------------------------------------------------------ */
/* Tailwind Preflight is intentionally OFF (app.css is shared with the AdminLTE
   admin). Front-end pages still need border-box, otherwise padding (px-2) on
   fractional grid columns (w-7/12 etc.) is ADDED to the width — pushing a
   two-column row past 100% so the second column wraps below. Apply it to the
   front only, here. */
*, *::before, *::after { box-sizing: border-box; }

/* Preflight is off, so bare <button>s inherit the browser's default grey border
   and background (visible e.g. behind the header search icon). Reset them on the
   front; every styled button sets its own bg/border so nothing else changes. */
button { background-color: transparent; background-image: none; border: 0; font: inherit; color: inherit; }

/* Guard against spurious horizontal scroll on small screens (negative-margin
   grid gutters / oversized media bleeding past the viewport in RTL).
   overflow-x: clip (not hidden) so it does NOT create a scroll container and
   the sticky header keeps working. */
html, body { overflow-x: clip; }

/* Legacy style.css declares `.text-muted { color:#b5b5b7 !important }` (made for
   the old dark footer) which hijacks Tailwind's .text-muted everywhere and is
   too light on light backgrounds. Re-point it at the palette muted. */
.text-muted { color: var(--color-muted, #6b7280) !important; }

:root {
    /* aliased to the central palette (see layouts/theme.blade.php) so polish.css
       re-themes with the rest of the site from the 3 DB colours */
    --brand: var(--color-brand, #F5A623);
    --brand-dark: var(--color-brand-dark, #e0910f);
    --brand-green: var(--color-green, #009d85);
    --ink: var(--color-ink, #2f4858);
    --muted: var(--color-muted, #6b7280);
    --surface: #ffffff;
    --line: var(--color-line, #e9ecef);
    --radius: 14px;
    --shadow: 0 6px 20px rgba(17, 24, 39, .08);
    --shadow-hover: 0 12px 30px rgba(17, 24, 39, .14);
}

/* ---------- Hero: avatar stack (was rendering as full-width bars) ---------- */
.hero-stats-row { margin: 18px 0 6px; }
.hero-avatars { display: flex; align-items: center; gap: 12px; }
.avatar-stack { display: inline-flex; flex-direction: row-reverse; }
.avatar-stack .avatar-circle {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15);
    margin-inline-start: -10px;
}
.avatar-stack .avatar-circle:first-child { margin-inline-start: 0; }
.hero-stats-row .stat-text { display: flex; flex-direction: column; line-height: 1.25; }
.hero-stats-row .stat-label { color: var(--muted); font-size: 14px; }
.hero-stats-row .stat-number { color: var(--ink); font-weight: 800; font-size: 18px; }

/* ---------- Hero: buttons ---------- */
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.btn-hero-primary, .btn-hero-outline {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 26px; border-radius: 999px; font-weight: 700;
    text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-hero-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(245,166,35,.35); }
.btn-hero-primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-2px); }
.btn-hero-outline { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn-hero-outline:hover { border-color: var(--brand); color: var(--brand-dark); transform: translateY(-2px); }
.hero-description { color: var(--muted); line-height: 2; }

/* ---------- Tailwind's bare .container isn't centred/padded (Preflight off);
             fix it so page content never hugs / bleeds off the edge ---------- */
.container { width: 100%; margin-inline: auto; padding-inline: 1rem; }

/* ---------- Hero: section / card / heading ---------- */
.hero-section-v2 { padding: 32px 0 56px; }
.hero-card-v2 { max-width: 1180px; margin-inline: auto; }
.hero-content-v2 h1 {
    font-size: clamp(26px, 3.4vw, 44px); font-weight: 800; line-height: 1.4;
    color: var(--ink); margin: 0 0 18px;
}
.hero-content-v2 h1 .text-orange { color: var(--brand); }

/* ---------- Hero: image + floating stat badges ---------- */
.hero-image-col { margin-top: 8px; }
.hero-image-v2 { position: relative; padding: 26px 34px; }
.hero-main-image img { width: 100%; height: auto; display: block; }
.hero-floating-badge {
    position: absolute; z-index: 2; background: #fff; border-radius: 16px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, .12); padding: 10px 16px;
    display: flex; align-items: center; gap: 10px;
}
.badge-rating { top: 6px; inset-inline-start: 0; flex-direction: column; gap: 2px; }
.badge-courses { bottom: 74px; inset-inline-end: 0; flex-direction: column; text-align: center; }
.badge-success { bottom: 4px; inset-inline-start: 6px; }
.badge-stars { color: #FFB800; font-size: 12px; letter-spacing: 1px; }
.badge-score { font-weight: 800; font-size: 18px; color: var(--ink); line-height: 1; }
.badge-number { font-weight: 800; color: var(--ink); font-size: 15px; line-height: 1.1; }
.badge-label { font-size: 11px; color: var(--muted); }
.badge-sublabel { font-size: 10px; color: var(--muted); max-width: 120px; }
.badge-courses .badge-number { color: var(--brand-dark); font-size: 20px; }
.badge-icon {
    color: #fff; background: var(--brand-green); width: 34px; height: 34px; flex: 0 0 34px;
    border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px;
}

@media (max-width: 1023px) {
    .hero-image-v2 { max-width: 460px; margin-inline: auto; }
}
@media (max-width: 480px) {
    .hero-floating-badge { transform: scale(.82); }
    .badge-rating { inset-inline-start: -6px; }
    .badge-success { inset-inline-start: -6px; }
    .badge-courses { inset-inline-end: -6px; }
}

/* ---------- Service cards on the homepage ---------- */
.single_service_style {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 26px 22px; margin-bottom: 24px;
    transition: transform .18s ease, box-shadow .18s ease;
    display: flex; flex-direction: column;
}
.single_service_style:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.single_service_style img { max-height: 120px; width: auto; object-fit: contain; margin: 0 auto 6px; }
.single_service_style h3 { font-size: 20px; font-weight: 800; color: var(--ink); }
.single_service_style p { color: var(--muted); flex: 1; }
.single_service_style .btn-primary { margin-top: 14px; align-self: stretch; }

/* ---------- Buttons: one consistent shape ---------- */
.btn-primary {
    background: var(--brand); border-color: var(--brand); color: #fff;
    border-radius: 999px; font-weight: 700; padding: 10px 22px;
    transition: transform .15s ease, background .15s ease;
}
.btn-primary:hover, .btn-primary:focus { background: var(--brand-dark); border-color: var(--brand-dark); transform: translateY(-1px); }

/* ---------- Course cards (course list card) ---------- */
.course-card, .card {
    border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.course-card:hover, .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card img.card-img-top { width: 100%; height: 180px; object-fit: cover; }

/* ---------- Blog / trainer thumbs sizing ---------- */
.blog-card-img-v2 img, .blog-card-v2 img { width: 100%; height: 190px; object-fit: cover; border-radius: 12px 12px 0 0; }

/* ---------- Section rhythm ---------- */
section { scroll-margin-top: 90px; }

/* ---------- Course card (redesign "v2" markup that lacked CSS) ---------- */
.course-card-v2 {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
    height: 100%; display: flex; flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
}
.course-card-v2:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.course-card-img-v2 { position: relative; }
.course-card-img-v2 img { width: 100%; height: 190px; object-fit: cover; display: block; }
.course-badge-v2 {
    position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2;
    background: var(--brand); color: #fff; font-size: 13px; font-weight: 700;
    padding: 4px 12px; border-radius: 999px; box-shadow: 0 4px 10px rgba(245,166,35,.35);
}
.course-card-body-v2 { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.course-title-v2 { font-size: 19px; font-weight: 800; color: var(--ink); margin: 0 0 10px; }
.course-features-v2 { list-style: none; padding: 0; margin: 6px 0 14px; }
.course-features-v2 li { color: var(--muted); font-size: 14px; padding: 3px 0; }
.course-features-v2 li i { color: var(--brand-green); margin-inline-end: 6px; }
.course-progress-header { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.progress-bar-bg { background: #eef1f4; border-radius: 999px; height: 8px; overflow: hidden; }
.progress-bar-fill { background: var(--brand-green); height: 100%; border-radius: 999px; }
.btn-course-v2 {
    background: var(--brand); color: #fff; border-radius: 999px; font-weight: 700;
    padding: 11px 18px; text-decoration: none; transition: background .15s ease, transform .15s ease;
}
.btn-course-v2:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }

/* ---------- Header search overlay (was always visible: no base CSS) ---------- */
.search-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 1050;
    background: rgba(17, 24, 39, .55); backdrop-filter: blur(2px);
    align-items: flex-start; justify-content: center;
}
.search-overlay.active { display: flex; }
.search-overlay-inner {
    background: #fff; margin-top: 12vh; width: min(680px, 92vw);
    border-radius: var(--radius); box-shadow: var(--shadow-hover);
    padding: 22px; position: relative;
}
.search-overlay-inner form { display: flex; gap: 10px; }
.search-overlay .search-input {
    flex: 1; border: 1px solid var(--line); border-radius: 999px;
    padding: 12px 18px; font-size: 16px;
}
.search-overlay .search-input:focus { outline: none; border-color: var(--brand); }
.search-overlay .search-submit-btn {
    background: var(--brand); color: #fff; border: none; border-radius: 999px;
    width: 48px; height: 48px; cursor: pointer;
}
.search-overlay .search-close-btn {
    position: absolute; top: 10px; inset-inline-end: 14px;
    background: none; border: none; font-size: 20px; color: var(--muted); cursor: pointer;
}
