/* ============================================================================
   Give River — public catalog design layer ("River Runs")
   Loaded LAST, on top of the Front theme, so it owns the public UI look.
   Soft-gradient, calm, water/river themed. Fully responsive.
   ==========================================================================*/

:root {
  --gr-ink:        #0e2440;   /* deep navy text            */
  --gr-ink-soft:   #4d6182;   /* muted body text           */
  --gr-primary:    #2b6cff;   /* river blue                */
  --gr-primary-d:  #1f52cc;   /* darker blue (hover)       */
  --gr-cyan:       #22b8cf;   /* river cyan                */
  --gr-teal:       #14b8a6;   /* accent teal               */
  --gr-bg:         #ffffff;
  --gr-bg-soft:    #f2f8ff;   /* pale water background     */
  --gr-bg-soft-2:  #eaf3ff;
  --gr-line:       #e4edf7;   /* hairline borders          */
  --gr-white-70:   rgba(255,255,255,.78);

  --gr-grad:       linear-gradient(120deg, #2b6cff 0%, #22b8cf 62%, #38d2c4 100%);
  --gr-grad-soft:  linear-gradient(160deg, #f2f8ff 0%, #eaf6ff 55%, #e9fbfb 100%);

  --gr-radius:     18px;
  --gr-radius-sm:  12px;
  --gr-shadow:     0 18px 40px -20px rgba(16,52,105,.35);
  --gr-shadow-sm:  0 10px 24px -14px rgba(16,52,105,.30);
  --gr-font:       'Inter', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --gr-font-head:  'Poppins', var(--gr-font);
}

/* ---- Base ---------------------------------------------------------------- */
body {
  font-family: var(--gr-font);
  color: var(--gr-ink);
  background: var(--gr-bg);
  -webkit-font-smoothing: antialiased;
}
.gr-scope h1,.gr-scope h2,.gr-scope h3,.gr-scope h4,
.gr-section h1,.gr-section h2,.gr-section h3,.gr-section h4 {
  font-family: var(--gr-font-head);
  color: var(--gr-ink);
  font-weight: 700;
  letter-spacing: -.01em;
}
.gr-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
/* Full-bleed container for the catalog — thumbnails span the browser width */
.gr-wrap--wide { max-width: none; padding: 0 clamp(20px, 4vw, 64px); }
.gr-section { padding: 64px 0; }
.gr-section--tight { padding: 40px 0; }
.gr-muted { color: var(--gr-ink-soft); }
.gr-center { text-align: center; }
a { color: var(--gr-primary); }

/* ---- Buttons ------------------------------------------------------------- */
.gr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--gr-font-head);
  font-weight: 600; font-size: .98rem; line-height: 1;
  padding: 14px 26px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.gr-btn:hover { transform: translateY(-2px); text-decoration: none; }
.gr-btn--primary { background: var(--gr-grad); color: #fff; box-shadow: var(--gr-shadow-sm); }
.gr-btn--primary:hover { color: #fff; box-shadow: var(--gr-shadow); }
.gr-btn--light { background: #fff; color: var(--gr-primary); box-shadow: var(--gr-shadow-sm); }
.gr-btn--light:hover { color: var(--gr-primary-d); }
.gr-btn--ghost { background: transparent; color: var(--gr-primary); border-color: var(--gr-line); }
.gr-btn--ghost:hover { border-color: var(--gr-primary); color: var(--gr-primary); }
.gr-btn--block { display: flex; width: 100%; }
.gr-btn--lg { padding: 16px 32px; font-size: 1.05rem; }

/* ---- Pills / badges ------------------------------------------------------ */
.gr-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  background: var(--gr-bg-soft-2); color: var(--gr-primary);
}
.gr-pill--teal { background: rgba(20,184,166,.12); color: var(--gr-teal); }
.gr-pill--gold { background: rgba(245,181,54,.16); color: #b7791f; }
.gr-pill--free { background: rgba(20,184,166,.14); color: var(--gr-teal); }
.gr-price { font-family: var(--gr-font-head); font-weight: 700; color: var(--gr-ink); }
.gr-price del { color: #9db0c8; font-weight: 500; margin-right: 6px; }

/* ---- Hero ---------------------------------------------------------------- */
.gr-hero {
  position: relative; overflow: hidden;
  background: var(--gr-grad); color: #fff;
}
.gr-hero::after {
  content: ""; position: absolute; right: -8%; bottom: -40%;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.28), rgba(255,255,255,0) 70%);
  pointer-events: none;
}
.gr-hero__inner { position: relative; z-index: 1; padding: 84px 0 96px; }
.gr-hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.08; margin: 0 0 16px; }
.gr-hero p { color: var(--gr-white-70); font-size: 1.18rem; max-width: 34em; margin: 0 0 28px; }
.gr-hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.25);
  padding: 7px 15px; border-radius: 999px; font-size: .82rem; font-weight: 600; margin-bottom: 20px;
}
.gr-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.gr-hero__stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 40px; }
.gr-hero__stat b { display: block; font-family: var(--gr-font-head); font-size: 1.7rem; color: #fff; }
.gr-hero__stat span { color: var(--gr-white-70); font-size: .92rem; }

/* search field on gradient */
.gr-search { display: flex; max-width: 540px; background: #fff; border-radius: 999px; padding: 6px; box-shadow: var(--gr-shadow); }
.gr-search input { flex: 1; border: 0; background: transparent; padding: 12px 18px; font-size: 1rem; color: var(--gr-ink); outline: none; min-width: 0; }
.gr-search button { border: 0; border-radius: 999px; background: var(--gr-grad); color: #fff; padding: 0 22px; font-weight: 600; cursor: pointer; }

/* ---- Section headings ---------------------------------------------------- */
.gr-head { text-align: center; max-width: 40em; margin: 0 auto 44px; }
.gr-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 12px; }
.gr-head p { color: var(--gr-ink-soft); font-size: 1.05rem; margin: 0; }
.gr-head--left { text-align: left; margin-left: 0; }

/* ---- Grid ---------------------------------------------------------------- */
.gr-grid { display: grid; gap: 26px; grid-template-columns: repeat(3, 1fr); }
.gr-grid--2 { grid-template-columns: repeat(2, 1fr); }
.gr-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 992px) { .gr-grid, .gr-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .gr-grid, .gr-grid--2, .gr-grid--4 { grid-template-columns: 1fr; } }
/* Catalog grid: as many full-width columns as fit, min ~250px each */
.gr-grid--catalog { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
@media (max-width: 560px) { .gr-grid--catalog { grid-template-columns: 1fr; } }

/* ---- Course card --------------------------------------------------------- */
.gr-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--gr-line); border-radius: var(--gr-radius);
  overflow: hidden; box-shadow: var(--gr-shadow-sm); transition: transform .18s ease, box-shadow .25s ease;
}
.gr-card:hover { transform: translateY(-4px); box-shadow: var(--gr-shadow); }
.gr-card__media { position: relative; aspect-ratio: 16/10; background: var(--gr-bg-soft); overflow: hidden; }
.gr-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gr-card__tag { position: absolute; top: 12px; left: 12px; }
.gr-card__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.gr-card__cat { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--gr-primary); margin-bottom: 8px; }
.gr-card__cat a { color: inherit; }
.gr-card__title { font-family: var(--gr-font-head); font-size: 1.12rem; font-weight: 600; line-height: 1.3; margin: 0 0 10px; }
.gr-card__title a { color: var(--gr-ink); }
.gr-card__title a:hover { color: var(--gr-primary); text-decoration: none; }
.gr-card__desc { color: var(--gr-ink-soft); font-size: .93rem; line-height: 1.55; margin: 0 0 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gr-card__meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--gr-ink-soft); font-size: .84rem; margin-bottom: 16px; }
.gr-card__meta i { color: var(--gr-cyan); margin-right: 5px; }
.gr-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 16px; border-top: 1px solid var(--gr-line); }
.gr-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--gr-line); }
.gr-card__author { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--gr-ink-soft); }
.gr-stars { display: inline-flex; gap: 2px; }
.gr-stars img { width: 13px; height: 13px; }
.gr-card__rating { font-size: .82rem; color: var(--gr-ink-soft); }

