﻿/**
 * Ebersbach theme - Busy theme rebuild for Drupal 11.
 * Spielvereinigung Ebersbach Sachsen - Schach.
 * Green color scheme (#266a2c) - modern, responsive.
 */

/* ============================================================
   COLOR PALETTE
   ============================================================ */
:root {
  --eb-green: #266a2c;
  --eb-green-dark: #1d5122;
  --eb-green-light: #308738;
  --eb-green-pale: #e8f0e8;
  --eb-green-paler: #f4f8f4;
  --eb-text: #475448;
  --eb-link: #266a2c;
  --eb-blue-grey: #6C8497;
  --eb-white: #ffffff;
}

/* ============================================================
   GLOBAL RESET & TYPOGRAPHY
   ============================================================ */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: arial, helvetica, verdana, "helvetica neue", sans-serif;
  color: var(--eb-text);
  background: var(--eb-green-paler);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--eb-green);
  font-weight: normal;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 0.5em;
}

h2 {
  font-size: 1.25rem;
}

a {
  color: var(--eb-link);
  text-decoration: none;
}

a:hover, a:focus {
  text-decoration: underline;
}

/* ============================================================
   WRAPPER - modern flat, no grey gradient
   ============================================================ */
#wrapper {
  margin: 0;
  padding: 0;
  background: var(--eb-green-paler);
}

#container {
  width: 960px;
  max-width: 100%;
  margin: 0 auto;
  background: var(--eb-white);
  box-shadow: 0 2px 14px rgba(20, 45, 25, 0.1);
}

/* ============================================================
   SITE HEADER - three photos, thin white dividers, centre photo
   dominant (22 / 44 / 22). Photos stay separate <img> elements,
   cropped via object-fit/object-position only.
   Thin 3px white dividers, slight outer radius.
   ============================================================ */
.site-header {
  background: var(--eb-green-dark);
  margin: 0;
  padding: 0;
}

.hero-gallery {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: var(--eb-white);
  display: flex;
  gap: 3px;
  border-radius: 6px;
}

.hero-gallery__photo {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.hero-gallery__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Centre photo is the clear focus; sides share the width equally */
.hero-gallery__photo--1 {
  flex: 22 1 0;
}

.hero-gallery__photo--1 img {
  object-position: 80% 50%;
}

.hero-gallery__photo--3 {
  flex: 44 1 0;
}

.hero-gallery__photo--3 img {
  object-position: 50% 50%;
}

.hero-gallery__photo--5 {
  flex: 22 1 0;
}

.hero-gallery__photo--5 img {
  object-position: 50% 50%;
}

/* Branding - white badge + name lockup, bottom-left.
   A soft gradient covers only the lower area so the photos stay open. */
.hero-branding {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  padding: 56px 28px 16px;
  background: linear-gradient(to top,
      rgba(4, 24, 10, 0.90) 0%,
      rgba(4, 24, 10, 0.66) 38%,
      rgba(4, 24, 10, 0.26) 68%,
      rgba(4, 24, 10, 0) 100%);
}

.branding-link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
}

.branding-link:hover,
.branding-link:focus {
  text-decoration: none;
}

.branding-link__emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  padding: 10px;
  background: var(--eb-white);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
}

.branding-link__emblem img {
  display: block;
  width: 100%;
  height: auto;
}

.branding-name {
  display: block;
  font-family: "calibri", "arial narrow", arial, helvetica, sans-serif;
  color: var(--eb-white);
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.branding-name__line1 {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
}

.branding-name__line2 {
  display: block;
  margin-top: 2px;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--eb-white);
}

#header-top-right {
  display: none;
}

/* ============================================================
   NAVIGATION - same width as the content, no separate block look
   ============================================================ */
#navigation {
  background: var(--eb-white);
  border-bottom: 1px solid #dfe7df;
  margin: 0;
  padding: 0;
  height: auto;
  overflow: visible;
  position: relative;
  z-index: 100;
}

#navigation .section {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 8px;
}

#block-ebersbach-main-menu > h2.visually-hidden {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  overflow: hidden;
  height: 1px;
  width: 1px;
}

#block-ebersbach-main-menu > ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

