/* article-layout.css */

/* Overall page wrapper for article content */
.yt-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

/* Meta text (date etc.) */
.yt-meta {
  font-size: 0.8rem;
  color: #777;
}

/* HERO SECTION */
.yt-hero {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.yt-section-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 0.5rem;
}

.yt-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.yt-hero-subtitle {
  color: #555;
}

.yt-hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}

.yt-hero-figure figcaption {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.4rem;
}

/* INTRO */
.yt-intro {
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

/* SPLIT LAYOUT (TEXT + IMAGE) */
.yt-split {
  display: grid;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}

.yt-split-text h2 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* Reverse layout on wide screens (image on left, text on right) */
.yt-split--reverse {
  direction: rtl;
}

.yt-split--reverse > * {
  direction: ltr;
}

/* Figures and images */
.yt-split-figure,
.yt-gallery figure {
  margin: 0;
}

.yt-split-figure img,
.yt-gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.yt-split-figure figcaption,
.yt-gallery figcaption {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.4rem;
}

/* GALLERY BLOCK */
.yt-gallery {
  margin-bottom: 2.5rem;
}

.yt-gallery h2 {
  margin-bottom: 0.75rem;
}

.yt-gallery-grid {
  display: grid;
  gap: 1rem;
}

/* CALLOUT BOX (tips / break-in steps) */
.yt-callout {
  border-left: 4px solid #0b7285;
  background: #f4f9fb;
  padding: 1.2rem 1.4rem;
  border-radius: 10px;
  margin-bottom: 2.5rem;
}

.yt-callout h2 {
  margin-top: 0;
}

/* Strong danger-style callout for high-voltage warnings */
.yt-callout--danger {
  border-left-color: #c92a2a;
  background: #fff5f5;
}

/* SUMMARY / FINAL SECTION */
.yt-summary {
  margin-bottom: 3rem;
}

/* RESPONSIVE BREAKPOINTS */
@media (min-width: 700px) {
  .yt-hero {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
    align-items: center;
  }

  .yt-split {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
  }

  .yt-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Slightly narrower text on huge screens */
@media (min-width: 1200px) {
  .yt-page {
    max-width: 1000px;
  }
}

/* Centre small image + caption block */
figure.yt-center,
figure .yt-img-small {
  text-align: center;
}

figure.yt-center figcaption {
  text-align: center;
  margin-top: 0.4rem;
}

/* Force small image size even inside figure */
.yt-img-small {
  width: auto !important;
  max-width: 260px !important;  /* adjust size as you like */
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ----------------------------------------
   YES THOMAS — CARD LAYOUT STYLING
   Used in category/index pages
-----------------------------------------*/

/* Grid structure is already defined by .yt-gallery-grid */

.yt-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: all 0.25s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.yt-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
  border-color: #d0d0d0;
}

/* Card title */
.yt-card h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
  color: #222;
}

/* Subtle date */
.yt-meta {
  font-size: 0.85rem;
  color: #777;
  margin: 0;
}

/* Card images */
.yt-card img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

/* Read more link */
.yt-card a {
  color: #0056b3;
  text-decoration: none;
}

.yt-card a:hover {
  text-decoration: underline;
}

/* Improve spacing for small screens */
@media (max-width: 600px) {
  .yt-card {
    padding: 1rem;
  }
}
