/*
Theme Name:  The Rusted Page
Theme URI:
Author:
Description: Industrial Gothic Punk Rock dark theme. Sticky header with logo left / nav right, hero slider, single-column content, up to 3-column footer. Fully responsive.
Version:     1.0.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: therustedpage
Tags:        dark, one-column, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, threaded-comments
*/

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  --color-bg:          #0a0a0a;
  --color-surface:     #131313;
  --color-surface-2:   #1c1c1c;
  --color-border:      #282828;
  --color-rust:        #00838f;   /* dark teal — primary accent */
  --color-rust-dark:   #006064;   /* deep teal */
  --color-rust-light:  #26c6da;   /* mid teal */
  --color-teal:        #4dd0e1;   /* light teal — code / blockquote */
  --color-teal-dark:   #00838f;
  --color-blood:       #8b0000;   /* Slayer blood red */
  --color-blood-light: #b71c1c;   /* lighter blood red */
  --color-purple:      #ba68c8;   /* purple — tertiary accent */
  --color-purple-dark: #7b1fa2;
  --color-steel:       #4a5058;
  --color-text:        #d4d4d4;
  --color-text-muted:  #7a7a7a;
  --color-heading:     #efefef;

  --font-heading: 'Bebas Neue', 'Arial Narrow', Arial, sans-serif;
  --font-sub:     'Oswald', 'Arial Narrow', Arial, sans-serif;
  --font-body:    'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --header-h:     72px;
  --content-w:    1150px;
  --wide-w:       1200px;
  --transition:   0.22s ease;
}

/* ==========================================================================
   Reset / Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a  { color: var(--color-rust-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-heading); }

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  letter-spacing: 0.05em;
  line-height: 1.05;
  text-transform: uppercase;
  margin: 1.4em 0 0.45em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.4rem, 3vw, 2.2rem); font-family: var(--font-sub); font-weight: 600; }
h4 { font-size: 1.4rem; font-family: var(--font-sub); font-weight: 600; }
h5 { font-size: 1.15rem; font-family: var(--font-sub); font-weight: 400; }
h6 { font-size: 0.95rem; font-family: var(--font-sub); font-weight: 400; }
p  { margin: 0 0 1.3em; }

blockquote {
  margin: 2em 0;
  padding: 1em 1.5em;
  border-left: 4px solid var(--color-teal);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-family: var(--font-sub);
  font-style: italic;
  font-size: 1.1rem;
}
blockquote cite { display: block; margin-top: 0.5em; font-size: 0.85rem; }

code { background: var(--color-surface-2); color: var(--color-teal); padding: 0.15em 0.4em; border-radius: 2px; font-size: 0.88em; }
pre  { background: var(--color-surface-2); padding: 1.4em; overflow-x: auto; border-left: 3px solid var(--color-teal); margin-bottom: 1.5em; }
pre code { background: none; padding: 0; color: inherit; font-size: 0.9em; }

hr { border: none; border-top: 1px solid var(--color-border); margin: 2.5em 0; }

ul, ol { padding-left: 1.4em; margin-bottom: 1.3em; }
li     { margin-bottom: 0.35em; }

table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; }
th, td { padding: 0.7em 1em; border: 1px solid var(--color-border); text-align: left; }
th { background: var(--color-surface-2); font-family: var(--font-sub); text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-rust-light); }
tr:nth-child(even) { background: var(--color-surface); }

/* ==========================================================================
   Forms
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
select {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.65em 1em;
  width: 100%;
  border-radius: 2px;
  transition: border-color var(--transition);
  appearance: none;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--color-rust); }
textarea { min-height: 120px; resize: vertical; }
label { display: block; font-family: var(--font-sub); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); margin-bottom: 6px; }

input[type="submit"],
button.wp-submit,
.btn {
  background: var(--color-blood);
  border: none;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-sub);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  padding: 0.7em 2em;
  text-transform: uppercase;
  transition: background var(--transition);
  border-radius: 2px;
  width: auto;
  display: inline-block;
}
input[type="submit"]:hover,
button.wp-submit:hover,
.btn:hover { background: var(--color-blood-light); }

/* ==========================================================================
   Layout
   ========================================================================== */
