:root {
  --brown-dark:   #164f27;
  --brown-mid:    #567235;
  --gold:         #938925;
  --gold-hover:   #82781f;
  --teal:         #94661e;
  --purple:       #45321f;
  --blue-light:   #4A90D9;
  --cream:        #F9F7F4;
  --warm-gray:    #F2F0EC;
  --clay:         #D4A373;
  --forest-deep:  #164f27;
  --text:         #1A1A1A;
  --text-muted:   #6B6B6B;
  --white:        #FFFFFF;
  --radius-sm:    8px;
  --radius:       16px;
  --radius-lg:    24px;
  --shadow-sm:    0 2px 8px rgba(0,0,0,.06);
  --shadow:       0 8px 32px rgba(0,0,0,.08);
  --shadow-lg:    0 16px 48px rgba(0,0,0,.12);
  --transition:   .35s cubic-bezier(.22,1,.36,1);
  --font-title:  'Sora', sans-serif;
  --font-body:   'Inter', sans-serif;
  --max-width:   1200px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100vw;
}

main {
  overflow-x: hidden;
  max-width: 100%;
}

.section > .container {
  overflow-x: hidden;
  max-width: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  overflow-x: hidden;
}

@media (max-width: 576px) {
  .container {
    padding: 0 16px;
  }
}

/* ==============================
   ANIMATIONS
   ============================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

.animate {
  opacity: 0;
}

.animate--visible {
  animation: fadeUp .7s var(--transition) forwards;
}

.animate--visible-delay-1 { animation-delay: .1s; }
.animate--visible-delay-2 { animation-delay: .2s; }
.animate--visible-delay-3 { animation-delay: .3s; }
.animate--visible-delay-4 { animation-delay: .4s; }
.animate--visible-delay-5 { animation-delay: .5s; }

.animate--fade-in {
  animation: fadeIn .6s var(--transition) forwards;
}

.animate--slide-up {
  animation: slideUp .5s var(--transition) forwards;
}

.animate--scale-in {
  animation: scaleIn .5s var(--transition) forwards;
}

.animate--pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ==============================
   HEADER
   ============================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: all var(--transition);
}

.header--scrolled {
  background: var(--white);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 10px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,.1);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brown-dark);
}

.logo__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
}

.logo:hover .logo__mark {
  transform: scale(1.05);
}

.logo__text {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--brown-dark), var(--brown-mid));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo__accent { color: var(--gold); }

.logo__tagline {
  display: none;
  font-size: .7rem;
  opacity: .6;
  font-weight: 400;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 101;
}

.header__burger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--brown-dark);
  border-radius: 2px;
  transition: var(--transition);
}

.header__burger--open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.header__burger--open span:nth-child(2) { opacity: 0; }
.header__burger--open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav__list {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav__link {
  position: relative;
  color: var(--text);
  font-size: .88rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition);
}

.nav__link:hover,
.nav__link--active {
  color: var(--brown-dark);
}

.nav__link:hover::after,
.nav__link--active::after {
  transform: scaleX(1);
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brown-dark);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 100px;
  font-size: .88rem;
  font-weight: 600;
  font-family: var(--font-title);
  transition: all var(--transition);
  margin-left: 12px;
}

.nav__cta:hover {
  background: var(--brown-mid);
  transform: translateY(-1px);
}

/* ==============================
   HERO
   ============================== */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #072013 0%, #0c331e 50%, #124429 100%);
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 20% 80%, rgba(152,201,80,.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 20%, rgba(11,46,27,.3) 0%, transparent 60%);
  pointer-events: none;
}

.hero__pattern {
  position: absolute;
  inset: 0;
  opacity: .015;
  background-image:
    repeating-linear-gradient(45deg, var(--white) 0px, var(--white) 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(-45deg, var(--white) 0px, var(--white) 1px, transparent 1px, transparent 40px);
  pointer-events: none;
}

/* Faint Line-Art Leaves in Background */
.hero__bg-leaf {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.hero__bg-leaf--left {
  left: -50px;
  top: 15%;
  width: 280px;
  height: 280px;
  transform: rotate(-15deg);
  opacity: 0.8;
}

.hero__bg-leaf--right {
  right: 5%;
  top: 8%;
  width: 220px;
  height: 220px;
  transform: rotate(35deg);
  opacity: 0.6;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero__content {
  position: relative;
  z-index: 3;
}

.hero__title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -.025em;
  animation: fadeUp .8s var(--transition) .1s both;
}

.hero__title-highlight {
  color: #98c950;
  font-weight: 800;
  position: relative;
  display: inline-block;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 36px;
  animation: fadeUp .8s var(--transition) .2s both;
}

.hero__actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  animation: fadeUp .8s var(--transition) .3s both;
}

/* Premium Hero Buttons */
.btn--hero-primary {
  background: #98c950;
  color: #0b2e1b;
  border-radius: 100px;
  font-weight: 700;
  padding: 15px 32px;
  box-shadow: 0 4px 14px rgba(152, 201, 80, 0.35);
}

.btn--hero-primary:hover {
  background: #a8d960;
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(152, 201, 80, 0.5);
}

.btn--hero-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  border-radius: 100px;
  font-weight: 600;
  padding: 13px 30px;
}

.btn--hero-outline:hover {
  border-color: #98c950;
  color: #98c950;
  transform: translateY(-3px);
}

.btn-arrow {
  transition: transform var(--transition);
}

.btn--hero-outline:hover .btn-arrow {
  transform: translateX(4px);
}

/* Organic Image Frame & Leaves Container */
.hero__media-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

/* Floating Solid Green Leaves */
.hero__floating-leaf {
  position: absolute;
  pointer-events: none;
  z-index: 4;
}

.hero__floating-leaf--left {
  left: -25px;
  bottom: 12%;
  width: 96px;
  height: 96px;
  transform: rotate(-10deg);
  animation: float 6s ease-in-out infinite;
}

.hero__floating-leaf--right {
  right: -15px;
  top: 8%;
  width: 76px;
  height: 76px;
  transform: rotate(35deg);
  animation: float 5s ease-in-out infinite alternate-reverse;
}

/* The Organic Shaped Picture Frame */
.hero__image-frame {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4 / 4.8;
  border-radius: 60% 40% 60% 40% / 40% 60% 40% 60%;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  border: 8px solid rgba(152, 201, 80, 0.2);
  background: #eae3d2;
  transition: border-color var(--transition), transform var(--transition);
}

.hero__image-frame:hover {
  border-color: rgba(152, 201, 80, 0.3);
  transform: scale(1.02);
}

.hero__img-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 25% center;
  border-radius: inherit;
}

.hero__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, rgba(152, 201, 80, 0.15), rgba(11, 46, 27, 0.3));
  font-size: 3rem;
}

/* RESPONSIVE STYLES */
@media (max-width: 992px) {
  .hero {
    padding: 100px 0 60px;
    min-height: auto;
  }
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero__actions {
    justify-content: center;
  }
  .hero__image-frame {
    max-width: 360px;
    margin: 0 auto;
  }
  .hero__bg-leaf--left {
    width: 200px;
    height: 200px;
  }
  .hero__bg-leaf--right {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 90px 0 50px;
  }
  .hero__title {
    font-size: 2.2rem;
  }
  .hero__floating-leaf--left {
    width: 70px;
    height: 70px;
    left: -15px;
  }
  .hero__floating-leaf--right {
    width: 55px;
    height: 55px;
    right: -10px;
  }
}

