/* WeLoveElla.org — modernized stylesheet
   Preserves the original 2007 palette and feel with CSS Grid/Flexbox */

:root {
  --lavender-bg:   #FEEEFD;
  --purple-deep:   #5252A1;
  --purple-mid:    #6D6DBD;
  --purple-bright: #6A4BCC;
  --purple-nav:    #6666FB;
  --gold:          #CD5802;
  --gold-light:    #FFCC33;
  --white:         #ffffff;
  --border-light:  #CCCCFF;
  --text-body:     #3d3d7a;
  --footer-purple: #663399;
  --header-bg:     #6A4BCC;
  --sidebar-bg:    #9F9FC4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background: var(--lavender-bg);
  font-family: 'Nunito', Arial, Helvetica, sans-serif;
  color: var(--text-body);
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---------- Header ---------- */
.site-header {
  background: var(--header-bg);
  border-bottom: 4px solid var(--gold-light);
}
.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px 0;
}
.header-logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}
.header-tagline {
  background: var(--purple-nav);
  text-align: center;
  padding: 8px 12px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  color: var(--white);
}
.header-tagline a {
  color: var(--gold-light);
  font-weight: bold;
  margin-right: 12px;
}
.header-tagline span { color: var(--white); }

/* ---------- Layout ---------- */
.site-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
}
.page-layout {
  display: grid;
  grid-template-columns: 160px 1fr 140px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 800px) {
  .page-layout { grid-template-columns: 1fr; }
}

/* ---------- Nav ---------- */
.site-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--white);
  border: 1px dotted var(--border-light);
  padding: 12px;
  border-radius: 6px;
}
.site-nav a {
  color: var(--purple-deep);
  font-weight: bold;
  font-size: 0.9rem;
  padding: 4px 2px;
}
.site-nav a.active,
.site-nav a:hover { color: var(--gold); }
.nav-butterfly { margin-top: 8px; }

/* ---------- Main content ---------- */
.main-content { min-width: 0; }
.content-card {
  background: var(--white);
  border: 1px dotted var(--border-light);
  border-radius: 6px;
  padding: 24px;
}
.content-card h1,
.content-card h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--purple-mid);
}
.content-card h3 {
  color: var(--purple-deep);
  font-size: 1.1rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 4px;
}
.content-card p { line-height: 1.6; }
.back-to-top {
  font-size: 0.8rem;
  display: inline-block;
  margin: 4px 0 20px;
}
.toc-list {
  list-style: none;
  padding-left: 0;
}
.toc-list li { margin-bottom: 4px; }
.toc-list li::before {
  content: "♥ ";
  color: var(--gold);
}

/* ---------- Sidebar: Ella Loved ---------- */
.sidebar-ella-loves {
  background: var(--sidebar-bg);
  border-radius: 6px;
  padding: 12px;
  text-align: center;
}
.ella-loves-title { margin-bottom: 10px; }
.ella-loves-item {
  display: inline-block;
  margin: 4px;
}
.ella-loves-item img {
  border: 2px solid var(--white);
  border-radius: 4px;
}

/* ---------- Poems / memorial text ---------- */
.poem {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  color: var(--purple-deep);
  line-height: 1.8;
  margin: 20px 0;
  padding-left: 20px;
  border-left: 3px solid var(--border-light);
}
.memorial-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ---------- Photo grids ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.photo-grid a img {
  border: 1px solid var(--purple-deep);
  border-radius: 4px;
}
.photo-caption {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 30px;
}

/* ---------- Video cards ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.video-card {
  border: 1px dotted var(--border-light);
  border-radius: 6px;
  padding: 10px;
  text-align: center;
}
.video-card video { width: 100%; border-radius: 4px; }
.video-placeholder {
  background: var(--lavender-bg);
  border: 1px dashed var(--gold);
  border-radius: 4px;
  padding: 20px 10px;
  font-size: 0.85rem;
  color: var(--gold);
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: 1000px;
  margin: 20px auto 0;
  padding: 16px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--footer-purple);
}
.footer-links a {
  color: var(--footer-purple);
  margin: 0 8px;
  font-weight: bold;
}

/* ---------- Homepage-specific ---------- */
.home-hero {
  text-align: center;
  padding: 20px;
}
.home-hero img { max-width: 300px; }