#block-ebersbach-main-menu > ul > li {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

#block-ebersbach-main-menu > ul > li > a {
  display: block;
  padding: 16px 22px;
  color: var(--eb-green);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

#block-ebersbach-main-menu > ul > li > a:hover,
#block-ebersbach-main-menu > ul > li > a:focus {
  background: var(--eb-green-paler);
  color: var(--eb-green-dark);
  text-decoration: none;
}

#block-ebersbach-main-menu > ul > li > a.is-active {
  background: transparent;
  color: var(--eb-green-dark);
  border-bottom-color: var(--eb-green);
}

/* Submenu - dropdown */
#block-ebersbach-main-menu > ul > li > ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--eb-white);
  border: 1px solid #dfe7df;
  border-top: none;
  padding: 0;
  margin: 0;
  list-style: none;
  z-index: 200;
  min-width: 200px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#block-ebersbach-main-menu > ul > li:hover > ul {
  display: block;
}

#block-ebersbach-main-menu > ul > li > ul > li {
  display: block;
  margin: 0;
  padding: 0;
}

#block-ebersbach-main-menu > ul > li > ul > li a {
  display: block;
  padding: 8px 15px;
  color: var(--eb-link);
  font-size: 0.9rem;
  font-weight: normal;
  text-decoration: none;
}

#block-ebersbach-main-menu > ul > li > ul > li a:hover {
  background: var(--eb-green-pale);
  color: var(--eb-green-dark);
  text-decoration: none;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
#main-wrapper {
  margin: 0;
}

#main {
  clear: both;
  display: flex;
  flex-wrap: wrap;
  background: var(--eb-white);
  border: 1px solid #e6ebe6;
  border-radius: 8px;
  margin: 14px 0;
}

#content {
  flex: 1;
  min-width: 0;
  padding: 14px 30px 10px;
  min-height: 260px;
}

#content-area {
  padding: 0;
}

#content-area .region-content {
  padding: 0;
}

/* Page title */
#tabs-wrapper h1 {
  color: var(--eb-green);
  margin-bottom: 0.5em;
}

/* Welcome intro (front page legacy markup: single paragraph with <br>).
   Scoped to class-less articles so node templates are unaffected. */
#block-ebersbach-busy-system-main article:not([class]) > div > div > DIV {
  border-bottom: 1px solid #eef1ee;
  padding-bottom: 10px;
  margin-bottom: 2px;
}

#block-ebersbach-busy-system-main {
  margin-bottom: 6px;
}

#block-ebersbach-busy-system-main article:not([class]) > div > div > DIV > p {
  font-size: 0.95rem;
  color: #6b756c;
  margin: 0;
}

#block-ebersbach-busy-system-main article:not([class]) > div > div > DIV > p::first-line {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--eb-green);
}

#block-ebersbach-busy-system-main article:not([class]) > div > div > p:last-child {
  margin: 0;
}

/* ============================================================
   SIDEBAR - right side (260px)
   ============================================================ */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  padding: 14px 16px 14px 14px;
  margin: 0;
}

/* Exactly two cards: Schachaufgabe and Links. Search stays borderless. */
#block-ebersbach-busy-block-1,
#block-ebersbach-busy-menu-menu-links {
  background: var(--eb-white);
  border: 1px solid #e6ebe6;
  border-radius: 8px;
  padding: 16px;
  margin: 0 0 16px;
}

#block-ebersbach-busy-block-1 h2,
#block-ebersbach-busy-menu-menu-links h2 {
  font-size: 1rem;
  color: var(--eb-green);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf1ed;
}

.sidebar ul.menu {
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.sidebar ul.menu li {
  list-style: none;
  padding: 5px 0;
  border-bottom: 1px solid #edf1ed;
}

.sidebar ul.menu li:last-child {
  border-bottom: none;
}

.sidebar ul.menu li a {
  color: var(--eb-text);
  text-decoration: none;
  display: block;
}

.sidebar ul.menu li a:hover,
.sidebar ul.menu li a.active {
  color: var(--eb-green);
  font-weight: bold;
}

/* Links block in sidebar - nice list, no bullets (card styles above) */
#block-ebersbach-busy-menu-menu-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#block-ebersbach-busy-menu-menu-links ul li {
  margin: 0;
  padding: 6px 0;
  list-style: none;
  border-bottom: 1px solid #edf1ed;
}

