/**
 * Screwed — Drupal 11 theme, matching the D7 screwed2014 design.
 * Values ported from screwed2014.css; selectors target D11 markup.
 */

:root {
  --accent: #cace4b;            /* brand lime */
  --link: #0074bd;
  --ink: #2b2b2b;
  --muted: #666;
  --font: "Open Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --maxw: 1200px;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: #111 url("../images/bg.jpg") no-repeat center center fixed;
  background-size: cover;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

#page { max-width: var(--maxw); margin: 0 auto; background-color: rgba(0, 0, 0, 0.2); }

/* ── Header: secondary (user) menu top-right + centered logo ───────────────── */
.header { position: relative; padding-top: 8px; text-align: center; }
.header__secondary-menu {
  position: absolute; top: 0; right: 0; z-index: 5;
}
.header__secondary-menu ul { list-style: none; margin: 0; padding: 0; display: flex; }
.header__secondary-menu li a {
  display: block; padding: 6px 14px; color: #eee; font-size: .82rem;
  background: rgba(0,0,0,.6); border: 1px solid #333; border-bottom: 0;
}
.header__secondary-menu li a:hover { background: var(--accent); color: #111; text-decoration: none; }

/* Site branding block → centered logo (D7 .header__logo) */
#header .site-branding,
#header .block { text-align: center; }
#header img { display: inline-block; margin: 1.6em auto .3em; max-width: 460px; height: auto; }
.site-branding__name, .site-branding__slogan { display: none; }

/* ── Navigation: the main menu bar ─────────────────────────────────────────── */
#navigation {
  background: rgba(255,255,255,.6);
  box-shadow: 1px 1px 5px rgba(0,0,0,.3);
  margin-bottom: 1.5em;
}
#navigation ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; }
#navigation li { margin: 0; }
#navigation a {
  display: block; padding: 0 20px; line-height: 3.4em;
  color: #333; font-weight: 700; text-transform: uppercase; font-size: .9rem;
  transition: all .3s ease;
}
#navigation a:hover, #navigation a.is-active {
  background: var(--accent); color: #111; text-decoration: none;
}

/* ── Content area + sidebar ────────────────────────────────────────────────── */
#main { display: flex; flex-wrap: wrap; gap: 20px; padding: 0 12px 40px; align-items: flex-start; }
#navigation { flex: 1 1 100%; }
#header-hero { flex: 1 1 100%; }
#content { flex: 1 1 640px; min-width: 0; }
.sidebars { flex: 0 0 240px; }

/* Header hero (scrwd_header view block) — full-width auto-advancing slider of
 * header_image banners (1180×385) on the front page. Slides cross-fade; nav
 * dots + arrows and autoplay are wired up in js/screwed.js. */
#block-screwed-hero { position: relative; margin: 0 0 1.2em; }
#block-screwed-hero div:has(> .views-row) {
  position: relative;
  aspect-ratio: 1180 / 385;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
  background: #111;
}
#block-screwed-hero .views-row {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; transition: opacity .8s ease; pointer-events: none;
}
#block-screwed-hero .views-row.is-active { opacity: 1; pointer-events: auto; }
#block-screwed-hero .hero-slide,
#block-screwed-hero .hero-slide > div { height: 100%; }
#block-screwed-hero .hero-slide img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}

/* Nav dots */
#block-screwed-hero .hero-dots {
  position: absolute; left: 0; right: 0; bottom: 12px; z-index: 3;
  display: flex; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none;
}
#block-screwed-hero .hero-dot {
  width: 12px; height: 12px; padding: 0; border-radius: 50%;
  border: 2px solid #fff; background: transparent; cursor: pointer;
  box-shadow: 0 0 3px rgba(0,0,0,.6); transition: background .2s, border-color .2s;
}
#block-screwed-hero .hero-dot.is-active { background: var(--accent); border-color: var(--accent); }

/* Prev / next arrows */
#block-screwed-hero .hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 46px; height: 64px; border: none; cursor: pointer;
  background: rgba(0,0,0,.4); color: #fff; font-size: 1.8rem; line-height: 1;
  transition: background .2s, color .2s;
}
#block-screwed-hero .hero-arrow:hover { background: var(--accent); color: #111; }
#block-screwed-hero .hero-prev { left: 0; }
#block-screwed-hero .hero-next { right: 0; }

