/* VfR Übach-Palenberg — site styles (flexbox) */
:root {
  --color-accent: #003298;
  --color-accent-dark: #002070;
  --color-bg: #a6b2bf;
  --color-content: #ffffff;
  --color-text: #333333;
  --color-footer-bg: #003298;
  --color-footer-text: #dbdbdb;
  --layout-max: 1500px;
  --layout-site: 1800px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a {
  color: var(--color-accent);
}

.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: var(--layout-site);
  margin: 0 auto;
  background: var(--color-content);
}

/* Header */
.site-header {
  background: var(--color-content);
  border-bottom: 3px solid var(--color-accent);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.custom-logo {
  max-height: 80px;
  width: auto;
}

.site-branding-text {
  display: flex;
  flex-direction: column;
}

.site-title {
  font-family: Montserrat, Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
}

.site-description {
  font-size: 0.9rem;
  color: #666;
}

.menu-toggle {
  display: none;
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 1rem;
}

.main-navigation {
  flex: 1 1 auto;
}

.menu-primary {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem 1rem;
  justify-content: flex-end;
}

.menu-primary a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-accent);
  padding: 0.25rem 0;
}

.menu-primary a:hover {
  text-decoration: underline;
}

.menu-primary .sub-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  position: absolute;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 220px;
  z-index: 100;
}

.menu-item-has-children {
  position: relative;
}

.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children.sub-open > .sub-menu {
  display: block;
}

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

.menu-primary .sub-menu a {
  display: block;
  padding: 0.35rem 1rem;
  font-weight: 400;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.social-links a {
  text-decoration: none;
}

/* Intro / page header */
.page-hero {
  background: var(--color-accent);
  color: #fff;
  padding: 2rem 1.5rem;
  text-align: center;
}

.page-hero h1,
.page-header h1 {
  margin: 0;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-accent);
}

.page-hero h1 {
  color: #fff;
}

.page-hero .tagline {
  opacity: 0.9;
  font-size: 1rem;
}

/* Main content */
.site-main {
  flex: 1;
  max-width: var(--layout-max);
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-header {
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-accent);
}

/* Posts list (homepage) */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-card {
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 1.5rem;
}

.post-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.post-card h2 a {
  color: var(--color-accent);
  text-decoration: none;
}

.post-card h2 a:hover {
  text-decoration: underline;
}

.post-meta {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 0.75rem;
}

.post-excerpt p {
  margin: 0 0 0.5rem;
}

.more-link {
  font-weight: 600;
  text-decoration: none;
}

.pagination {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
}

/* Blog grid (r-template_blog) */
.blog-container {
  width: 100%;
}

.blog-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.blog-card {
  flex: 1 1 280px;
  border: 1px solid #e0e0e0;
  padding: 1.25rem;
  background: #fafafa;
}

.blog-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.blog-title a {
  color: var(--color-accent);
  text-decoration: none;
}

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

/* Footer */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  margin-top: auto;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 1.5rem;
}

.site-footer a {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

/* Tables in content */
.romlicontainer table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.romlicontainer th,
.romlicontainer td {
  border: 1px solid #ddd;
  padding: 0.4rem 0.6rem;
  text-align: left;
}

.romlicontainer th {
  background: #f0f4fa;
  color: var(--color-accent);
}

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

  .main-navigation {
    display: none;
    width: 100%;
    order: 3;
  }

  .main-navigation.is-open {
    display: block;
  }

  .menu-primary {
    flex-direction: column;
    gap: 0;
  }

  .menu-primary > li > a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
  }

  .menu-primary .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
  }

  .social-links {
    order: 2;
  }
}

@media (max-width: 600px) {
  .site-header-inner {
    padding: 0.75rem 1rem;
  }

  .custom-logo {
    max-height: 60px;
  }

  .site-main {
    padding: 1.25rem 1rem;
  }
}
