/* Summerstown182 Custom Styles */
/* Supplements Tailwind CDN */

/* --- Article Content Prose --- */
.article-content {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #374151;
}

.article-content p {
  margin-bottom: 1.5em;
}

.article-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: #2C5F2D;
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.article-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #556B2F;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.article-content a {
  color: #E2725B;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.article-content a:hover {
  color: #2C5F2D;
}

.article-content img {
  border-radius: 0.5rem;
  margin: 1.5em 0;
  max-width: 100%;
  height: auto;
  cursor: pointer;
}

.article-content blockquote {
  border-left: 4px solid #E2725B;
  padding-left: 1.5em;
  margin: 1.5em 0;
  font-style: italic;
  color: #556B2F;
}

.article-content ul,
.article-content ol {
  margin: 1em 0;
  padding-left: 1.5em;
}

.article-content li {
  margin-bottom: 0.5em;
}

.article-content figure {
  margin: 2em 0;
}

.article-content figcaption {
  font-size: 0.85rem;
  color: #9CA3AF;
  text-align: center;
  margin-top: 0.5em;
  font-style: italic;
}

.article-content hr {
  border: none;
  border-top: 2px solid #2C5F2D;
  margin: 2em 0;
  opacity: 0.2;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}

.article-content th,
.article-content td {
  padding: 0.75em;
  border: 1px solid #E5E7EB;
  text-align: left;
}

.article-content th {
  background-color: #2C5F2D;
  color: white;
  font-weight: 500;
}

/* Remove WP-specific classes styling */
.article-content .wp-image-container,
.article-content .wp-block-image,
.article-content .wp-caption {
  margin: 1.5em 0;
}

.article-content .wp-caption-text,
.article-content .wp-element-caption {
  font-size: 0.85rem;
  color: #9CA3AF;
  text-align: center;
  margin-top: 0.5em;
  font-style: italic;
}

/* --- Line Clamp --- */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Gallery Lightbox --- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 0.25rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Calendar Styles --- */
.calendar-day {
  background: white;
  min-height: 60px;
  padding: 0.5rem;
  position: relative;
  cursor: default;
}

.calendar-day.today {
  background: #F5F5DC;
}

.calendar-day.has-event {
  cursor: pointer;
}

.calendar-day.has-event:hover {
  background: #f0efe5;
}

.calendar-day .day-number {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  color: #374151;
}

.calendar-day.other-month .day-number {
  color: #D1D5DB;
}

.calendar-day .event-dot {
  width: 6px;
  height: 6px;
  background: #E2725B;
  border-radius: 50%;
  display: inline-block;
  margin-top: 2px;
}

/* --- Smooth Scrolling --- */
html {
  scroll-behavior: smooth;
}

/* --- Selection Color --- */
::selection {
  background: #E2725B;
  color: white;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #F5F5DC;
}

::-webkit-scrollbar-thumb {
  background: #556B2F;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2C5F2D;
}

/* ── Map Markers & Popups ── */
.s182-marker {
  background: #2C5F2D;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.s182-marker.has-portrait {
  background: #E2725B;
}
.s182-cluster {
  background: rgba(44,95,45,0.7);
  border-radius: 50%;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  text-align: center;
  line-height: 36px;
}
.s182-popup { max-height: 300px; overflow-y: auto; }
.s182-popup-entry { display: flex; gap: 10px; padding: 6px 0; }
.s182-popup-divider { border-top: 1px solid #e5e7eb; margin: 4px 0; }
.s182-popup-portrait img {
  width: 56px; height: 72px; object-fit: cover; border-radius: 4px;
  flex-shrink: 0;
}
.s182-popup-info { min-width: 0; }
.s182-popup-name {
  font-family: 'Playfair Display', serif;
  color: #2C5F2D; font-size: 0.95rem; font-weight: 600;
  margin: 0 0 2px;
}
.s182-popup-regiment { font-style: italic; color: #556B2F; font-size: 0.78rem; margin: 0; }
.s182-popup-death { color: #6B7280; font-size: 0.72rem; margin: 2px 0 0; }
.s182-popup-address { color: #374151; font-size: 0.78rem; font-weight: 500; margin: 2px 0 0; }
.s182-popup-link {
  color: #E2725B; font-size: 0.78rem; text-decoration: none;
  display: inline-block; margin-top: 3px;
}
.s182-popup-link:hover { text-decoration: underline; }

/* Override Leaflet popup defaults */
.leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.leaflet-popup-content { margin: 10px 14px; font-family: 'Inter', sans-serif; }
