/* ═══════════════════════════════════════════════════════════════
   GCD App — Styles  |  navy #0B3D4F  teal #1A8A7D
   Mobile-first
═══════════════════════════════════════════════════════════════ */

:root {
  --navy:       #0B3D4F;
  --navy-dark:  #07293A;
  --navy-mid:   #0e4d63;
  --teal:       #1A8A7D;
  --teal-light: #21aa9a;
  --teal-dim:   #1A8A7D22;
  --white:      #ffffff;
  --bg:         #f0f4f6;
  --card-bg:    #ffffff;
  --text:       #0d2535;
  --muted:      #5a7a8a;
  --border:     #d0dde3;
  --shadow-sm:  0 2px 8px rgba(11,61,79,.10);
  --shadow-md:  0 6px 24px rgba(11,61,79,.14);
  --shadow-lg:  0 16px 48px rgba(11,61,79,.20);
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  22px;
  --r-xl:  32px;
  --font:  'Inter', system-ui, -apple-system, sans-serif;
  --trans: .2s ease;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior: none;
}

#screen-login,
#screen-app { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
img { display: block; max-width: 100%; }

/* ── Utilities ───────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.screen { min-height: 100vh; }
.screen.active { display: block; }

/* ══════════════════════════════════════════════════════════════════════════
   LOGIN
══════════════════════════════════════════════════════════════════════════ */
#screen-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 24px 16px;
  background: var(--navy-dark);
  position: relative;
  overflow: hidden;
}

/* animated background blobs */
.login-bg { position: absolute; inset: 0; pointer-events: none; }
.login-bg-shape {
  position: absolute;
  border-radius: 50%;
  opacity: .12;
  animation: float 8s ease-in-out infinite;
}
.shape1 {
  width: 400px; height: 400px;
  background: var(--teal);
  top: -120px; left: -100px;
  animation-delay: 0s;
}
.shape2 {
  width: 300px; height: 300px;
  background: var(--teal-light);
  bottom: -80px; right: -60px;
  animation-delay: -3s;
}
.shape3 {
  width: 200px; height: 200px;
  background: var(--teal);
  top: 50%; left: 60%;
  animation-delay: -5s;
}
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(20px,-20px) scale(1.05); }
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-xl);
  padding: 36px 28px 32px;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
}

.login-brand { text-align: center; margin-bottom: 32px; }
.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  border-radius: var(--r-lg);
  font-size: 22px; font-weight: 800; letter-spacing: -1px;
  color: var(--white);
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(26,138,125,.4);
}
.brand-title {
  font-size: 18px; font-weight: 700; color: var(--white);
  line-height: 1.3; margin-bottom: 6px;
}
.brand-sub { font-size: 13px; color: rgba(255,255,255,.55); }

.field-wrap { margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.7);
  margin-bottom: 6px;
}
.field-box {
  position: relative;
  display: flex; align-items: center;
}
.field-icon {
  position: absolute; left: 14px;
  color: rgba(255,255,255,.4);
  font-size: 14px; pointer-events: none;
}
.field-input {
  width: 100%;
  padding: 12px 42px 12px 40px;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: var(--r-sm);
  font-size: 15px; color: var(--white);
  font-family: var(--font);
  transition: border-color var(--trans), background var(--trans);
  -webkit-appearance: none;
}
.field-input::placeholder { color: rgba(255,255,255,.3); }
.field-input:focus {
  outline: none;
  border-color: var(--teal-light);
  background: rgba(255,255,255,.12);
}
.btn-eye {
  position: absolute; right: 12px;
  color: rgba(255,255,255,.4);
  font-size: 14px; padding: 4px;
  transition: color var(--trans);
}
.btn-eye:hover { color: rgba(255,255,255,.8); }

.btn-login {
  width: 100%; margin-top: 8px;
  padding: 14px;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  border-radius: var(--r-sm);
  color: var(--white);
  font-size: 15px; font-weight: 600;
  letter-spacing: .3px;
  transition: opacity var(--trans), transform var(--trans);
  box-shadow: 0 4px 16px rgba(26,138,125,.35);
}
.btn-login:hover { opacity: .92; transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.login-error {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(220,53,69,.15);
  border: 1px solid rgba(220,53,69,.3);
  border-radius: var(--r-sm);
  color: #ff8a95;
  font-size: 13px; line-height: 1.45;
  text-align: center;
}
.login-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.3);
}

/* ══════════════════════════════════════════════════════════════════════════
   APP HEADER
══════════════════════════════════════════════════════════════════════════ */
#screen-app { display: flex; flex-direction: column; min-height: 100dvh; }

