/* Public store pages (participant landing, course search, enroll) */
:root {
  --sf-bg: #f4f6f9;
  --sf-hero: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 45%, #3d7ab5 100%);
  --sf-accent: #f5c518;
  --sf-accent-hover: #e6b800;
  --sf-text: #1a1a1a;
  --sf-muted: #5c6570;
  --sf-card-border: #e2e8f0;
  --sf-radius: 12px;
  --sf-shadow: 0 10px 40px rgba(30, 58, 95, 0.12);
  --sf-max: 1120px;
}

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

body.sf-body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, sans-serif;
  color: var(--sf-text);
  background: var(--sf-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sf-skip {
  position: absolute;
  left: -9999px;
}
.sf-skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: #fff;
}

.sf-nav {
  background: #fff;
  border-bottom: 1px solid var(--sf-card-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.sf-nav-inner {
  max-width: var(--sf-max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.sf-brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.sf-brand:hover {
  opacity: 0.9;
}
.sf-brand img {
  display: block;
  max-height: 44px;
  width: auto;
}
.sf-nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem 1.25rem;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sf-nav-links a {
  color: var(--sf-muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.sf-nav-links a:hover {
  color: #1e3a5f;
}
.sf-nav-dropdown {
  position: relative;
}
.sf-nav-dropdown__toggle {
  border: 0;
  background: transparent;
  color: var(--sf-muted);
  font-size: 0.95rem;
  padding: 0;
  cursor: pointer;
}
.sf-nav-dropdown__toggle:hover,
.sf-nav-dropdown__toggle:focus {
  color: #1e3a5f;
  outline: none;
}
.sf-nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 12rem;
  padding: 0.35rem 0;
  border: 1px solid var(--sf-card-border);
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  display: none;
  z-index: 20;
}
.sf-nav-dropdown:hover .sf-nav-dropdown__menu,
.sf-nav-dropdown:focus-within .sf-nav-dropdown__menu {
  display: block;
}
.sf-nav-dropdown__menu a {
  display: block;
  padding: 0.55rem 0.9rem;
  white-space: nowrap;
}
.sf-nav-dropdown__menu a:hover {
  background: #f3f4f6;
}
.sf-nav-user {
  font-size: 0.9rem;
  color: var(--sf-muted);
}

.sf-main {
  flex: 1;
}

.sf-hero {
  background: var(--sf-hero);
  color: #fff;
  padding: 3rem 1.25rem 3.5rem;
  text-align: center;
}
.sf-hero-inner {
  max-width: 36rem;
  margin: 0 auto;
}
.sf-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
}
.sf-hero p {
  margin: 0 0 1.75rem;
  opacity: 0.92;
  font-size: 1rem;
}

.sf-form-search {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}
.sf-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
}
.sf-input:focus {
  outline: none;
  border-color: var(--sf-accent);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.35);
}
.sf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.sf-btn:active {
  transform: scale(0.98);
}
.sf-btn-accent {
  background: var(--sf-accent);
  color: #1a1a1a;
}
.sf-btn-accent:hover {
  background: var(--sf-accent-hover);
  color: #1a1a1a;
}
.sf-btn-block {
  width: 100%;
}
.sf-btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
}
.sf-btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.sf-section {
  max-width: var(--sf-max);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.sf-alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.sf-alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.sf-alert-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.sf-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  max-width: 42rem;
  margin: 0 auto;
}
.sf-card {
  background: #fff;
  border: 1px solid var(--sf-card-border);
  border-radius: var(--sf-radius);
  box-shadow: var(--sf-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.2s;
}
@media (min-width: 768px) {
  .sf-card {
    flex-direction: row;
  }
}
.sf-card-link:hover .sf-card {
  box-shadow: 0 16px 48px rgba(30, 58, 95, 0.18);
  transform: translateY(-2px);
}
.sf-card-media {
  flex-shrink: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(145deg, #3d7ab5, #1e3a5f);
}
@media (min-width: 768px) {
  .sf-card-media {
    width: 220px;
    height: auto;
    min-height: 200px;
  }
}
.sf-card-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
}
.sf-card-body h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}
.sf-meta {
  font-size: 0.9rem;
  color: var(--sf-muted);
  margin: 0.35rem 0;
}
.sf-muted {
  color: var(--sf-muted);
}

.sf-detail-grid {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}
.sf-detail-card {
  background: #fff;
  border: 1px solid var(--sf-card-border);
  border-radius: var(--sf-radius);
  box-shadow: var(--sf-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px) {
  .sf-detail-card {
    flex-direction: row;
  }
}
.sf-detail-media {
  width: 100%;
  min-height: 240px;
  background: linear-gradient(160deg, #2d5a87, #1e3a5f);
}
@media (min-width: 768px) {
  .sf-detail-media {
    width: 33%;
    min-height: 320px;
  }
}
.sf-detail-body {
  padding: 2rem;
  flex: 1;
}
.sf-detail-body h2 {
  margin: 0 0 1rem;
  font-size: 1.75rem;
}
.sf-icon-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--sf-muted);
}
.sf-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.sf-table-wrap {
  overflow-x: auto;
}
.sf-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--sf-radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.sf-table th,
.sf-table td {
  border: 1px solid var(--sf-card-border);
  padding: 0.75rem 1rem;
  text-align: left;
}
.sf-table th {
  background: #f1f5f9;
  font-weight: 600;
  font-size: 0.875rem;
}
.sf-pwd-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  color: #1e3a5f;
  font-size: 0.875rem;
}

.sf-footer {
  background: #fff;
  border-top: 1px solid var(--sf-card-border);
  padding: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--sf-muted);
}
.sf-footer a {
  color: #2d5a87;
}

.sf-about-hero {
  background: #e8ecf2;
  padding: 3rem 1.25rem;
}
.sf-about-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.75rem);
  text-align: center;
  color: #1e3a5f;
}

.sf-auth-box {
  max-width: 28rem;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: var(--sf-radius);
  box-shadow: var(--sf-shadow);
}

.sf-auth-box--wide {
  max-width: 36rem;
}

.sf-auth-page .sf-auth-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.sf-auth-stack .sf-field {
  margin-bottom: 1rem;
}
.sf-auth-stack .sf-field-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) {
  .sf-auth-stack .sf-field-row {
    flex-direction: row;
  }
  .sf-auth-stack .sf-field-row .sf-field {
    flex: 1;
  }
}
.sf-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--sf-muted);
}
.sf-field-error {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: #b91c1c;
}
.sf-auth-stack .sf-input--light {
  border: 2px solid var(--sf-card-border);
  background: #fff;
  color: var(--sf-text);
}
.sf-auth-stack .sf-input--light:focus {
  border-color: #2d5a87;
  box-shadow: 0 0 0 3px rgba(45, 90, 135, 0.2);
}
.sf-auth-footer-link {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.95rem;
}
.sf-auth-footer-link a {
  color: #2d5a87;
}

.sf-messages {
  max-width: var(--sf-max);
  margin: 0 auto;
  padding: 0.75rem 1.25rem 0;
}
.sf-message {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.sf-message--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.sf-message--success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.sf-message--warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.sf-message--info,
.sf-message--debug {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
