/* Classic template — minimal CSS reset */

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

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    'Noto Sans',
    sans-serif,
    'Apple Color Emoji',
    'Segoe UI Emoji',
    'Segoe UI Symbol',
    'Noto Color Emoji';
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #333;
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-block-start: 0.5rem;
  margin-block-end: 1rem;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.2;
  color: inherit;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-block-start: 0;
  margin-block-end: 0.9rem;
}

a {
  background-color: transparent;
  text-decoration: none;
  color: #c36;
}

a:active,
a:hover {
  color: #336;
}

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

small { font-size: 80%; }

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sub { bottom: -0.25em; }
sup { top: -0.5em; }

blockquote {
  margin: 0;
}

ul,
ol {
  padding-left: 1.5rem;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

input[type='date'],
input[type='email'],
input[type='number'],
input[type='password'],
input[type='search'],
input[type='tel'],
input[type='text'],
input[type='url'],
select,
textarea {
  width: 100%;
  border: 1px solid #666;
  border-radius: 3px;
  padding: 0.5rem 1rem;
  transition: border-color 0.2s;
}

input[type='date']:focus,
input[type='email']:focus,
input[type='number']:focus,
input[type='password']:focus,
input[type='search']:focus,
input[type='tel']:focus,
input[type='text']:focus,
input[type='url']:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary-color, #c36);
  outline-offset: 0;
  border-color: var(--primary-color, #c36);
}

button,
input {
  overflow: visible;
}

button,
select {
  text-transform: none;
}

textarea {
  overflow: auto;
  resize: vertical;
}

/* Accessibility: visually hidden but readable by screen readers */
.sr-only {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* Skip to content link */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
  word-wrap: normal;
}
.screen-reader-text:focus {
  background-color: #f1f1f1;
  clip: auto;
  color: #21759b;
  display: block;
  font-size: 14px;
  font-weight: bold;
  height: auto;
  left: 5px;
  padding: 15px 23px 14px;
  position: absolute;
  top: 5px;
  width: auto;
  z-index: 100000;
  text-decoration: none;
}

/* Scroll-triggered fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; }
}

/* ===== Shared internal-page layout ===== */
.container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 20px;
}
.page-hero {
  padding: 60px 0;
  text-align: center;
  background-color: var(--primary-color);
  color: var(--white-color);
}
.page-hero h1 {
  color: var(--white-color);
  margin: 0 0 12px;
}
.page-hero p {
  color: var(--white-color);
  opacity: 0.85;
  max-width: 560px;
  margin: 0 auto;
}
.breadcrumb {
  margin-top: 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}
.breadcrumb a {
  color: rgba(255, 255, 255, 0.75);
}
.breadcrumb a:hover {
  color: var(--white-color);
}

/* ===== Gallery Page ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 6px;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: none;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.5s ease,
    filter 0.3s ease;
}
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}
.gallery-item:hover img {
  transform: scale(1.08);
}
.gallery-item:hover::after {
  background: rgba(0, 0, 0, 0.1);
}
.gallery-item:focus-visible {
  outline: 2px solid var(--primary-color, #c36);
  outline-offset: 2px;
}

/* Lightbox (appended to document.body, so styles must be global) */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 6px;
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  color: #fff;
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 720px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
}
