@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Lato:wght@300;400;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #faf8f4;
  color: #2c2c2c;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

a { color: #2d5a27; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- HEADER ---- */
.site-header {
  background-color: #2d5a27;
  padding: 24px 20px;
  text-align: center;
  position: relative;
}

.site-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: #ffffff;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.logout-btn {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 4px 10px;
  border-radius: 3px;
  white-space: nowrap;
}
.logout-btn:hover {
  color: #fff;
  border-color: #fff;
  text-decoration: none;
}

/* ---- PAGE CONTENT ---- */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ---- HERO IMAGE ---- */
.hero {
  text-align: center;
  margin-bottom: 40px;
}

.hero a { display: inline-block; }

.hero img {
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* ---- FAMILY GRID ---- */
.family-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 48px;
}

.family-card {
  text-align: center;
  width: 155px;
}

.family-card a {
  display: block;
  text-decoration: none;
}

.family-card img {
  width: 155px;
  height: 165px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: box-shadow 0.2s, transform 0.2s;
  display: block;
}

.family-card:hover img {
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  transform: translateY(-3px);
}

.family-card .family-name {
  margin-top: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: #2d5a27;
}

/* ---- FOOTER CONTENT ---- */
.footer-content {
  border-top: 1px solid #e0dbd4;
  padding-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}

.footer-col h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: #2d5a27;
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 6px;
  font-size: 0.88rem;
}

.footer-col p {
  font-size: 0.88rem;
  margin-bottom: 8px;
}

/* ---- PHOTO PAGES ---- */
.photo-page {
  text-align: center;
}

.photo-page img {
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  margin-bottom: 20px;
}

.photo-caption {
  font-size: 1.1rem;
  color: #2c2c2c;
  margin-bottom: 28px;
  line-height: 1.7;
}

.photo-caption .subcaption {
  display: block;
  font-size: 0.88rem;
  color: #666;
  margin-top: 6px;
}

.back-btn {
  display: inline-block;
  padding: 10px 28px;
  background-color: #2d5a27;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.back-btn:hover {
  background-color: #1e3e1b;
  text-decoration: none;
}

/* ---- MAIERS LEGEND ---- */
.portrait-legend {
  max-width: 640px;
  margin: 0 auto 28px;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.9;
  text-align: center;
}

/* ---- LOGIN ---- */
#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: #2d5a27;
}

#login-box {
  background: #faf8f4;
  padding: 40px 48px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  max-width: 380px;
  width: 100%;
}

#login-box h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  color: #2d5a27;
  font-weight: 400;
  margin-bottom: 8px;
}

#login-box .login-subtitle {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 6px;
}

#login-box .login-hint {
  font-size: 0.78rem;
  color: #888;
  margin-bottom: 22px;
  font-style: italic;
}

#login-box input[type=password] {
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  padding: 9px 12px;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 3px;
  margin-bottom: 10px;
  background: #fff;
}

#login-box input[type=password]:focus {
  outline: none;
  border-color: #2d5a27;
  box-shadow: 0 0 0 2px rgba(45,90,39,0.15);
}

#login-box button {
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 11px 0;
  width: 100%;
  background-color: #2d5a27;
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#login-box button:hover {
  background-color: #1e3e1b;
}

#login-error {
  color: #c0392b;
  font-size: 0.82rem;
  min-height: 18px;
  margin-top: 10px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .site-header h1 { font-size: 1.5rem; }
  .logout-btn { font-size: 0.72rem; padding: 3px 8px; right: 10px; }
  .page-content { padding: 28px 16px; }
  .family-card { width: 130px; }
  .family-card img { width: 130px; height: 138px; }
  .footer-content { flex-direction: column; gap: 24px; }
  #login-box { padding: 32px 24px; }
}
