:root {
  --vv-blue:       #1B4FBF;
  --vv-sand:       #F5EFE0;
  --vv-dune:       #EBE2CE;
  --vv-sunshine:   #F2D04E;
  --vv-terracotta: #C1440E;
  --vv-ink:        #1A1A1A;
}

/* ─── Tab system ─────────────────────────────────────────────────────────── */

.vv-tab-panel {
  display: none;
}

.vv-tab-panel.active {
  display: block;
}

.vv-tab-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 2px solid var(--vv-ink);
  margin-bottom: 0;
  overflow: hidden;
}

.vv-tab-btn {
  background-color: var(--vv-sand);
  border: 2px solid var(--vv-ink);
  border-bottom: none;
  color: var(--vv-ink);
  padding: 10px 16px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 2px 2px 0 var(--vv-ink);
  position: relative;
  transition: background-color 0.15s ease, color 0.15s ease;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 180px;
  white-space: normal;
  word-break: break-word;
  text-align: left;
  line-height: 1.3;
  font-family: 'DM Sans', sans-serif !important;
}

.vv-tab-btn.active {
  background-color: var(--vv-blue);
  color: #ffffff;
}

.vv-tab-btn:first-child {
  border-top-left-radius: 8px;
}

.vv-tab-panel {
  background-color: var(--vv-sand);
  border: 2px solid var(--vv-ink);
  border-top: none;
  padding: 24px 40px;
  box-shadow: 2px 2px 0 var(--vv-ink);
  border-radius: 0 0 8px 8px;
}

.vv-lesson-reading-time {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--vv-ink);
  opacity: 0.5;
  margin-top: -8px;
  margin-bottom: 16px;
}

/* ─── Module nav (prev / next) ───────────────────────────────────────────── */

.vv-module-nav {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  margin-top: 32px;
}

.vv-module-nav-prev,
.vv-module-nav-next {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.vv-module-nav-next {
  margin-left: auto;
}

.vv-nav-arrow {
  font-size: 1.2em;
}

.vv-nav-title {
  font-weight: 600;
}

/* ─── Course summary ─────────────────────────────────────────────────────── */

.vv-promo-video {
  position: relative;
  padding-top: 56.25%;
  margin-bottom: 24px;
}

.vv-promo-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid var(--vv-ink);
}

.vv-instructor {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.vv-instructor img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--vv-ink);
  flex-shrink: 0;
}

.vv-instructor-meta {
  flex: 1;
}

.vv-instructor-meta strong {
  display: block;
  margin-bottom: 6px;
}

.vv-instructor-meta p {
  margin: 0;
}

.vv-course-length {
  margin-top: 0;
}

/* ─── Lesson list ────────────────────────────────────────────────────────── */

.vv-lesson-list,
.vv-resource-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vv-lesson-item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--vv-dune);
}

.vv-lesson-item:last-child {
  border-bottom: none;
}

.vv-reading-time {
  color: rgba(26, 26, 26, 0.5);
  font-size: 0.8125rem;
  white-space: nowrap;
  margin-left: 12px;
}

.vv-resource-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--vv-dune);
}

.vv-resource-item:last-child {
  border-bottom: none;
}

.vv-module-summary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--vv-dune);
}

/* ─── Module Overview ────────────────────────────────────────────────────── */

.vv-module-overview {
  color: var(--vv-ink);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.7;
}

/* ─── Lesson Tabs — key points ───────────────────────────────────────────── */

.vv-key-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.vv-key-points__point {
  display: inline-block;
  background: var(--vv-sunshine);
  border: 2px solid var(--vv-ink);
  box-shadow: 2px 2px 0 var(--vv-ink);
  padding: 4px 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--vv-ink);
}

.vv-key-points__text {
  color: var(--vv-ink);
  font-family: 'DM Sans', sans-serif;
}

.vv-lesson-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  color: var(--vv-ink);
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.vv-lesson-content {
  font-family: 'DM Sans', sans-serif;
  color: var(--vv-ink);
  line-height: 1.7;
}

.vv-lesson-content p {
  margin-bottom: 1em;
}

.vv-lesson-content ul,
.vv-lesson-content ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
}

/* ─── Resources ──────────────────────────────────────────────────────────── */

.vv-resources {
  margin-top: 32px;
}

.vv-resources__heading {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  color: var(--vv-ink);
  font-size: 1rem;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--vv-ink);
  padding-bottom: 8px;
}

