/* Benefits section — structure-ready */
.benefits { background: var(--tg-offwhite); }
.benefits .container { padding: 40px 16px; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.benefit-card { background: #fff; border: 1px solid var(--tg-grey); border-radius: var(--radius-8); padding: 16px; }

/* Raw benefits section (from backup) */
.benefits-section { background: var(--tg-offwhite); position: relative; }
.benefits-section .container { padding: 48px 16px; }
.benefits-cta { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; align-items: center; }
.benefits-cta .cta-content h3 { color: var(--tg-navy); font-size: 1.8rem; margin-bottom: 8px; }
.benefits-cta .cta-content p { color: var(--tg-charcoal); }
.benefit-cards-grid { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 16px; margin-top: 18px; }
.benefit-card { background: #fff; border: 1px solid var(--tg-grey); border-radius: var(--radius-8); padding: 16px; box-shadow: var(--shadow-1); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.benefit-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(12,35,64,0.18); }
.benefit-icon { width: 64px; height: 64px; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(245,245,245,0.95)); box-shadow: 6px 6px 14px rgba(0,0,0,0.12), inset 2px 2px 6px rgba(255,255,255,0.6); margin-bottom: 10px; }
.benefit-content h4 { color: var(--tg-navy); margin-bottom: 6px; }
.cta-buttons { margin-top: 20px; }
.animated-btn { width: -webkit-fill-available; background: var(--tg-gradient-cta); color: #fff; box-shadow: var(--shadow-1); border-radius: var(--radius-8); padding: 12px 16px; }
.cta-visual { position: relative; min-height: 220px; }
.floating-benefits { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; justify-items: center; align-items: center; }
.floating-benefits .floating-item { font-size: 28px; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(245,245,245,0.95)); box-shadow: 6px 6px 14px rgba(0,0,0,0.12), inset 2px 2px 6px rgba(255,255,255,0.6); }

@media (max-width: 1024px) {
  .benefits-cta { grid-template-columns: 1fr; }
  .benefit-cards-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}
@media (max-width: 576px) {
  .benefit-cards-grid { grid-template-columns: 1fr; }
}

/* Trend Registration Benefits section */
.registration-benefits { background: #fff; border-top: 1px solid var(--tg-grey); display: flex; justify-content: center; align-items: center; }
.registration-benefits .container { padding: 38px 16px; max-width: 1500px; margin: 0 auto; position: relative; width: 100%; }
.reg-benefits-header { text-align: center; }
.reg-benefits-header h2 { color: var(--tg-navy); font-size: clamp(1.6rem, 2.6vw, 2rem); animation: revealUp 500ms ease both; }
.reg-benefits-header p { color: #000000; font-size: clamp(1rem, 1.5vw, 1.125rem); animation: fadeIn 700ms ease both 120ms; }
.reg-benefits-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 18px auto 0; justify-items: center; max-width: 100%; }
.reg-benefit-card { 
  border: 1px solid #e6e8eb;
  border-radius: 16px;
  background: linear-gradient(9deg, #efff00b5 0%, #44a0fb 100%);
  box-shadow:
    0 8px 24px rgba(0,0,0,0.1),
    0 3px 8px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.6);
  padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.reg-benefit-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(12,35,64,0.18); }
.icon-3d { width: clamp(56px, 8vw, 72px); height: clamp(56px, 8vw, 72px); border-radius: 16px; display: grid; place-items: center; background: #0c2340; color: #fff; box-shadow: 6px 6px 14px rgba(0,0,0,0.25), inset 2px 2px 4px rgba(255,255,255,0.15); margin-bottom: 10px; }
.icon-3d svg { width: 100%; height: 100%; }
.icon-3d span { font-size: clamp(2.2rem, 6vw, 3rem); line-height: 1; }
.reg-benefit-card h4 { font-size: clamp(1rem, 1.2vw + 0.8rem, 1.3rem); color: var(--tg-navy); }
.reg-benefit-card p { font-size: clamp(0.9rem, 1vw + 0.6rem, 1.1rem); color: var(--tg-charcoal); }
.reg-benefits-actions { margin-top: 24px; display: flex; justify-content: center; }

/* Horizontal layout with equal-width cards above 577px */
@media (min-width: 577px) {
  .reg-benefits-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; overflow: visible; }
.reg-benefit-card { border-radius: 16px; }
}
/* Mobile horizontal scroll-snap under 577px */
@media (max-width: 576px) {
  .reg-benefits-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; gap: 0; }
  .reg-benefits-grid::-webkit-scrollbar { display: none; }
.reg-benefit-card { flex: 0 0 100%; max-width: 100%; scroll-snap-align: start; border-radius: 0; padding: 22px 18px; }
}

/* Mobile arrow controls for benefits carousel */
@media (max-width: 576px) {
  .reg-mobile-arrows {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
    pointer-events: none; /* allow buttons to opt-in */
  }
  .reg-snap-prev,
  .reg-snap-next {
    pointer-events: auto;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(12, 35, 64, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    -webkit-backdrop-filter: saturate(140%) blur(4px);
    backdrop-filter: saturate(140%) blur(4px);
    font-size: 20px;
    line-height: 1;
  }
}
@media (min-width: 577px) { .reg-mobile-arrows { display: none; } }

/* Prevent overflow between 577px and 777px by reducing columns */
@media (min-width: 577px) and (max-width: 777px) {
  .reg-benefits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Medium screens: keep all 4 cards in a single row */
@media (min-width: 778px) and (max-width: 1022px) {
.reg-benefits-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Restore 4 columns for larger screens */
@media (min-width: 1024px) {
  .reg-benefits-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Clip any minor horizontal overflow inside the section container */
.registration-benefits .container { overflow: hidden; }

/* Header accent to match Judging */
.registration-benefits .header-accent {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary, #0d6efd), var(--secondary, #00c2ff));
  margin: 12px auto 0;
  max-width: 160px;
}

/* Heading animations */
@keyframes revealUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Modal — centered overlay, theme colors, 3D elements */
/* Registration benefits modal (keeps themed gradient) */
.benefits-modal-overlay { position: fixed; inset: 0; background: rgba(12,35,64,0.55); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 16px; }
.benefits-modal-overlay[aria-hidden="false"] { display: flex; }
.benefits-modal { width: min(820px, 96vw); background: #fff; border-radius: 16px; box-shadow: 0 20px 48px rgba(12,35,64,0.35); border: 1px solid var(--tg-grey); overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; background: var(--tg-gradient-cta); color: #fff; }
.modal-content { padding: 18px; }
.modal-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 16px; }
.modal-card { background: var(--tg-offwhite); border: 1px solid var(--tg-grey); border-radius: 12px; padding: 14px; box-shadow: var(--shadow-1); }
.modal-header h3 { margin: 0; color: #fff; }

@media (max-width: 1024px) { .modal-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); } }
@media (max-width: 576px) { .modal-grid { grid-template-columns: 1fr; } .modal-header { padding: 12px; } }

/* Courses modal — match index.backup.html style */
.courses-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: none; align-items: center; justify-content: center; z-index: 9999; }
.courses-modal-overlay[aria-hidden="false"] { display: flex; }
.courses-modal { width: min(900px, 92vw); max-height: 86vh; overflow: hidden; background: #ffffff; border-radius: 18px; box-shadow: 0 30px 60px rgba(0,0,0,0.25); position: relative; animation: modalPop 280ms ease; display:flex; flex-direction: column; }
.courses-header { padding: 18px 20px; display:flex; align-items:center; justify-content:space-between; background: var(--tg-gradient-cta); color:#fff; border-bottom: none; }
.courses-header h3 { margin:0; font-size:1.2rem; font-weight:800; display:flex; align-items:center; gap:10px; color:#fff; }
.courses-actions { display:flex; align-items:center; gap:8px; }
.courses-actions .btn { min-height: 45px; padding: 10px 14px; border-radius: 10px; }
.courses-header .btn-primary { background: #fff; color: var(--tg-navy); border: 1px solid transparent; }
.courses-header .btn-primary:hover { filter: brightness(0.98); }
.courses-header .btn-ghost { color: #e53935; border: 1px solid rgba(229,57,53,0.6); background: #000000; }
.course-tabs { display:flex; gap:10px; padding: 14px 20px 6px; border-bottom: 1px dashed rgba(0,0,0,0.12); }
.tab-btn { padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.12); background: #f7f7f9; cursor: pointer; font-weight: 700; display:flex; align-items:center; gap:8px; min-width: 0; color: var(--tg-navy); }
.tab-btn.active { background: var(--tg-gradient-cta); color: #fff; border-color: transparent; }
.tab-btn svg { width:18px; height:18px; }
.course-content { padding: 18px; overflow-y: auto; }
.course-section { display: none; }
.course-section.active { display: block; }

/* Note text inside each course tab */
.course-note {
  margin-top: 10px;
  padding: 12px 14px;
  color: var(--tg-charcoal);
  background: var(--tg-offwhite);
  border-left: 4px solid var(--tg-pine);
  border-radius: 10px;
}

@keyframes modalPop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 768px) { 
  .courses-header { padding: 12px 14px; }
  .course-tabs { flex-wrap: wrap; gap: 8px; padding: 10px 14px 6px; }
  .tab-btn { flex: 1 1 100%; padding: 8px 10px; font-size: 0.9rem; }
  .tab-btn svg { width:16px; height:16px; }
}