.site {
  display: flex; flex-direction: column; min-height: 100vh;
  max-width: 1200px; margin: 0 auto;
  border-left: 1px solid #333; border-right: 1px solid #333;
}
.site-content { flex: 1; }
.container { max-width: var(--content-w); margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   Site Header
   ========================================================================== */
/* Offset sticky header below WP admin bar when logged in */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(10, 10, 10, 0.96);
  border-bottom: 2px solid #4a4a4a;
  display: flex;
  align-items: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  max-width: var(--wide-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
}

/* Logo / Branding */
.site-branding { flex-shrink: 0; line-height: 1; }
.custom-logo-link { display: block; }
.custom-logo { max-height: 52px; width: auto; }

.site-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-heading);
  margin: 0;
  line-height: 1;
}
.site-title a { color: inherit; }
.site-title a:hover { color: var(--color-rust-light); }

.site-description {
  font-family: var(--font-sub);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 4px 0 0;
}

/* Navigation */
.main-navigation { display: flex; align-items: center; }

#primary-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}
#primary-menu li { position: relative; }
#primary-menu a {
  display: block;
  padding: 8px 14px;
  font-family: var(--font-sub);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  white-space: nowrap;
  transition: color var(--transition);
}
#primary-menu a:hover,
#primary-menu .current-menu-item > a,
#primary-menu .current-page-ancestor > a,
#primary-menu .current-menu-ancestor > a { color: var(--color-rust-light); }

/* Dropdown */
#primary-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 210px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-rust);
  flex-direction: column;
  gap: 0;
  padding: 6px 0;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
#primary-menu li:hover > .sub-menu { display: flex; }
#primary-menu .sub-menu a { padding: 9px 18px; font-size: 0.78rem; }
#primary-menu .sub-menu a:hover { background: var(--color-surface-2); }

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 7px 11px;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  border-radius: 2px;
  transition: border-color var(--transition), color var(--transition);
}
.menu-toggle:hover { border-color: var(--color-rust); color: var(--color-rust-light); }
.menu-toggle .icon-close { display: none; }
.menu-toggle.is-active .icon-open  { display: none; }
.menu-toggle.is-active .icon-close { display: inline; }

/* ==========================================================================
   Hero Section
   ========================================================================== */
.site-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 19/5;
  overflow: hidden;
  background: var(--color-bg);
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0) 72%,
    rgba(10,10,10,0.4) 100%
  );
}

.hero-overlay-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 32px 40px;
  text-align: center;
}
.hero-overlay-text h2 { font-size: clamp(2rem, 5vw, 4.5rem); margin: 0 0 8px; text-shadow: 0 2px 16px rgba(0,0,0,0.85); }
.hero-overlay-text p { font-family: var(--font-sub); font-size: 1rem; color: var(--color-text-muted); margin: 0; letter-spacing: 0.15em; text-transform: uppercase; }

/* Slider dots */
.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.hero-dot.active,
.hero-dot:hover { background: var(--color-rust); transform: scale(1.25); }

/* Divider under hero */
.hero-divider {
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent  0%,
    #1e1e1e     10%,
    #3c3c3c     28%,
    #767676     50%,
    #3c3c3c     72%,
    #1e1e1e     90%,
    transparent 100%
  );
}

/* ==========================================================================
   Main Content
   ========================================================================== */
.site-main { padding: 56px 0 72px; }

.hentry { margin-bottom: 56px; padding-bottom: 56px; border-bottom: 1px solid var(--color-border); }
.hentry:last-of-type { border-bottom: none; }

.entry-header { margin-bottom: 24px; }
.entry-header h1,
.entry-header h2 { margin-top: 0; }
.entry-header h2 a { color: var(--color-heading); }
.entry-header h2 a:hover { color: var(--color-rust-light); }

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  font-family: var(--font-sub);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.entry-meta a { color: var(--color-text-muted); }
.entry-meta a:hover { color: var(--color-rust-light); }
.entry-meta .cat-links::before { content: '\25A0\00a0'; color: var(--color-rust); }

.post-thumbnail { margin-bottom: 28px; overflow: hidden; }
.post-thumbnail img { width: 100%; transition: transform 0.4s ease; }
.post-thumbnail:hover img { transform: scale(1.025); }

.entry-summary { color: var(--color-text-muted); }

.read-more-link {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-sub);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-rust-light);
  border-bottom: 1px solid var(--color-rust);
  padding-bottom: 2px;
  transition: color var(--transition), border-color var(--transition);
}
.read-more-link:hover { color: var(--color-heading); border-color: var(--color-heading); }

/* ==========================================================================
   Post Cards (blog & archive listings)
   ========================================================================== */
.post-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.post-card { border-radius: 4px; overflow: hidden; }

.post-card-link {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 320px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-surface-2);
  text-decoration: none;
  color: var(--color-text);
  transition: transform var(--transition), box-shadow var(--transition);
}
.post-card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 36px rgba(0,0,0,0.55);
}

.post-card-overlay {
  padding: 28px;
  background: rgba(10, 10, 10, 0.5);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.15;
}

