@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --navy: #111827;
  --navy-deep: #000000;
  --navy-light: #6b7280;
  --ink: #0a0a0a;
  --paper: #ffffff;
  --mist: #f5f5f5;
  --hair: #e5e7eb;
  --hero-line: #3f3f46;
  --stone: #6b7280;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
h1, h2, h3 { text-wrap: balance; font-weight: 900; letter-spacing: -.02em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

.tag {
  display: inline-flex; align-items: center;
  padding: 2px 10px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--stone);
}
.tag.on-dark { color: rgba(255,255,255,.6); border-color: rgba(255,255,255,.25); }

/* ===== Art panels (fallback for missing photography) ===== */
.art { position: relative; overflow: hidden; background: var(--mist); }
.art svg { width: 100%; height: 100%; display: block; }
.art img { width: 100%; height: 100%; object-fit: cover; }
.art-1 { background: linear-gradient(135deg, #dfe6ee, #c3d0de); }
.art-2 { background: linear-gradient(135deg, var(--navy), var(--navy-deep)); }
.art-3 { background: linear-gradient(135deg, #e8ebee, #d3dbe3); }
.art-4 { background: linear-gradient(135deg, #2c4a68, #1c3a5e); }
.art-vivid-1 { background: linear-gradient(140deg, #4577b2, #1c3a5e 60%, #0d1f30); }
.art-vivid-2 { background: linear-gradient(140deg, #6f93bd, #2c4a68 55%, #12283f); }
.art-vivid-3 { background: linear-gradient(140deg, #1c3a5e, #4577b2 65%, #8fb0d6); }
.art-vivid-4 { background: linear-gradient(140deg, #12283f, #1c3a5e 50%, #4577b2); }

/* ===== Header ===== */
.topbar { border-bottom: 1px solid var(--hair); }
.topbar-inner { display: flex; justify-content: space-between; padding: 9px 0; font-size: 13px; color: var(--stone); }
.topbar-links { display: flex; gap: 22px; }
.topbar-links a:hover { color: var(--ink); }

header.nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--hair); }
.logo { height: 38px; }
nav.links { display: flex; gap: 30px; font-size: 14.5px; font-weight: 600; }
nav.links a:hover { color: var(--navy); }
nav.links a.active { color: var(--navy); }
.nav-cta { background: var(--navy); color: #fff; font-weight: 700; font-size: 13.5px; padding: 11px 22px; border-radius: 999px; }
.nav-cta:hover { background: var(--navy-deep); }

/* ===== Hero ===== */
.hero { padding: 40px 0 64px; }

.feature-grid {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--hero-line);
}
.feature-col { display: flex; flex-direction: column; }
.feature-col-side { flex: 0 0 25%; }
.feature-col-center { flex: 0 0 50%; }
.feature-col-side:first-child, .feature-col-center { border-right: 1px solid var(--hero-line); }

.feature-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.feature-col-side .feature-card { flex: 1 1 0; }
.feature-col-side .feature-card:first-child { border-bottom: 1px solid var(--hero-line); }
.feature-col-center .feature-card { flex: 1 1 0; justify-content: space-between; gap: 0; }
.feature-card-body { display: flex; flex-direction: column; gap: 12px; }

.feature-card .art { border-radius: 2px; aspect-ratio: 4/3; }
.feature-card.center .art { aspect-ratio: 16/10; }
.feature-card h3 { font-size: .875rem; font-weight: 700; line-height: 1.4; letter-spacing: -.01em; color: var(--ink); }
.feature-card.center h3 { font-size: 1.75rem; font-weight: 900; line-height: 1.25; margin-top: 4px; }
.feature-excerpt { font-size: 14px; line-height: 1.65; color: var(--stone); margin-top: 2px; }
.feature-card h3:hover { color: var(--stone); }
.feature-card .byline { font-size: 12px; font-weight: 600; color: var(--stone); margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hero-line); }

@media (max-width: 900px) {
  .feature-grid { flex-direction: column; }
  .feature-col-side, .feature-col-center { flex: 1 1 auto; border-right: none; }
  .feature-col-side:not(:last-child), .feature-col-center { border-bottom: 1px solid var(--hero-line); }
  .feature-col-side .feature-card:first-child { border-bottom: 1px solid var(--hero-line); }
}

/* ===== Explore / Programs grid ===== */
.section { padding: 60px 0; }
.section-head { margin-bottom: 34px; display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-head .eyebrow { font-size: 13px; font-weight: 700; color: var(--stone); text-transform: uppercase; letter-spacing: .04em; }
.section-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin-top: 6px; }
.section-head .view-all { font-size: 13px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.section-head .view-all:hover { text-decoration: underline; }

.topics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; align-items: stretch; }
.topic-card { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--hair); border-radius: 8px; padding: 16px; }
.topic-card .art { border-radius: 4px; aspect-ratio: 4/3.4; }
.topic-card .art.logo-badge { background: linear-gradient(135deg, var(--navy), var(--navy-deep)); display: flex; align-items: center; justify-content: center; }
.topic-card .art.logo-badge img { width: auto; height: auto; max-width: 42%; max-height: 55%; object-fit: contain; }
.topic-card p { font-size: 13.5px; color: var(--stone); line-height: 1.55; }
.topic-card .view-link { font-size: 13px; font-weight: 700; color: var(--navy); margin-top: auto; padding-top: 4px; }
.topic-card .view-link:hover { text-decoration: underline; }

/* ===== Editor's Choice (black band, vivid blocks) ===== */
.band-dark { background: var(--ink); color: #fff; padding: 60px 0; }
.band-dark .section-head h2 { color: #fff; }
.vivid-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.vivid-card { position: relative; border-radius: 4px; aspect-ratio: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; }
.vivid-card::before { content: ''; position: absolute; inset: 0; background-image: url('/beta/assets/programs/jawaiz-logo-mark.png'); background-repeat: no-repeat; background-position: center 38%; background-size: 34%; opacity: .9; }
.vivid-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7), transparent 60%); }
.vivid-card * { position: relative; z-index: 1; }
.vivid-card h4 { color: #fff; font-size: 1.05rem; margin-top: 8px; line-height: 1.3; }

/* ===== Popular + spotlight ===== */
.split-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 60px; }
.popular-list { display: flex; flex-direction: column; }
.popular-item { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--hair); }
.popular-item:first-child { padding-top: 0; }
.popular-item .art { width: 56px; height: 56px; border-radius: 4px; border: 1px solid var(--hair); }
.popular-item h4 { font-size: 1.05rem; line-height: 1.4; }
.popular-item h4:hover { color: var(--navy); }
.popular-num { font-size: 1.9rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

.spotlight-stack { display: flex; flex-direction: column; gap: 22px; }
.spotlight-item { display: grid; grid-template-columns: 90px 1fr; gap: 16px; }
.spotlight-item .art { border-radius: 4px; aspect-ratio: 1; }
.spotlight-item h4 { font-size: .98rem; line-height: 1.35; }

/* ===== Trending (dark, divided, with background art) ===== */
.trending-band { background: var(--navy-deep); color: #fff; padding: 64px 0; position: relative; overflow: hidden; }
.trending-visual {
  position: absolute; inset: 0; width: 42%;
  background: linear-gradient(115deg, #2c4a68, #12283f 70%);
}
.trending-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.trending-visual::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to right, transparent 55%, var(--navy-deep) 100%);
}
.trending-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; position: relative; z-index: 1; }
.trending-item { padding: 0 32px; border-left: 1px solid rgba(255,255,255,.2); }
.trending-item .art { aspect-ratio: 16/9; border-radius: 4px; margin-bottom: 16px; border: 1px solid rgba(255,255,255,.15); }
.trending-item:first-child { border-left: none; padding-left: 0; }
.trending-item h3 { color: #fff; font-size: 1.35rem; margin: 10px 0; }
.trending-item p { font-size: 13.5px; color: rgba(255,255,255,.65); line-height: 1.6; margin-bottom: 14px; }
.trending-byline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: rgba(255,255,255,.75); }
.trending-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--navy-light); }

/* ===== Latest + Enquiries ===== */
.latest-list { display: flex; flex-direction: column; gap: 30px; }
.latest-row { display: grid; grid-template-columns: 200px 1fr; gap: 24px; }
.latest-row .art { border-radius: 4px; aspect-ratio: 4/3; }
.latest-row h4 { font-size: 1.15rem; margin: 8px 0 6px; }
.latest-row p { font-size: 13.5px; color: var(--stone); line-height: 1.6; }

.contact-card { display: flex; align-items: flex-start; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--hair); }
.contact-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--navy); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.contact-card h4 { font-size: .98rem; }
.contact-card .role { font-size: 12px; color: var(--stone); margin: 3px 0 8px; }
.contact-card p { font-size: 12.5px; }
.contact-card p a { color: var(--navy); }
.contact-social { display: flex; gap: 10px; margin-top: 8px; }
.contact-social a { width: 24px; height: 24px; border-radius: 50%; background: var(--mist); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--stone); }
.contact-social a:hover { background: var(--navy); color: #fff; }

/* ===== Newsletter/CTA band ===== */
.cta-band { background: var(--ink); color: #fff; padding: 70px 0; text-align: center; }
.cta-mark { width: 34px; height: 34px; margin: 0 auto 20px; }
.cta-band h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); color: #fff; max-width: 20ch; margin: 0 auto 14px; }
.cta-band p { color: rgba(255,255,255,.65); max-width: 46ch; margin: 0 auto 30px; font-size: 15px; }
.cta-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
.cta-form input { flex: 1; padding: 13px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: #fff; font-family: inherit; font-size: 14px; }
.cta-form input::placeholder { color: rgba(255,255,255,.5); }
.cta-form button { background: var(--navy-light); color: #fff; font-weight: 700; font-size: 14px; padding: 13px 26px; border-radius: 999px; }
.cta-form button:hover { background: var(--navy); }

/* ===== Gallery strip ===== */
.gallery-strip { padding: 60px 0; }
.gallery-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-grid .art { aspect-ratio: 1; border-radius: 4px; }

/* ===== Footer ===== */
footer { background: var(--mist); padding: 54px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1.2fr; gap: 32px; margin-bottom: 40px; }
.footer-logo { height: 30px; margin-bottom: 14px; }
.footer-desc { font-size: 13.5px; color: var(--stone); line-height: 1.7; max-width: 30ch; margin-bottom: 18px; }
.footer-btn { display: inline-block; background: var(--navy); color: #fff; font-weight: 700; font-size: 13px; padding: 11px 20px; border-radius: 999px; }
.footer-heading { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--stone); margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.footer-links a:hover { color: var(--navy); }
.footer-mini-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.footer-mini-form input { padding: 10px 14px; border-radius: 6px; border: 1px solid var(--hair); font-family: inherit; font-size: 13px; background: #fff; }
.footer-mini-form button { background: var(--ink); color: #fff; font-weight: 700; font-size: 13px; padding: 10px; border-radius: 6px; }
.footer-bottom { border-top: 1px solid var(--hair); padding-top: 22px; font-size: 12.5px; color: var(--stone); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ===== Article detail page ===== */
.breadcrumb { font-size: 13px; color: var(--stone); padding: 24px 0 0; }
.breadcrumb a:hover { color: var(--navy); }
.article-head { padding: 24px 0 36px; max-width: 780px; }
.article-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 14px 0 16px; }
.article-meta { font-size: 13px; color: var(--stone); }
.article-hero-img { border-radius: 6px; overflow: hidden; margin-bottom: 40px; aspect-ratio: 16/9; }
.article-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.article-body { max-width: 720px; margin: 0 auto 60px; font-size: 17px; line-height: 1.8; color: #24262b; }
.article-body p { margin-bottom: 22px; }
.article-body img { border-radius: 6px; margin: 30px 0; }
.article-body h2, .article-body h3 { margin: 34px 0 16px; }
.article-body a { color: var(--navy); text-decoration: underline; }
.article-body blockquote { border-left: 3px solid var(--navy); padding-left: 20px; font-style: italic; color: var(--stone); margin: 26px 0; }
.related-list { max-width: 720px; margin: 0 auto; border-top: 1px solid var(--hair); padding-top: 40px; }

/* ===== Archive / listing page ===== */
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 26px; }
.archive-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.archive-card .art { border-radius: 4px; aspect-ratio: 4/3; margin-bottom: 14px; }
.archive-card h3 { font-size: 1.05rem; line-height: 1.4; }
.archive-card h3:hover { color: var(--navy); }
.archive-card .byline { font-size: 12.5px; color: var(--stone); margin-top: 8px; }
.category-filter { display: flex; gap: 10px; flex-wrap: wrap; margin: 30px 0 40px; }
.category-filter a { font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--hair); color: var(--stone); }
.category-filter a:hover, .category-filter a.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 50px; }
.pagination a, .pagination span { padding: 9px 15px; border-radius: 6px; font-size: 13.5px; font-weight: 600; border: 1px solid var(--hair); }
.pagination a:hover { border-color: var(--navy); color: var(--navy); }
.pagination span.current { background: var(--navy); color: #fff; border-color: var(--navy); }

@media (max-width: 900px) {
  .topics-grid, .vivid-grid, .gallery-grid, .archive-grid, .archive-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .split-grid { grid-template-columns: 1fr; gap: 36px; }
  .trending-grid { grid-template-columns: 1fr; gap: 30px; }
  .trending-item { border-left: none; padding-left: 0; border-top: 1px solid rgba(255,255,255,.2); padding-top: 24px; }
  .trending-item:first-child { border-top: none; padding-top: 0; }
  .latest-row { grid-template-columns: 100px 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trending-visual { display: none; }
  nav.links { display: none; }
}