/* list variant */
.gr-list { display: flex; flex-direction: column; gap: 20px; }
.gr-card--row { flex-direction: row; }
.gr-card--row .gr-card__media { width: 300px; flex: none; aspect-ratio: auto; }
.gr-card--row .gr-card__body { padding: 22px 24px; }
@media (max-width: 720px) { .gr-card--row { flex-direction: column; } .gr-card--row .gr-card__media { width: 100%; aspect-ratio: 16/10; } }

/* ---- Category tiles ------------------------------------------------------ */
.gr-cat {
  position: relative; display: flex; align-items: flex-end; min-height: 190px;
  border-radius: var(--gr-radius); overflow: hidden; color: #fff; text-decoration: none;
  background: var(--gr-grad); box-shadow: var(--gr-shadow-sm); transition: transform .18s ease, box-shadow .25s ease;
}
.gr-cat:hover { transform: translateY(-4px); box-shadow: var(--gr-shadow); color: #fff; text-decoration: none; }
.gr-cat__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.gr-cat::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,36,64,0) 20%, rgba(11,36,64,.72) 100%); }
.gr-cat__body { position: relative; z-index: 1; padding: 20px; width: 100%; }
.gr-cat__body h3 { color: #fff; margin: 0 0 4px; font-size: 1.2rem; }
.gr-cat__count { color: var(--gr-white-70); font-size: .88rem; font-weight: 600; }

/* ---- "How it works" band ------------------------------------------------- */
.gr-band { background: var(--gr-grad-soft); }
.gr-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; }
@media (max-width: 760px){ .gr-steps { grid-template-columns: 1fr; } }
.gr-step { background: #fff; border: 1px solid var(--gr-line); border-radius: var(--gr-radius); padding: 28px; box-shadow: var(--gr-shadow-sm); }
.gr-step__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--gr-grad); font-size: 1.25rem; margin-bottom: 16px; }
.gr-step h3 { font-size: 1.12rem; margin: 0 0 8px; }
.gr-step p { color: var(--gr-ink-soft); margin: 0; font-size: .95rem; line-height: 1.55; }