#block-ebersbach-busy-menu-menu-links ul li:last-child {
  border-bottom: none;
}

#block-ebersbach-busy-menu-menu-links ul li a {
  color: var(--eb-text);
  text-decoration: none;
  display: block;
  font-size: 0.95rem;
}

#block-ebersbach-busy-menu-menu-links ul li a:hover {
  color: var(--eb-green);
  text-decoration: none;
}

/* Footer menu (Impressum) */
#block-ebersbach-footer-menu {
  margin: 0;
}

#block-ebersbach-footer-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

#block-ebersbach-footer-menu ul li {
  margin: 0;
  padding: 5px 0;
  list-style: none;
}

/* links side by side with a subtle vertical divider */
#block-ebersbach-footer-menu ul li + li {
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  margin-left: 18px;
  padding-left: 18px;
}

/* ============================================================
   FOOTER - green footer with menu
   ============================================================ */
#page-footer {
  background: var(--eb-green);
  padding: 28px 30px;
  clear: both;
  width: 100%;
}

#page-footer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: flex-start;
  justify-content: space-between;
}

#page-footer .block {
  color: var(--eb-white);
  margin-bottom: 0;
  flex: 0 1 auto;
}

#page-footer .block h2 {
  font-size: 1rem;
  font-weight: bold;
  color: var(--eb-white);
  margin: 0 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

#page-footer a {
  color: var(--eb-white);
  text-decoration: underline;
}

#page-footer a:hover {
  text-decoration: none;
}

#page_postfooter {
  background: var(--eb-green-dark);
  padding: 10px 30px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
}

#page_postfooter a {
  color: var(--eb-white);
}

/* ============================================================
   NODE / CONTENT STYLING
   ============================================================ */
.node {
  margin-bottom: 1.5em;
  padding-bottom: 1em;
  border-bottom: 1px solid #eee;
}

.node:last-child {
  border-bottom: none;
}

.node h2 {
  font-size: 1.4rem;
  color: var(--eb-green);
  margin: 0 0 0.5em;
}

.node h2 a {
  color: var(--eb-green);
  text-decoration: none;
}

.node h2 a:hover {
  color: var(--eb-green-light);
  text-decoration: underline;
}

.node p {
  color: var(--eb-text);
  margin: 0.5em 0;
}

/* Neueste Beiträge - modern list: document icon, title, chevron.
   Whole row is the click target; arrow appears on hover. */
#block-ebersbach-neueste-beitrage-block-1 .views-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-bottom: 1px solid #f0f2f0;
}

#block-ebersbach-neueste-beitrage-block-1 .views-row:last-child {
  border-bottom: none;
}

#block-ebersbach-neueste-beitrage-block-1 .views-row:hover {
  background: #f6f9f6;
  border-radius: 6px;
}

#block-ebersbach-neueste-beitrage-block-1 .views-field-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

#block-ebersbach-neueste-beitrage-block-1 .views-field-title::before {
  content: "";
  flex-shrink: 0;
  width: 13px;
  height: 16px;
  border: 1.5px solid #b9c7bb;
  border-radius: 2px;
  background: linear-gradient(to bottom right, transparent 0 49%, #b9c7bb 49%) top right / 7px 7px no-repeat;
}

#block-ebersbach-neueste-beitrage-block-1 .views-row::after {
  content: "›";
  flex-shrink: 0;
  color: #d5dcd6;
  font-size: 1.3rem;
  line-height: 1;
  padding: 0 2px;
}

#block-ebersbach-neueste-beitrage-block-1 .views-field-title a {
  color: var(--eb-text);
  text-decoration: none;
}

/* stretched link: the full row is clickable */
#block-ebersbach-neueste-beitrage-block-1 .views-field-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

#block-ebersbach-neueste-beitrage-block-1 .views-row:hover .views-field-title a {
  color: var(--eb-green);
  text-decoration: none;
}