.vv-resource-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vv-resource-item {
  border-bottom: 1px solid var(--vv-dune);
  padding: 10px 0;
}

.vv-resource-link {
  color: var(--vv-blue);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  text-decoration: none;
}

.vv-resource-link:hover {
  color: var(--vv-ink);
}

/* ── Start Course Button ───────────────────────── */
.vv-start-course-btn--disabled {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}

.vv-start-course-btn--disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ── Module List Table ─────────────────────────── */
.vv-module-list {
    overflow: hidden;
}

.vv-module-list__header {
    display: grid;
    grid-template-columns: 1fr 100px 100px;
    background: #D6EFE6;
    padding: 10px 16px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #1A1A1A;
}

.vv-module-list__row {
    display: grid;
    grid-template-columns: 1fr 100px 100px;
    padding: 12px 16px;
    background: transparent;
    border-top: 1px solid #1A1A1A;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #1A1A1A;
    align-items: center;
}

.vv-module-list__row--alt {
    background: transparent;
}

.vv-module-list__link {
    color: #1B4FBF;
    font-weight: 600;
    text-decoration: none;
}

.vv-module-list__link:hover {
    color: #1A1A1A;
}

.vv-module-list__duration,
.vv-module-list__lessons {
    font-size: 0.85rem;
    color: #1A1A1A;
}

/* ── Course Meta ───────────────────────────────── */
.vv-course-meta {
    display: flex;
    gap: 0;
    border: 2px solid var(--vv-ink);
    box-shadow: 4px 4px 0 var(--vv-ink);
    overflow: hidden;
    margin-right: 4px;
    margin-bottom: 4px;
}

.vv-course-meta__stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: var(--vv-sand);
    border-right: 2px solid var(--vv-ink);
    text-align: center;
}

.vv-course-meta__stat:last-child {
    border-right: none;
}

.vv-course-meta__value {
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--vv-blue);
    line-height: 1;
    margin-bottom: 6px;
}

.vv-course-meta__label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--vv-ink);
}

/* ── Complete Course Button ────────────────────── */
.vv-complete-course-btn {
    margin-left: auto;
}

/* ── No Lessons message ────────────────────────── */
.vv-no-lessons {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: var(--vv-ink);
    opacity: 0.5;
    font-style: italic;
    margin: 0;
    padding: 8px 0;
}

/* ── Button class fallbacks for plugin-rendered buttons ── */
/* Replicates Elementor global Button-L, Button-Blue, Button-Sunshine */
/* so plugin widgets render correctly on all templates        */

.elementor .Button-L,
.elementor a.Button-L,
.elementor div.Button-L {
    font-family: var(--DM-Sans), 'DM Sans', sans-serif;
    font-weight: 900;
    font-size: 13px;
    text-transform: uppercase;
    padding-block-start: 16px;
    padding-block-end: 16px;
    padding-inline-start: 36px;
    padding-inline-end: 36px;
    margin: var(--Spacing-XS, 8px);
    border-radius: var(--Border-R-S, 8px);
    border-width: var(--Border-W-Standard, 2px);
    border-color: var(--Ink, #1A1A1A);
    border-style: solid;
    box-shadow: 3px 3px 0px 0px var(--Ink, #1A1A1A);
    display: inline-block;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.1s ease, transform 0.1s ease;
}

.elementor .Button-L:hover,
.elementor a.Button-L:hover {
    box-shadow: 2px 2px 0px 0px var(--Ink, #1A1A1A);
    transform: translate(1px, 1px);
}

.elementor .Button-Blue,
.elementor a.Button-Blue {
    color: var(--Warm-white, #FFFAF5);
    background-color: var(--Greek-blue, #1B4FBF);
}

.elementor .Button-Sunshine,
.elementor a.Button-Sunshine {
    color: var(--Ink, #1A1A1A);
    background-color: var(--Sunshine, #F2D04E);
}

/* ── Mobile-responsive nav buttons ─────────────────── */
.vv-module-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

@media (max-width: 767px) {
    .vv-module-nav {
        flex-direction: column;
        align-items: stretch;
    }
    .vv-module-nav .vv-module-nav-prev,
    .vv-module-nav .vv-module-nav-next,
    .vv-module-nav .vv-complete-course-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
        box-sizing: border-box;
    }
}
