/* ===========================================
   Looth Gallery — WPCode CSS Snippet
   Add via WPCode > CSS Snippet > Site Wide Header
   =========================================== */

/* --- Gallery Grid --- */
.looth-gallery {
  display: grid;
  gap: 8px;
  margin: 24px 0;
}
.looth-gallery.cols-2 { grid-template-columns: 1fr 1fr; }
.looth-gallery.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.looth-gallery.cols-1 {
  grid-template-columns: 1fr;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 600px) {
  .looth-gallery.cols-2,
  .looth-gallery.cols-3 { grid-template-columns: 1fr; }
}

/* --- Gallery Items --- */
.looth-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  aspect-ratio: 4/3;
}
.looth-gallery-item.tall { aspect-ratio: 3/4; }
.looth-gallery-item.square { aspect-ratio: 1/1; }

.looth-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}
.looth-gallery-item:hover img { transform: scale(1.05); }
.looth-gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 60%, rgba(0,0,0,0.15));
  pointer-events: none;
}

/* --- Image + Caption Container --- */
.looth-figure {
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
  cursor: pointer;
}
.looth-figure img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}
.looth-figure:hover img { transform: scale(1.05); }
.looth-figure .looth-caption {
  padding: 8px 12px;
  font-size: 0.85em;
  line-height: 1.4;
  color: #555;
  background: #f5f5f5;
}
.looth-caption .looth-caption-num {
  font-weight: 700;
  color: #ECB351;
  margin-right: 4px;
}

/* --- Hover Tooltip Caption --- */
.looth-tooltip {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 6px 12px;
  font-size: 0.82em;
  line-height: 1.3;
  border-radius: 6px;
  z-index: 3;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  text-align: center;
}
.looth-gallery-item:hover .looth-tooltip,
.looth-feature:hover .looth-tooltip,
.looth-figure:hover .looth-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* --- Feature Image (full-width single) --- */
.looth-feature {
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}
.looth-feature img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}
.looth-feature:hover img { transform: scale(1.02); }

/* --- Dateline --- */
.looth-dateline {
  text-align: center;
  color: #888;
  font-size: 0.9em;
  margin-bottom: 32px;
}

/* --- Section Break --- */
.looth-section-break {
  border: none;
  border-top: 2px solid #ECB351;
  margin: 36px auto;
  width: 60px;
}

/* --- Pull Quote --- */
.looth-pull-quote {
  border-left: 4px solid #ECB351;
  padding: 12px 20px;
  margin: 28px 0;
  font-size: 1.1em;
  font-style: italic;
  color: #555;
  background: #fffcf5;
  border-radius: 0 6px 6px 0;
}

/* --- Drop Cap --- */
.looth-dropcap::first-letter {
  float: left;
  font-size: 3.4em;
  line-height: 0.8;
  font-weight: 700;
  color: #ECB351;
  margin: 4px 8px 0 0;
  padding: 0;
}

/* --- Callout Box --- */
.looth-callout {
  background: #f8f6f1;
  border: 1px solid #e8e2d6;
  border-left: 4px solid #ECB351;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.95em;
  line-height: 1.6;
  color: #555;
}

/* --- Lightbox Overlay --- */
.looth-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.97);
  z-index: 999999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.looth-lightbox.active { display: flex; }

.looth-lightbox .looth-lightbox-img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  user-select: none;
  position: relative;
  z-index: 1;
}

.looth-lightbox-caption {
  color: #eee;
  font-size: 1em;
  margin-top: 16px;
  text-align: center;
  max-width: 700px;
  padding: 8px 24px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  line-height: 1.4;
}

.looth-lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  color: #fff;
  font-size: 2.2em;
  cursor: pointer;
  background: none;
  border: none;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 9999999;
  line-height: 1;
}
.looth-lightbox-close:hover { opacity: 1; }

.looth-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 2.5em;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  border: none;
  width: 50px;
  height: 70px;
  border-radius: 6px;
  opacity: 0.6;
  transition: opacity 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.looth-lightbox-nav:hover {
  opacity: 1;
  background: rgba(255,255,255,0.2);
}
.looth-lightbox-prev { left: 16px; }
.looth-lightbox-next { right: 16px; }

.looth-lightbox-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #888;
  font-size: 0.85em;
}
/* ===========================================
   Looth Article Containers — ADD to existing
   Looth Gallery WPCode CSS Snippet
   =========================================== */

/* --- Article Wrapper --- */
.looth-article {
  max-width: 860px;
  margin: 0 auto;
  font-size: 1.08em;
  line-height: 1.75;
  color: #2c2c2c;
}

/* --- Section Card --- */
.looth-section {
  background: #fdfbf7;
  border: 1px solid #ece6d8;
  border-radius: 16px;
  padding: 36px 40px;
  margin-bottom: 28px;
}
@media (max-width: 600px) {
  .looth-section {
    padding: 24px 20px;
    border-radius: 12px;
  }
}

/* Paragraphs inside sections get comfortable spacing */
.looth-section p {
  margin-bottom: 1.1em;
}
.looth-section p:last-child {
  margin-bottom: 0;
}

/* Headings inside sections */
.looth-section h3 {
  color: #87986A;
  font-size: 1.3em;
  margin-top: 0;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ECB351;
  display: inline-block;
}

/* --- Article Header Card (title/byline area) --- */
.looth-article-header {
  background: #fdfbf7;
  border: 1px solid #ece6d8;
  border-radius: 16px;
  padding: 32px 40px 28px;
  margin-bottom: 28px;
  text-align: center;
}
.looth-article-header h2 {
  margin: 0 0 6px;
  color: #1A1E12;
  font-size: 1.8em;
}
.looth-article-header .looth-dateline {
  margin-bottom: 0;
  margin-top: 0;
}
.looth-article-header .looth-subtitle {
  color: #888;
  font-size: 0.92em;
  font-style: italic;
  margin-top: 4px;
}

/* --- Adjustments for gallery/feature inside sections --- */
.looth-section .looth-feature,
.looth-section .looth-figure,
.looth-section .looth-gallery {
  margin-left: -12px;
  margin-right: -12px;
}

/* --- Pull quote & callout tweaks inside sections --- */
.looth-section .looth-pull-quote {
  margin-left: -4px;
}
.looth-section .looth-callout {
  background: #f3f0e8;
  border-color: #ddd6c6;
}

/* --- Section break between cards not needed, 
       but if used inside a card: --- */
.looth-section .looth-section-break {
  margin: 28px auto;
}

/* --- Author Sign-off Card --- */
.looth-signoff {
  background: #fdfbf7;
  border: 1px solid #ece6d8;
  border-radius: 16px;
  padding: 28px 40px;
  margin-top: 28px;
  text-align: center;
  font-size: 1.05em;
  color: #555;
}
.looth-signoff strong {
  color: #1A1E12;
  font-size: 1.15em;
}