#block-ebersbach-neueste-beitrage-block-1 .views-row:hover .views-field-title::before {
  border-color: var(--eb-green);
}

#block-ebersbach-neueste-beitrage-block-1 .views-row:hover .views-field-title::before {
  background-image: linear-gradient(to bottom right, transparent 0 49%, var(--eb-green) 49%);
}

#block-ebersbach-neueste-beitrage-block-1 .views-row:hover::after {
  color: var(--eb-green);
}

/* ============================================================
   BUTTONS
   ============================================================ */
input.form-submit,
a.button,
.button {
  cursor: pointer;
  padding: 6px 18px;
  color: var(--eb-white);
  text-align: center;
  font-weight: bold;
  font-size: 0.9rem;
  border: none;
  border-radius: 4px;
  background: var(--eb-green);
  transition: background 0.2s;
}

input.form-submit:hover,
a.button:hover,
.button:hover {
  background: var(--eb-green-light);
  text-decoration: none;
}

/* ============================================================
   MESSAGES - status / warning / error notices
   ============================================================ */
#highlight {
  margin: 0 0 12px;
}

#highlight:empty {
  display: none;
}

.messages {
  padding: 10px 14px;
  border: 1px solid #d8ded8;
  border-left-width: 4px;
  border-radius: 6px;
  background: #f6f9f6;
  color: var(--eb-text);
  font-size: 0.9rem;
  margin: 0 0 10px;
}

.messages:last-child {
  margin-bottom: 0;
}

.messages--status {
  border-left-color: var(--eb-green);
}

.messages--warning {
  border-left-color: #c89b00;
  background: #fdf8e8;
}

.messages--error {
  border-left-color: #b32b2b;
  background: #fdf0f0;
}

.messages a {
  color: var(--eb-green);
}

/* ============================================================
   LOCAL TASKS - tabs (Ansicht / Bearbeiten / Löschen)
   Core renders a plain list here, so it is styled to match the theme.
   ============================================================ */
#block-ebersbach-primary-local-tasks {
  margin: 0 0 14px;
}

#block-ebersbach-primary-local-tasks > ul {
  margin: 0;
  padding: 0 0 10px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #e6ebe6;
}

#block-ebersbach-primary-local-tasks > ul > li {
  margin: 0;
  padding: 0;
}

#block-ebersbach-primary-local-tasks > ul > li > a {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid #d8ded8;
  border-radius: 6px;
  color: var(--eb-text);
  text-decoration: none;
  font-size: 0.9rem;
  background: var(--eb-white);
}

#block-ebersbach-primary-local-tasks > ul > li > a:hover {
  border-color: var(--eb-green);
  color: var(--eb-green);
  text-decoration: none;
}

#block-ebersbach-primary-local-tasks > ul > li > a.is-active {
  background: var(--eb-green);
  border-color: var(--eb-green);
  color: var(--eb-white);
  font-weight: bold;
}

/* ============================================================
   TABLES
   ============================================================ */
table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  font-weight: bold;
  color: var(--eb-green);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--eb-green);
}

tbody td {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
}

tbody tr.odd {
  background-color: var(--eb-green-paler);
}

tbody tr.even {
  background-color: var(--eb-white);
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 960px) {
  #container {
    width: 100%;
  }

  .hero-gallery {
    height: 200px;
  }

  .hero-branding {
    padding: 48px 22px 14px;
  }

  .branding-link {
    gap: 16px;
  }

  .branding-link__emblem {
    width: 80px;
    height: 80px;
    padding: 8px;
  }

  .branding-name__line1 {
    font-size: 1.2rem;
  }

  .branding-name__line2 {
    font-size: 2.05rem;
  }

  #main {
    flex-direction: column;
    margin: 14px 0;
  }

  #content {
    padding: 15px;
    flex: none;
    width: 100%;
  }

  .sidebar {
    width: 100%;
    padding: 15px;
    flex: none;
  }

  #page-footer {
    padding: 15px;
  }
}