.post-card-excerpt {
  font-size: 0.88rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  font-family: var(--font-sub);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-rust-light);
  margin-top: 14px;
}

.entry-content { line-height: 1.8; }
.entry-content > * + * { margin-top: 0; }

.entry-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
  font-family: var(--font-sub);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.entry-footer a { color: var(--color-text-muted); border-bottom: 1px solid var(--color-border); padding-bottom: 1px; }
.entry-footer a:hover { color: var(--color-rust-light); border-color: var(--color-rust-light); }

/* Page links (multi-page posts) */
.page-links { margin: 1.5em 0; font-family: var(--font-sub); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.page-links a { display: inline-block; padding: 3px 10px; background: var(--color-surface-2); border: 1px solid var(--color-border); margin: 0 3px; color: var(--color-text); }
.page-links a:hover { background: var(--color-rust); border-color: var(--color-rust); color: #fff; }

/* ==========================================================================
   Pagination / Post Nav
   ========================================================================== */
.pagination,
.post-navigation { margin: 48px 0 0; }

.pagination .nav-links,
.post-navigation .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pagination .page-numbers,
.post-navigation .nav-previous a,
.post-navigation .nav-next a {
  display: inline-block;
  padding: 7px 15px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-family: var(--font-sub);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: all var(--transition);
  border-radius: 2px;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current,
.post-navigation .nav-previous a:hover,
.post-navigation .nav-next a:hover { background: var(--color-rust); border-color: var(--color-rust); color: #fff; }
.pagination .page-numbers.dots { background: none; border-color: transparent; }

.post-navigation .nav-next { margin-left: auto; }
.post-navigation .nav-subtitle { display: block; font-size: 0.7rem; color: var(--color-text-muted); margin-bottom: 3px; }
.post-navigation .nav-title  { display: block; font-size: 0.9rem; color: var(--color-heading); }

/* ==========================================================================
   Page Header (archive / search)
   ========================================================================== */
.page-header { margin-bottom: 40px; padding-bottom: 20px; border-bottom: 1px solid var(--color-border); }
.page-header .page-title { margin-top: 0; }
.page-header .page-title span { color: var(--color-rust-light); }
.archive-description { color: var(--color-text-muted); font-family: var(--font-sub); font-size: 0.9rem; }

/* ==========================================================================
   404
   ========================================================================== */
.error-404 .page-header { text-align: center; padding: 60px 0 40px; }
.error-404 .four-oh-four { font-size: clamp(5rem, 15vw, 10rem); color: var(--color-rust); margin: 0; line-height: 1; }
.error-404 .page-header p { font-family: var(--font-sub); text-transform: uppercase; letter-spacing: 0.12em; color: var(--color-text-muted); font-size: 1rem; margin-top: 16px; }
.error-404 .page-content { max-width: 480px; margin: 0 auto; text-align: center; }
.error-404 .page-content .btn { margin-top: 20px; }

/* ==========================================================================
   Search Form
   ========================================================================== */
.search-form { display: flex; gap: 8px; }
.search-form .search-field { flex: 1; }
.search-form .search-submit { font-family: var(--font-sub); font-size: 0.82rem; letter-spacing: 0.1em; padding: 0.7em 1.4em; }

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--color-border); }
.comments-title,
.comment-reply-title { font-family: var(--font-heading); font-size: 1.6rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-purple); margin: 0 0 28px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 32px; }
.comment-list .children { list-style: none; padding-left: 32px; margin: 0; }
.comment-body {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-blood);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.comment-meta { font-family: var(--font-sub); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 12px; }
.comment-author .fn { color: var(--color-rust-light); font-style: normal; }
.comment-content p { margin-bottom: 0.75em; }
.comment-content p:last-child { margin-bottom: 0; }
.reply { margin-top: 10px; }
.comment-reply-link { font-family: var(--font-sub); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-muted); border-bottom: 1px solid var(--color-border); padding-bottom: 1px; }
.comment-reply-link:hover { color: var(--color-rust-light); border-color: var(--color-rust-light); }
.comment-form p { margin-bottom: 14px; }
.comment-form .form-submit { margin-top: 4px; }
#cancel-comment-reply-link { font-size: 0.78rem; margin-left: 12px; color: var(--color-text-muted); }

/* ==========================================================================
   Widgets
   ========================================================================== */