/* Title bar (page_title_block placed in highlighted) */
.highlighted h1,
.highlighted .page-title,
h1.page-title {
  background-color: rgba(0,0,0,.5);
  border: 1px dotted var(--muted);
  color: var(--accent);
  font-size: 2.6em;
  text-align: center;
  padding: .2em;
  margin: 0 0 .6em;
  border-radius: 3px;
}

/* D7: listing & image pages sit directly on the tinted #page bg — no card. */
.page_content {
  background: none;
  padding: 0;
}
.page_content h1, .page_content h2 { color: var(--ink); }

/* …but text/form pages (About, Impressum, Kontakt) get D7's light content
 * panel so the copy stays legible over the metal background
 * (screwed2014: .page_content { background: rgba(255,255,255,.6) }). */
.page-node-type-page .page_content,
.page-contact .page_content,
.page-user .page_content {
  background-color: rgba(255, 255, 255, 0.6);
  padding: 1em;
  margin: 0.2em 0.1em 1em;
}

.sidebars .block { background: rgba(255,255,255,.97); border-radius: 6px; padding: 8px; margin-bottom: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.sidebars img { display: block; }

/* Admin contextual links ("Configure block" / "Remove block" / "Edit menu").
 * Core collapses these into a hover gear via JS, but they should never intrude on
 * the public design — hide them outright. Manage blocks at /admin/structure/block. */
.contextual { display: none !important; }

/* Messages */
.messages { margin-bottom: 1em; }

/* Local task tabs (e.g. Log in / Reset your password) — bare <ul> in the tabs
 * block; render them as a row of pills with a lime active state. */
#block-screwed-tabs { margin: 0 0 1em; }
#block-screwed-tabs ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; }
#block-screwed-tabs li { margin: 0; }
#block-screwed-tabs a {
  display: block; padding: 7px 14px; font-weight: 700; font-size: .9rem;
  background: rgba(0,0,0,.55); color: #fff; border-radius: 3px 3px 0 0; text-decoration: none;
}
#block-screwed-tabs a:hover { background: var(--link); color: #fff; }
#block-screwed-tabs a.is-active { background: var(--accent); color: #111; }