.app-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.header-inner {
  display: flex; align-items: center; gap: 10px;
  max-width: 1280px; margin: 0 auto;
  padding: 0 16px;
  height: 56px;
}
.btn-back {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--white);
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--trans);
}
.btn-back:hover { background: rgba(255,255,255,.1); }

.header-brand { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.header-logo {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  color: var(--white);
  font-size: 13px; font-weight: 800; letter-spacing: -.5px;
  padding: 4px 10px;
  border-radius: var(--r-sm);
}
.header-tagline {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.75);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.header-email {
  font-size: 12px; color: rgba(255,255,255,.5);
  display: none;
}
.btn-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  color: rgba(255,255,255,.7);
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--trans), color var(--trans);
}
.btn-icon:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn-logout { color: rgba(255,255,255,.6); }

/* ══════════════════════════════════════════════════════════════════════════
   CATEGORY NAV
══════════════════════════════════════════════════════════════════════════ */
.cat-nav {
  position: sticky; top: 56px; z-index: 99;
  background: var(--navy-mid);
  border-bottom: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
}
.cat-track {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 4px;
  padding: 8px 12px;
  max-width: 1280px; margin: 0 auto;
}
.cat-track::-webkit-scrollbar { display: none; }

.cat-tab {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.6);
  white-space: nowrap;
  transition: background var(--trans), color var(--trans);
  cursor: pointer;
}
.cat-tab:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); }
.cat-tab.active {
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(26,138,125,.4);
}
.cat-tab-emoji { font-size: 15px; line-height: 1; }

/* ══════════════════════════════════════════════════════════════════════════
   SEARCH BAR
══════════════════════════════════════════════════════════════════════════ */
.search-bar-wrap {
  position: sticky; top: 112px; z-index: 98;
  background: var(--navy-dark);
  padding: 8px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.search-bar-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  padding: 0 14px;
  transition: background var(--trans);
}
.search-bar-inner:focus-within {
  background: rgba(255,255,255,.15);
  box-shadow: 0 0 0 2px var(--teal);
}
.search-icon { color: rgba(255,255,255,.5); font-size: 13px; flex-shrink: 0; }
.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--white);
  font-family: var(--font);
  font-size: 16px; /* 16px previne zoom pe iOS la focus */
  padding: 9px 0;
}
.search-input::placeholder { color: rgba(255,255,255,.4); }
.search-input::-webkit-search-cancel-button { display: none; }
.btn-search-clear {
  color: rgba(255,255,255,.5);
  font-size: 13px;
  padding: 4px;
  flex-shrink: 0;
  transition: color var(--trans);
}
.btn-search-clear:hover { color: var(--white); }

/* Search Results */
.search-results-header {
  padding: 20px 16px 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 24px;
  color: var(--muted);
  font-size: 15px;
}
.search-empty i { font-size: 32px; opacity: .4; }

/* ══════════════════════════════════════════════════════════════════════════
   APP BODY / VIEWS
══════════════════════════════════════════════════════════════════════════ */
.app-body {
  flex: 1;
  max-width: 1280px; margin: 0 auto; width: 100%;
  padding: 0 0 80px;
}

.view { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Loading */
.loading-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 16px;
  padding: 80px 20px;
  color: var(--muted);
  font-size: 14px;
}
.spinner-ring {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Cat hero */
.cat-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 16px 12px;
}
.cat-hero-icon { font-size: 32px; line-height: 1; }
.cat-hero h2 { font-size: 20px; font-weight: 700; color: var(--navy); }
.cat-hero p  { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── Trainer Grid ─────────────────────────────────────────────────────────── */
.trainer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 0 12px;
}

.trainer-card {
  background: var(--card-bg);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform var(--trans), box-shadow var(--trans);
  position: relative;
}
.trainer-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.trainer-card:active { transform: translateY(-1px); }

.trainer-card-banner {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy), var(--teal));
}
.trainer-card-banner img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.trainer-card:hover .trainer-card-banner img { transform: scale(1.04); }
.trainer-card-banner-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.trainer-card-vid-badge {
  position: absolute; bottom: 7px; right: 7px;
  background: rgba(0,0,0,.65);
  color: var(--white);
  font-size: 10px; font-weight: 600;
  padding: 3px 7px;
  border-radius: 999px;
  display: flex; align-items: center; gap: 4px;
}

.trainer-card-body { padding: 10px 12px 12px; }
.trainer-card-category {
  font-size: 10px; font-weight: 600; letter-spacing: .4px;
  color: var(--teal); text-transform: uppercase;
  margin-bottom: 3px;
}
.trainer-card-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ══════════════════════════════════════════════════════════════════════════
   TRAINER DETAIL
══════════════════════════════════════════════════════════════════════════ */
.detail-wrap { animation: fadeIn .25s ease; }

