/*
Theme Name: AfD Regional Child
Theme URI: https://afd-passau.de
Description: Regionales Child Theme für GeneratePress mit AfD-CI Header, Navigation, Footer und globalen Basiselementen.
Author: AfD Regional
Template: generatepress
Version: 1.0.9
Text Domain: afd-regional-child
*/

:root {
  --afd-hellblau: #166a99;
  --afd-hellblau-web: #00ccff;
  --afd-dunkelblau: #0f4f7c;
  --afd-schwarzblau: #173557;
  --afd-rot: #cc0000;
  --afd-rot-dunkel: #a21126;
  --afd-weiss: #ffffff;
  --afd-text: #173557;
  --afd-border: #d8e4ef;
  --afd-light: #f3f7fa;

  --afd-gradient-blue: linear-gradient(90deg, #173557 0%, #0f5c8f 58%, #1681ba 100%);
  --afd-gradient-hero: linear-gradient(135deg, #173557 0%, #0f4f7c 52%, #166a99 100%);
  --afd-gradient-footer: linear-gradient(135deg, #173557 0%, #123f63 55%, #0f5c8f 100%);
  --afd-gradient-red: linear-gradient(135deg, #a21126 0%, #cc0000 100%);
}

/* =========================
   BASE
========================= */

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--afd-text);
  background: var(--afd-light);
  font-family: "Bitter", Georgia, serif;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.main-title,
.main-navigation a,
button,
.button,
.wp-block-button__link {
  font-family: "Barlow Condensed", Arial, sans-serif;
}

a {
  color: var(--afd-dunkelblau);
  text-decoration: none;
}

a:hover {
  color: var(--afd-rot);
}

.entry-title,
.page-title {
  color: var(--afd-schwarzblau);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* =========================
   BUTTONS
========================= */

button,
html input[type="button"],
input[type="reset"],
input[type="submit"],
.button,
.wp-block-button__link,
.afd-btn,
.afd-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 18px;
  background: var(--afd-dunkelblau);
  color: var(--afd-weiss) !important;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

button:hover,
html input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.button:hover,
.wp-block-button__link:hover,
.afd-btn:hover,
.afd-buttons a:hover {
  background: var(--afd-rot);
  color: var(--afd-weiss) !important;
  transform: translateY(-1px);
}

.afd-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* =========================
   CONTENT / GENERATEPRESS RESET
========================= */

.site-content,
.inside-article,
.entry-content {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.site-main,
.separate-containers .site-main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.site-content {
  padding-top: 0 !important;
}

.inside-article,
.separate-containers .inside-article {
  margin-top: 0 !important;
  padding-top: 16px !important;
  background: #ffffff;
}

.entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.entry-content > *:first-child {
  margin-top: 0 !important;
}

.separate-containers .comments-area,
.separate-containers .page-header,
.separate-containers .paging-navigation {
  margin-top: 0 !important;
}

.inside-article,
.afd-card,
.afd-hero,
.afd-start-hero {
  box-shadow: 0 10px 28px rgba(23,53,87,0.05);
}

.page-header,
.entry-header .entry-title,
.separate-containers .inside-article > .entry-header {
  display: none !important;
}

/* =========================
   HEADER
========================= */

.site-header {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  background: var(--afd-gradient-blue) !important;
  color: var(--afd-weiss);
  border-bottom: 4px solid var(--afd-rot);
  box-shadow: none;
}

.inside-header {
  max-width: 1440px !important;
  min-height: 96px;
  margin: 0 auto !important;
  padding: 16px 32px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.site-branding {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.main-title {
  margin: 0;
  line-height: 1;
  letter-spacing: -0.02em;
}

.main-title a,
.main-title a:hover,
.main-title a:visited {
  color: var(--afd-weiss);
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 800;
}

.site-description {
  margin-top: 4px;
  color: rgba(255,255,255,0.86);
  font-size: 15px;
  line-height: 1.25;
}

.site-logo,
.site-branding,
.inside-header .site-logo {
  flex: 0 0 auto;
}

.site-logo img,
.header-image,
.navigation-branding img {
  width: auto !important;
  height: auto !important;
  max-width: 210px !important;
  max-height: 88px !important;
  object-fit: contain !important;
}

/* =========================
   NAVIGATION
========================= */

.main-navigation {
  background: transparent !important;
  flex: 1;
  margin-left: 24px;
}

.main-navigation .inside-navigation {
  max-width: 1440px !important;
  margin: 0 auto;
  padding: 0 28px 0 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}

.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items a {
  color: var(--afd-weiss) !important;
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  padding: 20px 14px !important;
  white-space: nowrap;
  background: transparent !important;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li:focus > a,
.main-navigation .main-nav ul li.sfHover > a,
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li.current-menu-ancestor > a {
  color: var(--afd-weiss) !important;
  background: rgba(255,255,255,0.10) !important;
}

.main-navigation .main-nav ul li.current-menu-item > a {
  box-shadow: inset 0 -5px 0 var(--afd-hellblau-web);
}

.menu-item-has-children > a {
  display: flex !important;
  align-items: center !important;
  gap: 8px;
}

.menu-item-has-children .dropdown-menu-toggle {
  display: flex !important;
  align-items: center !important;
  height: auto !important;
  margin-top: 1px;
  padding: 0 !important;
  line-height: 1 !important;
  color: var(--afd-weiss) !important;
}

.main-navigation ul ul {
  background: rgba(255,255,255,0.98) !important;
  border-top: 4px solid var(--afd-hellblau-web);
  box-shadow: 0 18px 38px rgba(23,53,87,0.22);
  padding: 8px 0;
}

.main-navigation ul ul li {
  margin: 0;
}

.main-navigation .main-nav ul ul li a {
  color: var(--afd-schwarzblau) !important;
  background: rgba(255,255,255,0.98) !important;
  font-family: "Bitter", Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  padding: 15px 22px !important;
  min-width: 300px;
  border-bottom: 1px solid #e4edf4;
  white-space: nowrap;
}

.main-navigation .main-nav ul ul li:last-child > a {
  border-bottom: 0;
}

.main-navigation .main-nav ul ul li:hover > a,
.main-navigation .main-nav ul ul li:focus > a,
.main-navigation .main-nav ul ul li.sfHover > a {
  color: var(--afd-schwarzblau) !important;
  background: #eaf4fb !important;
}

.main-navigation.navigation-stick {
  background: var(--afd-schwarzblau) !important;
  border-bottom: 3px solid var(--afd-rot);
  box-shadow: 0 12px 34px rgba(23,53,87,0.16);
}

/* =========================
   HERO / BANNER
========================= */

.afd-hero,
.afd-start-hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 300px !important;
  margin-top: 0 !important;
  padding: 56px 64px !important;
  border-radius: 22px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  background: var(--afd-gradient-hero) !important;
  color: var(--afd-weiss);
}

.entry-content > .afd-hero:first-child,
.entry-content > .afd-start-hero:first-child {
  margin-top: 0 !important;
}

.afd-hero::before,
.afd-start-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 55%, rgba(0,204,255,0.08), transparent 34%),
    rgba(0,0,0,0.08);
  border-radius: inherit;
  pointer-events: none;
}

.afd-hero > *,
.afd-start-hero > * {
  position: relative;
  z-index: 1;
}

.afd-hero .afd-kicker,
.afd-start-hero .afd-kicker {
  margin-bottom: 14px !important;
}

.afd-hero h1,
.afd-start-hero h1,
.afd-hero h2,
.afd-start-hero h2 {
  color: var(--afd-weiss);
}

.afd-hero h1,
.afd-start-hero h1 {
  font-size: clamp(56px, 5vw, 82px) !important;
  line-height: 0.95 !important;
  margin: 0 0 18px 0 !important;
}

.afd-hero p,
.afd-start-hero p {
  max-width: 980px !important;
  margin: 0 !important;
  color: rgba(255,255,255,0.94);
  font-size: 23px !important;
  line-height: 1.35 !important;
}

.afd-hero .afd-buttons,
.afd-start-hero .afd-buttons {
  margin-top: 24px !important;
}

.afd-hero .afd-btn,
.afd-start-hero .afd-btn,
.afd-hero .afd-buttons a,
.afd-start-hero .afd-buttons a {
  background: rgba(255,255,255,0.14) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,0.32) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

.afd-hero .afd-btn:hover,
.afd-start-hero .afd-btn:hover,
.afd-hero .afd-buttons a:hover,
.afd-start-hero .afd-buttons a:hover {
  background: #ffffff !important;
  color: var(--afd-schwarzblau) !important;
  border-color: #ffffff !important;
}

.afd-hero .afd-btn.red,
.afd-start-hero .afd-btn.red,
.afd-hero .afd-buttons a.red,
.afd-start-hero .afd-buttons a.red {
  background: var(--afd-rot) !important;
  border-color: var(--afd-rot) !important;
  color: #ffffff !important;
}

.afd-hero + .afd-grid,
.afd-start-hero + .afd-grid,
.afd-hero + .afd-section,
.afd-start-hero + .afd-section {
  margin-top: 34px !important;
}

/* =========================
   SECTIONS / CARDS
========================= */

.afd-section {
  margin-top: 42px;
}

.afd-section-title,
.entry-content h2.afd-section-title {
  margin-bottom: 22px;
  color: var(--afd-schwarzblau);
  font-size: clamp(34px, 3vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.afd-grid,
.afd-cards,
.afd-card-grid {
  align-items: stretch;
}

.afd-card {
  height: 100%;
  background: #ffffff;
  border: 1px solid var(--afd-border);
  border-radius: 18px;
}

.afd-card h2,
.afd-card h3 {
  margin-top: 0;
}

.afd-card p:last-child {
  margin-bottom: 0;
}

/* =========================
   FORMS
========================= */

.gform_wrapper,
.afd-form,
form {
  max-width: 100%;
}

.gform_wrapper input,
.gform_wrapper textarea,
.gform_wrapper select,
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  border: 1px solid var(--afd-border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--afd-text);
  background: #ffffff;
}

/* =========================
   FOOTER
========================= */

.site-footer {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  margin-top: 54px;
  background:
    radial-gradient(circle at 18% 10%, rgba(0,204,255,0.07), transparent 30%),
    var(--afd-gradient-footer) !important;
  border-top: 4px solid var(--afd-rot);
  color: var(--afd-weiss);
}

.footer-widgets {
  background: transparent !important;
  padding: 42px 0 36px !important;
}

.site-footer .inside-footer-widgets {
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 0 28px !important;
  display: grid !important;
  grid-template-columns: 1.35fr 0.95fr 1.05fr !important;
  gap: 64px !important;
}

.site-footer,
.site-footer p,
.site-footer li,
.site-footer a {
  font-family: "Bitter", Georgia, serif;
  font-size: 16px !important;
  line-height: 1.62 !important;
  font-weight: 400 !important;
}

.site-footer h3,
.site-footer .widget-title {
  position: relative;
  color: var(--afd-weiss) !important;
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-weight: 800;
  font-size: 24px !important;
  line-height: 1.05;
  margin: 0 0 14px;
}

.site-footer h3::before,
.site-footer .widget-title::before {
  content: "";
  display: block;
  width: 34px;
  height: 5px;
  margin-bottom: 14px;
  background: linear-gradient(
    90deg,
    #000 0 33%,
    #cc0000 33% 66%,
    #ffcc00 66% 100%
  );
}

.site-footer p {
  max-width: 390px;
  margin: 0 0 24px;
  color: rgba(255,255,255,0.94);
}

.site-footer a {
  color: rgba(255,255,255,0.94) !important;
  border-bottom: 1px solid rgba(0,204,255,0.35);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer a:hover {
  color: var(--afd-hellblau-web) !important;
  border-bottom-color: var(--afd-hellblau-web);
}

.afd-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.afd-footer-links li {
  margin: 0 0 8px;
  padding: 0;
}

.afd-footer-links a,
.afd-footer-buttons a {
  display: inline-block;
}

.afd-footer-links a {
  min-width: 190px;
}

.afd-footer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.afd-footer-buttons-stacked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.site-footer .widget:nth-child(2),
.site-footer .widget:nth-child(3) {
  border-left: 1px solid rgba(255,255,255,0.14);
  padding-left: 28px;
}

.site-footer .widget:first-child::before {
  content: none !important;
  display: none !important;
}

/* =========================
   FOOTER BOTTOM BAR
========================= */

.site-info {
  background: rgba(0,0,0,0.16) !important;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 0 !important;
  color: rgba(255,255,255,0.9);
  text-align: center;
}

.site-info .inside-site-info {
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 0 28px !important;
}

.site-info .copyright-bar {
  display: none !important;
}

.afd-footer-bottom,
.afd-footer-bottom::before,
.afd-footer-bottom::after,
.afd-footer-bottom-inner::before,
.afd-footer-bottom-inner::after,
.afd-footer-copyright::before,
.afd-footer-copyright::after,
.afd-footer-legal::before,
.afd-footer-legal::after {
  background-image: none !important;
  content: none !important;
  display: none;
}

.afd-footer-bottom {
  display: block !important;
  padding: 16px 20px 14px;
}

.afd-footer-bottom-inner {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.afd-footer-copyright {
  display: block !important;
  font-size: 0.95rem !important;
  line-height: 1.35 !important;
  color: rgba(255,255,255,0.94);
}

.afd-footer-legal {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  font-size: 0.92rem !important;
  line-height: 1.35 !important;
}

.afd-footer-legal a {
  color: rgba(255,255,255,0.94) !important;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,204,255,0.35);
  padding-bottom: 2px;
}

.afd-footer-legal a:hover {
  color: var(--afd-hellblau-web) !important;
  border-color: var(--afd-hellblau-web);
}

.afd-footer-separator {
  opacity: 0.45;
}

/* =========================
   TABLET
========================= */

@media (max-width: 1280px) {
  .main-navigation .main-nav ul li a {
    font-size: 22px;
    padding: 18px 11px !important;
  }

  .site-logo img,
  .header-image {
    max-width: 180px !important;
  }
}

@media (max-width: 1180px) {
  .main-navigation .main-nav ul li a {
    font-size: 19px;
    padding: 15px 8px !important;
  }

  .site-logo img,
  .header-image {
    max-width: 155px !important;
  }

  .inside-header {
    gap: 18px;
  }
}

@media (max-width: 980px) {
  .inside-header {
    display: block;
    padding: 16px 22px !important;
  }

  .site-logo {
    margin-bottom: 14px;
  }

  .main-navigation {
    background: var(--afd-schwarzblau) !important;
  }

  .main-navigation .inside-navigation {
    justify-content: flex-start;
    padding: 0 22px;
  }

  .main-navigation ul {
    flex-wrap: wrap;
  }

  .main-navigation .menu-toggle {
    width: 100%;
    text-align: left;
    color: var(--afd-weiss) !important;
    font-size: 23px;
    line-height: 52px;
  }

  .main-navigation.toggled .main-nav > ul {
    background: var(--afd-schwarzblau);
    border-top: 1px solid rgba(255,255,255,0.18);
  }

  .main-navigation .main-nav ul li a {
    line-height: 48px;
    font-size: 21px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
  .site-content,
  .inside-article,
  .entry-content {
    max-width: 100%;
  }

  .inside-article,
  .separate-containers .inside-article {
    padding-top: 14px !important;
  }

  .afd-hero,
  .afd-start-hero {
    min-height: 240px !important;
    padding: 34px 24px !important;
    border-radius: 18px !important;
  }

  .afd-hero h1,
  .afd-start-hero h1 {
    font-size: 44px !important;
    line-height: 1.02 !important;
  }

  .afd-hero p,
  .afd-start-hero p {
    font-size: 18px !important;
    line-height: 1.45 !important;
  }

  .afd-grid,
  .afd-cards,
  .afd-card-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .afd-card,
  .afd-grid > *,
  .afd-card-grid > * {
    min-width: 0 !important;
    width: 100% !important;
  }

  .afd-card {
    padding: 22px !important;
  }

  .afd-card h2,
  .afd-card h3 {
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: auto;
    font-size: 32px !important;
    line-height: 1.06 !important;
  }

  .afd-card p {
    font-size: 17px !important;
    line-height: 1.55 !important;
  }

  .afd-btn,
  .afd-buttons a {
    width: auto;
    max-width: 100%;
  }

  .site-footer {
    margin-top: 42px;
  }

  .footer-widgets {
    padding: 32px 0 26px !important;
  }

  .site-footer .inside-footer-widgets {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .site-footer .widget:nth-child(2),
  .site-footer .widget:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }

  .afd-footer-links a {
    min-width: unset;
  }

  .site-info {
    text-align: center;
  }

  .afd-footer-bottom {
    padding: 15px 14px 13px;
  }

  .afd-footer-copyright {
    font-size: 0.9rem !important;
  }

  .afd-footer-legal {
    gap: 8px;
    font-size: 0.88rem !important;
  }
}