/* ==============================
   BUTTONS
   ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: .9rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.15);
  transform: translateX(-100%);
  transition: transform .5s;
}

.btn:hover::after {
  transform: translateX(0);
}

.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  transform: scale(0);
  animation: rippleAnim .6s ease-out forwards;
  pointer-events: none;
}

.btn--primary {
  background: var(--brown-dark);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--brown-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(22,79,39,.3);
}

.btn--gold {
  background: var(--gold);
  color: var(--white);
  border-radius: 100px;
}

.btn--gold:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(147,137,37,.3);
}

.btn--outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,.3);
  color: var(--white);
}

.btn--outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.btn--danger {
  background: #DC3545;
  color: #fff;
}

.btn--danger:hover {
  background: #C82333;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  padding: 10px 20px;
}

.btn--ghost:hover {
  background: var(--warm-gray);
}

.btn--sm {
  padding: 10px 20px;
  font-size: .82rem;
}

.btn--icon {
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* ==============================
   BACK TO TOP
   ============================== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brown-dark);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow);
  z-index: 50;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all var(--transition);
}

.back-to-top--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--brown-mid);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ==============================
   PAGE TRANSITION
   ============================== */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--brown-dark);
  pointer-events: none;
  opacity: 0;
  transition: opacity .4s ease;
}

.page-transition--active {
  opacity: 1;
}

/* ==============================
   SKELETON LOADER
   ============================== */
.skeleton {
  background: linear-gradient(90deg, #e8e8e8 25%, #f5f5f5 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

.skeleton--text { height: 14px; width: 100%; margin-bottom: 8px; }
.skeleton--title { height: 24px; width: 70%; margin-bottom: 12px; }
.skeleton--image { aspect-ratio: 16/9; width: 100%; border-radius: var(--radius) var(--radius) 0 0; }

/* ==============================
   TOAST NOTIFICATION
   ============================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: all;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .9rem;
  font-weight: 500;
  transform: translateX(120%);
  opacity: 0;
  transition: all .4s var(--transition);
  border-left: 4px solid var(--brown-dark);
  width: 100%;
  max-width: 420px;
}

@media (max-width: 480px) {
  .toast-container {
    left: 12px !important;
    right: 12px !important;
  }
}

.toast--visible {
  transform: translateX(0);
  opacity: 1;
}

.toast--success { border-left-color: #28A745; color: #155724; }
.toast--error { border-left-color: #DC3545; color: #721C24; }
.toast--info { border-left-color: var(--gold); color: var(--brown-dark); }

.toast__icon { flex-shrink: 0; }

/* ==============================
   FORM VALIDATION
   ============================== */
.form__input--error {
  border-color: #DC3545 !important;
  box-shadow: 0 0 0 3px rgba(220,53,69,.12) !important;
  animation: shake .4s ease;
}

.form__input--success {
  border-color: #28A745 !important;
  box-shadow: 0 0 0 3px rgba(40,167,69,.12) !important;
}

.form__error {
  font-size: .8rem;
  color: #DC3545;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  animation: slideUp .3s ease forwards;
}

/* ==============================
   SECTION
   ============================== */
.section {
  padding: 80px 0;
  position: relative;
}

.section--gray {
  background: var(--warm-gray);
}

.section--dark {
  background: var(--brown-dark);
  color: var(--white);
}

.section--divider-top::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--brown-dark), var(--teal));
}

.section__header {
  max-width: 640px;
  margin-bottom: 48px;
}

.section__tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold);
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--brown-dark);
  line-height: 1.2;
  letter-spacing: -.02em;
}

.section--dark .section__title {
  color: var(--white);
}

.section__subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.7;
}

.section--dark .section__subtitle {
  color: rgba(255,255,255,.6);
}

.section__header--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ==============================
   CARDS GRID
   ============================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

/* ==============================
   QUICK CARDS
   ============================== */
.quick-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: -56px;
  position: relative;
  z-index: 10;
}

.quick-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.quick-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  transition: height var(--transition);
}

.quick-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.quick-card:hover::before {
  height: 4px;
}

.quick-card--news::before        { background: var(--gold); }
.quick-card--courses::before     { background: var(--teal); }
.quick-card--materials::before   { background: var(--teal); }
.quick-card--testimonials::before { background: var(--purple); }

.quick-card__icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: block;
}

.quick-card__title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--brown-dark);
}

.quick-card__text {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==============================
   CARD
   ============================== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.card__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--transition);
}

.card:hover .card__image {
  transform: scale(1.06);
}

.card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card__tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.card__tag--news {
  background: rgba(147,137,37,.12);
  color: var(--gold);
}

.card__tag--course {
  background: rgba(148,102,30,.12);
  color: var(--teal);
}

.card__tag--material {
  background: rgba(233,196,106,.2);
  color: #8B7A3A;
}

.card__title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--brown-dark);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__text {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--text-muted);
}

.card__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--warm-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==============================
   BADGE
   ============================== */
.badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 100px;
}

.badge--success { background: #D4EDDA; color: #155724; }
.badge--warning { background: #FFF3CD; color: #856404; }
.badge--muted   { background: #E9ECEF; color: #495057; }
.badge--gold    { background: var(--gold); color: var(--forest-deep); }

/* ==============================
   ABOUT SECTION
   ============================== */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about__image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
}

.about__image-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--teal), var(--forest-deep));
  opacity: .1;
}

.about__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__image-decor {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  border-radius: var(--radius);
  background: var(--gold);
  z-index: -1;
}

.about__content p {
  margin-bottom: 16px;
  line-height: 1.7;
  color: var(--text-muted);
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.about__stat {
  text-align: center;
  padding: 16px;
  background: var(--warm-gray);
  border-radius: var(--radius);
}

.about__stat-value {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--brown-dark);
}

.about__stat-label {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==============================
   TESTIMONIALS
   ============================== */
.testimonials-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 20px;
  scrollbar-width: none;
}

.testimonials-track::-webkit-scrollbar { display: none; }

.testimonial-card {
  min-width: 340px;
  scroll-snap-align: start;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  left: 24px;
  font-size: 4rem;
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--gold);
  opacity: .3;
  line-height: 1;
}

.testimonial-card__photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  background: var(--warm-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  color: var(--text-muted);
}

.testimonial-card__text {
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 20px;
  color: var(--text);
  position: relative;
  z-index: 1;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-card__name {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: .9rem;
  color: var(--brown-dark);
}

.testimonial-card__role {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ==============================
   GALLERY
   ============================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all .6s var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.5), transparent);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.gallery-item:hover .gallery-item__overlay {
  opacity: 1;
}

.gallery-item__caption {
  color: var(--white);
  font-size: .85rem;
  font-weight: 500;
}

/* ==============================
   CTA BANNER
   ============================== */
.cta-banner {
  background: linear-gradient(135deg, #072013 0%, #0c331e 50%, #124429 100%);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 30% 20%, rgba(152,201,80,.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 70% 80%, rgba(11,46,27,.3) 0%, transparent 50%);
  pointer-events: none;
}

.cta-banner__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
}

.cta-banner__text {
  font-size: 1rem;
  opacity: .8;
  max-width: 500px;
  margin: 0 auto 28px;
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

.cta-banner .btn {
  position: relative;
  z-index: 2;
}

/* Floating Leaves inside CTA Banner */
.cta-banner__leaf {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  color: rgba(152,201,80,0.18);
  transition: var(--transition);
}

.cta-banner__leaf--left {
  left: 20px;
  bottom: 15%;
  width: 96px;
  height: 96px;
  transform: rotate(-15deg);
  animation: float 6s ease-in-out infinite;
}

.cta-banner__leaf--right {
  right: 20px;
  top: 15%;
  width: 76px;
  height: 76px;
  transform: rotate(35deg);
  animation: float 5s ease-in-out infinite alternate-reverse;
}

/* Global background floating leaves */
.global-floating-leaf {
  position: fixed;
  pointer-events: none;
  z-index: -2;
  opacity: 0.05;
  color: var(--brown-mid);
  transition: opacity 0.3s ease;
}

.global-floating-leaf--left {
  left: 3vw;
  bottom: 15vh;
  width: 130px;
  height: 130px;
  transform: rotate(-25deg);
  animation: float 8s ease-in-out infinite;
}

.global-floating-leaf--right {
  right: 4vw;
  top: 20vh;
  width: 100px;
  height: 100px;
  transform: rotate(40deg);
  animation: float 7s ease-in-out infinite alternate-reverse;
}

/* Responsive adjustment for global leaves and CTA leaves */
@media (max-width: 768px) {
  .cta-banner__leaf {
    width: 60px;
    height: 60px;
  }
  .global-floating-leaf {
    opacity: 0.03; /* Make even more subtle on small screens */
    width: 80px;
    height: 80px;
  }
}

/* ==============================
   FOOTER
   ============================== */
.footer {
  background: var(--brown-dark);
  color: rgba(255,255,255,.7);
  padding: 60px 0 0;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--terracotta), var(--teal));
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer__brand {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 12px;
}