.detail-banner {
  width: 100%;
  background: var(--navy-dark);
  line-height: 0;
}
.detail-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: fill;
}
.detail-banner-overlay { display: none; }
.detail-banner-placeholder {
  min-height: 200px;
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
}

.detail-content { padding: 16px; max-width: 900px; margin: 0 auto; }

.detail-category {
  font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--teal); margin-bottom: 4px;
}
.detail-name {
  font-size: 22px; font-weight: 800; color: var(--navy);
  line-height: 1.2; margin-bottom: 14px;
}

/* Social links */
.detail-social {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 20px;
}
.social-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  transition: opacity var(--trans), transform var(--trans);
  color: var(--white);
}
.social-pill:hover { opacity: .88; transform: translateY(-1px); }
.social-pill.facebook  { background: #1877F2; }
.social-pill.instagram { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); }
.social-pill.youtube   { background: #FF0000; }
.social-pill.tiktok    { background: #010101; }
.social-pill.linkedin  { background: #0A66C2; }
.social-pill.whatsapp  { background: #25D366; }
.social-pill.website   { background: var(--teal); }

/* Description */
.detail-desc {
  font-size: 14px; line-height: 1.7; color: #2c4a5a;
  margin-bottom: 24px;
}
.detail-desc p { margin-bottom: 10px; }
.detail-desc p:last-child { margin-bottom: 0; }

/* Section title */
.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: var(--navy);
  margin-bottom: 12px;
}
.section-title-icon { font-size: 18px; }

/* ── Video Carousel ──────────────────────────────────────────────────────── */
.videos-section { margin-bottom: 24px; }
.video-count-badge {
  background: var(--teal-dim);
  color: var(--teal);
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  margin-left: 4px;
}

.video-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 10px;
  padding: 4px 16px 12px;
  margin: 0 -16px;
}
.video-carousel::-webkit-scrollbar { display: none; }

.video-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  cursor: pointer;
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--card-bg);
  transition: transform var(--trans), box-shadow var(--trans);
}
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.video-thumb-wrap {
  position: relative;
  width: 240px; height: 135px;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  overflow: hidden;
}
.video-thumb-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.video-card:hover .video-thumb-wrap img { transform: scale(1.06); }
.video-thumb-error { display: none; }
.video-thumb-wrap.no-thumb img { display: none; }
.video-thumb-wrap.no-thumb .video-thumb-error {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: absolute; inset: 0;
  gap: 4px;
  color: rgba(255,255,255,.6);
  font-size: 11px; text-align: center; padding: 8px;
}
.video-thumb-wrap.no-thumb .video-thumb-error i { font-size: 24px; opacity: .5; }

.play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.25);
  opacity: 0; transition: opacity var(--trans);
}
.video-card:hover .play-overlay { opacity: 1; }
.play-circle {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy);
  font-size: 14px;
  padding-left: 3px; /* optical center for play icon */
}
.vid-dur {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,.72);
  color: var(--white);
  font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
}

.video-card-body {
  padding: 8px 10px 10px;
}
.video-card-date {
  font-size: 12px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.no-videos-msg {
  text-align: center; padding: 24px 16px;
  color: var(--muted); font-size: 14px;
}
.no-videos-msg i { font-size: 32px; display: block; margin-bottom: 8px; opacity: .4; }

/* ── PDF Materials ───────────────────────────────────────────────────────── */
.materials-section { margin-bottom: 24px; }
.materials-toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 12px 14px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600;
  color: var(--navy);
  transition: background var(--trans), border-color var(--trans);
}
.materials-toggle:hover { background: #f0f8f7; border-color: var(--teal); }
.materials-toggle.open { border-color: var(--teal); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.materials-toggle .mcount {
  font-size: 11px; font-weight: 700;
  background: var(--teal-dim); color: var(--teal);
  padding: 2px 7px; border-radius: 999px;
}
.mat-chevron {
  margin-left: auto;
  font-size: 12px; color: var(--muted);
  transition: transform .25s ease;
}
.materials-toggle.open .mat-chevron { transform: rotate(180deg); }

.materials-list {
  border: 1.5px solid var(--teal);
  border-top: none;
  border-bottom-left-radius: var(--r-sm);
  border-bottom-right-radius: var(--r-sm);
  overflow: hidden;
}
.material-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text);
  transition: background var(--trans);
  cursor: pointer;
}
.material-item:last-child { border-bottom: none; }
.material-item:hover { background: #f5fbfa; color: var(--teal); }
.material-item .pdf-ico { color: #e53935; font-size: 16px; flex-shrink: 0; }
.material-item .pdf-name { flex: 1; font-weight: 500; }
.material-item .ext-ico { color: var(--muted); font-size: 11px; flex-shrink: 0; }

/* External links */
.ext-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.ext-link-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 12px; font-weight: 500; color: var(--text);
  background: var(--white);
  transition: border-color var(--trans), color var(--trans), transform var(--trans);
}
.ext-link-btn:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); }

