/*
Theme Name: Messing Schrottpreis
Theme URI: https://messingschrottpreis.com/
Author: MessingSchrottpreis
Description: Individuelles Theme fuer Messing-Schrottpreise in Deutschland: Hero, Preistabelle, Preisrechner-Bereich, Ratgeber-Artikel und Footer. Keine Page-Builder-Abhaengigkeit, reines PHP.
Version: 1.4.1
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: msp
*/

:root {
  --msp-navy: #13212D;
  --msp-navy-2: #1B2E3E;
  --msp-yellow: #A6B81C;
  --msp-green: #2E7D46;
  --msp-green-dark: #256A3B;
  --msp-green-light: #E9F4EC;
  --msp-grey: #5A6570;
  --msp-grey-light: #8A949C;
  --msp-border: #E3E8EC;
  --msp-bg-soft: #F4F7F8;
  --msp-white: #FFFFFF;
  --msp-radius: 12px;
  --msp-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--msp-font);
  color: var(--msp-navy);
  background: var(--msp-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }

.msp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ---------- Header ---------- */
.msp-header {
  background: var(--msp-navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
}
.msp-header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.msp-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.msp-brand-mark { width: 40px; height: 40px; flex-shrink: 0; }
.msp-brand-name { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.1; color: #fff; }
.msp-brand-name .msp-yellow { color: var(--msp-yellow); }
.msp-brand-tag { font-size: 11px; color: #9AA6B0; line-height: 1.3; }
.msp-nav { margin-left: auto; }
.msp-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
}
.msp-nav a {
  color: #DDE5EA;
  font-size: 15px;
  font-weight: 600;
  padding: 6px 2px;
  position: relative;
}
.msp-nav a:hover { color: #fff; }
.msp-nav .current-menu-item a,
.msp-nav .current_page_item a,
.msp-nav a.msp-active {
  color: #fff;
}
.msp-nav .current-menu-item a::after,
.msp-nav .current_page_item a::after,
.msp-nav a.msp-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 3px;
  border-radius: 2px;
  background: var(--msp-green);
}
.msp-search-icon {
  margin-left: 8px;
  color: #DDE5EA;
  display: inline-flex;
  cursor: pointer;
  flex-shrink: 0;
}
.msp-search-icon:hover { color: #fff; }

/* ---------- Hero ---------- */
.msp-hero {
  background:
    linear-gradient(90deg, rgba(19,33,45,0.94) 0%, rgba(19,33,45,0.62) 46%, rgba(19,33,45,0.18) 100%),
    url("assets/images/hero.jpg") center center / cover no-repeat;
  color: #fff;
  min-height: 520px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.msp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(640px 440px at 16% 42%, rgba(166,184,28,0.10), transparent 70%);
  pointer-events: none;
}
.msp-hero > .msp-container { max-width: none; padding-left: clamp(24px, 7vw, 110px); padding-right: 24px; position: relative; z-index: 1; }
.msp-hero-inner { padding-top: 64px; padding-bottom: 64px; max-width: 640px; }
.msp-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: #fff;
  margin-bottom: 20px;
}
.msp-badge .msp-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--msp-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.msp-hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 18px;
  color: #fff;
}
.msp-hero h1 .msp-yellow { color: var(--msp-yellow); }
.msp-hero p.msp-lead {
  font-size: 17px;
  color: #C9D4DC;
  margin: 0 0 28px;
  max-width: 560px;
}
.msp-hero-search {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 6px 6px 6px 18px;
  gap: 10px;
  max-width: 560px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.28);
}
.msp-hero-search svg { color: var(--msp-grey-light); flex-shrink: 0; }
.msp-hero-search input {
  border: 0;
  outline: 0;
  flex: 1;
  font-size: 15px;
  color: var(--msp-navy);
  background: transparent;
  min-width: 0;
}
.msp-hero-search input::placeholder { color: var(--msp-grey-light); }
.msp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 9px;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.msp-btn-green { background: var(--msp-green); color: #fff; }
.msp-btn-green:hover { background: var(--msp-green-dark); color: #fff; }
.msp-btn-outline-green {
  background: transparent;
  color: var(--msp-green);
  border: 1.5px solid var(--msp-green);
}
.msp-btn-outline-green:hover { background: var(--msp-green-light); color: var(--msp-green-dark); }

.msp-trust {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.msp-trust-item {
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(8, 15, 22, 0.55);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 9px 16px 9px 9px;
}
.msp-trust-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--msp-yellow);
  flex-shrink: 0;
}
.msp-trust-text { font-size: 13px; font-weight: 600; line-height: 1.35; color: #EDF2F6; }

/* ---------- Features ---------- */
.msp-features { padding: 64px 0 20px; }
.msp-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.msp-feature { text-align: center; padding: 10px 26px; }
.msp-feature + .msp-feature { border-left: 1px solid var(--msp-border); }
.msp-feature-icon {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--msp-green-light);
  color: var(--msp-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.msp-feature h3 { font-size: 17px; margin: 0 0 8px; font-weight: 700; }
.msp-feature p { font-size: 14.5px; color: var(--msp-grey); margin: 0; }

/* ---------- Price section ---------- */
.msp-price-section { padding: 44px 0 64px; }
.msp-price-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 26px;
  align-items: start;
}
.msp-card {
  background: #fff;
  border: 1px solid var(--msp-border);
  border-radius: var(--msp-radius);
  padding: 30px;
}
.msp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.8px;
  color: var(--msp-green);
  margin-bottom: 12px;
}
.msp-eyebrow .msp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--msp-green); }
.msp-card h2 { font-size: 27px; margin: 0 0 10px; letter-spacing: -0.3px; }
.msp-card > p.msp-intro { color: var(--msp-grey); font-size: 15px; margin: 0 0 22px; }
.msp-table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
table.msp-price-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.msp-price-table th {
  text-align: left;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--msp-grey);
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 2px solid var(--msp-border);
}
.msp-price-table td { padding: 13px 12px; border-bottom: 1px solid #EEF1F4; font-size: 15px; vertical-align: middle; }
.msp-price-table tr:last-child td { border-bottom: 0; }
.msp-material { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.msp-material img { width: 48px; height: 48px; object-fit: cover; border-radius: 9px; flex-shrink: 0; }
.msp-price { font-weight: 600; white-space: nowrap; }
.msp-trend { color: var(--msp-green); font-weight: 700; white-space: nowrap; }
.msp-table-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #EEF1F4;
  font-size: 13.5px;
  color: var(--msp-grey);
}
.msp-updated { display: inline-flex; align-items: center; gap: 7px; }
.msp-link-green { color: var(--msp-green); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.msp-link-green:hover { color: var(--msp-green-dark); }

/* Sidebar */
.msp-sidebar { display: flex; flex-direction: column; gap: 22px; }
.msp-side-dark {
  border-radius: var(--msp-radius);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(19,33,45,0.55) 0%, rgba(19,33,45,0.88) 100%),
    url("assets/images/sidebar-rohre.jpg") center center / cover no-repeat;
  color: #fff;
  padding: 30px 26px;
}
.msp-side-dark h3 { font-size: 22px; line-height: 1.25; margin: 0 0 12px; color: #fff; }
.msp-side-dark p { font-size: 14.5px; color: #C9D4DC; margin: 0 0 20px; }
.msp-side-light {
  background: var(--msp-green-light);
  border-radius: var(--msp-radius);
  padding: 26px;
}
.msp-side-light .msp-calc-icon { color: var(--msp-green); margin-bottom: 12px; }
.msp-side-light h3 { font-size: 18px; margin: 0 0 8px; }
.msp-side-light p { font-size: 14.5px; color: var(--msp-grey); margin: 0 0 18px; }

/* ---------- Rechner ---------- */
.msp-rechner { background: var(--msp-bg-soft); padding: 64px 0; }
.msp-rechner h2 { text-align: center; font-size: 28px; margin: 0 0 10px; }
.msp-rechner .msp-sub { text-align: center; color: var(--msp-grey); margin: 0 0 30px; }
.msp-rechner-box {
  background: #fff;
  border: 1px solid var(--msp-border);
  border-radius: var(--msp-radius);
  padding: 30px;
  max-width: 860px;
  margin: 0 auto;
}

/* ---------- Articles ---------- */
.msp-articles { padding: 64px 0; }
.msp-articles .msp-eyebrow { margin-bottom: 10px; }
.msp-articles h2 { font-size: 28px; margin: 0 0 30px; letter-spacing: -0.3px; }
.msp-articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.msp-article-card {
  background: #fff;
  border: 1px solid var(--msp-border);
  border-radius: var(--msp-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.msp-article-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
a.msp-article-card { color: inherit; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
a.msp-article-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.10); }
.msp-articles-more { text-align: center; margin-top: 32px; }
.msp-article-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.msp-article-body h3 { font-size: 16.5px; line-height: 1.4; margin: 0; }
.msp-article-body p { font-size: 14px; color: var(--msp-grey); margin: 0; flex: 1; }
.msp-readmore { color: var(--msp-green); font-weight: 700; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }

/* ---------- Footer ---------- */
.msp-footer { background: var(--msp-navy); color: #C9D4DC; }
.msp-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 36px;
  padding: 54px 0 40px;
}
.msp-footer h4 { color: #fff; font-size: 15px; margin: 0 0 16px; font-weight: 700; }
.msp-footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.msp-footer-brand .msp-brand-name { font-size: 18px; }
.msp-footer p.msp-tag { font-size: 13px; color: #9AA6B0; margin: 0; }
.msp-footer ul { list-style: none; margin: 0; padding: 0; }
.msp-footer ul li { margin-bottom: 9px; }
.msp-footer ul a { color: #C9D4DC; font-size: 14.5px; }
.msp-footer ul a:hover { color: #fff; }
.msp-contact-list { list-style: none; margin: 0; padding: 0; }
.msp-contact-list li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 11px; font-size: 14px; }
.msp-contact-list li a { color: inherit; text-decoration: none; }
.msp-contact-list li a:hover { text-decoration: underline; }
.msp-contact-list svg { color: var(--msp-yellow); flex-shrink: 0; margin-top: 3px; }
.msp-contact-list li a.msp-whatsapp-btn {
  display: inline-flex; align-items: center;
  background: #25D366; color: #fff;
  padding: 8px 16px; border-radius: 999px;
  font-weight: 600; font-size: 13px; text-decoration: none;
}
.msp-contact-list li a.msp-whatsapp-btn:hover { background: #1FB857; text-decoration: none; }
.msp-social { display: flex; gap: 12px; margin-bottom: 18px; }
.msp-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: inline-flex; align-items: center; justify-content: center;
  color: #DDE5EA;
}
.msp-social a:hover { background: var(--msp-yellow); color: var(--msp-navy); }
.msp-eco-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--msp-green-light);
  color: var(--msp-navy);
  border-radius: 999px;
  padding: 10px 18px 10px 12px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
}
.msp-eco-pill svg { color: var(--msp-green); flex-shrink: 0; }
.msp-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 18px 0;
  font-size: 13px;
  color: #9AA6B0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.msp-footer-bottom .msp-legal { display: flex; gap: 8px; align-items: center; }
.msp-footer-bottom .msp-sep { opacity: 0.5; }

/* ---------- Fallback page content ---------- */
.msp-page-content { max-width: 820px; margin: 0 auto; padding: 48px 20px; }
.msp-page-content h1 { font-size: 32px; letter-spacing: -0.4px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .msp-header-inner { flex-wrap: wrap; gap: 14px; }
  .msp-nav { margin-left: 0; width: 100%; order: 3; }
  .msp-nav ul { gap: 16px; }
  .msp-hero { min-height: 0; }
  .msp-hero-inner { padding-top: 48px; padding-bottom: 48px; }
  .msp-features-grid { grid-template-columns: repeat(2, 1fr); }
  .msp-feature + .msp-feature { border-left: 0; }
  .msp-price-grid { grid-template-columns: 1fr; }
  .msp-articles-grid { grid-template-columns: repeat(2, 1fr); }
  .msp-footer-grid { grid-template-columns: 1fr 1fr; }
  .msp-trust { gap: 20px; }
}
@media (max-width: 560px) {
  .msp-features-grid { grid-template-columns: 1fr; }
  .msp-articles-grid { grid-template-columns: 1fr; }
  .msp-footer-grid { grid-template-columns: 1fr; }
  .msp-hero-search { flex-wrap: wrap; padding: 10px; }
  .msp-hero-search .msp-btn { width: 100%; justify-content: center; }
  .msp-card { padding: 22px; }
}

/* ---------- Silo: Quicklinks unter Preis-Intro ---------- */
.msp-quicklinks { font-size: 0.92rem; color: #6E6A62; margin: 2px 0 22px; line-height: 2; }
.msp-quicklinks > span:first-child { font-weight: 700; color: #242424; margin-right: 6px; }
.msp-quicklinks a { color: #2E7D46; text-decoration: none; font-weight: 600; white-space: nowrap; }
.msp-quicklinks a:hover { text-decoration: underline; }
.msp-quicklinks .msp-sep { color: #C9BFA8; margin: 0 2px; }

/* ---------- Silo: Schrottarten ---------- */
.msp-arten { padding: 72px 0; background: #F7F4EC; }
.msp-arten h2 { margin: 10px 0 8px; }
.msp-arten-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 30px; }
.msp-arten-card {
  background: #fff; border: 1px solid #E8E0D2; border-radius: 12px;
  padding: 24px 22px; text-decoration: none; color: inherit; display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.msp-arten-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(36,36,36,0.10); }
.msp-arten-card h3 { font-size: 1.12rem; margin: 0 0 10px; color: #242424; }
.msp-arten-card p { font-size: 0.93rem; color: #6E6A62; line-height: 1.55; margin: 0 0 14px; }
.msp-arten-card .msp-more { display: inline-flex; align-items: center; gap: 6px; color: #2E7D46; font-weight: 700; font-size: 0.92rem; }
.msp-arten-more { margin-top: 28px; text-align: center; }

/* ---------- Silo: Regionen ---------- */
.msp-regionen { padding: 72px 0; }
.msp-regionen h2 { margin: 0 0 8px; }
.msp-city-chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.msp-city-chip {
  display: inline-flex; align-items: center; padding: 11px 22px;
  border: 1.5px solid #C9BFA8; border-radius: 999px; background: #fff;
  color: #242424; font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.msp-city-chip:hover { border-color: #2E7D46; background: #EFF7EE; color: #2E7D46; }

@media (max-width: 900px) {
  .msp-arten-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .msp-arten-grid { grid-template-columns: 1fr; }
  .msp-arten, .msp-regionen { padding: 52px 0; }
}