.footer__brand-accent {
  color: var(--gold);
}

.footer__desc {
  font-size: .88rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer__social {
  display: flex;
  gap: 12px;
}

.footer__social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  transition: all var(--transition);
}

.footer__social-link:hover {
  background: var(--gold);
  color: var(--brown-dark);
  transform: translateY(-2px);
}

.footer__title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: .9rem;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: .03em;
}

.footer__links li {
  margin-bottom: 10px;
}

.footer__links a {
  font-size: .85rem;
  transition: all var(--transition);
  opacity: .7;
}

.footer__links a:hover {
  opacity: 1;
  color: var(--gold);
  padding-left: 4px;
}

.footer__contact li {
  display: flex;
  gap: 10px;
  font-size: .85rem;
  margin-bottom: 12px;
  opacity: .7;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 20px 0;
  text-align: center;
  font-size: .82rem;
  opacity: .5;
}

/* ==============================
   PAGE HEADER
   ============================== */
.page-header {
  background: linear-gradient(135deg, #072013 0%, #0c331e 50%, #124429 100%);
  padding: 120px 0 60px;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .03;
  background-image:
    repeating-linear-gradient(45deg, #98c950 0px, #98c950 1px, transparent 1px, transparent 40px);
  pointer-events: none;
}

.page-header__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  color: var(--white);
  letter-spacing: -.02em;
}

.page-header__breadcrumb {
  display: flex;
  gap: 8px;
  font-size: .82rem;
  color: rgba(255,255,255,.5);
  margin-bottom: 16px;
}

.page-header__breadcrumb a {
  color: var(--gold);
  transition: color var(--transition);
}

.page-header__breadcrumb a:hover {
  color: var(--gold-hover);
}

/* ==============================
   FORMS
   ============================== */
.form {
  max-width: 640px;
}

.form__group {
  margin-bottom: 20px;
}

.form__label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: .88rem;
  color: var(--brown-dark);
}

.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .92rem;
  transition: all var(--transition);
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(0,0,0,.06);
}

.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45,106,79,.15);
}

.form__textarea {
  min-height: 140px;
  resize: vertical;
}

/* ==============================
   FILTERS
   ============================== */
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.filters__input,
.filters__select {
  padding: 12px 18px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .88rem;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(0,0,0,.06);
  transition: all var(--transition);
}

.filters__input:focus,
.filters__select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45,106,79,.12);
}

.filters__input { flex: 1; min-width: 200px; }

/* ==============================
   PAGINATION
   ============================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination__link {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: .88rem;
  transition: all var(--transition);
  background: var(--white);
  border: 1px solid transparent;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06);
}

.pagination__link:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.pagination__link--active {
  background: var(--gold);
  color: var(--brown-dark);
  border-color: var(--gold);
  box-shadow: none;
}

/* ==============================
   LIGHTBOX
   ============================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
}

.lightbox--open {
  opacity: 1;
  pointer-events: all;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 28px;
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
  background: none;
  border: none;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background var(--transition);
}

.lightbox__close:hover {
  background: rgba(255,255,255,.1);
}

/* ==============================
   ENROLLMENT FORM
   ============================== */
.enrollment-form {
  background: var(--warm-gray);
  padding: 36px;
  border-radius: var(--radius);
  margin-top: 36px;
}

.enrollment-form__title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--brown-dark);
  margin-bottom: 20px;
}

/* ==============================
   CONTATO INFO
   ============================== */
.contato-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.contato-card {
  text-align: center;
  padding: 32px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.contato-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.contato-card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.contato-card__title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: .9rem;
  color: var(--brown-dark);
  margin-bottom: 8px;
}

.contato-card__text {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.contato-card__text a {
  color: var(--teal);
  font-weight: 500;
}

/* ==============================
   ABOUT PAGE
   ============================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.about-grid__item {
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.about-grid__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}

.about-grid__item:nth-child(1)::before { background: var(--teal); }
.about-grid__item:nth-child(2)::before { background: var(--gold); }

.about-grid__item h3 {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--brown-dark);
  margin-bottom: 12px;
}

.about-grid__item p {
  color: var(--text-muted);
  line-height: 1.7;
}

.about-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.about-value {
  text-align: center;
  padding: 28px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.about-value:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.about-value__icon { font-size: 2rem; margin-bottom: 12px; }

.about-value__title {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: .9rem;
  color: var(--brown-dark);
}

.about-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.about-number {
  text-align: center;
  padding: 28px 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.about-number:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.about-number__value {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
}

.about-number__label {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==============================
   COURSE DETAIL
   ============================== */
.course-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.course-meta__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .88rem;
  color: var(--text-muted);
  padding: 8px 16px;
  background: var(--warm-gray);
  border-radius: var(--radius-sm);
}

/* ==============================
   ALERTS
   ============================== */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: .88rem;
  line-height: 1.5;
}

.alert--success {
  background: #D4EDDA;
  color: #155724;
  border-left: 4px solid #28A745;
}

.alert--error {
  background: #F8D7DA;
  color: #721C24;
  border-left: 4px solid #DC3545;
}

/* ==============================
   MISC COMPOSITION
   ============================== */
.section-inner {
  max-width: 800px;
  margin: 0 auto;
}

.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-32 { margin-bottom: 32px; }
.gap-12 { gap: 12px; }
.flex-center { display: flex; align-items: center; justify-content: center; }

