/* CC Resources — visual design from the approved mockup (yhub2 /p/ca639aa35228),
   with a mobile-first responsive layer the mockup didn't have. Base styles are
   the phone layout; min-width queries build up to the desktop design. */

:root {
  --blue:        #003DA5;
  --blue-mid:    #1A56C4;
  --blue-light:  #EEF3FF;
  --blue-deep:   #001a4d;
  --amber:       #F59E0B;
  --amber-light: #FEF3C7;
  --teal:        #0EA5E9;
  --green:       #10B981;
  --coral:       #F97316;
  --danger:      #DC2626;
  --bg:          #F4F6FB;
  --card:        #FFFFFF;
  --text:        #111827;
  --muted:       #6B7280;
  --border:      #E5E7EB;
  --radius:      12px;
  --shadow:      0 2px 12px rgba(0,0,0,.08);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--blue); }

/* ── NAV ──────────────────────────────────────────────────────────────────── */

nav.topbar {
  background: var(--blue);
  min-height: 60px;
  display: flex; align-items: center;
  padding: 0 16px; gap: 10px;
  flex-wrap: wrap;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -.3px;
  text-decoration: none; margin-right: auto;
  padding: 12px 0;
}
.nav-logo img { width: 30px; height: auto; display: block; }

.nav-toggle {
  background: rgba(255,255,255,.15); border: 0; color: #fff;
  width: 40px; height: 40px; border-radius: 8px; cursor: pointer;
  font-size: 17px; display: flex; align-items: center; justify-content: center;
}
.nav-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--amber); color: var(--blue);
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.nav-links {
  display: none; width: 100%; flex-direction: column;
  gap: 2px; padding: 4px 0 12px;
}
.nav-links.open { display: flex; }
.nav-link, .nav-links form button {
  color: rgba(255,255,255,.85); text-decoration: none;
  font-size: 15px; font-weight: 500;
  padding: 12px 12px; border-radius: 6px;
  background: none; border: 0; font-family: inherit; text-align: left;
  cursor: pointer; min-height: 44px;
  display: flex; align-items: center; gap: 6px;
}
.nav-link:hover, .nav-link.active,
.nav-links form button:hover { background: rgba(255,255,255,.15); color: #fff; }

@media (min-width: 900px) {
  nav.topbar { padding: 0 32px; flex-wrap: nowrap; height: 60px; }
  .nav-logo { font-size: 18px; margin-right: 40px; padding: 0; }
  .nav-toggle { display: none; }
  .nav-links {
    display: flex; flex-direction: row; align-items: center;
    width: auto; flex: 1; gap: 4px; padding: 0;
  }
  .nav-link, .nav-links form button {
    font-size: 14px; padding: 6px 14px; min-height: 0;
  }
}

/* ── HERO ─────────────────────────────────────────────────────────────────── */

.hero {
  position: relative; overflow: hidden;
  background: var(--blue-deep);
  min-height: 340px;
  padding: 48px 20px 44px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.hero-photos { position: absolute; inset: 0; display: flex; gap: 3px; }
.hero-photo { flex: 1; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* On a phone, five slivers read as noise — show two, then three, then all five. */
.hero-photo:nth-child(n+3) { display: none; }

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right,
    rgba(0,26,77,.65) 0%, rgba(0,38,100,.55) 50%, rgba(0,26,77,.65) 100%);
}
.hero-content { position: relative; z-index: 2; width: 100%; }
.hero h1 {
  color: #fff; font-size: 30px; font-weight: 800;
  line-height: 1.15; letter-spacing: -.5px; margin-bottom: 12px;
}
.hero h1 span { color: var(--amber); display: block; }
.hero p {
  color: rgba(255,255,255,.75); font-size: 15px;
  max-width: 520px; margin: 0 auto 26px; line-height: 1.6;
}

.hero-search {
  display: flex; max-width: 600px; margin: 0 auto;
  box-shadow: 0 8px 40px rgba(0,0,0,.25); border-radius: 12px;
}
.hero-search input {
  flex: 1; min-width: 0; border: none; border-radius: 12px 0 0 12px;
  padding: 15px 16px; font-size: 16px; /* 16px avoids iOS zoom-on-focus */
  outline: none; background: #fff; font-family: inherit;
}
.hero-search button {
  background: var(--amber); border: none; border-radius: 0 12px 12px 0;
  padding: 0 20px; font-size: 15px; font-weight: 700; color: #fff;
  cursor: pointer; white-space: nowrap; font-family: inherit;
}
.hero-search button:hover { background: #D97706; }

.hero-stats {
  display: flex; justify-content: center; gap: 26px;
  margin-top: 28px; flex-wrap: wrap;
}
.hero-stat { color: rgba(255,255,255,.8); font-size: 12px; }
.hero-stat strong { display: block; color: #fff; font-size: 20px; font-weight: 800; }

@media (min-width: 600px) {
  .hero-photo:nth-child(3) { display: block; }
  .hero h1 { font-size: 38px; }
  .hero h1 span { display: inline; }
}
@media (min-width: 900px) {
  .hero { padding: 80px 32px 70px; min-height: 440px; }
  .hero-photo { display: block !important; }
  .hero h1 { font-size: 46px; margin-bottom: 14px; }
  .hero p { font-size: 18px; margin-bottom: 36px; }
  .hero-search input { padding: 18px 20px; }
  .hero-search button { padding: 0 28px; }
  .hero-stats { gap: 40px; margin-top: 40px; }
  .hero-stat { font-size: 13px; }
  .hero-stat strong { font-size: 22px; }
}

/* ── SECTIONS ─────────────────────────────────────────────────────────────── */

.section { padding: 32px 16px; }
.section.white { background: #fff; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; gap: 12px; flex-wrap: wrap;
}
.section-header h2 { font-size: 19px; font-weight: 700; }
.section-header a { font-size: 14px; color: var(--blue); font-weight: 600; text-decoration: none; }
@media (min-width: 900px) {
  .section { padding: 48px 32px; }
  .section-header { margin-bottom: 24px; }
  .section-header h2 { font-size: 22px; }
}

.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ── CATEGORY CARDS ───────────────────────────────────────────────────────── */

.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat-card {
  background: var(--card); border-radius: var(--radius); padding: 18px 12px;
  text-align: center; border: 2px solid transparent;
  box-shadow: var(--shadow); transition: all .2s;
  text-decoration: none; color: inherit; display: block;
}
.cat-card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cat-icon { font-size: 26px; margin-bottom: 8px; }
.cat-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.cat-count { font-size: 12px; color: var(--muted); }
@media (min-width: 600px) { .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1000px) { .cat-grid { grid-template-columns: repeat(6, 1fr); } }

/* ── ACTIVITY CARDS ───────────────────────────────────────────────────────── */

.activity-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px)  { .activity-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .activity-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1200px) { .activity-grid { grid-template-columns: repeat(4, 1fr); } }

.activity-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: all .2s;
  text-decoration: none; color: inherit; display: block;
}
.activity-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-thumb { width: 100%; aspect-ratio: 4/3; position: relative; overflow: hidden; background: var(--blue-light); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; font-size: 40px;
}
.card-heart {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,.9); border: 0; border-radius: 50%;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; box-shadow: 0 2px 8px rgba(0,0,0,.15); cursor: pointer;
}
.card-heart.active { background: #FEE2E2; }
.card-body { padding: 16px; }
.card-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.card-title { font-size: 15px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.card-desc {
  font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.card-meta span { display: flex; align-items: center; gap: 4px; }

/* ── CHIPS ────────────────────────────────────────────────────────────────── */

.chip {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 100px;
  text-transform: uppercase; letter-spacing: .04em; display: inline-block;
}
.chip-cat   { background: var(--blue-light);  color: var(--blue); }
.chip-tag   { background: var(--amber-light); color: #92400E; }
.chip-green { background: #D1FAE5; color: #065F46; }
.chip-grey  { background: #F3F4F6; color: var(--muted); }

/* ── CATEGORY PAGE HEADER ─────────────────────────────────────────────────── */

.cat-page-header {
  background: linear-gradient(135deg, #003DA5, #0066cc);
  padding: 28px 16px; color: #fff;
  display: flex; align-items: center; gap: 16px;
}
.cat-page-icon { font-size: 38px; }
.cat-page-header h1 { font-size: 24px; font-weight: 800; }
.cat-page-header p { color: rgba(255,255,255,.75); font-size: 14px; margin-top: 4px; }
@media (min-width: 900px) {
  .cat-page-header { padding: 40px 32px; gap: 20px; }
  .cat-page-icon { font-size: 48px; }
  .cat-page-header h1 { font-size: 32px; }
  .cat-page-header p { font-size: 15px; }
}

/* ── GENERIC CARD / FORMS (admin + auth pages) ────────────────────────────── */

.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
@media (min-width: 900px) { .wrap { padding: 32px 32px 56px; } }

h1 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
h2 { font-size: 19px; font-weight: 700; color: var(--blue); margin-bottom: 12px; }
h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
@media (min-width: 900px) { h1 { font-size: 30px; } h2 { font-size: 21px; } }

.sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.card {
  background: var(--card); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px;
}
@media (min-width: 700px) { .card { padding: 26px 28px; } }

label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=search], input[type=password],
select, textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 16px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue);
}
textarea { min-height: 110px; resize: vertical; }
.field { margin-bottom: 16px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue); color: #fff; border: 0; border-radius: 10px;
  font: inherit; font-size: 15px; font-weight: 700;
  padding: 12px 22px; min-height: 46px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #002E7A; }
.btn.amber { background: var(--amber); }
.btn.amber:hover { background: #D97706; }
.btn.ghost { background: #fff; color: var(--blue); border: 1.5px solid var(--blue); }
.btn.ghost:hover { background: var(--blue-light); }
.btn.small { padding: 7px 13px; min-height: 36px; font-size: 13.5px; }
.btn.danger { background: var(--danger); }
.btn.link { background: none; color: var(--blue); padding: 4px 6px; min-height: 0; font-weight: 600; }

.flash {
  padding: 13px 16px; border-radius: 10px; margin-bottom: 14px;
  font-size: 14.5px; border: 1px solid;
}
.flash.success { background: #F0FDF4; border-color: var(--green);  color: #065F46; }
.flash.danger  { background: #FEF2F2; border-color: var(--danger); color: #991B1B; }
.flash.warning { background: var(--amber-light); border-color: var(--amber); color: #92400E; }

/* ── TABLES → cards on phone ──────────────────────────────────────────────── */

.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th {
  text-align: left; padding: 10px 12px; background: var(--bg); color: var(--muted);
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}
.table td { padding: 13px 12px; border-top: 1px solid var(--border); vertical-align: middle; }

.table.stack, .table.stack thead, .table.stack tbody,
.table.stack tr, .table.stack th, .table.stack td { display: block; }
.table.stack thead { display: none; }
.table.stack tr {
  border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: 12px; padding: 6px 4px; background: #fff;
}
.table.stack td { border: 0; padding: 7px 12px; }
.table.stack td::before {
  content: attr(data-label); display: block;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); margin-bottom: 2px;
}
@media (min-width: 780px) {
  .table.stack, .table.stack thead, .table.stack tbody { display: table; width: 100%; }
  .table.stack thead { display: table-header-group; }
  .table.stack tr { display: table-row; border: 0; border-radius: 0; margin: 0; padding: 0; }
  .table.stack th, .table.stack td { display: table-cell; }
  .table.stack td { padding: 13px 12px; border-top: 1px solid var(--border); }
  .table.stack td::before { display: none; }
}

/* ── PAGE GUIDE (collapsed by default on every page) ──────────────────────── */

.guide {
  background: var(--blue-light); border: 1px solid #C7D7F5;
  border-radius: var(--radius); margin-bottom: 20px;
}
.guide summary {
  cursor: pointer; padding: 13px 16px; font-weight: 700;
  font-size: 14px; color: var(--blue); list-style: none;
}
.guide summary::-webkit-details-marker { display: none; }
.guide summary::before { content: '▸ '; }
.guide[open] summary::before { content: '▾ '; }
.guide .guide-body { padding: 0 16px 16px; font-size: 14px; color: #374151; }
.guide .guide-body p { margin-bottom: 9px; }
.guide .guide-body ul { padding-left: 20px; margin-bottom: 9px; }
.guide .guide-body li { margin-bottom: 4px; }

/* ── LOGIN ────────────────────────────────────────────────────────────────── */

.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; position: relative; overflow: hidden; background: var(--blue-deep);
}
.login-page .hero-photos { position: absolute; inset: 0; display: flex; gap: 3px; }
.login-page .hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(0,26,77,.82) 0%, rgba(0,38,100,.75) 50%, rgba(0,26,77,.82) 100%);
}
.login-card {
  position: relative; z-index: 2; width: 100%; max-width: 420px;
  background: var(--card); border-radius: 16px; padding: 30px 24px;
  box-shadow: var(--shadow-lg);
}
.login-head { text-align: center; margin-bottom: 24px; }
.login-head .badge {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.login-head h1 { font-size: 26px; margin-bottom: 4px; }
.provider {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px; margin-bottom: 10px; min-height: 50px;
  border: 1.5px solid var(--border); border-radius: 10px; background: #fff;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--text);
  text-decoration: none; cursor: pointer;
}
.provider:hover { border-color: var(--blue); background: var(--blue-light); }
.provider .mark { font-weight: 800; width: 22px; text-align: center; }
.provider .mark.g { color: #4285F4; }
.provider .mark.m { color: #00A4EF; }

.or {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0; color: var(--muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
}
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--border); }

/* ── MISC ─────────────────────────────────────────────────────────────────── */

.foot { text-align: center; font-size: 12.5px; color: #9CA3AF; padding: 26px 16px 40px; }
.foot a { color: #9CA3AF; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 10px; }

.rowactions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
