/* ================================================================
   Digital Command — main.css
   Custom component styles layered on top of Tailwind CDN
   ================================================================ */

/* ── Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; height: auto; display: block; }

/* ── Container ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}
@media (min-width: 1024px) {
  .container { padding-left: 48px; padding-right: 48px; }
}
.container-narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.container-cta    { max-width: 600px; margin-left: auto; margin-right: auto; }

/* ── Sections ────────────────────────────────────────────────── */
.section    { padding-top: 96px;  padding-bottom: 96px; }
.section-sm { padding-top: 64px;  padding-bottom: 64px; }
.section-bg { background: #F5F5F5; }

/* ── Gold decorative lines ───────────────────────────────────── */
.gold-line        { display: block; width: 48px; height: 2px; background: #C8A951; margin-bottom: 16px; }
.gold-line-center { display: block; width: 48px; height: 2px; background: #C8A951; margin: 0 auto 16px; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary-gold {
  display: inline-flex; align-items: center; gap: 8px;
  background: #C8A951; color: #fff;
  font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600;
  padding: 14px 28px; border-radius: 4px;
  text-decoration: none; border: none; cursor: pointer;
  transition: background 0.2s; white-space: nowrap;
}
.btn-primary-gold:hover { background: #A8892D; color: #fff; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: #00205B; color: #fff;
  font-size: 14px; font-weight: 500;
  padding: 10px 20px; border-radius: 4px;
  text-decoration: none; border: none; cursor: pointer;
  transition: background 0.2s; white-space: nowrap;
}
.btn-primary:hover { background: #0057A8; color: #fff; }

.btn-secondary {
  display: inline-flex; align-items: center;
  background: transparent; color: #00205B;
  font-size: 14px; font-weight: 500;
  padding: 10px 20px; border-radius: 4px;
  text-decoration: none; border: 1.5px solid #00205B; cursor: pointer;
  transition: background 0.2s, color 0.2s; white-space: nowrap;
}
.btn-secondary:hover { background: #00205B; color: #fff; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  color: #00205B; font-size: 14px; font-weight: 500;
  text-decoration: none; background: none; border: none; cursor: pointer;
  transition: color 0.2s, gap 0.2s;
}
.btn-ghost:hover { color: #0057A8; gap: 10px; }

.btn-outline-white {
  display: inline-flex; align-items: center; gap: 8px;
  color: #fff; border: 1.5px solid rgba(255,255,255,0.45);
  padding: 10px 20px; border-radius: 4px;
  font-size: 14px; font-weight: 500; text-decoration: none;
  transition: border-color 0.2s, background 0.2s; white-space: nowrap;
}
.btn-outline-white:hover { border-color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.08); }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  padding: 0.25rem 0.65rem; border-radius: 3px;
}
.badge-blue    { background: #EFF6FF; color: #1D4ED8; }
.badge-amber   { background: #FEF3C7; color: #92400E; }
.badge-green   { background: #ECFDF5; color: #065F46; }
.badge-teal    { background: #F0FDFA; color: #0F766E; }
.badge-orange  { background: #FFF7ED; color: #C2410C; }
.badge-gray    { background: #F3F4F6; color: #9CA3AF; }
.badge-gold    { background: #C8A951; color: #00205B; border-radius: 2px; }

/* Direction */
.badge-legaltech  { background: #EFF6FF; color: #1D4ED8; }
.badge-fintech    { background: #EFF6FF; color: #1D4ED8; }
.badge-ecommerce  { background: #FFF7ED; color: #C2410C; }
.badge-3d         { background: #FFF7ED; color: #C2410C; }
.badge-cyber      { background: #F0FDFA; color: #0F766E; }
/* Level */
.badge-beginner   { background: #ECFDF5; color: #065F46; }
.badge-mid        { background: #FEF3C7; color: #92400E; }
.badge-advanced   { background: #EFF6FF; color: #1D4ED8; }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: #fff; border: 1px solid #E5E7EB;
  border-radius: 12px; padding: 24px;
  transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover {
  box-shadow: 0 8px 32px rgba(0, 32, 91, 0.10);
  transform: translateY(-4px);
}

/* ── Navigation ──────────────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: #00205B; height: 72px;
  display: flex; align-items: center;
  transition: box-shadow 0.3s;
}
.site-nav.scrolled { box-shadow: 0 2px 24px rgba(0, 0, 0, 0.28); }

.nav-container {
  display: flex; align-items: center;
  width: 100%; max-width: 1280px;
  margin-left: auto; margin-right: auto;
  padding: 0 24px;
}
@media (min-width: 1024px) { .nav-container { padding: 0 48px; } }

.nav-logo { flex-shrink: 0; text-decoration: none; line-height: 0; }

.nav-links {
  display: none; list-style: none; margin: 0; padding: 0;
  gap: 2px; margin-left: auto; align-items: center;
}
@media (min-width: 1024px) { .nav-links { display: flex; } }

.nav-link {
  display: flex; align-items: center; gap: 4px;
  color: rgba(255,255,255,0.78); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 4px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  background: none; border: none; font-family: 'Inter', sans-serif;
}
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(255,255,255,0.1); }

/* Dropdown */
.nav-item { position: relative; }
.nav-item .dropdown { display: none; }
.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown { display: block; }

.dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: #fff; border: 1px solid #E5E7EB; border-radius: 8px;
  padding: 6px; min-width: 220px;
  box-shadow: 0 8px 32px rgba(0, 32, 91, 0.12);
  z-index: 100;
}
.dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 6px;
  font-size: 14px; color: #374151; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.dropdown a:hover { background: #F3F4F6; color: #00205B; }
.dropdown-divider { border: none; border-top: 1px solid #F3F4F6; margin: 4px 0; }

/* Language switcher */
.lang-switcher {
  display: none; align-items: center; gap: 3px; margin-left: 16px;
}
@media (min-width: 1024px) { .lang-switcher { display: flex; } }
.lang-link {
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.45);
  padding: 4px 5px; text-decoration: none;
  transition: color 0.15s;
}
.lang-link.active { color: #C8A951; }
.lang-link:hover  { color: #fff; }
.lang-sep { color: rgba(255,255,255,0.2); font-size: 11px; }

/* Hamburger */
.hamburger-btn {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; padding: 6px;
  background: none; border: none; cursor: pointer; margin-left: auto;
  flex-shrink: 0;
}
@media (min-width: 1024px) { .hamburger-btn { display: none; } }
.hamburger-btn span {
  display: block; width: 100%; height: 2px; background: #fff;
  border-radius: 2px; transition: transform 0.3s, opacity 0.3s;
}
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none; position: fixed;
  top: 72px; left: 0; right: 0; bottom: 0;
  background: #00205B; z-index: 999;
  overflow-y: auto; padding: 24px;
}
.mobile-menu.open { display: block; }
.mobile-menu-section-title {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: #C8A951; margin: 20px 0 8px;
}
.mobile-menu-section-title:first-child { margin-top: 0; }
.mobile-menu-links a {
  display: block; color: rgba(255,255,255,0.75); font-size: 15px;
  font-weight: 500; padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-decoration: none; transition: color 0.15s;
}
.mobile-menu-links a:hover { color: #fff; }
.mobile-menu-sub a {
  padding-left: 16px; font-size: 14px; color: rgba(255,255,255,0.6);
}
.mobile-lang-row { display: flex; gap: 16px; margin-top: 24px; }
.mobile-lang-row a {
  font-size: 15px; font-weight: 600; text-decoration: none;
  color: rgba(255,255,255,0.5); transition: color 0.15s;
}
.mobile-lang-row a.active { color: #C8A951; }
.mobile-lang-row a:hover { color: #fff; }

/* ── Page hero ────────────────────────────────────────────────── */
.page-hero {
  background: #00205B; padding: 7rem 0 4rem;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 4px; background: #C8A951;
}
.page-hero-overlay {
  position: absolute; top: 0; right: 0; width: 40%; height: 100%;
  background: linear-gradient(135deg, rgba(0,87,168,0.25) 0%, transparent 60%);
  pointer-events: none;
}

/* Direction hero variants */
.page-hero-fintech    { background: #0057A8; }
.page-hero-ecommerce  { background: #1B2E4B; }
.page-hero-3d         { background: #1B2E4B; }
.page-hero-cyber      { background: #0A3D55; }

/* ── Spacer for fixed nav (pages without hero) ───────────────── */
.page-offset { height: 72px; }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  font-size: 13px; color: rgba(255,255,255,0.45);
  margin-bottom: 24px;
}
.breadcrumb a {
  color: rgba(255,255,255,0.45); text-decoration: none;
  transition: color 0.15s;
}
.breadcrumb a:hover { color: rgba(255,255,255,0.8); }
.breadcrumb-sep { color: rgba(255,255,255,0.25); }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer { background: #00205B; }
.footer-top  { padding: 64px 0 48px; }
.footer-grid {
  display: grid; gap: 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; } }

.footer-col-title {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.38);
  margin-bottom: 14px;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  color: rgba(255,255,255,0.6); font-size: 14px; text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: #fff; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; }
.footer-bottom-inner {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; color: rgba(255,255,255,0.35);
}
@media (min-width: 768px) {
  .footer-bottom-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}
.footer-bottom-inner a { color: rgba(255,255,255,0.35); text-decoration: none; transition: color 0.15s; }
.footer-bottom-inner a:hover { color: rgba(255,255,255,0.7); }

.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-link {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 6px;
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7);
  text-decoration: none; transition: background 0.2s, color 0.2s;
}
.social-link:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* ── Article content ─────────────────────────────────────────── */
.article-content { font-size: 16px; line-height: 1.82; color: #374151; }
.article-content h2 {
  font-family: 'Source Serif 4', serif; font-size: 1.55rem;
  font-weight: 700; color: #00205B; margin: 2.5rem 0 1rem;
}
.article-content h3 {
  font-family: 'Source Serif 4', serif; font-size: 1.2rem;
  font-weight: 700; color: #00205B; margin: 2rem 0 0.75rem;
}
.article-content p   { margin-bottom: 1.25rem; }
.article-content ul,
.article-content ol  { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.article-content li  { margin-bottom: 0.5rem; }
.article-content a   { color: #0057A8; text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { color: #00205B; }
.article-content blockquote {
  border-left: 4px solid #C8A951; background: #FAFAFA;
  padding: 14px 18px; margin: 1.5rem 0;
  border-radius: 0 8px 8px 0; font-style: italic; color: #4B5563;
}
.article-callout {
  border-left: 4px solid #0057A8; background: #EFF6FF;
  padding: 14px 18px; margin: 1.5rem 0;
  border-radius: 0 8px 8px 0; font-size: 14px; color: #1E40AF;
}
.case-study {
  border-left: 4px solid #C8A951; background: #F5F5F5;
  padding: 20px 24px; margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

/* ── Author bio block ────────────────────────────────────────── */
.author-bio {
  display: flex; gap: 1.25rem; align-items: flex-start;
  background: #F5F5F5; border-radius: 12px; padding: 1.25rem 1.5rem;
}
@media (max-width: 480px) { .author-bio { flex-direction: column; align-items: center; text-align: center; } }
.author-bio-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.author-bio-initials {
  width: 64px; height: 64px; border-radius: 50%; background: #00205B;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Source Serif 4', serif; font-size: 1.3rem;
  font-weight: 700; color: #C8A951; flex-shrink: 0;
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-group  { margin-bottom: 20px; }
.form-label  {
  display: block; font-size: 13px; font-weight: 600;
  color: #374151; margin-bottom: 6px;
}
.form-input,
.form-textarea,
.form-select {
  width: 100%; padding: 10px 14px; border-radius: 6px;
  border: 1.5px solid #E5E7EB; background: #fff;
  font-family: 'Inter', sans-serif; font-size: 14px; color: #1A1A2E;
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
  appearance: none;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: #0057A8; box-shadow: 0 0 0 3px rgba(0,87,168,0.10);
}
.form-input.error,
.form-textarea.error { border-color: #EF4444; }
.form-textarea  { min-height: 120px; resize: vertical; }
.form-field-error { font-size: 12px; color: #EF4444; margin-top: 4px; display: none; }
.form-field-error.visible { display: block; }

.form-success {
  background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46;
  padding: 16px 20px; border-radius: 8px; text-align: center; font-size: 14px;
}
.form-error-msg {
  background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B;
  padding: 16px 20px; border-radius: 8px; text-align: center; font-size: 14px;
}

/* ── Gold bullet list ────────────────────────────────────────── */
.gold-bullet-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 12px;
}
.gold-bullet-list li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 15px; color: #374151; line-height: 1.7;
}
.gold-bullet-list li::before {
  content: ''; display: block; width: 8px; height: 8px;
  border-radius: 50%; background: #C8A951;
  flex-shrink: 0; margin-top: 7px;
}

/* ── Responsive grid layouts ─────────────────────────────────── */
/* Use these classes instead of inline grid styles for responsive behavior */

.grid-main-aside {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 60px;
  align-items: start;
}
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.grid-2col-center {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.grid-photo-bio {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: start;
}
.grid-info-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0;
}
.grid-course-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0;
  align-items: stretch;
}

@media (max-width: 767px) {
  .section    { padding-top: 56px;  padding-bottom: 56px; }
  .section-sm { padding-top: 40px;  padding-bottom: 40px; }

  .grid-main-aside {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .grid-main-aside > .aside-sticky {
    position: static !important;
    top: auto !important;
  }
  .grid-2col,
  .grid-2col-center {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .grid-photo-bio {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .grid-photo-bio .member-card { max-width: 280px; }

  .grid-info-4 {
    grid-template-columns: 1fr 1fr;
  }
  .grid-info-4 > div:nth-child(odd)  { border-right: 1px solid #E5E7EB; }
  .grid-info-4 > div:nth-child(1),
  .grid-info-4 > div:nth-child(2)    { border-right: none; }

  .grid-course-card {
    grid-template-columns: 1fr;
  }
  .grid-course-card-action {
    border-left: none !important;
    border-top: 1px solid #E5E7EB;
    align-items: flex-start !important;
  }
}

@media (max-width: 480px) {
  .grid-info-4 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Blog cards ──────────────────────────────────────────────── */
.blog-card {
  background: #fff; border: 1px solid #E5E7EB; border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow 0.3s, transform 0.3s;
  text-decoration: none; color: inherit;
}
.blog-card:hover { box-shadow: 0 8px 32px rgba(0,32,91,0.10); transform: translateY(-3px); }
.blog-card-body  { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card-title { font-family: 'Source Serif 4', serif; font-size: 1.1rem; font-weight: 700; color: #00205B; line-height: 1.4; margin-bottom: 10px; }
.blog-card-excerpt { font-size: 14px; color: #6B7280; line-height: 1.7; flex: 1; margin-bottom: 16px; }
.blog-card-meta  { display: flex; align-items: center; gap: 10px; }
.blog-card-author { font-size: 12px; color: #9CA3AF; }
.blog-card-date  { font-size: 12px; color: #9CA3AF; margin-left: auto; }

/* ── Category filter ─────────────────────────────────────────── */
.category-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.cat-btn {
  font-size: 13px; font-weight: 500; padding: 7px 16px;
  border-radius: 999px; border: 1px solid #E5E7EB;
  background: #fff; color: #374151; cursor: pointer;
  transition: all 0.15s; text-decoration: none;
}
.cat-btn:hover, .cat-btn.active { background: #00205B; color: #fff; border-color: #00205B; }

/* ── Utility ─────────────────────────────────────────────────── */
.text-balance   { text-wrap: balance; }
.font-display   { font-family: 'Source Serif 4', serif; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
