/* === Rex Pagan Art — Static Site Styles === */

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

:root {
  --bg: #000;
  --fg: #e0e0e0;
  --accent: #fff;
  --nav-bg: #111;
  --nav-hover: #333;
  --border: #333;
  --max-width: 1400px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

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

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.5rem;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

.logo-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-container svg {
  width: 48px !important;
  height: auto !important;
  margin: 0 !important;
}

.logo-container .cls-1 {
  fill: #fff;
}

/* === NAV === */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 1.5rem;
  cursor: pointer;
  margin-left: auto;
}

.site-nav {
  flex: 1;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
  flex-wrap: wrap;
}

.nav-list > li {
  position: relative;
}

.nav-list > li > a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--fg);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: background 0.2s;
}

.nav-list > li > a:hover,
.nav-list > li.active > a {
  background: var(--nav-hover);
  text-decoration: none;
  color: var(--accent);
}

/* Dropdown */
.sub-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--nav-bg);
  border: 1px solid var(--border);
  list-style: none;
  z-index: 200;
}

.has-children:hover .sub-nav {
  display: block;
}

.sub-nav li a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--fg);
  font-size: 0.8rem;
  white-space: nowrap;
  transition: background 0.2s;
}

.sub-nav li a:hover,
.sub-nav li.active a {
  background: var(--nav-hover);
  text-decoration: none;
  color: var(--accent);
}

/* === MAIN CONTENT === */
.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-content h1 {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

.page-content h2 {
  font-size: 1.5rem;
  color: var(--accent);
  margin: 1.5rem 0 0.75rem;
}

.page-content h3 {
  font-size: 1.2rem;
  color: var(--accent);
  margin: 1.25rem 0 0.5rem;
}

.page-content p {
  margin-bottom: 1rem;
}

.page-content strong {
  color: var(--accent);
}

.page-content em {
  font-style: italic;
}

/* === WP BLOCK COMPAT (keep existing inline styles working) === */
.wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.wp-block-column {
  flex: 1;
  min-width: 250px;
}

.wp-block-group {
  margin-bottom: 1rem;
}

.wp-block-image {
  margin-bottom: 1rem;
}

.wp-block-image figcaption,
.wp-element-caption {
  font-size: 0.85rem;
  color: #999;
  margin-top: 0.5rem;
  text-align: center;
}

.wp-block-heading {
  color: var(--accent);
}

.wp-block-buttons {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.wp-block-button__link,
.wp-element-button {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  transition: background 0.2s, color 0.2s;
}

.wp-block-button__link:hover {
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
}

/* === GALLERY / CAROUSEL === */
.rex-thumb {
  max-width: 50px;
  height: auto;
  object-fit: contain;
  cursor: pointer;
  background: black;
  padding: 4px;
  border-radius: 4px;
}

.rex-zoomed {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  pointer-events: none;
}

/* === FOOTER === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #666;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
  }

  .site-nav.open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
  }

  .sub-nav {
    position: static;
    border: none;
    padding-left: 1rem;
  }

  .has-children:hover .sub-nav,
  .has-children .sub-nav {
    display: none;
  }

  .has-children.open .sub-nav {
    display: block;
  }

  .wp-block-columns {
    flex-direction: column;
  }

  .wp-block-column {
    min-width: 100%;
  }
}
/* === GALLERY / CAROUSEL (from gen_site.py portfolio pages) === */
.page-content:has(.gallery-header) { padding: 0; max-width: 100%; }
.gallery-header { display: flex; align-items: center; gap: 0; margin: 0.25in 0 0 0.25in; line-height: 28px; }
.gh-back { opacity: 0.7; text-decoration: none; padding-right: 10px; flex-shrink: 0; display: flex; align-items: center; }
.gh-back:hover { opacity: 1; }
.gh-divider { width: 1px; height: 40px; background: #9DFF20; margin: 0 8px; flex-shrink: 0; }
.gh-spacer { flex: 1; }
.gh-info { padding: 0; margin: 0; display: flex; flex-direction: column; justify-content: center; }
.gh-play { cursor: pointer; user-select: none; margin: 0; flex-shrink: 0; padding: 0 14px; display: flex; align-items: center; }
.gh-play svg { width: 28px; height: 28px; display: block; }
.gh-play.running { color: #ff0000; }
.gh-play.stopped { color: #9DFF20; }
.gh-meta-col { padding: 0 0 0 8px; margin: 0; line-height: 1.3; width: 2in; min-width: 2in; flex-shrink: 0; }
h1.gallery-title { color: #9DFF20; font-size: 1.4rem; text-transform: uppercase; letter-spacing: 0.15em; margin: 0 0 2px 0 !important; padding: 0; line-height: 1; white-space: nowrap; }
.gallery-count { color: #fff; font-size: 0.8rem; line-height: 1; margin: 2px 0 0 0; }
.gallery-desc { color: #ccc; font-size: 0.85rem; line-height: 1.6; margin: 0.5rem 0.25in; max-width: 600px; }
.gallery-desc strong { color: #fff; }
.gallery-desc em { color: #ddd; }
#meta-caption { color: #9DFF20; font-size: 0.85rem; text-transform: uppercase; font-weight: bold; line-height: 1; margin: 0 0 1px 0; }
#meta-date { color: #fff; font-size: 0.8rem; line-height: 1; margin: 0 0 1px 0; }
#meta-size { color: #fff; font-size: 0.8rem; line-height: 1; margin: 0; }
#rex-gallery { display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 10px; padding: 0; margin: 0.25in; margin-top: 2mm; background: black; max-height: calc(100vh - 120px); }
.rex-thumb-wrap { width: 75px; height: 75px; display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; }
.rex-thumb { max-width: 75px; max-height: 75px; object-fit: contain; display: block; background: black; }
.rex-thumb-wrap.active::before { content: ''; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); width: 8px; height: 8px; background: #9DFF20; border-radius: 50%; }
#rex-canvas { position: fixed; top: 0; left: 0; z-index: 1000; display: none; cursor: pointer; }
