/* =========================================
   TTIJ Training Schedule — Self-contained CSS
   Includes nav + footer + batch + admin styles
   ========================================= */

/* ── Reset & base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; line-height: 1.65; color: #222; background: #fff; }
img  { max-width: 100%; height: auto; display: block; }
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  --gold:     #d4af37;
  --gold-lt:  #f0d870;
  --gold-bg:  #fdf6dd;
  --dark:     #0f1923;
  --dark2:    #1a2a3a;
  --white:    #fff;
  --gray:     #f5f5f5;
  --muted:    #666;
  --radius:   12px;
  --shadow:   0 4px 20px rgba(0,0,0,.12);
  --nav-h:    106px;
  --trans:    .25s ease;
}

/* ── Shared helpers ─────────────────────────────────────── */
.container  { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-sub { color: var(--gold); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; display: block; margin-bottom: 6px; }

/* ═══════════════════════════════════════════════════════════
   PUBLIC NAV  (sticky dark navbar, matches main site)
   ═══════════════════════════════════════════════════════════ */
body.public-layout { padding-top: var(--nav-h); background: #fff; }

.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--dark);
  min-height: var(--nav-h);
  display: flex; align-items: center;
  box-shadow: 0 2px 15px rgba(0,0,0,.35);
  padding: 8px 0;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0;
}
.nav-logo img       { height: 54px; width: auto; flex-shrink: 0; }
.nav-logo-text      { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-line1        { font-size: 1.05rem; font-weight: 800; color: var(--gold); }
.brand-line2        { font-size: .86rem; color: rgba(255,255,255,.8); font-weight: 500; }
.brand-line3        { font-size: .7rem;  color: rgba(255,255,255,.55); font-weight: 400; margin-top: 2px; }
.brand-line4        { font-size: .7rem;  color: rgba(255,255,255,.55); font-weight: 400; }

.nav-toggle {
  display: none; background: none; border: none;
  color: #fff; font-size: 1.45rem; cursor: pointer; padding: 6px;
}
.nav-links  { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: rgba(255,255,255,.85); font-size: .88rem; font-weight: 500;
  padding: 8px 12px; border-radius: 6px; transition: var(--trans);
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); }
.nav-cta {
  background: var(--gold) !important; color: var(--dark) !important;
  padding: 8px 16px !important; border-radius: 6px; font-weight: 700 !important;
}
.nav-cta:hover { background: var(--gold-lt) !important; }

/* Desktop nav: Upcoming Batches stays available in the mobile burger menu only */
@media (min-width: 901px) {
  .nav-schedule-item { display: none; }
}

/* Mobile nav */
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links  {
    position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: var(--dark2); flex-direction: column; align-items: flex-start;
    padding: 24px 20px; gap: 2px; overflow-y: auto;
    transform: translateX(-100%); transition: transform .3s ease; z-index: 999;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a {
    font-size: 1.05rem; padding: 12px 10px; width: 100%;
    border-bottom: 1px solid rgba(255,255,255,.07);
  }
  .nav-cta { margin-top: 14px !important; }
}
@media (max-width: 600px) {
  .brand-line1 { font-size: .82rem; }
  .brand-line2 { font-size: .7rem; }
  .brand-line3 { font-size: .62rem; }
  .brand-line4 { font-size: .62rem; }
  .nav-logo img { height: 48px; }
}

/* ═══════════════════════════════════════════════════════════
   TRAINING SCHEDULE — PUBLIC CONTENT
   ═══════════════════════════════════════════════════════════ */
.ts-main { max-width: 1200px; margin: 0 auto; padding: 0 20px 60px; }