/* ══════════════════════════════════════════════════════════════════════════
   VIDEO MODAL
══════════════════════════════════════════════════════════════════════════ */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.modal.hidden { display: none; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.85);
  cursor: pointer;
}
.modal-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 900px;
  background: var(--navy-dark);
  border-radius: 0;
  overflow: hidden;
  max-height: 100dvh;
  display: flex; flex-direction: column;
}
.modal-topbar {
  display: flex; align-items: center;
  padding: 12px 14px 12px 16px;
  gap: 12px;
  background: var(--navy);
}
.modal-title-wrap { flex: 1; min-width: 0; }
.modal-video-title {
  font-size: 13px; font-weight: 600; color: var(--white);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.modal-counter {
  font-size: 11px; color: rgba(255,255,255,.45);
  display: block; margin-top: 2px;
}
.modal-close {
  flex-shrink: 0;
  background: rgba(255,255,255,.08);
}
.modal-close:hover { background: rgba(255,255,255,.18); }

.player-ratio {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  flex-shrink: 0;
}
.player-ratio iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
}

.modal-controls {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 12px;
  gap: 8px;
}
.btn-ctrl {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,.8);
  transition: background var(--trans), color var(--trans);
  min-width: 100px;
}
.btn-ctrl:first-child { justify-content: flex-start; }
.btn-ctrl:last-child  { justify-content: flex-end; }
.btn-ctrl:hover { background: rgba(255,255,255,.15); color: var(--white); }
.btn-ctrl:disabled { opacity: .3; cursor: not-allowed; }
.modal-duration {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.5);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 480px) {
  .trainer-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0 16px; }
}
@media (min-width: 640px) {
  .trainer-grid { grid-template-columns: repeat(3, 1fr); }
  .trainer-card-name { font-size: 14px; }
  .video-card { flex: 0 0 280px; }
  .video-thumb-wrap { width: 280px; height: 158px; }
  .header-email { display: block; }
  .modal-panel { border-radius: var(--r-lg); max-height: 92dvh; }
  .modal { padding: 20px; }
}
@media (min-width: 1024px) {
  .trainer-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 0 24px; }
  .cat-hero { padding: 24px 24px 14px; }
  .detail-content { padding: 24px; }
  .header-inner { padding: 0 24px; }
}
@media (min-width: 1280px) {
  .trainer-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ── Home / Bun venit view ───────────────────────────────────────────────── */
.home-view {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}
.home-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-section-title i { color: var(--teal); font-size: 16px; }
.welcome-video-wrap {
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-md);
}
.welcome-video-wrap video {
  width: 100%;
  display: block;
  max-height: 480px;
}
.calendar-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.calendar-scroll iframe {
  display: block;
  border: 0;
  width: 100%;
  min-width: 680px;
  height: 560px;
}
@media (min-width: 640px) {
  .calendar-scroll iframe { height: 640px; }
}
@media (min-width: 1024px) {
  .home-view { padding: 24px; }
  .calendar-scroll iframe { height: 720px; min-width: 900px; }
}

/* ── Chat ────────────────────────────────────────────────────────────────── */
.chat-section { margin-top: 8px; }
.chat-messages {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}
.chat-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 24px 0;
}
.chat-msg { display: flex; flex-direction: column; gap: 3px; }
.chat-msg-header { display: flex; align-items: center; gap: 7px; }
.chat-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.chat-sender { font-size: 12px; font-weight: 600; color: var(--navy); }
.chat-time { font-size: 11px; color: var(--muted); margin-left: auto; }
.chat-text {
  font-size: 13px;
  color: var(--text);
  padding-left: 33px;
  line-height: 1.45;
  word-break: break-word;
}
.chat-input-row { display: flex; gap: 8px; align-items: center; }
.chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 16px;
  font-family: var(--font);
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color var(--trans);
}
.chat-input:focus { border-color: var(--teal); }
.chat-send-btn {
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  padding: 10px 16px;
  font-size: 15px;
  cursor: pointer;
  transition: background var(--trans);
  flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--teal-light); }
.chat-send-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Touch / focus ────────────────────────────────────────────────────────── */
@media (hover: none) {
  .trainer-card:hover { transform: none; box-shadow: var(--shadow-sm); }
  .play-overlay { opacity: 1; }
}
:focus-visible {
  outline: 2px solid var(--teal-light);
  outline-offset: 2px;
  border-radius: 4px;
}
