/* ==========================================================================
   classically-modern.com — modern responsive theme
   Replaces the dated RapidWeaver 680px layout. Loaded after the legacy
   stylesheets so it overrides them. All colours are tuned to a clean,
   gallery-friendly palette with generous whitespace.
   ========================================================================== */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --ink: #212529;
  --muted: #6c757d;
  --accent: #b3412f;      /* warm automotive red */
  --accent-dark: #8f3223;
  --line: #e3e6ea;
  --maxw: 1040px;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 6px 20px rgba(0,0,0,.05);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Trebuchet MS", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ink) url(images/menu_starter.png) repeat; /* fallback texture removed */
  background: linear-gradient(180deg, #1b1e22 0, #2a2f36 520px, #f5f6f8 520px);
  min-height: 100vh;
  padding: 0;
}

img { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-strong, #8a3223); }

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--accent);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header & navigation ---------- */
.site-header {
  background: transparent;
  padding: 1.2rem 0 .9rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem 1.5rem;
}
.brand {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: .3px;
  color: #fff;
  text-decoration: none;
}
.brand small { display: block; font-weight: 400; font-size: .75rem; color: #c6ccd1; letter-spacing: .5px; }

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  padding: .45rem .8rem;
  border-radius: 6px;
  color: #e7ebee;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  transition: background .15s ease, color .15s ease;
}
.site-nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.site-nav a.current { background: var(--accent); color: #fff; }

/* ---------- Main content ---------- */
main.container {
  background: var(--surface);
  margin-top: 1.6rem;
  margin-bottom: 2.5rem;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 2rem 2.2rem 2.6rem;
}
main > *:first-child { margin-top: 0; }
main > *:last-child { margin-bottom: 0; }

h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); font-weight: 700; }
h1 { font-size: 2rem; margin: 0 0 1rem; }
h2 { font-size: 1.45rem; margin: 2rem 0 .75rem; padding-bottom: .35rem; border-bottom: 2px solid var(--line); }
h3 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.1rem; color: var(--muted); }

.page-tag { display:inline-block; font-size:.78rem; letter-spacing:.5px; text-transform:uppercase; color:var(--accent); font-weight:700; margin-bottom:.4rem; }

/* ---------- Homepage modules ---------- */
.intro { border-bottom: 1px solid var(--line); padding-bottom: 1.4rem; margin-bottom: 1.6rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.4rem;
  margin: 1.2rem 0;
}
.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card img { width: 100%; height: 170px; object-fit: cover; display: block; }
.card-body { padding: 1rem 1.1rem 1.15rem; }
.card h3 { margin: 0 0 .3rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: .9rem; }
.card .card-link { color: var(--accent); font-weight: 700; }

.module {
  background: #fbfbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  margin: 1.6rem 0;
}
.module h2 { margin-top: 0; border-bottom: none; padding-bottom: 0; }

.updates { list-style: none; margin: 0; padding: 0; }
.updates li { padding: .4rem 0; border-bottom: 1px dashed var(--line); }
.updates li:last-child { border-bottom: none; }
.updates time { color: var(--muted); font-size: .85rem; margin-right: .5rem; }

/* ---------- Galleries ---------- */
.album-title { font-size: 1.6rem; font-weight: 800; }
.album-description { color: var(--muted); margin-bottom: 1.4rem; max-width: 60ch; }

.album-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.1rem;
}
.thumbnail-wrap { text-align: center; }
.thumbnail-frame {
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .55rem;
  display: block;
}
.thumbnail-frame img {
  display: block;
  margin: 0 auto;
  border-radius: 6px;
  width: auto;
  height: auto;
}
.thumbnail-caption { margin: .5rem 0 0; font-size: .85rem; color: var(--muted); }

/* Gallery intro links on section index pages */
.gallery-links { list-style: none; margin: 1rem 0; padding: 0; }
.gallery-links li { margin-bottom: .6rem; }
.gallery-links img { vertical-align: middle; border-radius: 6px; margin-right: .6rem; border: 1px solid var(--line); }
.gallery-links a { font-weight: 600; }

/* ---------- Videos ---------- */
.movie-page-title { font-size: 1.6rem; font-weight: 800; }
.movie-page-description { color: var(--muted); margin-bottom: 1.2rem; }
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
}
.movie-thumbnail-frame {
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .6rem;
  text-align: center;
}
.movie-thumbnail-frame img { border-radius: 6px; }
.movie-thumbnail-caption { margin-top: .5rem; font-size: .88rem; font-weight: 600; color: var(--ink); }

/* ---------- Photo (full) pages ---------- */
.photo-background {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  background: #101214;
  color: #fff;
}
.photo-background .photo-navigation {
  max-width: 980px;
  width: 100%;
  text-align: center;
}
.photo-title { font-size: 1.5rem; font-weight: 800; margin: 0 0 .2rem; }
.photo-caption { color: #b8bfc5; margin: 0 0 1rem; }
.photo-frame img { max-width: 100%; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.photo-links { margin-top: 1rem; font-size: .95rem; }
.photo-links a { color: #ffd7cd; margin: 0 .4rem; }

/* ---------- Breadcrumb ---------- */
#breadcrumbcontainer { margin: 0 0 1.2rem; font-size: .9rem; color: var(--muted); }
#breadcrumbcontainer ul { list-style: none; margin: 0; padding: 0; }
#breadcrumbcontainer li { display: inline; }
#breadcrumbcontainer a { color: var(--muted); text-decoration: none; }
#breadcrumbcontainer a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { background: #1b1e22; color: #aab1b7; padding: 1.8rem 0 2.4rem; font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: .5rem 2rem; align-items: center; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer a { color: #d5dae0; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem; margin: 0; padding: 0; }
.copyright small { color: #7f878d; }

/* ---------- Legacy RapidWeaver blocks we keep ---------- */
#gradient { display: none; }
#pageHeader { display: none; }
#sidebarContainer { display: none; }
.contentSpacer, .clear, .clearer { clear: both; height: 1px; overflow: hidden; }
.imageStyle { border-radius: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  body { background: linear-gradient(180deg,#1b1e22 0,#2a2f32 430px,#f5f6f8 430px); }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .site-nav ul { gap: 0; }
  main { padding: 1.4rem 1.1rem 1.8rem; margin-top: 1rem; }
  h1 { font-size: 1.6rem; }
  .card img { height: 140px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