/* ---- CTA ----------------------------------------------------------------- */
.gr-cta { background: var(--gr-grad); border-radius: 26px; color: #fff; padding: 54px 40px; text-align: center; position: relative; overflow: hidden; }
.gr-cta h2 { color: #fff; font-size: clamp(1.6rem,3vw,2.3rem); margin: 0 0 12px; }
.gr-cta p { color: var(--gr-white-70); font-size: 1.1rem; margin: 0 0 26px; }

/* ---- Catalog page -------------------------------------------------------- */
.gr-catalog { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px){ .gr-catalog { grid-template-columns: 1fr; } }
.gr-side { position: sticky; top: 90px; }
.gr-side h4 { font-size: 1rem; margin: 0 0 10px; }
.gr-side__group { margin-bottom: 26px; }
.gr-side a { display: block; color: var(--gr-ink-soft); padding: 5px 0; font-size: .93rem; text-decoration: none; }
.gr-side a:hover, .gr-side a.is-active { color: var(--gr-primary); }
.gr-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding-bottom: 18px; margin-bottom: 28px; border-bottom: 1px solid var(--gr-line); }
.gr-toolbar .gr-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.gr-toolbar select {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--gr-line); background: #fff; color: var(--gr-ink);
  border-radius: 999px; padding: 9px 34px 9px 16px; font-size: .9rem; font-weight: 500; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234d6182' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.gr-toolbar select:focus { outline: none; border-color: var(--gr-primary); }
.gr-layout-toggle a { color: #9db0c8; padding: 6px; font-size: 1rem; }
.gr-layout-toggle a.is-active { color: var(--gr-primary); }

.gr-empty { text-align: center; padding: 60px 20px; color: var(--gr-ink-soft); }
.gr-empty i { font-size: 2.4rem; color: var(--gr-cyan); margin-bottom: 14px; display: block; }

/* pagination (Front theme uses <ul class="pagination">) */
.gr-pager .pagination { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 40px 0 0; justify-content: center; }
.gr-pager .pagination a, .gr-pager .pagination strong, .gr-pager .pagination .current {
  display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center;
  padding: 0 12px; border-radius: 10px; border: 1px solid var(--gr-line); color: var(--gr-ink); text-decoration: none; font-weight: 600;
}
.gr-pager .pagination a:hover { border-color: var(--gr-primary); color: var(--gr-primary); }
.gr-pager .pagination strong, .gr-pager .pagination .current { background: var(--gr-grad); color: #fff; border-color: transparent; }

/* ---- Course detail ------------------------------------------------------- */
.gr-detail-hero { position: relative; background: var(--gr-grad); color: #fff; overflow: hidden; }
.gr-detail-hero::after { content:""; position:absolute; right:-6%; top:-40%; width:460px; height:460px; border-radius:50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.25), rgba(255,255,255,0) 70%); }
.gr-detail-hero__inner { position: relative; z-index: 1; padding: 66px 0 130px; max-width: 720px; }
.gr-detail-hero h1 { color:#fff; font-size: clamp(1.8rem,3.6vw,2.7rem); line-height:1.14; margin: 12px 0; }
.gr-detail-hero p { color: var(--gr-white-70); font-size: 1.1rem; margin: 0 0 18px; }
.gr-detail-hero__badges { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:16px; }
.gr-detail-hero__badges .gr-pill { background: rgba(255,255,255,.18); color:#fff; }
.gr-detail-meta { display:flex; flex-wrap:wrap; gap:20px; align-items:center; color:var(--gr-white-70); font-size:.92rem; }
.gr-detail-meta b { color:#fff; }
.gr-detail-meta .gr-stars img { width:15px; height:15px; }

.gr-detail-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
@media (max-width: 940px){ .gr-detail-wrap { grid-template-columns: 1fr; } }

.gr-enroll-card {
  background:#fff; border:1px solid var(--gr-line); border-radius: var(--gr-radius); box-shadow: var(--gr-shadow);
  overflow: hidden; margin-top: -96px; position: relative; z-index: 3;
}
@media (max-width: 940px){ .gr-enroll-card { margin-top: -96px; } }
.gr-enroll-card__media { position: relative; aspect-ratio: 16/10; background: var(--gr-bg-soft); }
.gr-enroll-card__media img { width:100%; height:100%; object-fit: cover; }
.gr-enroll-card__play { position:absolute; inset:0; display:grid; place-items:center; color:#fff; text-decoration:none; background:rgba(11,36,64,.28); }
.gr-enroll-card__play span.ico { width:60px; height:60px; border-radius:50%; background:rgba(255,255,255,.92); color:var(--gr-primary); display:grid; place-items:center; font-size:1.2rem; }
.gr-enroll-card__body { padding: 22px; }
.gr-enroll-card__price { font-family: var(--gr-font-head); font-size: 1.9rem; font-weight: 700; margin-bottom: 16px; }
.gr-enroll-card__note { text-align:center; font-size:.82rem; color:var(--gr-ink-soft); margin-top:12px; }
.gr-includes { list-style:none; padding:0; margin: 18px 0 0; }
.gr-includes li { display:flex; gap:12px; align-items:flex-start; padding:8px 0; color:var(--gr-ink-soft); font-size:.94rem; border-top:1px solid var(--gr-line); }
.gr-includes li:first-child { border-top:0; }
.gr-includes i { color: var(--gr-cyan); width: 20px; text-align:center; margin-top:2px; }

.gr-detail-body h2 { font-size: 1.4rem; margin: 0 0 16px; }
.gr-detail-body .gr-block { background:#fff; border:1px solid var(--gr-line); border-radius: var(--gr-radius); padding: 26px 28px; margin-bottom: 24px; box-shadow: var(--gr-shadow-sm); }
.gr-outcomes { list-style:none; padding:0; margin:0; display:grid; grid-template-columns:1fr 1fr; gap:12px 26px; }
@media (max-width:620px){ .gr-outcomes { grid-template-columns:1fr; } }
.gr-outcomes li { display:flex; gap:10px; color:var(--gr-ink-soft); line-height:1.5; }
.gr-outcomes i { color: var(--gr-teal); margin-top:4px; }
.gr-curriculum details { border:1px solid var(--gr-line); border-radius: var(--gr-radius-sm); margin-bottom:10px; overflow:hidden; }
.gr-curriculum summary { cursor:pointer; padding:16px 18px; font-weight:600; font-family:var(--gr-font-head); background:var(--gr-bg-soft); list-style:none; display:flex; justify-content:space-between; align-items:center; }
.gr-curriculum summary::-webkit-details-marker { display:none; }
.gr-lesson { display:flex; gap:10px; align-items:center; padding:12px 18px; border-top:1px solid var(--gr-line); color:var(--gr-ink-soft); font-size:.93rem; }
.gr-lesson i { color: var(--gr-cyan); }

/* ---- Header tweaks (keep vendor nav functional, restyle) ----------------- */
#header .header-section { background: #fff !important; box-shadow: 0 1px 0 var(--gr-line); }
#header .navbar-brand img { max-height: 46px; width: auto; }
.gr-navlink { font-family: var(--gr-font-head); font-weight: 600; color: var(--gr-ink) !important; }
.gr-signin { display:inline-flex; align-items:center; gap:.4rem; }

/* Header search box (reuse Front markup) */
#header .input-group.input-group-merge .form-control { border-radius: 999px 0 0 999px; border-color: var(--gr-line); }
#header .input-group.input-group-merge .input-group-text { border-radius: 0 999px 999px 0; border-color: var(--gr-line); background:#fff; }

/* ---- Footer -------------------------------------------------------------- */
.gr-footer { background: var(--gr-ink); color: #c7d6ea; }
.gr-footer a { color: #c7d6ea; text-decoration: none; }
.gr-footer a:hover { color: #fff; }
.gr-footer__grid { display:grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 60px 0 40px; }
@media (max-width: 820px){ .gr-footer__grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 480px){ .gr-footer__grid { grid-template-columns: 1fr; } }
.gr-footer h5 { color:#fff; font-family:var(--gr-font-head); font-size:.95rem; letter-spacing:.03em; text-transform:uppercase; margin:0 0 16px; }
.gr-footer ul { list-style:none; padding:0; margin:0; }
.gr-footer li { margin-bottom: 10px; font-size:.94rem; }
.gr-footer__brand img { max-height: 54px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.gr-footer__brand p { color:#9fb3ce; font-size:.94rem; line-height:1.6; max-width: 26em; }
.gr-footer__bar { border-top:1px solid rgba(255,255,255,.1); padding: 22px 0; display:flex; flex-wrap:wrap; gap:14px; justify-content:space-between; align-items:center; font-size:.86rem; color:#8ba3c2; }
.gr-footer__social a { display:inline-grid; place-items:center; width:36px; height:36px; border-radius:50%; background:rgba(255,255,255,.08); margin-left:8px; }
.gr-footer__social a:hover { background: var(--gr-primary); }

/* ---- Hide legacy public commerce elements (safety net) ------------------- */
#header .fa-shopping-cart, #header .fa-heart { }

/* utility */
.gr-mt-0 { margin-top: 0 !important; }
.gr-hide { display: none !important; }
