/* ============================================================
   page.css  —  Shared styles for interior pages (hobbies, electronics)
   ============================================================ */

/* ── Page Hero ── */
.page-hero {
  position:    relative;
  min-height:  320px;
  display:     flex;
  align-items: flex-end;
  overflow:    hidden;
  margin-top:  58px;
}

.page-hero-bg {
  position: absolute;
  inset:    0;
  z-index:  0;
}

/* Fishing page: water-like diagonal lines */
.hobby-bg {
  background:
    repeating-linear-gradient(
      170deg,
      transparent,
      transparent 40px,
      rgba(26, 86, 219, .07) 40px,
      rgba(26, 86, 219, .07) 41px
    ),
    linear-gradient(180deg, #dbeafe 0%, #e0f2fe 100%);
}

/* Electronics page: circuit-board grid */
.electronics-bg {
  background:
    repeating-linear-gradient(0deg,   transparent, transparent 28px, rgba(26,86,219,.07) 28px, rgba(26,86,219,.07) 29px),
    repeating-linear-gradient(90deg,  transparent, transparent 28px, rgba(26,86,219,.07) 28px, rgba(26,86,219,.07) 29px),
    linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
}

.page-hero-content {
  position: relative;
  z-index:  1;
  padding:  4rem 2rem 3rem;
}

.page-hero-kicker {
  font-family:    var(--mono);
  font-size:      .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color:          var(--gold);
  margin-bottom:  .6rem;
}

.page-hero-title {
  font-family:   var(--display);
  font-size:     clamp(2.2rem, 5vw, 3.6rem);
  font-weight:   300;
  color:         #1a1a2e;
  line-height:   1.1;
  margin-bottom: .4rem;
}

.page-hero-sub {
  font-family:    var(--mono);
  font-size:      .78rem;
  color:          var(--text-dim);
  letter-spacing: .06em;
}

/* ── Sections ── */
.page-section {
  padding:    5.5rem 0;
  border-top: 1px solid var(--border);
}

.alt-section { background: var(--bg-soft); }

.intro-para {
  max-width:   680px;
  font-size:   1.06rem;
  color:       var(--text-dim);
  line-height: 1.8;
}

/* ── Empty state hint ── */
.empty-hint {
  font-family:    var(--mono);
  font-size:      .8rem;
  color:          var(--text-mute);
  border:         1px dashed var(--border-mid);
  border-radius:  var(--r);
  padding:        2rem;
  text-align:     center;
  line-height:    1.8;
  margin-top:     1.5rem;
}
.empty-hint code {
  color:       var(--gold);
  background:  var(--gold-ghost);
  padding:     .1rem .35rem;
  border-radius: 2px;
  font-size:   .78rem;
}
.blog-empty { max-width: 600px; margin: 0 auto; }

/* ── Hobby info cards ── */
.hobby-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap:                   1.2rem;
  margin-top:            2.5rem;
}

.hobby-card {
  background:     var(--bg-card);
  border:         1px solid var(--border);
  border-radius:  var(--r);
  padding:        1.8rem;
  display:        flex;
  flex-direction: column;
  gap:            .6rem;
  transition:     border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.hobby-card:hover {
  border-color: var(--border-hi);
  transform:    translateY(-3px);
  box-shadow:   0 10px 34px rgba(26, 86, 219, .09);
}
.hobby-icon { font-size: 2rem; line-height: 1; }
.hobby-card h3 { font-family: var(--display); font-size: 1.1rem; font-weight: 500; color: #1a1a2e; }
.hobby-card p  { font-size: .91rem; color: var(--text-dim); line-height: 1.7; flex: 1; }
.hobby-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.hobby-tags span {
  font-family:    var(--mono);
  font-size:      .58rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding:        .18rem .5rem;
  border:         1px solid var(--border-mid);
  border-radius:  2px;
  color:          var(--cyan);
  background:     var(--gold-ghost);
}

/* ── Fishing gallery (reuses main-site gal classes) ── */
.gal-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap:                   .9rem;
  margin-top:            2rem;
}

.gal-item {
  cursor:        pointer;
  border-radius: var(--r);
  overflow:      hidden;
  border:        1px solid var(--border);
  transition:    transform var(--ease), box-shadow var(--ease);
}
.gal-item:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(26,86,219,.10); }
.gal-item img   { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.gal-cap        { padding: .65rem .75rem; background: var(--bg-card); }
.gal-cap p      { font-size: .82rem; color: var(--text-dim); margin: 0; }
.gal-loc        { font-family: var(--mono); font-size: .65rem; color: var(--text-mute); display: block; margin-top: .2rem; }

/* ── Lightbox (reuses main-site styles) ── */
.lightbox {
  display:         none;
  position:        fixed;
  inset:           0;
  background:      rgba(10, 12, 26, .88);
  z-index:         500;
  align-items:     center;
  justify-content: center;
  flex-direction:  column;
  gap:             1rem;
  padding:         2rem;
}
.lightbox.open { display: flex; }
.lightbox img  { max-width: min(90vw, 860px); max-height: 72vh; border-radius: var(--r); }
.lightbox p    { font-family: var(--mono); font-size: .75rem; color: rgba(255,255,255,.55); text-align: center; }
.lb-close {
  position:   absolute;
  top: 1.2rem; right: 1.5rem;
  background: none; border: none;
  color: rgba(255,255,255,.6);
  font-size:  2rem; cursor: pointer;
  transition: color var(--ease);
}
.lb-close:hover { color: #fff; }

/* ── Video grid (reuses main-site vid classes) ── */
.vid-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap:                   1.2rem;
  margin-top:            2rem;
}

.vid-card {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--r);
  overflow:      hidden;
}