.widget { margin-bottom: 36px; }
.widget-title { font-family: var(--font-heading); font-size: 1.15rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-teal); border-bottom: 1px solid var(--color-border); padding-bottom: 8px; margin-bottom: 14px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 7px 0; border-bottom: 1px solid var(--color-border); font-size: 0.9rem; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--color-text); }
.widget ul li a:hover { color: var(--color-rust-light); }
.widget_recent_comments li { color: var(--color-text-muted); font-size: 0.85rem; }
.widget_tag_cloud a {
  display: inline-block;
  padding: 4px 11px;
  margin: 3px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  font-size: 0.76rem !important;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-radius: 2px;
  transition: all var(--transition);
}
.widget_tag_cloud a:hover { background: var(--color-rust); border-color: var(--color-rust); color: #fff; }
.widget_search .search-form { flex-direction: column; }

/* ==========================================================================
   Site Footer
   ========================================================================== */
.site-footer {
  background: var(--color-surface);
  border-top: 2px solid var(--color-blood);
  padding-top: 56px;
}

.footer-widgets-area {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 0 24px 48px;
  display: grid;
  gap: 40px;
}
.footer-widgets-area.columns-1 { grid-template-columns: 1fr; max-width: var(--content-w); }
.footer-widgets-area.columns-2 { grid-template-columns: repeat(2, 1fr); }
.footer-widgets-area.columns-3 { grid-template-columns: repeat(3, 1fr); }

.site-info {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 18px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-sub);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.site-info .copyright { flex: 1; text-align: center; }
.site-info a { color: var(--color-text-muted); }
.site-info a:hover { color: var(--color-rust-light); }

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-family: var(--font-sub);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  transition: color var(--transition);
}
.back-to-top:hover { color: var(--color-rust-light); background: none; }
.back-to-top::before { content: '\25B2'; font-size: 0.6rem; }

/* ==========================================================================
   Gutenberg Block Support
   ========================================================================== */
.wp-block-separator { border-color: var(--color-border); opacity: 1; }
.wp-block-quote { border-left: 4px solid var(--color-teal); background: var(--color-surface); padding: 1em 1.5em; margin: 2em 0; }
.wp-block-code { background: var(--color-surface-2); border-left: 3px solid var(--color-teal); color: var(--color-teal); }
.wp-block-button__link { background: var(--color-blood); font-family: var(--font-sub); text-transform: uppercase; letter-spacing: 0.1em; border-radius: 2px; }
.wp-block-button__link:hover { background: var(--color-blood-light); }
.wp-block-image figcaption { font-family: var(--font-sub); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); }
.has-rust-color { color: var(--color-rust); }
.has-rust-background-color { background-color: var(--color-rust); }

/* ==========================================================================
   Accessibility / Utilities
   ========================================================================== */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: #f1f1f1;
  clip: auto !important;
  color: #21759b;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}
.skip-link { position: absolute; top: -999px; }
.skip-link:focus { top: 0; }

.alignleft  { float: left;  margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin: 0 auto 16px; }
.alignfull  { width: 100vw; position: relative; left: 50%; transform: translateX(-50%); }
.alignwide  { width: calc(100% + 80px); max-width: 1200px; position: relative; left: 50%; transform: translateX(-50%); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .footer-widgets-area.columns-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }

  .hero-overlay-text { padding: 20px; }

  /* Hamburger — always visible; header pops above overlay when open */
  .menu-toggle { display: flex; align-items: center; font-size: 1.5rem; padding: 7px 12px; }
  body.nav-open { overflow: hidden; }
  body.nav-open .site-header { z-index: 1200; }

  /* Full-screen overlay */
  .main-navigation {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(8, 8, 8, 0.97);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .main-navigation.is-open { display: flex; }

  /* Large centered menu items */
  #primary-menu {
    flex-direction: column;
    gap: 0;
    align-items: center;
    text-align: center;
    width: 100%;
  }
  #primary-menu > li > a {
    padding: 14px 40px;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    letter-spacing: 0.2em;
    border-bottom: none;
  }
  #primary-menu a:hover,
  #primary-menu .current-menu-item > a { color: var(--color-rust-light); }

  /* Sub-menus inline within overlay */
  #primary-menu .sub-menu {
    position: static;
    display: none;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  #primary-menu .sub-menu.is-open { display: flex; }
  #primary-menu .sub-menu a {
    padding: 8px 40px;
    font-family: var(--font-sub);
    font-size: 1rem;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
  }
  #primary-menu li:hover > .sub-menu { display: none; }

  .footer-widgets-area.columns-2,
  .footer-widgets-area.columns-3 { grid-template-columns: 1fr; }

  .site-info { flex-direction: column; text-align: center; }

  .alignleft,
  .alignright { float: none; margin: 0 0 16px; }
  .alignwide  { width: 100%; left: auto; transform: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
}