@media (max-width: 600px) {
  html {
    font-size: 14px;
  }

  #block-ebersbach-main-menu > ul {
    flex-direction: column;
  }

  #block-ebersbach-main-menu > ul > li > a {
    padding: 10px 15px;
  }

  #block-ebersbach-main-menu > ul > li > ul {
    position: static;
    box-shadow: none;
    border: none;
  }

  .hero-gallery {
    height: 185px;
  }

  .hero-branding {
    padding: 40px 16px 12px;
  }

  .branding-link {
    gap: 12px;
  }

  .branding-link__emblem {
    width: 64px;
    height: 64px;
    padding: 7px;
  }

  .branding-name__line1 {
    font-size: 1.3rem;
  }

  .branding-name__line2 {
    font-size: 2.5rem;
    letter-spacing: 0.04em;
  }
}

@media (max-width: 420px) {
  .hero-gallery {
    height: 170px;
  }

  .branding-link {
    gap: 10px;
  }

  .branding-link__emblem {
    width: 56px;
    height: 56px;
    padding: 6px;
  }

  .branding-name__line1 {
    font-size: 1.2rem;
  }

  .branding-name__line2 {
    font-size: 2.2rem;
  }
}

/* ============================================================
   PAGER - horizontal mini pager (Neuere / Ältere)
   ============================================================ */
nav.pager {
  margin: 20px 0 10px;
  text-align: center;
}

nav.pager ul.pager__items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav.pager ul.pager__items li {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
}

nav.pager ul.pager__items li.is-active,
nav.pager ul.pager__items li.pager__item {
  display: inline-flex;
}

nav.pager ul.pager__items li a,
nav.pager ul.pager__items li.is-active span {
  display: inline-block;
  padding: 7px 18px;
  background: var(--eb-green-pale);
  color: var(--eb-green);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: bold;
  border: 1px solid var(--eb-green);
  transition: all 0.2s;
}

nav.pager ul.pager__items li.is-active span {
  background: var(--eb-green);
  color: var(--eb-white);
  border-color: var(--eb-green);
}

nav.pager ul.pager__items li a:hover {
  background: var(--eb-green);
  color: var(--eb-white);
}

nav.pager ul.pager__items li.pager__item--next a,
nav.pager ul.pager__items li.pager__item--previous a {
  background: var(--eb-green);
  color: var(--eb-white);
}

nav.pager ul.pager__items li.pager__item--next a:hover,
nav.pager ul.pager__items li.pager__item--previous a:hover {
  background: var(--eb-green-light);
}

/* Turnier/Aktuell add button - subtle, no background */
.turnier-add {
  margin: 20px 0 15px;
  text-align: right;
}

.turnier-add .button {
  display: inline-block;
  padding: 5px 16px;
  background: transparent;
  color: var(--eb-green) !important;
  text-decoration: none;
  border-radius: 4px;
  font-weight: normal;
  font-size: 0.85rem;
  border: 1px solid var(--eb-green);
  transition: all 0.2s;
}

.turnier-add .button:hover {
  background: var(--eb-green-pale);
  text-decoration: none;
}

/* ============================================================
   NODE - modern content layout
   ============================================================ */
.node__header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.node__title {
  font-size: 1.5rem;
  color: var(--eb-green);
  margin: 0 0 6px;
  font-weight: normal;
}

.node__meta {
  font-size: 0.8rem;
  color: #999;
}

.node__meta .node__author {
  margin-left: 4px;
}

.node__body {
  margin-bottom: 20px;
  line-height: 1.7;
}

.node__body p {
  margin: 0.6em 0;
}

.node__body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* PDF inline embed */
.node__pdfs {
  margin-top: 25px;
}

.pdf-embed {
  margin-bottom: 25px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.pdf-embed__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--eb-green-paler);
  border-bottom: 1px solid #e0e0e0;
}

.pdf-embed__icon {
  display: inline-block;
  padding: 2px 8px;
  background: var(--eb-green);
  color: var(--eb-white);
  font-size: 0.7rem;
  font-weight: bold;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.pdf-embed__link {
  font-size: 0.85rem;
  color: var(--eb-green);
  text-decoration: none;
}

.pdf-embed__link:hover {
  text-decoration: underline;
}

.pdf-embed__object {
  width: 100%;
  height: 600px;
  border: none;
  display: block;
}
