/*
 * Stylesheet for the “Микулино‑1941” memorial site.
 *
 * The design combines solemn dark tones with crisp typography to
 * reflect the tragedy of the events without overwhelming the reader.
 * A limited palette and spacious layout make the long‑read easy to
 * navigate. Cards on the home page invite visitors to explore
 * additional materials: recollections, documents, search reports and
 * poetry.  Navigation sticks to the top for quick access on long
 * pages.  A footer provides attribution and citation hooks.
 */

/* Reset some basic elements */
body,
h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
  padding: 0;
}

body {
  /* Use a light, contemporary sans‑serif stack for body text. */
  font-family: "Verdana", "Trebuchet MS", sans-serif;
  line-height: 1.5;
  color: #333;
  background: #f9f9f9;
}

/* Typography: use a bold, monumental font for headings.  Fall back to
   sans-serif if unavailable. */
h1, .page-header h1, .hero h1 {
  /* Headings use a clean sans‑serif typeface that feels modern yet authoritative. */
  font-family: "Trebuchet MS", "Arial", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  /* Only the hero title is uppercased via the specific selector below. */
}
h2 {
  font-family: "Trebuchet MS", "Arial", sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}
h3 {
  font-family: "Trebuchet MS", "Arial", sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Top navigation bar */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(40, 40, 40, 0.95);
  /* Slightly lighter dark bar for a more contemporary feel. */
  backdrop-filter: blur(3px);
  padding: 0.6rem 1.2rem;
  text-align: center;
}

.nav a {
  color: #f7f7f7;
  margin: 0 0.8rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: none;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a:focus {
  color: #e5a66a;
  text-decoration: underline;
}

/* Hero section on the home page
 *
 * The landing header draws inspiration from the design brief. Instead
 * of a photographic backdrop, a solid crimson field sets a sober
 * tone. A georgian‑ribbon graphic and an anniversary badge are
 * positioned absolutely, leaving the title and subtitle centered.
 */
.hero {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60vh;
  color: #ffffff;
  text-align: center;
  background-color: #8b0a15;
}

/* remove overlay: with solid colour it isn’t needed */
.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  /* The main title is large but lighter to avoid overwhelming the page */
  font-size: 4.2rem;
  margin-bottom: 0.4rem;
  letter-spacing: 0.05rem;
  text-transform: uppercase;
}

.hero h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

/* Tagline inside the hero, used for the introductory description */
.hero-tagline {
  /* The tagline appears beneath the subtitle in a small, muted tone. */
  font-size: 0.8rem;
  line-height: 1.4;
  max-width: 700px;
  margin: 0.6rem auto 0;
  color: #f4e7e7;
}

/* Main container */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem;
}

section {
  margin-bottom: 2rem;
}

section h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: #222;
}

section p {
  margin-bottom: 1rem;
  text-indent: 1em;
}

/* Card grid on the home page */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.card {
  position: relative;
  flex: 1 1 calc(50% - 1rem);
  min-width: 280px;
  height: 220px;
  border-radius: 8px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  color: #fff;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: scale(1.02);
}

.card a {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.55);
}

.card h3 {
  margin: 0 0 0.3rem 0;
  font-size: 1.5rem;
  line-height: 1.2;
}

.card p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.3;
}

/* Page header for inner pages */
.page-header {
  position: relative;
  height: 35vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  text-align: center;
  background-size: cover;
  background-position: center;
}

.page-header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.page-header h1 {
  position: relative;
  z-index: 1;
  font-size: 2.5rem;
}

/* Document text blocks */
.document-text {
  background: #fbfaf8;
  border: 1px solid #e0e0e0;
  padding: 1rem;
  white-space: pre-wrap;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  overflow-x: auto;
  border-radius: 6px;
}

/* Footer styling */
footer {
  margin-top: 3rem;
  background: #222;
  color: #ccc;
  padding: 1rem;
  font-size: 0.8rem;
  text-align: center;
}

/* Responsive tweaks */
@media (max-width: 700px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero h2 {
    font-size: 1.2rem;
  }
  .card {
    flex: 1 1 100%;
  }
  .page-header h1 {
    font-size: 2rem;
  }
}

/* Styling for poems */
.poem {
  white-space: pre-line;
  font-family: "Georgia", serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  margin-left: 1rem;
  margin-bottom: 2rem;
}

/* A small striped ribbon reminiscent of the St. George’s ribbon.  The
   image itself lives in the assets folder and should be referenced
   directly in the markup using the `.ribbon` class.  It is kept
   relatively small and anchored to the top right of the hero. */
.ribbon {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 7rem;
  height: auto;
  pointer-events: none;
}

/* An anniversary badge that overlays the hero background.  It uses
   translucent white so that it contrasts gently with the crimson
   backdrop. */
.anniversary {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.05rem;
  color: #fff;
  backdrop-filter: blur(2px);
}

/* A responsive photo grid used on the gallery page.  It adapts to
   available width and applies subtle hover effects.  When the user
   replaces the placeholder images with their own photographs in
   `assets/photos`, the layout will remain consistent. */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.photo-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.photo-grid img:hover {
  transform: scale(1.03);
}

/* Portrait images used in recollections.  They float to the right on
   wider screens and stack on narrow screens. */
.portrait {
  float: right;
  width: 180px;
  margin-left: 1rem;
  margin-bottom: 1rem;
  border-radius: 6px;
  object-fit: cover;
}

@media (max-width: 700px) {
  .portrait {
    float: none;
    display: block;
    margin: 0 auto 1rem;
    width: 60%;
  }
}