/* ===== Reset & base ===== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: #333;
  line-height: 1.6;
  background-color: #efd4b3;
  background-image: url("/wp-content/uploads/2013/03/BG_tile.png");
  background-repeat: repeat;
  background-attachment: fixed;
  min-height: 100vh;
}

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

a { color: #7e7772; text-decoration: none; }
a:hover { text-decoration: underline; color: #452205; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== Layout ===== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  background: #1f1e1e;
  border-bottom: 3px solid #7e7772;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo img {
  display: block;
  max-width: 100%;
  height: auto;
}

.header-search {
  display: flex;
  gap: .5rem;
}

.header-search input[type="text"] {
  padding: .4rem .6rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  min-width: 140px;
}

.header-search input[type="submit"] {
  padding: .4rem .75rem;
  background: #7e7772;
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.header-search input[type="submit"]:hover {
  background: #452205;
}

/* ===== Navigation ===== */
.site-nav {
  background: #333;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1rem;
  padding: .75rem 0;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

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

.nav-list > .nav-item > a {
  display: block;
  color: #eee;
  padding: .85rem 1rem;
  font-size: .85rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  text-decoration: none;
}

.nav-list > .nav-item > a:hover,
.nav-list > .nav-item.is-active > a {
  background: #7e7772;
  text-decoration: none;
}

.nav-item { position: relative; }

.nav-sub {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #452205;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  z-index: 100;
}

.nav-item:hover > .nav-sub,
.nav-item.sub-open > .nav-sub {
  display: block;
}

.nav-sub .nav-sub {
  top: 0;
  left: 100%;
}

.nav-sub a {
  display: block;
  color: #fff;
  padding: .6rem 1rem;
  font-size: .82rem;
  font-family: "Helvetica Neue", Arial, sans-serif;
  text-decoration: none;
}

.nav-sub a:hover,
.nav-sub .is-active > a {
  background: rgba(255,255,255,.12);
  text-decoration: none;
}

/* ===== Main content ===== */
.site-main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.page-banner {
  background: rgba(255,255,255,.85);
  border-left: 4px solid #7e7772;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.page-banner h1 {
  margin: 0;
  font-size: 1.35rem;
  color: #452205;
}

.home-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.home-primary {
  flex: 1 1 60%;
  min-width: 280px;
}

.home-sidebar {
  flex: 0 1 280px;
  min-width: 240px;
}

.content-panel,
.sidebar-widget {
  background: rgba(255,255,255,.88);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(126,119,114,.3);
}

.sidebar-widget h3 {
  margin: 0 0 .75rem;
  font-size: 1rem;
  color: #452205;
  border-bottom: 1px solid #ddd;
  padding-bottom: .4rem;
}

.sidebar-widget ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
  font-size: .9rem;
}

.sidebar-widget li {
  margin-bottom: .35rem;
}

.hero-slider {
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(126,119,114,.4);
}

.hero-slider img {
  width: 100%;
  display: block;
}

.news-ticker {
  font-size: .85rem;
}

.news-item {
  padding: .5rem 0;
  border-bottom: 1px dotted #ccc;
}

.news-item:last-child { border-bottom: none; }

.news-item strong {
  display: block;
  color: #452205;
  font-size: .9rem;
}

.quick-links img {
  display: inline-block;
  margin: .25rem .5rem .25rem 0;
}

/* ===== Tables (homepage) ===== */
.datagrid table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: .9rem;
}

.datagrid th,
.datagrid td {
  border: 1px solid #ccc;
  padding: .75rem;
  vertical-align: top;
  background: rgba(255,255,255,.9);
}

.datagrid th {
  background: #7e7772;
  color: #fff;
  text-align: center;
}

/* ===== Blog ===== */
.blog-container { margin-top: 1rem; }

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-card {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(126,119,114,.3);
  padding: 1rem 1.25rem;
}

.blog-title {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
}

.blog-title a { color: #452205; }

.blog-preview p {
  margin: 0;
  font-size: .9rem;
  color: #555;
}

/* ===== Footer ===== */
.site-footer {
  background: #1f1e1e;
  color: #ccc;
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem;
  text-align: center;
  font-size: .85rem;
}

.footer-copy { margin: 0; }

.romlifooter {
  margin-bottom: 1rem;
}

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

  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-bottom: .5rem;
  }

  .nav-list.is-open { display: flex; }

  .nav-sub {
    position: static;
    box-shadow: none;
    background: #452205;
  }

  .nav-item:hover > .nav-sub { display: none; }
  .nav-item.sub-open > .nav-sub { display: block; }

  .header-inner { justify-content: center; }
}

@media (max-width: 600px) {
  .home-layout { flex-direction: column; }
  .home-sidebar { flex: 1 1 100%; }
}