.ts-hero { padding: 40px 0 28px; }
.ts-hero h1 { font-size: 2rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.ts-hero p  { font-size: 1rem; color: var(--muted); }

/* Filter pills */
.filter-bar  { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-pill {
  padding: 6px 18px; border-radius: 20px; font-size: .85rem; font-weight: 500;
  border: 1.5px solid #ddd; background: #fff; color: var(--muted);
  cursor: pointer; transition: all .18s;
}
.filter-pill:hover  { border-color: var(--gold); color: #b8960a; }
.filter-pill.active { background: var(--gold-bg); border-color: var(--gold); color: #8a6d00; font-weight: 600; }

/* Batch grid */
.batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.batch-card {
  background: #fff; border: 1.5px solid #eee; border-radius: 14px;
  padding: 22px 24px; transition: box-shadow .18s, border-color .18s;
  display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.batch-card:hover { border-color: var(--gold); box-shadow: 0 8px 28px rgba(212,175,55,.18); }
.batch-card.highlight {
  border-color: var(--gold);
  background: linear-gradient(180deg, var(--gold-bg) 0%, #fff 80px);
  box-shadow: 0 8px 28px rgba(212,175,55,.18);
}

.batch-city-tag {
  font-size: .73rem; font-weight: 700; color: var(--gold);
  text-transform: uppercase; letter-spacing: .08em;
  display: flex; align-items: center; gap: 5px; margin-bottom: 10px;
}
.batch-name { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 10px; line-height: 1.3; }
.batch-desc { font-size: .88rem; color: var(--muted); margin-bottom: 12px; line-height: 1.6; }

.batch-meta         { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; flex: 1; }
.batch-meta-item    { font-size: .87rem; color: #555; display: flex; align-items: center; gap: 7px; }
.batch-meta-item i  { font-size: 15px; color: var(--gold); flex-shrink: 0; }

.batch-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid #f0f0f0; margin-top: auto;
}

/* Status badges */
.status-badge     { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: .76rem; font-weight: 600; }
.status-open      { background: #eaf3de; color: #27500a; }
.status-soon      { background: var(--gold-bg); color: #8a6d00; }
.status-full      { background: #fcebeb; color: #791f1f; }
.status-completed { background: #f0f0f0; color: #555; }
.status-cancelled { background: #fcebeb; color: #791f1f; }

.contact-link {
  font-size: .82rem; color: var(--gold); display: flex; align-items: center; gap: 5px;
  font-weight: 600; transition: color .15s;
}
.contact-link:hover { color: #b8960a; text-decoration: underline; }
.contact-actions { display: flex; align-items: center; gap: 14px; }
.whatsapp-link { color: #25D366; }
.whatsapp-link:hover { color: #1da851; }

.no-batches       { text-align: center; padding: 80px 24px; }
.no-batches i     { font-size: 48px; display: block; margin-bottom: 14px; color: var(--gold); }
.no-batches p     { font-size: 1rem; color: var(--muted); margin-bottom: 6px; }
.no-batches small { font-size: .85rem; color: #bbb; }

/* ═══════════════════════════════════════════════════════════
   FOOTER  (matches main site)
   ═══════════════════════════════════════════════════════════ */
.site-footer     { background: var(--dark); color: rgba(255,255,255,.8); margin-top: 40px; }
.footer-grid     { display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 40px; padding: 60px 0 40px; }
.footer-title    { font-size: .9rem; font-weight: 700; color: #fff; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.footer-about p  { font-size: .9rem; line-height: 1.7; margin-bottom: 16px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a  { font-size: .88rem; transition: color var(--trans); }
.footer-links a:hover { color: var(--gold); }
.footer-contact li      { display: flex; gap: 12px; margin-bottom: 14px; align-items: flex-start; }
.footer-contact .fi     { color: var(--gold); font-size: .95rem; margin-top: 3px; flex-shrink: 0; }
.footer-contact strong  { display: block; color: #fff; font-size: .8rem; margin-bottom: 2px; }
.footer-contact a       { color: rgba(255,255,255,.7); font-size: .88rem; }
.footer-contact a:hover { color: var(--gold); }
.footer-bottom          { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; text-align: center; font-size: .82rem; color: rgba(255,255,255,.45); }
.footer-bottom a        { color: var(--gold); }

.btn-outline {
  display: inline-block; padding: 10px 24px; border-radius: 6px; font-weight: 600;
  font-size: .9rem; border: 2px solid var(--gold); color: var(--gold);
  background: transparent; transition: var(--trans);
}
.btn-outline:hover { background: var(--gold); color: var(--dark); }
.mt-16 { margin-top: 16px; }

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ── Mobile Bottom Nav ──────────────────────────────────── */
.mobile-bottom-nav { display: none; }
@media (max-width: 900px) {
  body.public-layout { padding-bottom: 62px; }
  .mobile-bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 950;
    background: var(--dark2); border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 -2px 12px rgba(0,0,0,.25);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 8px 4px; color: rgba(255,255,255,.7); font-size: .68rem; font-weight: 600;
    text-decoration: none; transition: var(--trans);
  }
  .mobile-bottom-nav a i { font-size: 1.15rem; }
  .mobile-bottom-nav a:hover, .mobile-bottom-nav a.active { color: var(--gold); }
  .mobile-bottom-nav a.whatsapp-link i { color: #25D366; }
}

/* ═══════════════════════════════════════════════════════════
   ADMIN LAYOUT
   ═══════════════════════════════════════════════════════════ */
body.admin-layout {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 14px; line-height: 1.6; color: #222;
  background: #f2f2ef; padding-top: 0;
}

.admin-topnav {
  background: var(--dark); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 56px; position: sticky; top: 0; z-index: 200;
}
.admin-brand        { display: flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 600; }
.admin-brand img    { height: 34px; width: auto; border-radius: 50%; }
.admin-brand i      { color: var(--gold); font-size: 20px; }
.admin-badge        { background: rgba(212,175,55,.2); color: var(--gold); font-size: .68rem; padding: 2px 8px; border-radius: 4px; font-weight: 700; letter-spacing: .05em; }
.admin-nav-right    { display: flex; align-items: center; gap: 16px; }
.admin-user         { font-size: .8rem; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 5px; }
.btn-logout         { font-size: .8rem; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 5px; padding: 5px 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; transition: background .15s; }
.btn-logout:hover   { background: rgba(255,255,255,.1); }

.admin-wrapper      { display: flex; min-height: calc(100vh - 56px); }
.sidebar            { width: 210px; background: #fff; border-right: 1px solid #e8e8e8; flex-shrink: 0; }
.sidebar-nav        { padding: 14px 0; display: flex; flex-direction: column; }
.sidebar-item       { display: flex; align-items: center; gap: 10px; padding: 10px 18px; font-size: .88rem; color: #555; transition: all .15s; }
.sidebar-item i     { font-size: 17px; }
.sidebar-item:hover { background: #f5f5f5; color: #222; }
.sidebar-item.active { background: var(--gold-bg); color: #8a6d00; font-weight: 600; border-left: 3px solid var(--gold); padding-left: 15px; }
.admin-main         { flex: 1; padding: 28px 32px; overflow: auto; }

/* Page header */
.page-header    { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header h1 { font-size: 1.2rem; font-weight: 700; }

/* Stat grid */
.stat-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card  { background: #fff; border: 1px solid #e8e8e8; border-radius: 10px; padding: 18px 20px; }
.stat-num   { font-size: 1.9rem; font-weight: 700; color: var(--dark); }
.stat-label { font-size: .8rem; color: #999; margin-top: 3px; }

/* Admin buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px; font-size: .88rem; font-weight: 500;
  cursor: pointer; border: 1px solid #e8e8e8; background: #fff; color: #222;
  transition: all .15s;
}
.btn:hover        { background: #f5f5f5; }
.btn-primary      { background: var(--dark); color: #fff; border-color: var(--dark); }
.btn-primary:hover{ background: var(--dark2); }
.btn-gold         { background: var(--gold); color: var(--dark); border-color: var(--gold); font-weight: 700; }
.btn-gold:hover   { background: #c09d28; }
.btn-danger       { background: #fcebeb; color: #791f1f; border-color: #f5c1c1; }
.btn-danger:hover { background: #f7c1c1; }
.btn-sm           { padding: 4px 10px; font-size: .8rem; }

/* Table */
.data-table              { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e8e8e8; border-radius: 10px; overflow: hidden; }
.data-table thead tr     { background: #f5f5f5; }
.data-table th           { padding: 10px 16px; text-align: left; font-size: .72rem; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid #e8e8e8; }
.data-table td           { padding: 12px 16px; font-size: .88rem; border-bottom: 1px solid #f5f5f5; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td  { background: #fafafa; }
.actions                 { display: flex; gap: 6px; }

/* Alerts */
.alert         { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: .88rem; display: flex; align-items: center; gap: 8px; }
.alert-success { background: #eaf3de; color: #27500a; border: 1px solid #c0dd97; }
.alert-error   { background: #fcebeb; color: #791f1f; border: 1px solid #f5c1c1; }

/* Forms */
.form-card   { background: #fff; border: 1px solid #e8e8e8; border-radius: 10px; padding: 28px; max-width: 700px; }
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group  { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: .78rem; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .04em; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="number"], input[type="password"], select, textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid #e8e8e8; border-radius: 8px;
  font-size: .9rem; font-family: inherit; color: #222; background: #fff; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.15); }
textarea { resize: vertical; min-height: 80px; }
select   { cursor: pointer; }
.hint    { font-size: .76rem; color: #999; }

/* Login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--dark); }
.login-card { background: #fff; border-radius: 14px; padding: 40px; width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.login-logo { width: 52px; height: 52px; border-radius: 50%; background: var(--gold-bg); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.login-logo i { font-size: 24px; color: var(--gold); }
.login-card h1       { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.login-card .subtitle { font-size: .88rem; color: #999; margin-bottom: 26px; }
.login-form .form-group { margin-bottom: 16px; }
.login-btn { width: 100%; justify-content: center; padding: 11px; font-size: .95rem; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .batch-grid  { grid-template-columns: 1fr; }
  .form-grid   { grid-template-columns: 1fr; }
  .sidebar     { display: none; }
  .admin-main  { padding: 16px; }
  .ts-hero h1  { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .ts-main { padding: 0 14px 40px; }
  .login-card { width: 92vw; padding: 28px 20px; }
}
