/* =============================================
   TDK Custom Theme – Tiefsee-Farbschema
   ============================================= */

/* ---- Merriweather (lokal gehostet, DSGVO-konform) ---- */
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/merriweather-regular-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/merriweather-regular.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Merriweather';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/merriweather-italic-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Merriweather';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/merriweather-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --cassiopeia-color-primary: #0b1a2e;
  --cassiopeia-color-link: #1a9fba;
  --link-color: #1a9fba;
  --link-color-rgb: 26, 159, 186;
  --cassiopeia-color-hover: #14d4e6;
  --link-hover-color: #14d4e6;
  --link-hover-color-rgb: 20, 212, 230;
  --primary: #0d2847;
  --primary-rgb: 13, 40, 71;
}

/* ---- HEADER: Logo links, Menü + Motto rechts ---- */
.container-header {
  background: linear-gradient(135deg, #040d1a 0%, #0b1a2e 40%, #0d2847 100%);
  border-bottom: 3px solid #1a9fba;
  display: flex !important;
  flex-direction: row;
  align-items: center;
  padding: 0.4rem 1.5rem;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

/* Logo-Block: ganz links, nur so breit wie nötig */
.container-header > .grid-child {
  order: -1;
  flex-shrink: 0;
  padding: 0;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  display: block !important;
}

.container-header .navbar-brand {
  margin: 0;
  margin-inline-end: 0 !important;
  padding: 0;
}

.container-header .navbar-brand a {
  display: block;
  line-height: 0;
}

.container-header .navbar-brand img {
  height: 55px;
  width: auto;
  display: block;
}

/* Motto aus Logo-Block ausblenden (wird unten via ::after gezeigt) */
.container-header .site-description {
  display: none !important;
}

/* Menü-Block: nimmt restlichen Platz, Menü + Motto als Block übereinander */
.container-header > .container-topbar {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
}

.container-header > .container-topbar::after {
  content: "Anspruchsvolles Hobbytauchen in Baden-Württemberg und darüber hinaus";
  display: block;
  color: #8ab4c8;
  font-style: italic;
  font-size: 0.8rem;
  padding-left: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.container-header .mod-menu {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  flex: none !important;  /* Überschreibt template.css: flex: 1 0 100% */
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.container-header .mod-menu a {
  color: #c8dce6 !important;
  border-bottom: 2px solid transparent;
  padding: 0.2rem 0.7rem;
  font-size: 0.95rem;
  white-space: nowrap;
  text-decoration: none;
  display: block;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

.container-header .mod-menu a:hover,
.container-header .mod-menu a:focus,
.container-header .mod-menu .active > a {
  color: #14d4e6 !important;
  border-bottom-color: #1a9fba;
  text-decoration: none;
}

/* ---- BODY ---- */
body {
  background-color: #e8eef4;
  color: #1e2a3a;
}

/* Größere Schrift + begrenzte Breite für Inhalt (nicht Willkommensseite) */
body:not([class*="itemid-101"]) .container-component {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Artikel-Seite: Lesebreite begrenzen + Serifen-Schrift wie Spiegel.de */
.view-article .container-component .com-content-article {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* Artikel-Text: Merriweather-Serifen für Fließtext */
.view-article .com-content-article__body {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.65;
  color: #2a2a2a;
}

/* Überschriften innerhalb von Artikeln: serifenlos */
.view-article .com-content-article__body h1,
.view-article .com-content-article__body h2,
.view-article .com-content-article__body h3,
.view-article .com-content-article__body h4 {
  font-family: inherit;
  color: #0b1a2e;
}

.container-component {
  background: #f7f9fb;
  border-radius: 8px;
  padding: 2rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 4px rgba(11, 26, 46, 0.06);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- HERO (Willkommensseite) ---- */
.hero-banner {
  position: relative;
  width: 100%;
  min-height: 70vh;
  background-image: url('/images/bodensee-hero.jpg');
  background-size: cover;
  background-position: center 40%;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4,13,26,0.55) 0%, rgba(11,26,46,0.45) 50%, rgba(4,13,26,0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #ffffff;
  max-width: 800px;
  padding: 3rem 2rem;
}

.hero-content .hero-logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5));
}

.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  margin-bottom: 0.5rem;
}

.hero-content h2 {
  font-size: 1.4rem;
  font-weight: 400;
  color: #a0dce8;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  margin-bottom: 2rem;
}

.hero-content p {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #d8e8f0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.hero-content .hero-features {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-content .hero-feature {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(26,159,186,0.3);
  border-radius: 10px;
  padding: 1.5rem;
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero-content .hero-feature:hover {
  transform: translateY(-3px);
  border-color: rgba(26,159,186,0.7);
}

.hero-content .hero-feature h3 {
  color: #14d4e6;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.hero-content .hero-feature p {
  font-size: 0.95rem;
  color: #b8d0dc;
  margin: 0;
}

.hero-cta {
  margin-top: 2.5rem;
}

.hero-cta a {
  display: inline-block;
  background: #1a9fba;
  color: #ffffff !important;
  padding: 0.8rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-cta a:hover {
  background: #14d4e6;
  transform: translateY(-2px);
  color: #0b1a2e !important;
}

/* Kein Container-Styling auf der Startseite – nahtlos vom Header zum Footer */
.view-featured .container-component,
body[class*="itemid-101"] .container-component {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  margin: 0;
  max-width: none !important;
  width: 100% !important;
}

/* Startseite: Banner-Position ist bereits full-width im Grid */
.container-banner {
  padding: 0;
  margin: 0;
}

body[class*="itemid-101"] .blog-featured .blog-items,
body[class*="itemid-101"] .blog-featured .items-leading {
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
}

/* Willkommensseite: keine Karten-Optik auf Blog-Items */
body[class*="itemid-101"] .blog-items .blog-item {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
}
body[class*="itemid-101"] .blog-items .blog-item:hover {
  box-shadow: none;
  transform: none;
  border-color: transparent;
}

/* Grauer Body-Hintergrund auf Startseite durch dunkles Tiefsee-Thema ersetzen */
body[class*="itemid-101"] {
  background: linear-gradient(180deg, #0b1a2e 0%, #040d1a 100%);
}

/* Blog-Listen auf anderen Seiten */
.blog-items {
  background: #f7f9fb;
  border-radius: 8px;
  padding: 2rem;
  margin-top: 1.5rem;
  box-shadow: 0 1px 4px rgba(11,26,46,0.06);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- ARTIKEL ---- */
.com-content-article h1,
.com-content-article h2,
.blog h2 {
  color: #0b1a2e;
}

.com-content-article h3,
.blog h3 {
  color: #0d2847;
}

/* ---- GALERIE ---- */
figure.gallery-item {
  margin: 1.5rem 0;
  text-align: center;
}

figure.gallery-item img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: box-shadow 0.3s ease;
}

figure.gallery-item img:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

figure.gallery-item figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #5a7080;
  font-style: italic;
}

/* ---- BUTTONS ---- */
.btn-primary {
  background-color: #0d2847 !important;
  border-color: #0d2847 !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #1a9fba !important;
  border-color: #1a9fba !important;
}

a.readmore,
a.readmore:link {
  color: #1a9fba;
  font-weight: 600;
}

a.readmore:hover {
  color: #14d4e6;
}

/* ---- FOOTER ---- */
.footer {
  background: linear-gradient(135deg, #040d1a 0%, #0b1a2e 100%);
  color: #8ab4c8;
  border-top: 3px solid #1a9fba;
}

.footer a:not(.btn),
.footer .btn-link {
  color: #1a9fba !important;
}

.footer a:not(.btn):hover,
.footer .btn-link:hover {
  color: #14d4e6 !important;
}

/* ---- BREADCRUMBS ---- */
.container-breadcrumbs {
  background: #e8f1f6;
  font-size: 0.85rem;
}

body[class*="itemid-101"] .container-breadcrumbs {
  display: none;
}

/* ---- PAGINATION ---- */
.pagination .page-link {
  color: #0d2847;
}

.pagination .page-item.active .page-link {
  background-color: #0d2847;
  border-color: #0d2847;
}

/* ---- BLOG-LISTE: Card-Design mit Bild links ---- */

/* Jeder Artikel als Karte */
.blog-items .blog-item {
  background: #f7f9fb;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(11, 26, 46, 0.06);
  border: 1px solid #dce4ec;
  border-left: 3px solid transparent;
  padding: 0 !important;
  margin-bottom: 1.75rem;
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.blog-items .blog-item:hover {
  box-shadow: 0 6px 20px rgba(11, 26, 46, 0.12);
  border-left-color: #1a9fba;
  transform: translateY(-2px);
}

/* Bild: feste Breite + feste Höhe, Ausschnitt bei falschem Seitenverhältnis */
.blog-items .blog-item .item-image {
  overflow: hidden;
  border-radius: 0;
  margin: 0;
  flex: 0 0 336px !important;
  max-width: 336px;
  height: 240px;
  align-self: center;
}

.blog-items .blog-item .item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  transition: object-position 0.1s linear, transform 0.4s ease;
}

.blog-items .blog-item:hover .item-image img {
  transform: scale(1.03);
}

/* Text-Bereich: Padding innerhalb der Karte */
.blog-items .blog-item .item-content {
  padding: 1.2rem 1.5rem !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Überschrift */
.blog-items .blog-item .page-header {
  margin-top: 0;
  padding-top: 0;
  border-bottom: none;
}

.blog-items .blog-item .page-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.blog-items .blog-item .page-header h2 a {
  color: #0b1a2e;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-items .blog-item .page-header h2 a:hover {
  color: #1a9fba;
}

/* Meta-Info: Datum + Hits als dezente Badges */
.blog-items .article-info-term {
  display: none;
}

.blog-items .article-info {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
  padding: 0;
  border: none;
}

.blog-items .article-info dd {
  background: #f0f5fa;
  color: #4a6178;
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  margin: 0;
  font-size: 0.78rem;
}

/* Excerpt */
.blog-items .blog-item .item-content > p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #4a5568;
}

/* Weiterlesen-Link: kein Button-Style, schlichter Link */
.blog-items .blog-item .item-content .readmore a,
.blog-items .blog-item .item-content .readmore a.btn {
  display: inline-block;
  color: #1a9fba;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.25rem 0;
  background: none !important;
  border: none !important;
  border-bottom: 1px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: border-color 0.2s, color 0.2s;
}

.blog-items .blog-item .item-content .readmore a:hover {
  border-bottom-color: #1a9fba !important;
  color: #14d4e6;
  background: none !important;
}

/* Blog-Container */
.image-left .blog-items {
  background: transparent !important;
  box-shadow: none !important;
  padding: 1rem 0 !important;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsiv: Karten stapeln unter 768px */
@media (max-width: 768px) {
  .blog-items .blog-item .item-image {
    flex: none !important;
    max-width: none;
    max-height: 200px;
  }
}

/* ---- FOOTER LEGAL (Impressum + Datenschutz) ---- */
.container-footer {
  position: fixed;
  bottom: 0;
  right: 0;
  left: auto;
  width: auto;
  background: transparent;
  padding: 0;
  margin: 0;
  padding-right: 1.2rem;
  padding-bottom: 0.2rem;
  z-index: 10;
  line-height: 1;
}

/* "Aktuelle Seite" im Breadcrumb ausblenden */
.mod-breadcrumbs__here {
  display: none !important;
}

.container-footer > .grid-child {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  display: block !important;
}

.container-footer .mod-menu {
  display: flex !important;
  flex-direction: row !important;
  justify-content: flex-end;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.container-footer .mod-menu li {
  padding: 0;
}

.container-footer .mod-menu a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  text-decoration: none;
  transition: color 0.2s;
}

.container-footer .mod-menu a:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* ---- GOOGLE DOCS ---- */
iframe[src*="docs.google"] {
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .container-header {
    flex-wrap: wrap;
    padding: 0.5rem 1rem;
  }
  .container-header > .container-topbar::after {
    display: none;
  }
  .container-header .mod-menu a {
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 600px) {
  .container-component {
    padding: 1rem;
    margin-top: 0.5rem;
  }
  .hero-banner {
    min-height: 50vh;
    background-attachment: scroll;
  }
  .hero-content h1 { font-size: 1.8rem; }
  .hero-content h2 { font-size: 1.1rem; }
  .hero-content .hero-features {
    flex-direction: column;
    align-items: center;
  }
}
