﻿:root {
  --red: #b01c2e;
  --dark: #1a1a1a;
  --paper: #f7f5f0;
  --warm: #ffd166;
  --muted: #777;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: Georgia, "Times New Roman", serif;
  background: var(--paper);
  color: var(--dark);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.hidden {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.site-nav a:focus-visible {
  outline: 3px solid var(--warm);
  outline-offset: 3px;
}

.no-js-warning {
  display: block;
  background: #fff4e5;
  color: #7f4d07;
  padding: 1rem 1.25rem;
  text-align: center;
  border-bottom: 1px solid #f4d29c;
  font-size: 0.95rem;
}

.site-header {
  background: var(--red);
  color: #fff;
  padding: 2.75rem 1rem 2.25rem;
  border-bottom: 5px solid var(--dark);
  text-align: center;
}

.site-header a {
  color: #fff;
}

.site-header h1 {
  font-size: 2.6rem;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.site-header p {
  font-style: italic;
  opacity: 0.93;
  max-width: 640px;
  margin: 0 auto;
}

.site-nav {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  padding: 0.9rem 1rem;
}

.site-nav a {
  color: var(--paper);
  font-size: 0.78rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.15rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.site-nav a:hover,
.site-nav a.active,
.site-nav a[aria-current="page"] {
  color: var(--warm);
  border-bottom-color: var(--warm);
}

.page-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero h2 {
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.25rem;
}

.hero p {
  color: #444;
  max-width: 560px;
  margin: 0 auto;
  font-size: 0.95rem;
}

.note {
  background: #fff3cd;
  border-left: 4px solid #f0ad4e;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
  color: #856404;
  border-radius: 3px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.25rem;
}

.filter-btn {
  background: #fff;
  border: 1px solid #c5c2ba;
  color: var(--dark);
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 3px;
  transition: all 0.15s ease;
}

.filter-btn:hover,
.filter-btn:focus-visible {
  background: var(--warm);
  border-color: var(--warm);
  color: var(--dark);
}

.filter-btn.active {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
}

.cartoon {
  background: #fff;
  border: 1px solid #d8d5ce;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}

.cartoon:hover,
.cartoon:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.14);
}

.cartoon figure {
  margin: 0;
  line-height: 0;
  position: relative;
  overflow: hidden;
}

.cartoon img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.cartoon:hover img,
.cartoon:focus-within img {
  transform: scale(1.05);
}

.caption {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.caption .cat {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--red);
  font-weight: bold;
}

.caption h3 {
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0;
}

.caption .meta {
  font-size: 0.78rem;
  color: #888;
  font-style: italic;
}

.caption p {
  font-size: 0.88rem;
  color: #333;
  margin: 0;
}

.tags {
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.45rem;
  font-size: 0.72rem;
  background: #f0efe9;
  border: 1px solid #dbd9d1;
  color: #444;
  border-radius: 3px;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.tag:hover,
.tag:focus-visible {
  background: var(--warm);
  border-color: var(--warm);
  color: var(--dark);
  transform: translateY(-1px);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  max-height: 90vh;
  display: grid;
  gap: 1rem;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--dark);
  font-size: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #000;
}

.lightbox-caption {
  padding: 1rem 1.25rem 1.5rem;
  font-size: 0.95rem;
  color: #333;
}

.newsletter,
.form-wrap {
  background: #fff;
  border: 1px solid #d8d5ce;
  padding: 1.5rem;
  margin-top: 2rem;
  border-radius: 8px;
}

.newsletter h3 {
  margin-top: 0;
  font-size: 1.3rem;
}

#newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

#newsletter-form input[type="email"] {
  flex: 1 1 220px;
  min-width: 220px;
  padding: 0.85rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#newsletter-form button {
  background: var(--red);
  color: #fff;
  padding: 0.9rem 1.3rem;
  border-radius: 6px;
  font-weight: bold;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h2 {
  margin: 0;
  font-size: 2rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.about-card {
  background: #fff;
  border: 1px solid #d8d5ce;
  padding: 1.35rem;
  border-radius: 8px;
}

.about-card h3 {
  margin-top: 0;
  margin-bottom: 0.65rem;
  font-size: 1.05rem;
}

.about-card p {
  margin: 0;
  color: #444;
  line-height: 1.7;
}

.recent-heading {
  text-align: center;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 1rem;
}

.recent-list {
  max-width: 720px;
  margin: 0 auto;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0;
}

#recent-list li {
  background: #fff;
  border: 1px solid #d8d5ce;
  padding: 1rem;
  border-radius: 8px;
}

#recent-list .meta {
  color: #666;
}

.form-row {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.form-row label {
  font-weight: bold;
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  min-height: 44px;
}

.form-row textarea {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 0.95rem 1.5rem;
  border-radius: 6px;
  font-weight: bold;
}

.form-note {
  margin-top: 1rem;
  background: #eef6ff;
  border-left: 4px solid #4a90d9;
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: #0b3d6b;
}

.site-footer {
  border-top: 1px solid #d8d5ce;
  padding: 1.5rem 1.25rem 2rem;
  background: #f9f7f3;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--dark);
  font-size: 0.9rem;
}

.site-footer p {
  text-align: center;
  color: #555;
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .site-header h1 {
    font-size: 2rem;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  #newsletter-form {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 600px) {
  .site-nav ul {
    flex-direction: column;
    align-items: center;
  }

  .filters {
    justify-content: flex-start;
  }

  .filter-btn {
    flex: 1 1 100%;
  }
}
