/* ==========================================================================
   Y.H. Securities — Blogs
   Shared dropdown states (every page) + blog page layout (blog.html).
   Theme-consistent: relies on the site's CSS variables (--navy, --gold,
   --gray, --border, --text-primary, ...) with safe fallbacks so it works
   on both the modern in-page theme (index.html) and the styles.css theme
   (contact / disclaimer / blog).
   ========================================================================== */

/* ── Dropdown loading / empty / error states (any page header) ── */
.blogs-dd-all {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .78rem;
  border-bottom: 1px solid var(--border, #eceff3);
  margin-bottom: .25rem;
  color: var(--navy, #101722) !important;
}
.blogs-dd-muted {
  display: block;
  padding: .625rem 1.5rem;
  font-size: .85rem;
  color: var(--text-secondary, #666);
}
.blogs-dd-loading {
  display: block;
  padding: .625rem 1.5rem;
  font-size: .85rem;
  color: var(--text-muted, #8a94a6);
}

/* ── Blog page (blog.html) ── */

/* index grid */
.blog-index-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px) { .blog-index-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-index-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--card-border, #e6eaf0);
  border-radius: .5rem;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  height: 100%;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,.12);
}
.blog-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }

.blog-card-cover {
  position: relative;
  padding-top: 56%;           /* 16:9 */
  background: linear-gradient(135deg, var(--navy,#101722), #2a3a52);
}
.blog-card-cover.no-img { background: linear-gradient(135deg, var(--gold, #c9a84c), var(--navy,#101722)); }
.blog-card-cover img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}

.blog-card-body { padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.blog-card-meta {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--gold-dark, #9a7a24); font-weight: 700;
}
.blog-card-title {
  font-size: 1.15rem; line-height: 1.3; font-family: 'Playfair Display', Georgia, serif;
  color: var(--text-primary, #101722); margin: 0;
}
.blog-card-excerpt {
  font-size: .875rem; color: var(--text-secondary, #4a5568); line-height: 1.6; margin: 0; flex: 1;
}
.blog-card-more {
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--gold-dark, #8a6c1f);
}

.blog-none, .blog-loading, .blog-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary, #4a5568);
}

/* ── Article detail ── */
.blog-article {
  max-width: 52rem;
  margin: 0 auto;
}
.blog-article-cover {
  position: relative;
  padding-top: 52%;
  background: linear-gradient(135deg, var(--navy,#101722), #2a3a52);
  border-radius: .5rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.blog-article-cover.no-img { background: linear-gradient(135deg, var(--gold,#101722), var(--navy,#101722)); }
.blog-article-cover img { position: absolute; inset:0; width:100%; height:100%; object-fit:cover; }

.blog-article-meta {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--gold-dark, #9a7a24); font-weight: 700; margin-bottom: .75rem;
}
.blog-article-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text-primary, #101722); line-height: 1.15; margin: 0 0 .75rem;
}
.blog-article-excerpt {
  font-size: 1.05rem; color: var(--text-secondary, #4a5568); font-style: italic;
  border-left: 3px solid var(--gold, #C9A84C); padding-left: 1rem; margin: 0 0 1.5rem;
}
.blog-article-content {
  font-size: 1rem; line-height: 1.85; color: var(--text-primary, #101722);
}
.blog-article-content h1, .blog-article-content h2, .blog-article-content h3,
.blog-article-content h4 { margin: 1.8rem 0 .75rem; color: var(--text-primary,#101722); }
.blog-article-content p { margin: .9rem 0; }
.blog-article-content ul, .blog-article-content ol { margin: .9rem 0; padding-left: 1.5rem; }
.blog-article-content blockquote {
  border-left: 3px solid var(--gold,#C9A84C); margin: 1.2rem 0;
  padding: .4rem 1rem; color: var(--text-secondary,#4a5568); font-style: italic;
}
.blog-article-content a { color: var(--gold-dark, #9a7a24); text-decoration: underline; }
.blog-article-content img { max-width: 100%; height: auto; border-radius: .375rem; }
.blog-article-content table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.blog-article-content th, .blog-article-content td { border: 1px solid var(--border,#ddd); padding: .5rem; }

/* ── Blog detail hero: render the cover image plainly (no crop / filter / overlay) ── */
/* The detail route toggles .page-hero--blog-detail on the shared .page-hero section,
   overriding the themed styles.css rules only for this route. */
.page-hero--blog-detail { height: auto; display: block; background: transparent; }
.page-hero--blog-detail .page-hero-bg {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  max-height: 400px;
}
.page-hero--blog-detail .page-hero-bg img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 400px;
  display: block;
  object-fit: contain;
  object-position: center;
}
.page-hero--blog-detail .page-hero-overlay { display: none; }
/* Title/breadcrumbs now sit below the plain image, so switch them to the light-theme text colours. */
.page-hero--blog-detail .breadcrumbs { color: var(--text-secondary, #4a5568); }
.page-hero--blog-detail .page-title { color: var(--text-primary, #101722); }

/* back links */
.blog-back-link {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--gold-dark, #9a7a24); margin-bottom: 1.5rem; text-decoration: none;
}
.blog-back-link:hover { color: var(--navy, #101722); }

/* not-found */
.blog-notfound-inner { max-width: 40rem; margin: 0 auto; text-align: center; padding: 3rem 1rem; }
.blog-notfound-code {
  font-family: 'Playfair Display', Georgia, serif; font-size: clamp(4rem,12vw,7rem);
  color: var(--gold, #C9A84C); line-height: 1; margin: 0;
}
.blog-notfound-title {
  font-family: 'Playfair Display', Georgia, serif; font-size: 1.9rem;
  color: var(--text-primary,#101722); margin: .5rem 0;
}
.blog-notfound-text { color: var(--text-secondary,#4a5568); margin-bottom: 1.75rem; }

/* blog hero tagline under page-title */
.blog-hero-sub {
  margin-top: .5rem; font-size: .85rem; color: rgba(255,255,255,.7); letter-spacing: .05em;
}

/* uses existing .reveal / .vis from site js */
.blog-card.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.blog-card.reveal.vis { opacity: 1; transform: translateY(0); }

/* ── Self-contained header dropdown (used on our-team.html, which does not
        load styles.css and does not define .dropdown/.dd) ── */
.blog-nav {
  position: relative;
  display: inline-block;
}
.blog-nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .6rem 1.25rem;
  background: transparent;
  color: var(--navy, hsl(220,38%,10%));
  border: 2px solid var(--navy, hsl(220,38%,10%));
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  transition: all .25s;
}
.blog-nav-trigger:hover {
  background: var(--gold, #C9A84C);
  border-color: var(--gold, #C9A84C);
  color: #101722;
}
.blog-nav-drop {
  display: none;
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
  border-top: 2px solid var(--gold, #C9A84C);
  min-width: 16rem;
  z-index: 100;
  padding: .5rem 0;
}
.blog-nav:hover .blog-nav-drop { display: block; }
.blog-nav-drop a {
  display: block;
  padding: .625rem 1.5rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--navy, #101722);
  transition: all .15s;
  white-space: nowrap;
  text-decoration: none;
}
.blog-nav-drop a:hover { color: var(--gold-d, #8a6c1f); background: var(--gray, hsl(220,10%,95%)); }
.blog-nav-drop .blogs-dd-loading { padding: .625rem 1.5rem; }