.nav-mobile,
.nav-mobile-overlay {
  display: none;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header__burger { display: flex; }

  /* Posicionamento Nativo (Logo na Esquerda, Hambúrguer na Direita) */
  .header__burger {
    display: flex !important;
  }

  .header__inner {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
  }

  /* Ocultar o menu desktop */
  .nav {
    display: none !important;
  }

  /* Lock scroll do corpo */
  body.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
  }

  /* ==============================
     MOBILE DRAWER MENU (ROOT LEVEL - SLIDES FROM RIGHT)
     ============================== */
  .nav-mobile {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: rgba(61, 31, 10, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9999 !important; /* Acima de tudo! */
    transform: translateX(100%); /* Escondido no lado direito */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex !important; /* Sobrescreve o display: none do desktop */
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 90px 24px 40px;
    overflow-y: auto;
    box-shadow: -5px 0 25px rgba(0,0,0,0.3);
  }

  .nav-mobile--open {
    transform: translateX(0) !important;
  }

  .nav-mobile__close {
    position: absolute;
    top: 20px;
    right: 24px; /* Botão Fechar no canto superior direito do drawer */
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 2.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    z-index: 10;
  }

  .nav-mobile__close:hover {
    color: var(--gold);
  }

  .nav-mobile__list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .nav-mobile__link {
    font-size: 1.25rem;
    padding: 12px 0;
    display: block;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    text-align: left;
    width: 100%;
  }

  .nav-mobile__link:hover,
  .nav-mobile__link--active {
    color: var(--gold);
  }

  .nav-mobile__cta {
    display: inline-block;
    font-size: 1.15rem;
    padding: 12px 32px;
    margin-top: 16px;
    color: var(--white);
    background: var(--brown-dark);
    border: 2px solid var(--gold);
    border-radius: 100px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition);
  }

  .nav-mobile__cta:hover {
    background: var(--brown-mid);
    transform: translateY(-1px);
  }

  /* Overlay de fundo */
  .nav-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    display: block !important; /* Sobrescreve o display: none do desktop */
  }

  .nav-mobile-overlay--open {
    opacity: 1 !important;
    pointer-events: all !important;
  }

  /* ==============================
     ESPAÇAMENTOS DOS MATERIAIS
     ============================== */
  .page-header {
    padding: 100px 0 40px !important;
  }

  .filters {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--radius-sm);
  }

  .filters__select,
  .filters__input {
    width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box;
  }

  .filters .btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
  }

  .hero { min-height: auto; }
  .hero__content { padding: 90px 0 40px; max-width: 100%; }
  .hero__image-placeholder { display: none; }
  .hero__stats { flex-wrap: wrap; gap: 16px; }

  .about { grid-template-columns: 1fr; gap: 32px; }
  .about-grid { grid-template-columns: 1fr; }
  .about__stats { grid-template-columns: repeat(3, 1fr); }

  /* ==============================
     ESPAÇAMENTO DE CARDS E ÍCONES (MOBILE)
     ============================== */
  .quick-cards {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-top: -30px !important;
    padding: 0 4px !important;
  }

  .quick-card {
    display: grid !important;
    grid-template-columns: 56px 1fr !important;
    grid-template-rows: auto auto !important;
    column-gap: 16px !important;
    row-gap: 2px !important;
    align-items: center !important;
    padding: 16px !important;
    text-align: left !important;
  }

  .quick-card__icon {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .quick-card__title {
    grid-column: 2 !important;
    grid-row: 1 !important;
    margin-bottom: 2px !important;
    font-size: 0.98rem !important;
    align-self: end !important;
  }

  .quick-card__text {
    grid-column: 2 !important;
    grid-row: 2 !important;
    margin-top: 0 !important;
    font-size: 0.82rem !important;
    align-self: start !important;
  }

  .section { padding: 48px 0; }

  .cards-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 0 4px !important;
  }

  .card__body {
    padding: 20px 16px !important;
  }

  .card__title {
    font-size: 1.05rem !important;
    margin-bottom: 6px !important;
  }

  .card__text {
    font-size: 0.85rem !important;
    margin-bottom: 14px !important;
  }

  .card__meta {
    font-size: 0.78rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .card__meta svg {
    margin-right: 0 !important;
    color: var(--gold) !important;
  }

  .card__footer {
    padding: 16px 16px 20px !important;
  }

  .cta-banner { padding: 40px 24px; }

  .footer__grid { grid-template-columns: 1fr; gap: 28px; }

  .testimonial-card {
    min-width: 280px;
    padding: 24px 20px !important;
  }

  .enrollment-form { padding: 24px; }

  .about-grid { grid-template-columns: 1fr; }

  .swiper-button-next,
  .swiper-button-prev { display: none; }
}

@media (max-width: 480px) {
  .hero__stats { flex-direction: column; gap: 12px; }
  .hero__stat { display: flex; gap: 8px; align-items: baseline; }
  .hero__stat-label { margin-top: 0; }
  .about__stats { grid-template-columns: 1fr; }
  .about-numbers { grid-template-columns: 1fr 1fr; }
  .about-values { grid-template-columns: 1fr 1fr; }
  .container { padding: 0 16px; }

  .testimonial-card {
    min-width: 240px;
    padding: 20px 16px;
  }

  .hero__badge { font-size: .7rem; padding: 4px 12px 4px 4px; }
}
/* Swiper Custom */
.swiper-pagination-bullet-active {
  background: var(--gold) !important;
}
.news-swiper {
  padding-bottom: 20px;
}
.card__image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  aspect-ratio: 16/10;
}
.card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover .card__image {
  transform: scale(1.08);
}