.embed-wrap {
  position:    relative;
  padding-top: 56.25%;
}
.embed-wrap iframe {
  position: absolute;
  inset:    0;
  width:    100%;
  height:   100%;
  border:   none;
}

.vid-info    { padding: .9rem 1rem; }
.vid-title   { font-size: .92rem; font-weight: 500; color: #1a1a2e; line-height: 1.4; }
.vid-meta    { font-family: var(--mono); font-size: .65rem; color: var(--text-mute); margin-top: .3rem; }

/* ════════════════════════════════
   BLOG POSTS  (electronics page)
   ════════════════════════════════ */

#electronics-feed {
  display:       flex;
  flex-direction: column;
  gap:           3rem;
  margin-top:    2.5rem;
}

.blog-post {
  background:    var(--bg-card);
  border:        1px solid var(--border);
  border-radius: var(--r);
  overflow:      hidden;
  transition:    border-color var(--ease), box-shadow var(--ease);
}
.blog-post:hover {
  border-color: var(--border-hi);
  box-shadow:   0 6px 28px rgba(26, 86, 219, .08);
}

.post-header {
  padding:     1.6rem 1.8rem 1rem;
  border-bottom: 1px solid var(--border);
}

.post-meta {
  display:     flex;
  align-items: center;
  gap:         1rem;
  flex-wrap:   wrap;
  margin-bottom: .6rem;
}

.post-date {
  font-family:    var(--mono);
  font-size:      .65rem;
  letter-spacing: .10em;
  text-transform: uppercase;
  color:          var(--text-mute);
}

.post-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.post-tags span {
  font-family:    var(--mono);
  font-size:      .58rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding:        .18rem .5rem;
  border:         1px solid var(--border-mid);
  border-radius:  2px;
  color:          var(--cyan);
  background:     var(--gold-ghost);
}

.post-title {
  font-family:   var(--display);
  font-size:     clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight:   400;
  color:         #1a1a2e;
  line-height:   1.3;
  margin:        0;
}

.post-body {
  padding: 1.4rem 1.8rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.post-body p {
  font-size:   .97rem;
  color:       var(--text-dim);
  line-height: 1.8;
  margin:      0;
}

/* Post images */
.post-images {
  display: grid;
  gap:     .75rem;
  margin:  .4rem 0;
}
.post-images.single { grid-template-columns: 1fr; }
.post-images.multi  { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

.post-fig {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.post-fig img {
  width:        100%;
  display:      block;
  aspect-ratio: 16/9;
  object-fit:   cover;
}
.post-fig figcaption {
  font-family:  var(--mono);
  font-size:    .7rem;
  color:        var(--text-mute);
  padding:      .5rem .75rem;
  background:   var(--bg-soft);
  line-height:  1.5;
}

/* Post embedded video */
.post-body .embed-wrap {
  border-radius: var(--r);
  overflow:      hidden;
  border:        1px solid var(--border);
}

/* ── Footer ── */
footer {
  padding:    2.5rem 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  flex-wrap:       wrap;
  gap:             .5rem;
  font-family:     var(--mono);
  font-size:       .66rem;
  color:           var(--text-ghost);
  letter-spacing:  .06em;
}
.footer-dirac { color: rgba(26, 86, 219, .28); }

/* ── Responsive ── */
@media (max-width: 640px) {
  .page-hero { min-height: 240px; }
  .page-hero-content { padding: 3rem 1.5rem 2rem; }
  .hobby-grid, .gal-grid, .vid-grid { grid-template-columns: 1fr; }
  .post-images.multi { grid-template-columns: 1fr; }
  .post-header, .post-body { padding-left: 1.2rem; padding-right: 1.2rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}
