/*
  user/assets/css/public.css
  Public-site specific: sticky header/nav, article typography, cards, footer.
*/

/* ---------- Header / Nav ---------- */
.dd-site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--dd-card); border-bottom: 1px solid var(--dd-border);
}
.dd-topbar {
  background: var(--dd-maroon); color: #fff; font-size: .78rem; padding: .35rem 0;
}
.dd-topbar a { color: #fff; opacity: .9; text-decoration: none; margin-left: 1rem; }
.dd-topbar a:hover { opacity: 1; text-decoration: underline; }

.dd-nav { display: flex; align-items: center; justify-content: space-between; padding: .85rem 0; position: relative; }
.dd-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.dd-brand .mark { width: 38px; height: 38px; border-radius: 9px; background: var(--dd-maroon); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.dd-brand .name { font-weight: 700; font-size: 1.15rem; color: var(--dd-text); letter-spacing: -0.01em; }
.dd-brand .tagline { font-size: .7rem; color: var(--dd-text-muted); display: block; margin-top: -2px; }

.dd-nav-links { display: flex; gap: 1.4rem; align-items: center; }
.dd-nav-links a { color: var(--dd-text); text-decoration: none; font-weight: 500; font-size: .9rem; }
.dd-nav-links a:hover { color: var(--dd-maroon); }

.dd-nav-actions { display: flex; align-items: center; gap: .6rem; }
.dd-search-toggle, .dd-mobile-toggle { background: none; border: none; color: var(--dd-text); font-size: 1.15rem; cursor: pointer; }

.dd-search-bar { display: none; padding: 1rem 0; border-top: 1px solid var(--dd-border); }
.dd-search-bar.open { display: block; }
.dd-search-bar input { width: 100%; border: 1px solid var(--dd-border); border-radius: var(--dd-radius); padding: .6rem 1rem; font-size: .95rem; }

/* Breaking news ticker */
.dd-breaking { background: var(--dd-maroon-tint); border-bottom: 1px solid #F0C9CC; padding: .5rem 0; font-size: .85rem; }
.dd-breaking .label { background: var(--dd-maroon); color: #fff; font-weight: 700; font-size: .7rem; padding: .15rem .5rem; border-radius: 4px; margin-right: .6rem; }
.dd-breaking a { color: var(--dd-maroon-dark); text-decoration: none; font-weight: 500; }
.dd-breaking a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.dd-hero { position: relative; border-radius: var(--dd-radius-lg); overflow: hidden; min-height: 380px; display: flex; align-items: flex-end; background: linear-gradient(135deg, var(--dd-blue-dark), var(--dd-maroon-dark)); }
.dd-hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.dd-hero .overlay { position: relative; padding: 2.2rem; color: #fff; z-index: 2; }
.dd-hero .category-tag { background: var(--dd-maroon); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .25rem .7rem; border-radius: 20px; display: inline-block; margin-bottom: .7rem; }
.dd-hero h1 { font-size: 1.8rem; font-weight: 700; line-height: 1.25; margin-bottom: .5rem; }
.dd-hero .meta { font-size: .85rem; opacity: .85; }

/* ---------- Article cards ---------- */
.dd-article-card { text-decoration: none; color: inherit; display: block; }
.dd-article-card img { width: 100%; height: 170px; object-fit: cover; border-radius: var(--dd-radius); margin-bottom: .7rem; background: var(--dd-bg); }
.dd-article-card .cat { color: var(--dd-maroon); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.dd-article-card h3 { font-size: 1.05rem; font-weight: 600; margin: .35rem 0; line-height: 1.35; color: var(--dd-text); }
.dd-article-card .excerpt { font-size: .85rem; color: var(--dd-text-muted); }
.dd-article-card .meta { font-size: .75rem; color: var(--dd-text-muted); margin-top: .5rem; }

/* ---------- Article reading page ---------- */
.dd-article-body { font-family: var(--dd-font-serif); font-size: 1.12rem; line-height: 1.8; color: var(--dd-text); }
.dd-article-body p { margin-bottom: 1.3rem; }
.dd-article-body img { max-width: 100%; border-radius: var(--dd-radius); margin: 1.5rem 0; }
.dd-article-body h2, .dd-article-body h3 { font-family: var(--dd-font); font-weight: 700; margin: 2rem 0 1rem; }
.dd-article-body blockquote { border-left: 3px solid var(--dd-maroon); padding-left: 1.2rem; font-style: italic; color: var(--dd-text-muted); margin: 1.5rem 0; }
.dd-article-title { font-size: 2rem; font-weight: 700; line-height: 1.2; margin-bottom: .8rem; }
.dd-article-meta { font-size: .85rem; color: var(--dd-text-muted); margin-bottom: 1.5rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--dd-border); }

/* ---------- Small thumbnails (beside title in listings) ---------- */
/* 16:9 — matches video/podcast thumbnail shape and crops far less of a normal
   landscape photo than a square would. Width is fixed at 2cm; aspect-ratio
   keeps height automatically correct (2cm / 16 * 9 = 1.125cm) without needing
   to hardcode both dimensions everywhere. */
.dd-thumb-sm {
  width: 2cm; aspect-ratio: 16 / 9; min-width: 2cm;
  object-fit: cover; border-radius: var(--dd-radius);
  background: var(--dd-bg); flex-shrink: 0;
}
.dd-thumb-sm-placeholder {
  width: 2cm; aspect-ratio: 16 / 9; min-width: 2cm;
  border-radius: var(--dd-radius); background: var(--dd-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--dd-text-muted); font-size: 1.1rem; flex-shrink: 0;
}
.dd-list-row { display: flex; gap: 1rem; align-items: flex-start; text-decoration: none; color: inherit; }
.dd-list-row .content h3 { font-size: 1rem; font-weight: 600; margin: 0 0 .25rem; color: var(--dd-text); }
.dd-list-row .content .excerpt { font-size: .85rem; color: var(--dd-text-muted); margin-bottom: .3rem; }
.dd-list-row .content .meta { font-size: .75rem; color: var(--dd-text-muted); }

/* ---------- Sections ---------- */
.dd-section-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.2rem; display: flex; align-items: center; justify-content: space-between; }
.dd-section-title .see-all { font-size: .85rem; font-weight: 500; }

/* ---------- Newsletter box ---------- */
.dd-newsletter-box { background: var(--dd-maroon); color: #fff; border-radius: var(--dd-radius-lg); padding: 2rem; }
.dd-newsletter-box input { border: none; border-radius: var(--dd-radius); padding: .65rem 1rem; width: 100%; }

/* ---------- Footer ---------- */
.dd-footer { background: #16181C; color: #C7C9CC; padding: 3rem 0 1.5rem; margin-top: 3rem; }
.dd-footer h5 { color: #fff; font-size: .9rem; font-weight: 600; margin-bottom: 1rem; }
.dd-footer a { color: #C7C9CC; text-decoration: none; font-size: .85rem; display: block; margin-bottom: .5rem; }
.dd-footer a:hover { color: #fff; }
.dd-footer .socials a { display: inline-block; margin-right: .8rem; font-size: 1.1rem; }
.dd-footer .bottom { border-top: 1px solid #2A2E35; margin-top: 2rem; padding-top: 1.2rem; font-size: .78rem; color: #8A8D93; }

/* ---------- Comments ---------- */
.dd-comment { padding: 1rem 0; border-bottom: 1px solid var(--dd-border); }
.dd-comment .name { font-weight: 600; font-size: .9rem; }
.dd-comment .body { font-size: .9rem; margin-top: .3rem; }
.dd-comment .time { font-size: .75rem; color: var(--dd-text-muted); }

/* ---------- Logo / banner ---------- */
.dd-brand .dd-logo { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; display: block; }
.dd-footer .dd-footer-logo { display: inline-block; margin-bottom: .8rem; }
.dd-footer .dd-footer-logo img { width: 96px; height: 96px; border-radius: 14px; display: block; }
.dd-banner { width: 100%; aspect-ratio: 4 / 1; border-radius: var(--dd-radius-lg); overflow: hidden; background: #0B2A52; box-shadow: var(--dd-shadow-md); }
.dd-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 767px) { .dd-banner { aspect-ratio: 22 / 9; } }

/* ---------- Nav additions (9 items + The INTs dropdown) ---------- */
.dd-nav-links { gap: 1.05rem; }
.dd-nav-links a { font-size: .84rem; white-space: nowrap; }
.dd-ints-menu .dropdown-toggle::after { margin-left: .3rem; vertical-align: .15em; }
.dd-ints-menu .dropdown-menu { border: 1px solid var(--dd-border); border-radius: var(--dd-radius); box-shadow: var(--dd-shadow-md); font-size: .85rem; min-width: 9rem; }
.dd-ints-menu .dropdown-item { font-size: .85rem; }
.dd-ints-menu .dropdown-item:hover { color: var(--dd-maroon); background: var(--dd-maroon-tint); }
.dd-login-link { color: var(--dd-text); text-decoration: none; font-size: .84rem; font-weight: 500; white-space: nowrap; }
.dd-login-link:hover { color: var(--dd-maroon); }
.dd-brand .tagline { display: none; } /* the tagline already shows in the top bar */
@media (max-width: 1280px) { .dd-nav-links { gap: .8rem; } .dd-nav-links a { font-size: .8rem; } }

@media (max-width: 576px) { .dd-nav { padding-left: .75rem; padding-right: .75rem; } }

@media (max-width: 1100px) {
  .dd-nav-links { display: none; }
  .dd-nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: .2rem;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--dd-card); border-bottom: 1px solid var(--dd-border);
    padding: .8rem 1.2rem 1rem; box-shadow: var(--dd-shadow-md);
  }
  .dd-nav-links.open a { padding: .35rem 0; font-size: .95rem; }
  .dd-mobile-toggle { display: inline-block !important; }
}

/* ---------- Podcast rows ---------- */
.dd-podcast-row { margin-bottom: 2.2rem; }
.dd-podcast-row .row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.dd-podcast-row .row-head h3 { font-size: 1.15rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: .5rem; }
.dd-podcast-row .row-head .badge-icon { width: 34px; height: 34px; border-radius: 9px; background: var(--dd-maroon); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.dd-episode-card { display: block; height: 100%; text-decoration: none !important; color: inherit !important; padding: .7rem; }
.dd-episode-card .thumb { width: 80%; margin: 0 auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: var(--dd-bg); display: flex; align-items: center; justify-content: center; color: var(--dd-text-muted); font-size: 1.4rem; }
.dd-episode-card h4 { font-size: .8rem; font-weight: 600; margin: .55rem 0 .2rem; line-height: 1.3; width: 80%; margin-left: auto; margin-right: auto; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dd-episode-card .meta { font-size: .7rem; color: var(--dd-text-muted); width: 80%; margin: 0 auto; }

/* ---------- Auth / INTs ---------- */
.dd-auth-card { max-width: 460px; margin: 1.5rem auto; padding: 1.8rem; }
.dd-auth-card h1 { font-size: 1.35rem; font-weight: 700; margin-bottom: .3rem; }
.dd-int-form { max-width: 720px; margin: 1.5rem auto; padding: 1.8rem; }
.dd-declaration { background: var(--dd-maroon-tint); border: 1px solid #E7C4C7; border-radius: var(--dd-radius); padding: 1rem; font-size: .88rem; }

/* ---------- News & RSS ---------- */
.dd-chip { display: inline-block; font-size: .68rem; font-weight: 600; padding: .12rem .5rem; border-radius: 20px; background: var(--dd-bg); color: var(--dd-text-muted); border: 1px solid var(--dd-border); margin: 0 .25rem .2rem 0; }
.dd-chip-geo { background: var(--dd-maroon-tint); color: var(--dd-maroon); border-color: transparent; }
.dd-news-card { padding: 1rem 1.2rem; }
.dd-news-card .meta { font-size: .75rem; color: var(--dd-text-muted); }
.dd-news-card .meta .src { font-weight: 700; color: var(--dd-maroon); text-transform: uppercase; letter-spacing: .03em; }
.dd-news-card h3 { font-size: 1.05rem; font-weight: 700; margin: .3rem 0 .4rem; line-height: 1.35; }
.dd-news-card h3 a { color: inherit; text-decoration: none; }
.dd-news-card h3 a:hover { color: var(--dd-maroon); }
.dd-news-card .summary { font-size: .88rem; color: var(--dd-text-muted); margin: 0 0 .6rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dd-news-card .foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .8rem; }
.dd-rss-row { display: flex; gap: .9rem; padding: .65rem 1rem; border-bottom: 1px solid var(--dd-border); }
.dd-rss-row:last-child { border-bottom: 0; }
.dd-rss-row .when { flex: 0 0 82px; font-size: .74rem; color: var(--dd-text-muted); padding-top: .15rem; }
.dd-rss-row .main a { font-size: .92rem; font-weight: 600; color: inherit; text-decoration: none; line-height: 1.35; }
.dd-rss-row .main a:hover { color: var(--dd-maroon); }
.dd-rss-row .meta { font-size: .72rem; color: var(--dd-text-muted); margin-top: .15rem; }
.dd-rss-row .meta .src { font-weight: 700; margin-right: .3rem; }

/* ---------- Research & Publication ---------- */
.dd-research-card { padding: 1.1rem 1.3rem; }
.dd-research-card .meta { font-size: .76rem; color: var(--dd-text-muted); }
.dd-research-card h3 { font-size: 1.12rem; font-weight: 700; margin: .45rem 0 .5rem; line-height: 1.35; }
.dd-research-card .summary { font-size: .9rem; color: var(--dd-text-muted); margin: 0 0 .85rem; }

/* ---------- Data, Dashboards & Trackers ---------- */
.dd-data-card { display: block; padding: 1.15rem 1.25rem; height: 100%; text-decoration: none !important; color: inherit !important; transition: box-shadow .15s, transform .15s; }
.dd-data-card:hover { box-shadow: var(--dd-shadow-md); transform: translateY(-1px); }
.dd-data-card .icon { width: 38px; height: 38px; border-radius: 10px; background: var(--dd-maroon); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; margin-bottom: .7rem; }
.dd-data-card h3 { font-size: 1.02rem; font-weight: 700; margin: 0 0 .35rem; line-height: 1.35; }
.dd-data-card p { font-size: .86rem; color: var(--dd-text-muted); margin: 0 0 .6rem; }
.dd-data-card .meta { font-size: .74rem; color: var(--dd-text-muted); margin-bottom: .5rem; }
.dd-data-card .go { font-size: .82rem; font-weight: 600; color: var(--dd-maroon); }
.dd-stat { padding: 1rem 1.2rem; }
.dd-stat .label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--dd-text-muted); }
.dd-stat .value { font-size: 1.55rem; font-weight: 700; line-height: 1.2; margin: .15rem 0; }
.dd-stat .sub { font-size: .78rem; color: var(--dd-text-muted); }
.dd-filter { position: relative; }
.dd-filter summary { list-style: none; cursor: pointer; font-size: .82rem; padding: .28rem .7rem; border: 1px solid var(--dd-border); border-radius: 6px; background: #fff; user-select: none; }
.dd-filter summary::-webkit-details-marker { display: none; }
.dd-filter summary::after { content: ' \25BE'; color: var(--dd-text-muted); }
.dd-filter summary .n { background: var(--dd-maroon); color: #fff; border-radius: 10px; font-size: .68rem; padding: 0 .4rem; margin-left: .2rem; }
.dd-filter .box { position: absolute; z-index: 20; top: 110%; left: 0; min-width: 220px; max-height: 260px; overflow: auto; background: #fff; border: 1px solid var(--dd-border); border-radius: 8px; box-shadow: var(--dd-shadow-md); padding: .5rem .7rem; }
.dd-filter .box label { display: block; font-size: .82rem; white-space: nowrap; padding: .1rem 0; cursor: pointer; }
.dd-data-table { font-size: .84rem; }
.dd-data-table thead th { background: var(--dd-bg); font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; border-bottom: 1px solid var(--dd-border); }
.dd-data-table thead th a { color: inherit; text-decoration: none; }
.dd-data-table td.long { max-width: 420px; min-width: 200px; font-size: .78rem; color: var(--dd-text-muted); }
.dd-bar-row { display: flex; gap: .6rem; align-items: center; margin-bottom: .55rem; font-size: .85rem; }
.dd-bar-row .rank { flex: 0 0 22px; color: var(--dd-text-muted); font-size: .75rem; text-align: right; }
.dd-bar-row .body { flex: 1; min-width: 0; }
.dd-bar-row .yr { color: var(--dd-text-muted); font-size: .72rem; }
.dd-bar-row .bar { height: 6px; background: var(--dd-bg); border-radius: 4px; margin-top: .2rem; overflow: hidden; }
.dd-bar-row .bar span { display: block; height: 100%; background: #9AA3AE; border-radius: 4px; }
.dd-bar-row.focus .bar span { background: var(--dd-maroon); }
.dd-bar-row.focus { font-weight: 600; }

/* ---------- Data sub-menu + Third-party Research & Analysis ---------- */
.dd-subtabs { display: flex; flex-wrap: wrap; gap: .4rem; border-bottom: 1px solid var(--dd-border); }
.dd-subtabs a { padding: .55rem .95rem; font-size: .88rem; font-weight: 600; color: var(--dd-text-muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dd-subtabs a:hover { color: var(--dd-maroon); }
.dd-subtabs a.active { color: var(--dd-maroon); border-bottom-color: var(--dd-maroon); }
.dd-rl-filters { display: flex; flex-direction: column; gap: .55rem; }
.dd-rl-row { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.dd-rl-row .lbl { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--dd-text-muted); min-width: 5.6rem; }
@media (max-width: 576px) { .dd-rl-row .lbl { min-width: 100%; } }
