/*
 * Global styles for the LegacyQR website.  The palette was chosen
 * to be neutral and respectful.  Layouts are responsive and adjust
 * gracefully for small screens.
 */

/* Colour variables make it easy to adjust the theme in one place. */
:root {
  --primary: #4b5563;
  --primary-hover: #374151;
  --accent: #9ca3af;
  --bg: #f9fafb;
  --text: #1f2937;
}

/* Reset some basic elements */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation bar */
.nav {
  background-color: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}
.nav h1 {
  margin: 0;
  font-size: 1.5rem;
}
.nav h1 a {
  text-decoration: none;
  color: var(--primary);
}
.nav nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--primary);
  font-weight: bold;
}
.nav nav a:hover {
  text-decoration: underline;
}

/* Home page hero */
.hero {
  text-align: center;
  padding: 3rem 1rem;
}
.hero h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.hero p {
  margin-bottom: 2rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* Button styles */
.button {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 1rem;
}
.button:hover {
  background-color: var(--primary-hover);
}
.button.secondary {
  background-color: #e5e7eb;
  color: var(--primary);
}
.button.secondary:hover {
  background-color: #d1d5db;
}

/* Features section */
.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 1rem;
  max-width: 960px;
  margin: 0 auto;
}
.feature {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1rem;
  flex: 1 1 260px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.feature h3 {
  margin-top: 0;
}

/* Create and memorial panels */
.create,
.memorial {
  max-width: 680px;
  margin: 2rem auto;
  padding: 1rem;
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}
.create h2 {
  text-align: center;
  margin-top: 0;
}
.create form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: bold;
}
.create form input[type="text"],
.create form input[type="date"],
 .create form input[type="email"],
.create form textarea {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}
.create form input[type="file"] {
  margin-top: 0.25rem;
}

/* Optional explanatory text (e.g., for email field) */
.create form small {
  display: block;
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.hidden {
  display: none;
}

/* Gallery layout for memorial images */
.memorial .gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.memorial .gallery img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  flex: 1 1 calc(50% - 0.5rem);
}

/* Footer formatting */
.footer {
  margin-top: auto;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Smaller screens adjustments */
@media (max-width: 640px) {
  .features {
    flex-direction: column;
  }
  .feature {
    flex: none;
  }
  .memorial .gallery img {
    flex-basis: 100%;
  }
}