/* Swiper Testimonials */
.testimonials-swiper {
  padding: 20px 10px 40px;
}
.testimonial-card {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

/* Fix swiper slides to allow 100% height children */
.swiper-wrapper {
  display: flex !important;
  align-items: stretch !important;
}
.swiper-slide {
  height: auto !important;
  display: flex !important;
}
.swiper-slide > div {
  width: 100%;
}
/* ==============================
   AUTH & FORMS
   ============================== */
.container--narrow {
  max-width: 550px;
}

.section--auth {
  background: var(--warm-gray);
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.auth-card {
  background: var(--white);
  padding: 48px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.auth-card__header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-card__title {
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--brown-dark);
  margin-bottom: 8px;
}

.auth-card__subtitle {
  color: var(--text-muted);
}

.auth-form .form-group {
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #edf2f7;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(147,137,37, 0.1);
}

.auth-link {
  color: var(--teal);
  font-weight: 600;
  font-size: 0.9rem;
}

.auth-card__footer {
  margin-top: 32px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.alert {
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-weight: 500;
}

.alert--danger {
  background: #fff5f5;
  color: #c53030;
  border: 1px solid #feb2b2;
}

.alert--success {
  background: #f0fff4;
  color: #2f855a;
  border: 1px solid #9ae6b4;
}

.btn--block {
  width: 100%;
}

/* ==============================
   DASHBOARD
   ============================== */
.section--dashboard {
  background: #f8fafc;
  padding-top: 120px;
  padding-bottom: 60px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  position: sticky;
  top: 100px;
}

.user-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 32px;
}

.user-profile__avatar {
  width: 80px;
  height: 80px;
  background: var(--gold);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(147,137,37, 0.2);
  overflow: hidden;
}

.user-profile__name {
  font-family: var(--font-title);
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: var(--brown-dark);
  word-break: break-word;
  overflow-wrap: break-word;
  width: 100%;
}

.user-profile__email {
  font-size: 0.85rem;
  color: var(--text-muted);
  word-break: break-word;
  overflow-wrap: break-word;
  width: 100%;
}

.dashboard-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.2s ease;
}

.dashboard-nav__link:hover {
  background: #f1f5f9;
  color: var(--teal);
}

.dashboard-nav__link.active {
  background: var(--teal);
  color: var(--white);
}

.dashboard-nav__link.text-danger:hover {
  background: #fef2f2;
  color: #ef4444;
}

.text-danger { color: #dc3545; }

.dashboard-content__header {
  margin-bottom: 32px;
}

.dashboard-content__title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 2rem;
  color: var(--brown-dark);
  margin-bottom: 8px;
}

.dashboard-content__subtitle {
  color: var(--text-muted);
}

/* COURSE LIST IN DASHBOARD */
.courses-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.course-item {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 180px 1fr;
  overflow: hidden;
  transition: transform 0.2s ease;
}

@media (max-width: 600px) {
  .course-item {
    grid-template-columns: 1fr;
  }
}

.course-item:hover {
  transform: translateX(8px);
}

.course-item__image {
  height: 100%;
}

.course-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-item__placeholder {
  width: 100%;
  height: 100%;
  background: var(--warm-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}

.course-item__content {
  padding: 24px;
}

.course-item__category {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.course-item__title {
  font-family: var(--font-title);
  font-weight: 700;
  margin: 8px 0 20px;
  color: var(--brown-dark);
}

.progress-container {
  margin-bottom: 20px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.progress-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--teal);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.empty-state {
  text-align: center;
  padding: 64px 32px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.empty-state__icon {
  color: #cbd5e1;
  margin-bottom: 24px;
}

.empty-state__title {
  font-family: var(--font-title);
  font-weight: 700;
  margin-bottom: 12px;
}

.empty-state__text {
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* AVATAR UPLOAD */
.user-profile__avatar-wrapper {
  position: relative;
  margin-bottom: 16px;
  cursor: pointer;
  width: 80px;
  height: 80px;
  border: none;
  background: none;
  padding: 0;
  outline: none;
}

.user-profile__avatar-wrapper:hover .user-profile__avatar-overlay {
  opacity: 1;
}

.user-profile__avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Shared admin/student card & table styles */
.admin-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  overflow: hidden;
  border: 1px solid #edf2f7;
}

.admin-card__header {
  padding: 24px 28px;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafcfd;
}

.admin-card__header h3 {
  font-weight: 700;
  font-size: 1.1rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 16px 28px;
  background: #f8fafc;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #6B6B6B;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 20px 28px;
  border-bottom: 1px solid #edf2f7;
  font-size: 0.9rem;
  color: #4a5568;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.badge {
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge--warning {
  background: #fff5f5;
  color: #c53030;
}

.badge--resolved {
  background: #f0fff4;
  color: #276749;
}

.badge--gold {
  background: rgba(147,137,37, 0.12);
  color: #82781f;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Password show/hide toggle */
.password-wrapper {
  position: relative;
}
.password-wrapper .form-control,
.password-wrapper .form__input {
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
  transition: color 0.15s;
}
.password-toggle:hover {
  color: var(--gold);
}

/* Extra responsive fixes */
@media (max-width: 600px) {
  .auth-card {
    padding: 32px 20px;
  }

  .auth-card__title {
    font-size: 1.35rem;
  }

  .section--auth {
    padding: 100px 16px 40px;
  }

  .hero__title {
    font-size: 1.8rem;
  }

  .hero__subtitle {
    font-size: 0.95rem;
  }

  .hero__content {
    padding: 80px 0 32px;
  }

  .section__title {
    font-size: 1.5rem;
  }

  .enrollment-form {
    padding: 24px 16px;
  }

  .course-meta {
    gap: 12px;
  }

  .course-meta__item {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .about-values {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .about-numbers {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: relative;
    top: 0;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  .toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
  }

  .toast {
    min-width: unset;
    max-width: unset;
    width: 100%;
  }

  .course-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding: 100px 0 40px;
  }

  .page-header__title {
    font-size: 1.4rem;
  }

  .filters__input,
  .filters__select {
    min-width: 100%;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
  }

  .contato-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contato-card {
    padding: 24px 16px;
  }

  .certificates-grid {
    grid-template-columns: 1fr !important;
  }

  .empty-state {
    padding: 40px 20px;
  }

  .dashboard-content__title {
    font-size: 1.4rem;
  }

  .about-numbers {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .about-values {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 6px;
  }

  .pagination__link {
    padding: 8px 12px;
    font-size: 0.82rem;
  }
}

@media (max-width: 400px) {
  .auth-card {
    padding: 24px 16px;
  }

  .auth-card__title {
    font-size: 1.15rem;
  }

  .hero__title {
    font-size: 1.5rem;
  }

  .hero__subtitle {
    font-size: 0.85rem;
  }

  .container {
    padding: 0 12px;
  }

  .btn {
    font-size: 0.85rem;
    padding: 10px 18px;
  }

  .about-values {
    grid-template-columns: 1fr;
  }

  .about-numbers {
    grid-template-columns: 1fr 1fr;
  }

  .quick-cards {
    margin-top: -20px !important;
    padding: 0 2px !important;
  }

  .nav-mobile {
    width: 100% !important;
    max-width: 100vw !important;
  }

  .section {
    padding: 32px 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .about-numbers {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* ==============================
   LGPD — COOKIE CONSENT BANNER
   ============================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1a202c;
  color: #e2e8f0;
  padding: 16px 20px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  animation: slideUp .5s ease forwards;
}

.cookie-banner__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-banner__content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 240px;
  font-size: .9rem;
  line-height: 1.5;
}

.cookie-banner__content svg {
  flex-shrink: 0;
  color: var(--gold);
}

.cookie-banner__content a {
  color: var(--gold);
  text-decoration: underline;
  font-weight: 600;
}

.cookie-banner__content a:hover {
  color: #d4a843;
}

/* ==============================
   LGPD — CHECKBOX DE CONSENTIMENTO
   ============================== */
.lgpd-checkbox {
  margin: 8px 0;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

.checkbox-label__text a {
  color: var(--gold);
  text-decoration: underline;
  font-weight: 600;
}

  .checkbox-label__text a:hover {
  color: #d4a843;
}

/* ==============================
   THEME SYSTEM — DARK MODE
   ============================== */
:root {
  --bg-primary: #F9F7F4;
  --bg-secondary: #F2F0EC;
  --bg-card: #FFFFFF;
  --bg-input: #FFFFFF;
  --border-color: #e2e8f0;
  --text-primary: #1A1A1A;
  --text-on-dark: #FFFFFF;
  --shadow-color: rgba(0,0,0,.08);
}

[data-theme="dark"] {
  --bg-primary: #121212;
  --bg-secondary: #1A1A1A;
  --bg-card: #252525;
  --bg-input: #333;
  --border-color: #3a3a3a;
  --text-primary: #E4E4E4;
  --text-muted: #9E9E9E;
  --cream: #121212;
  --warm-gray: #1A1A1A;
  --white: #252525;
  --text: #E4E4E4;
  --brown-dark: #7ABA8A;
  --brown-mid: #8DB57A;
  --teal: #D4A847;
  --gold: #D4A847;
  --gold-hover: #C49A3A;
  --forest-deep: #7ABA8A;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.3);
  --shadow: 0 8px 32px rgba(0,0,0,.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.5);
  --shadow-color: rgba(0,0,0,.4);
}

[data-theme="dark"] body {
  background: var(--bg-primary);
  color: var(--text-primary);
}

[data-theme="dark"] .header {
  background: rgba(18,18,18,.95);
}

[data-theme="dark"] .header--scrolled {
  background: rgba(18,18,18,.98);
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
}

[data-theme="dark"] .footer {
  background: #0a0a0a;
}

[data-theme="dark"] .admin-card,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .post-card,
[data-theme="dark"] .course-card,
[data-theme="dark"] .material-card {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form__input,
[data-theme="dark"] .form__textarea,
[data-theme="dark"] .form__select {
  background: var(--bg-input);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form__input:focus {
  border-color: var(--gold);
}

[data-theme="dark"] .alert--danger {
  background: #2a1515;
  color: #fc8181;
  border-color: #5a2020;
}

[data-theme="dark"] .modal-content,
[data-theme="dark"] .lightbox__content {
  background: var(--bg-card);
}

[data-theme="dark"] .cookie-banner {
  background: #0a0a0a;
  border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .dashboard-sidebar {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .nav-mobile {
  background: var(--bg-card);
}

[data-theme="dark"] .nav-mobile__link {
  color: var(--text-primary);
}

[data-theme="dark"] .dashboard-nav__link:hover {
  background: var(--bg-secondary);
  color: var(--gold);
}

[data-theme="dark"] .dashboard-nav__link.text-danger:hover {
  background: rgba(220,53,69,.15);
  color: #f87171;
}

[data-theme="dark"] .text-danger { color: #f87171; }

[data-theme="dark"] .testimonials-swiper .swiper-slide {
  background: var(--bg-card);
}

[data-theme="dark"] .section__subtitle {
  color: var(--text-muted);
}

[data-theme="dark"] a:not(.btn):not(.access-toolbar__btn) {
  color: var(--gold);
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
  color: var(--text-primary);
}

[data-theme="dark"] .text-muted { color: var(--text-muted) !important; }

[data-theme="dark"] .section,
[data-theme="dark"] .hero,
[data-theme="dark"] .player-layout {
  background: var(--bg-primary);
}

[data-theme="dark"] .player-main,
[data-theme="dark"] .player-info {
  background: var(--bg-primary);
  color: var(--text);
}

[data-theme="dark"] .player-sidebar {
  background: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text);
}

[data-theme="dark"] .player-sidebar .module-header {
  color: var(--text-primary);
}

[data-theme="dark"] .player-sidebar .lesson-item {
  color: var(--text-primary);
}

[data-theme="dark"] .player-sidebar .lesson-item:hover {
  background: var(--bg-secondary);
}

[data-theme="dark"] .player-sidebar .lesson-item--active {
  background: var(--bg-secondary);
  border-color: var(--gold);
}

[data-theme="dark"] .player-tabs {
  border-color: var(--border-color);
}

[data-theme="dark"] .player-tab-content {
  color: var(--text-primary);
}

[data-theme="dark"] .forum-category,
[data-theme="dark"] .forum-post {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .forum-category__header {
  border-color: var(--border-color);
}

[data-theme="dark"] .forum-topic {
  border-color: var(--border-color);
}

[data-theme="dark"] .forum-topic:hover {
  background: var(--bg-secondary);
}

[data-theme="dark"] .forum-post--solution {
  border-color: var(--gold);
  background: rgba(212, 168, 71, 0.08);
}

[data-theme="dark"] .forum-form {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme="dark"] .course-detail-header,
[data-theme="dark"] .curso-detalhes {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .rating-summary,
[data-theme="dark"] .rating-item {
  border-color: var(--border-color);
}

[data-theme="dark"] .rating-star {
  color: var(--gold);
}

[data-theme="dark"] .material-card {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .badge--success { background: #1a3a1a; color: #7cda7c; }
[data-theme="dark"] .badge--warning { background: #3a2a1a; color: #e8c84a; }
[data-theme="dark"] .badge--muted   { background: #2a2a2a; color: #aaa; }

[data-theme="dark"] .toast--success { border-left-color: #28A745; color: #7cda7c; }
[data-theme="dark"] .toast--error { border-left-color: #DC3545; color: #fc8181; }
[data-theme="dark"] .toast--info { border-left-color: var(--gold); color: var(--gold); }

[data-theme="dark"] .back-to-top {
  background: var(--brown-mid);
  color: #fff;
}

[data-theme="dark"] .about-grid__item {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .testimonial-card {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .section-title {
  color: var(--text-primary);
}

[data-theme="dark"] .btn--outline {
  color: var(--text-primary);
  border-color: var(--border-color);
}

[data-theme="dark"] .btn--outline:hover {
  background: var(--bg-secondary);
  border-color: var(--gold);
  color: var(--gold);
}

[data-theme="dark"] .quick-card {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .quick-card__title {
  color: var(--text-primary);
}

[data-theme="dark"] table, [data-theme="dark"] th, [data-theme="dark"] td {
  border-color: var(--border-color);
}

[data-theme="dark"] th {
  color: var(--text-primary);
}

[data-theme="dark"] td {
  color: var(--text-primary);
}

[data-theme="dark"] .progress-ring__bg {
  stroke: var(--border-color);
}

[data-theme="dark"] .progress-ring__fill {
  stroke: var(--gold);
}

[data-theme="dark"] .access-toolbar {
  background: var(--bg-card);
  border-color: var(--border-color);
}

[data-theme="dark"] .badge--success,
[data-theme="dark"] .badge--warning,
[data-theme="dark"] .badge--muted {
  opacity: 0.85;
}

[data-theme="dark"] .badge--gold { background: var(--gold); color: #121212; }

[data-theme="dark"] .toast--success { background: #1a3a1a; color: #b8e6b8; border-left-color: var(--teal); }
[data-theme="dark"] .toast--error   { background: #3a1a1a; color: #e6b8b8; border-left-color: #DC3545; }
[data-theme="dark"] .toast--info    { background: #1a1a3a; color: #b8b8e6; border-left-color: var(--gold); }

[data-theme="dark"] .admin-table th { color: #aaa; }
[data-theme="dark"] .admin-table td { color: #ccc; }

[data-theme="dark"] .admin-card__header h3 { color: var(--text-primary); }

[data-theme="dark"] .page-header__title { color: var(--text-primary); }
[data-theme="dark"] .page-header__breadcrumb { color: var(--text-muted); }
[data-theme="dark"] .page-header__breadcrumb a { color: var(--gold); }

/* ==============================
   THEME SYSTEM — HIGH CONTRAST
   ============================== */
[data-contrast="high"] {
  --text: #000000;
  --text-muted: #222222;
  --text-primary: #000000;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F0F0F0;
  --bg-card: #FFFFFF;
  --bg-input: #FFFFFF;
  --border-color: #000;
  --gold: #7A7200;
  --gold-hover: #5C5600;
  --brown-dark: #0A3D15;
  --brown-mid: #2A5A1A;
  --teal: #6B4A00;
  --cream: #FFFFFF;
  --warm-gray: #F0F0F0;
  --white: #FFFFFF;
  --shadow: none;
  --shadow-sm: none;
  --shadow-lg: none;
  --shadow-color: transparent;
}

[data-contrast="high"] body {
  color: #000;
  background: #fff;
}

[data-contrast="high"] .access-toolbar,
[data-contrast="high"] .admin-card,
[data-contrast="high"] .auth-card,
[data-contrast="high"] .post-card,
[data-contrast="high"] .course-card,
[data-contrast="high"] .material-card,
[data-contrast="high"] .forum-category,
[data-contrast="high"] .forum-post,
[data-contrast="high"] .forum-topic,
[data-contrast="high"] .forum-form,
[data-contrast="high"] .player-sidebar,
[data-contrast="high"] .about-grid__item,
[data-contrast="high"] .testimonial-card,
[data-contrast="high"] .quick-card,
[data-contrast="high"] .course-detail-header,
[data-contrast="high"] .rating-summary,
[data-contrast="high"] .rating-item,
[data-contrast="high"] .form-control,
[data-contrast="high"] .form__input,
[data-contrast="high"] .form__textarea,
[data-contrast="high"] .form__select,
[data-contrast="high"] table, [data-contrast="high"] th, [data-contrast="high"] td {
  border-color: #000 !important;
}

[data-contrast="high"] a:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: #0000EE;
}

[data-contrast="high"] a:not(.btn):visited {
  color: #551A8B;
}

[data-contrast="high"] .btn {
  border-width: 2px;
  font-weight: 700;
}

[data-contrast="high"] .btn--primary {
  background: #000;
  color: #fff;
  border-color: #000;
}

[data-contrast="high"] .btn--outline {
  background: transparent;
  color: #000;
  border-color: #000;
}

[data-contrast="high"] .btn--danger {
  background: #c00;
  color: #fff;
  border-color: #c00;
}

[data-contrast="high"] .form-control,
[data-contrast="high"] .form__input,
[data-contrast="high"] .form__textarea,
[data-contrast="high"] .form__select {
  border-width: 2px;
  background: #fff;
  color: #000;
}

[data-contrast="high"] .header,
[data-contrast="high"] .footer,
[data-contrast="high"] .nav-mobile {
  background: #fff;
  border-bottom: 2px solid #000;
}

[data-contrast="high"] .footer {
  border-top: 2px solid #000;
  border-bottom: none;
}

[data-contrast="high"] .nav__link,
[data-contrast="high"] .nav-mobile__link {
  color: #000;
}

[data-contrast="high"] .nav__link:hover,
[data-contrast="high"] .nav-mobile__link:hover {
  text-decoration: underline;
  background: transparent;
}

[data-contrast="high"] .admin-card,
[data-contrast="high"] .auth-card,
[data-contrast="high"] .post-card,
[data-contrast="high"] .course-card,
[data-contrast="high"] .material-card,
[data-contrast="high"] .forum-category,
[data-contrast="high"] .forum-post,
[data-contrast="high"] .forum-form,
[data-contrast="high"] .about-grid__item,
[data-contrast="high"] .testimonial-card,
[data-contrast="high"] .quick-card,
[data-contrast="high"] .player-sidebar {
  background: #fff;
  border: 2px solid #000;
  box-shadow: none;
}

[data-contrast="high"] .forum-topic {
  border-bottom: 1px solid #000;
}

[data-contrast="high"] .forum-topic:hover {
  background: #f0f0f0;
}

[data-contrast="high"] .forum-post__avatar {
  border: 2px solid #000;
}

[data-contrast="high"] h1, [data-contrast="high"] h2, [data-contrast="high"] h3, [data-contrast="high"] h4,
[data-contrast="high"] p, [data-contrast="high"] li, [data-contrast="high"] span,
[data-contrast="high"] .section-title, [data-contrast="high"] .section__subtitle {
  color: #000;
}

[data-contrast="high"] .section {
  background: #fff;
}

[data-contrast="high"] .player-layout,
[data-contrast="high"] .player-main,
[data-contrast="high"] .player-info,
[data-contrast="high"] .player-video-container {
  background: #fff;
}

[data-contrast="high"] .player-sidebar .lesson-item {
  color: #000;
}

[data-contrast="high"] .player-sidebar .lesson-item--active {
  background: #e0e0e0;
  border-left: 3px solid #000;
}

[data-contrast="high"] .access-toolbar {
  background: #fff;
  border: 1px solid #000;
  border-right: none;
}

[data-contrast="high"] .access-toolbar__btn {
  color: #000;
}

[data-contrast="high"] .access-toolbar__btn.active {
  background: #000;
  color: #fff;
}

[data-contrast="high"] .access-toolbar__btn .tooltip {
  background: #000;
  color: #fff;
  border: 1px solid #fff;
}

[data-contrast="high"] .rating-star {
  color: #000;
}

[data-contrast="high"] .badge {
  border: 1px solid #000;
  font-weight: 700;
}

[data-contrast="high"] .back-to-top {
  background: #000;
  color: #fff;
  border: 2px solid #fff;
}

[data-contrast="high"] .cookie-banner {
  background: #fff;
  color: #000;
  border-top: 2px solid #000;
}

[data-contrast="high"] .cookie-banner__content a {
  color: #0000EE;
}

[data-contrast="high"] table, [data-contrast="high"] th, [data-contrast="high"] td {
  border: 1px solid #000;
}

/* ==============================
   ACCESSIBILITY TOOLBAR
   ============================== */
.access-toolbar {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: 12px 0 0 12px;
  box-shadow: var(--shadow);
}

.access-toolbar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background .2s, color .2s;
  position: relative;
}

.access-toolbar__btn:hover {
  background: var(--bg-secondary);
  color: var(--gold);
}

.access-toolbar__btn.active {
  background: var(--gold);
  color: #fff;
}

.access-toolbar__group {
  position: relative;
}

.access-toolbar__btn .tooltip {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: #1a202c;
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: .75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.access-toolbar__btn:hover .tooltip {
  opacity: 1;
}

/* Font size popup */
/* Unified accessibility menu popup */
.access-menu-popup {
  display: none;
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  flex-direction: column;
  gap: 12px;
  width: 280px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.access-menu-popup--open {
  display: flex;
}

.access-menu-popup__info-content--open {
  max-height: 250px !important;
  padding-top: 8px;
  padding-bottom: 4px;
}

.access-menu-popup__section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.access-menu-popup__title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.access-menu-popup__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.access-menu-popup__separator {
  height: 1px;
  background: var(--border-color);
  opacity: 0.15;
  margin: 4px 0;
}

.access-menu-popup__toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.access-menu-popup__toggle-btn * {
  pointer-events: none;
}

.access-menu-popup__toggle-btn svg {
  flex-shrink: 0;
  margin-right: 8px;
  opacity: 0.8;
}

.access-menu-popup__toggle-btn span {
  flex: 1;
}

.access-menu-popup__toggle-btn:hover {
  background: var(--bg-card);
  border-color: var(--gold);
}

.access-menu-popup__toggle-btn.active {
  background: var(--bg-card);
  border-color: var(--gold);
}

/* Switch Styles */
.access-menu-popup__switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: #cbd5e0;
  border-radius: 99px;
  transition: background 0.2s ease;
}

.access-menu-popup__switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}

.access-menu-popup__toggle-btn.active .access-menu-popup__switch {
  background: var(--gold);
}

.access-menu-popup__toggle-btn.active .access-menu-popup__switch::after {
  transform: translateX(16px);
}

.access-font-popup__btn {
  width: 60px;
  height: 44px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  transition: background .15s, border-color .15s;
}

.access-font-popup__btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.access-font-popup__level {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.access-font-popup__reset {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 10px 16px;
  margin-top: 4px;
  border-radius: var(--radius-sm);
  text-decoration: underline;
  width: 100%;
  display: block;
  text-align: center;
}

.access-font-popup__reset:hover {
  color: var(--gold);
}

@media (max-width: 768px) {
  .access-menu-popup {
    right: 0;
    left: auto;
    top: auto;
    bottom: calc(100% + 12px);
    transform: none;
    width: 280px;
  }
}

.field-font-popup {
  display: none;
  position: fixed;
  z-index: 10001;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 6px 8px;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.field-font-popup--visible {
  display: inline-flex;
}

.field-font-popup__btn {
  width: 36px;
  height: 30px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
  font-size: .85rem;
  transition: background .15s, border-color .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.field-font-popup__btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.field-font-popup__label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 32px;
  text-align: center;
}

@media (max-width: 768px) {
  .field-font-popup__btn {
    width: 40px;
    height: 34px;
    font-size: .95rem;
  }
}

.font-size--large {
  font-size: 125%;
}

.font-size--xlarge {
  font-size: 150%;
}

/* Skip to main content */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 10000;
  background: var(--gold);
  color: #fff;
  padding: 12px 24px;
  font-weight: 700;
  border-radius: 0 0 8px 0;
  transition: top .3s;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Focus visible for keyboard nav */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ARIA live regions base */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ==============================
   STUDENT PROGRESS
   ============================== */
.progress-ring {
  position: relative;
  width: 80px;
  height: 80px;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.progress-ring__bg {
  fill: none;
  stroke: var(--bg-secondary);
  stroke-width: 6;
}

.progress-ring__fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset .6s ease;
}

.progress-ring__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
}

.progress-bar {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), #C4872A);
  border-radius: 99px;
  transition: width .6s ease;
}

.progress-label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-label__text {
  font-size: .85rem;
  color: var(--text-muted);
}

/* Course progress card */
.course-progress {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform .3s, box-shadow .3s;
}

.course-progress:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.course-progress__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.course-progress__title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  flex: 1;
}

.course-progress__meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: .85rem;
  color: var(--text-muted);
}

.course-progress__actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==============================
   DELETE ACCOUNT
   ============================== */
.delete-account-section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.delete-account-section h3 {
  color: #dc3545;
  font-family: var(--font-title);
  margin-bottom: 8px;
}

.delete-account-section p {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 16px;
}

/* ==============================
   FORUM
   ============================== */
.forum-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.forum-header__title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
}

.forum-category {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
  overflow: hidden;
}

.forum-category__header {
  padding: 16px 20px;
  background: var(--bg-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forum-category__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
}

.forum-topic {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: background .2s;
}

.forum-topic:last-child {
  border-bottom: none;
}

.forum-topic:hover {
  background: var(--bg-secondary);
}

.forum-topic__icon {
  flex-shrink: 0;
  color: var(--text-muted);
}

.forum-topic__icon.pinned {
  color: var(--gold);
}

.forum-topic__info {
  flex: 1;
  min-width: 0;
}

.forum-topic__title {
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.forum-topic__title a {
  color: var(--text);
}

.forum-topic__title a:hover {
  color: var(--gold);
}

.forum-topic__meta {
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.forum-topic__badge {
  font-size: .7rem;
  background: var(--gold);
  color: #fff;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 600;
}

.forum-topic__stats {
  flex-shrink: 0;
  text-align: right;
  font-size: .8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Forum topic detail */
.forum-post {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.forum-post--solution {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(147,137,37,.05), transparent);
}

.forum-post__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.forum-post__body {
  flex: 1;
  min-width: 0;
}

.forum-post__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.forum-post__author {
  font-weight: 700;
  font-size: .9rem;
}

.forum-post__date {
  font-size: .8rem;
  color: var(--text-muted);
}

.forum-post__content {
  font-size: .92rem;
  line-height: 1.7;
  color: var(--text);
}

.forum-post__content p {
  margin-bottom: 8px;
}

/* Forum form */
.forum-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.forum-form__title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

/* ==============================
   COURSE RATINGS
   ============================== */
.star-rating {
  display: flex;
  gap: 4px;
  direction: rtl;
}

.star-rating input {
  display: none;
}

.star-rating label {
  cursor: pointer;
  font-size: 1.5rem;
  color: #ddd;
  transition: color .2s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
  color: var(--gold);
}

.star-rating--display {
  display: flex;
  gap: 2px;
}

.star-rating--display svg {
  color: #ddd;
}

.star-rating--display .star--filled {
  color: var(--gold);
}

.rating-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
}

.rating-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.rating-card__author {
  font-weight: 600;
  font-size: .9rem;
}

.rating-card__date {
  font-size: .8rem;
  color: var(--text-muted);
}

.rating-card__text {
  font-size: .9rem;
  color: var(--text);
  line-height: 1.6;
}

.rating-average {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.rating-average__number {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-title);
  color: var(--gold);
}

.rating-average__stars {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.rating-average__label {
  font-size: .85rem;
  color: var(--text-muted);
}

/* ==============================
   DRAG & DROP — Sortable
   ============================== */
.sortable-ghost {
  opacity: .4;
  background: var(--gold) !important;
}

.sortable-drag {
  opacity: .8;
  transform: rotate(2deg);
}

.drag-handle {
  cursor: grab;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: color .2s, background .2s;
}

.drag-handle:hover {
  color: var(--gold);
  background: var(--bg-secondary);
}

.drag-handle:active {
  cursor: grabbing;
}

/* ==============================
   PLAYER ENHANCEMENTS
   ============================== */
.player-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.player-progress {
  margin-bottom: 20px;
}

.player-progress__header {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* Module accordion active state */
.module-header.active {
  background: var(--bg-secondary);
}

/* ==============================
   RESPONSIVE: ACCESS TOOLBAR
   ============================== */
@media (max-width: 768px) {
  .access-toolbar {
    top: auto;
    bottom: 24px;
    right: 24px;
    left: auto;
    transform: none;
    border-radius: 0;
    border: none;
    width: auto;
    height: auto;
    box-shadow: none;
    background: transparent;
  }

  .access-toolbar__btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
  }

  .access-toolbar__btn:hover, .access-toolbar__btn.active {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
  }

  .access-toolbar__btn .tooltip {
    display: none;
  }

  .access-menu-popup {
    right: 0;
    left: auto;
    top: auto;
    bottom: calc(100% + 12px);
    transform: none;
    width: 280px;
    box-shadow: var(--shadow-lg);
    border-radius: 16px;
  }

  .progress-ring {
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 480px) {
  .forum-topic {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .forum-topic__stats {
    text-align: left;
    width: 100%;
  }

  .rating-average {
    flex-direction: column;
    text-align: center;
  }

  .course-progress__header {
    flex-direction: column;
  }
}

/* ==========================================================================
   TEAM SECTION & CAROUSEL
   ========================================================================== */
.team-swiper {
  padding-bottom: 40px !important;
}

.team-swiper-pagination .swiper-pagination-bullet {
  background: var(--gold) !important;
  opacity: 0.3;
}

.team-swiper-pagination .swiper-pagination-bullet-active {
  background: var(--gold) !important;
  opacity: 1 !important;
}

.team-card {
  text-align: center;
  background: var(--bg-card, #ffffff);
  padding: 30px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  border: 1px solid var(--border-color);
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.team-card__avatar-frame {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 20px;
  border-radius: 60% 40% 60% 40% / 40% 60% 40% 60%;
  overflow: hidden;
  border: 5px solid rgba(152, 201, 80, 0.15);
  background: #eae3d2;
  transition: border-color var(--transition), transform var(--transition);
  box-shadow: var(--shadow-sm);
}

.team-card:hover .team-card__avatar-frame {
  border-color: rgba(152, 201, 80, 0.35);
  transform: scale(1.03) rotate(2deg);
}

.team-card__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card__avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-gray), #e4ebf0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.team-card__name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.team-card__category {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.team-card__role {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(196, 135, 42, 0.1);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.72rem;
  border-radius: 30px;
  text-transform: uppercase;
  margin-top: auto;
  border: 1px solid rgba(196, 135, 42, 0.15);
}

/* ==============================
   PAGE LEAVES (global decoration)
   ============================== */
.page-leaf {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}

.page-leaf--tl {
  top: 120px;
  left: -40px;
  width: 200px;
  height: 200px;
  transform: rotate(-20deg);
}

.page-leaf--tr {
  top: 80px;
  right: -30px;
  width: 140px;
  height: 140px;
  transform: rotate(30deg);
  opacity: 0.35;
}

.page-leaf--bl {
  bottom: 60px;
  left: -20px;
  width: 100px;
  height: 100px;
  transform: rotate(-15deg);
  animation: float 7s ease-in-out infinite;
}

.page-leaf--br {
  bottom: 100px;
  right: -40px;
  width: 170px;
  height: 170px;
  transform: rotate(25deg);
  opacity: 0.4;
  animation: float 8s ease-in-out infinite alternate-reverse;
}

.page-leaf--solid {
  opacity: 0.12;
}

@media (max-width: 768px) {
  .page-leaf--tl { width: 140px; height: 140px; }
  .page-leaf--tr { width: 90px; height: 90px; }
  .page-leaf--bl { width: 70px; height: 70px; left: -15px; }
  .page-leaf--br { width: 110px; height: 110px; }
}

/* ==============================
   STATS GRID (equal-height cards)
   ============================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.stats-grid .admin-card {
  display: flex;
  flex-direction: column;
}

.stats-grid .admin-card .admin-card__header {
  flex-shrink: 0;
}

.stats-grid .admin-card > div:not(.admin-card__header) {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.stats-grid .admin-card > div:not(.admin-card__header) > div:last-child {
  margin-top: auto;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.news-swiper .card__text,
.news-swiper .card__title,
.cards-grid:has(.card__footer a[href*="noticia"]) .card__text,
.cards-grid:has(.card__footer a[href*="noticia"]) .card__title {
  text-align: justify;
}

/* ==============================
   MEDIA LIBRARY
   ============================== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.media-item {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #edf2f7;
  overflow: hidden;
  position: relative;
  transition: box-shadow .2s;
}

.media-item:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

.media-item__thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  background: #f8fafc;
}

.media-item__info {
  padding: 12px 16px;
}

.media-item__delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(220,38,38,.9);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s;
  text-decoration: none;
}

.media-item:hover .media-item__delete {
  opacity: 1;
}

.media-item__delete:hover {
  background: rgb(185,28,28);
}

.drop-zone {
  border: 2px dashed #d0d5dd;
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  margin-bottom: 24px;
}

.drop-zone:hover,
.drop-zone--active {
  border-color: var(--gold);
  background: rgba(196,135,42,.04);
}

.drop-zone__icon {
  color: var(--gold);
  margin-bottom: 12px;
}

.drop-zone__text {
  color: var(--admin-text-muted);
  font-size: .9rem;
}

/* ==============================
   TRANSLATOR BUTTONS
   ============================== */
.footer__link-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: .85rem;
  color: var(--white);
  opacity: .7;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer__link-btn:hover,
.footer__link-btn--active {
  opacity: 1;
  color: var(--gold);
  padding-left: 4px;
}