/* ── Forms (contact, login, user account) — D7 screwed2014 form styling ─────── */
.page_content .form-item,
.page_content .js-form-item { margin: 0 0 1em; }
.page_content label {
  display: block; font-weight: 700; margin-bottom: .3em; color: var(--ink);
}
.page_content input.form-text,
.page_content input.form-email,
.page_content input.form-tel,
.page_content input.form-url,
.page_content input.form-password,
.page_content input[type="text"],
.page_content input[type="email"],
.page_content input[type="password"],
.page_content input[type="search"],
.page_content textarea,
.page_content select {
  padding: 8px 10px; border: 1px solid #ddd; border-radius: 2px;
  background: #fff; color: #333; font: inherit; max-width: 100%;
}
.page_content textarea { width: 100%; resize: vertical; }
.page_content input.form-text:focus,
.page_content input.form-email:focus,
.page_content input[type="text"]:focus,
.page_content input[type="email"]:focus,
.page_content input[type="password"]:focus,
.page_content textarea:focus,
.page_content select:focus { color: #000; border-color: var(--link); outline: none; }
.page_content .description { font-size: .8rem; color: #555; margin-top: .3em; }
.page_content .form-required::after { content: " *"; color: #c00; }

.page_content input.form-submit,
.page_content .button,
.page_content button {
  cursor: pointer; display: inline-block; background: #eee; border: none;
  padding: 9px 18px; margin: .2em 1em .5em 0; color: #555;
  font: inherit; font-weight: 700; text-transform: uppercase; font-size: .9rem;
  border-radius: 2px; transition: background .2s, color .2s;
}
.page_content input.form-submit:hover,
.page_content .button:hover,
.page_content button:hover { background: var(--link); color: #fff; text-decoration: none; }
.page_content .button--primary { background: var(--accent); color: #111; }
.page_content .button--primary:hover { background: var(--link); color: #fff; }

/* ── Article teaser card (list view) ───────────────────────────────────────── */
.view-content, .views-row { }
/* teaser card shows only the FIRST image */
.node--teaser .field--type-image .field__item:not(:first-child) { display: none; }
.article_link { display: block; position: relative; margin-bottom: 1.5em; }
.article_link img { display: block; width: 100%; box-shadow: 2px 3px 5px rgba(50,50,50,.6); }
.article_link h2, .article_link .title {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0;
  background-color: rgba(0,0,0,.6); color: #fff;
  border-bottom: 1px dotted var(--muted);
  padding: .4em .6em; font-size: 1.3rem;
}
.article_link:hover h2 { color: var(--accent); }
.article_link .date {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent); color: #111; text-align: center;
  padding: 6px 10px; border-radius: 3px; line-height: 1; font-weight: 700;
}
.article_link .date span { display: block; font-size: .7rem; text-transform: uppercase; }

/* Team / link teaser — floated grid cards; title overlay hidden until hover (D7).
 * D7 used `margin: 0.5em` all round each card; 3 columns fill the content width. */
.views-row:has(> .team_teaser) { float: left; width: calc(33.333% - 1em); margin: 0.5em; }
.views-row:has(> .link) { float: left; width: 120px; margin: 0.5em; }
.page_content::after { content: ""; display: table; clear: both; }  /* clear floated cards */

.team_link, .link_link { display: block; position: relative; text-decoration: none; }
.team_link img, .link_link img { display: block; width: 100%; height: auto; box-shadow: 2px 3px 5px rgba(50,50,50,.6); }

/* Pager — full width below the grid, centered, styled buttons. */
.pager { clear: both; margin: 1.5em 0 0; }
.pager__items { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.pager__item { margin: 0; }
.pager__item a,
.pager__item.is-active > * {
  display: block; padding: 8px 14px; border-radius: 3px; font-weight: 700;
  background: rgba(0,0,0,.55); color: #fff; text-decoration: none;
}
.pager__item.is-active > * { background: var(--accent); color: #111; }
.pager__item a:hover { background: var(--accent); color: #111; }
.team_link h2.title, .link_link h2.title {
  position: absolute; left: 0; right: 0; bottom: .8em; margin: 0;
  background: rgba(0,0,0,.5); color: #fff;
  border-top: 1px dotted var(--muted); border-bottom: 1px dotted var(--muted);
  padding: .4em .5em; font-size: 1rem;
  opacity: 0; transition: opacity .3s ease-out;
}
.team_link:hover h2.title, .link_link:hover h2.title { opacity: 1; }
.link_link h2.title { font-size: .75rem; bottom: .3em; }

/* ── Article / team full view — D7 .article_full / .team_full ────────────────
 * Body text and the image gallery each sit on the light rgba(255,255,255,.6)
 * panel. The gallery is centred: the first image (scrwd_large) is the full-width
 * lead, the rest (screwed_120) are bordered thumbnails with .4em .2em spacing —
 * exact screwed2014 values. */
.article_full .text,
.team_full .text {
  background-color: rgba(255, 255, 255, 0.6);
  margin: 0.2em 0.1em 1em;
  padding: 1em;
}
.article_images,
.team_images {
  background-color: rgba(255, 255, 255, 0.6);
  margin: 0.2em 0.1em 0.5em;
  padding: 1em;
  text-align: center;
}
/* each Colorbox image is a bare <div> wrapping an a.colorbox */
.article_images div:has(> a.colorbox),
.team_images div:has(> a.colorbox) {
  display: inline-block; vertical-align: top; margin: 0.4em 0.2em; line-height: 0;
}
.article_images a.colorbox img,
.team_images a.colorbox img {
  display: block; border: 1px solid #222;
  transition: transform .15s, border-color .15s;
}
.article_images a.colorbox:hover img,
.team_images a.colorbox:hover img { border-color: var(--accent); transform: scale(1.03); }
/* first image (scrwd_large) = full-width lead, centred, no crop */
.article_images div:has(> a.colorbox img[src*="scrwd_large"]),
.team_images div:has(> a.colorbox img[src*="scrwd_large"]) {
  display: block; margin: 0 auto 0.5em;
}
.article_images div:has(> a.colorbox img[src*="scrwd_large"]) img,
.team_images div:has(> a.colorbox img[src*="scrwd_large"]) img {
  width: 100%; height: auto; border: 0; box-shadow: 2px 3px 8px rgba(0,0,0,.4);
}
.article_images div:has(> a.colorbox img[src*="scrwd_large"]) a.colorbox:hover img,
.team_images div:has(> a.colorbox img[src*="scrwd_large"]) a.colorbox:hover img { transform: none; }

/* ── Floating social share ─────────────────────────────────────────────────── */
.social_share { position: absolute; left: -60px; top: 0; list-style: none; margin: 0; padding: 0; }
.social_share li a {
  display: block; width: 48px; height: 48px; margin-bottom: 2px; text-indent: -9999px;
  background: #1a1a1a; border-radius: 3px;
}
.social_share li.twitter a { background: #1da1f2; }
.social_share li.fb a { background: #1877f2; }
article, .node { position: relative; }

/* ── Footer — D7 screwed2014: thin dark bar, dotted top border, white bold ──── */
footer .footer {
  background-color: rgba(0, 0, 0, 0.7);
  border-top: 1px dotted #666;
  color: #fff;
  font-size: 0.85em;
  font-weight: bold;
  text-align: center;
  padding: 0.5em;
  margin: 0;
}
footer .footer p { margin: 0; padding: 0; }
.region-footer { max-width: var(--maxw); margin: 0 auto; }
.region-footer ul { list-style: none; display: flex; justify-content: center; gap: 16px; padding: 0; margin: 0; }
.region-footer a { color: var(--accent); }

/* ── Products catalogue (display-only) ─────────────────────────────────────── */
/* 3-column grid cards (D7 Produkte grid); title shown on hover. */
.views-row:has(> .product_teaser) { float: left; width: calc(33.333% - 1em); margin: 0.5em; }
.product_link { display: block; position: relative; text-decoration: none; }
.product_link img { display: block; width: 100%; height: auto; box-shadow: 2px 3px 5px rgba(50,50,50,.6); }
.product_link h2.title {
  position: absolute; left: 0; right: 0; bottom: .8em; margin: 0;
  background: rgba(0,0,0,.55); color: #fff; text-align: center;
  border-top: 1px dotted var(--muted); border-bottom: 1px dotted var(--muted);
  padding: .4em .5em; font-size: 1rem;
  opacity: 0; transition: opacity .3s ease-out;
}
.product_link:hover h2.title { opacity: 1; }

/* "Store closed" banner (products view header) — D7 green status message. */
.store-closed {
  background: rgba(88, 158, 60, .92); color: #fff; text-align: center;
  border-radius: 4px; padding: 14px 18px; margin: 0 0 1.2em;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.store-closed a { color: #fff; font-weight: 700; text-decoration: underline; }

/* Product full view — info panel (price + sizes) above the reused image gallery. */
.product_full .product_info {
  background-color: rgba(255,255,255,.6); margin: 0.2em 0.1em 1em; padding: 1em;
}
.product_full .price { font-size: 1.6em; font-weight: 700; color: var(--ink); margin: 0 0 .1em; }
.product_full .sizes { font-weight: 700; color: #333; margin: 0 0 .5em; }
.product_full .inquire { font-style: italic; color: #555; margin: .6em 0 0; }

/* ── Newsletter signup (simplenews) — clean D7-style form (email + button) ──── */
#block-screwed-newsletter h2 { color: var(--ink); margin: 0 0 .6em; }
/* One newsletter only → hide the redundant selection checkbox + "manage" link. */
#block-screwed-newsletter .field--name-subscriptions { display: none; }
#block-screwed-newsletter .form-actions a { display: none; }
#block-screwed-newsletter .description { color: #555; font-size: .85rem; }
#block-screwed-newsletter .simplenews-subscriber-form { max-width: 460px; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .sidebars { flex-basis: 100%; }
  #header img { max-width: 300px; }
  .social_share { position: static; display: flex; gap: 4px; margin-bottom: 1em; }
  .header__secondary-menu { position: static; }
  .header__secondary-menu ul { justify-content: center; }
}
