/*
Theme Name: Gipscher Child
Theme URI: https://gipscher.de
Description: Child-Theme für Waldemar Gipscher — Raumgestaltung & Malerarbeiten
Author: Mario
Template: kadence
Version: 1.2.0
*/

/* ============================================================
   FONTS — Lokal gehostet (kein Google CDN!)
   ============================================================ */

@font-face {
  font-family: 'Inter';
  src: url('fonts/inter/inter-v18-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter/inter-v18-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter/inter-v18-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('fonts/playfair-display/playfair-display-v40-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('fonts/playfair-display/playfair-display-v40-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   DESIGN-SYSTEM VARIABLES
   ============================================================ */

:root {
  --color-primary:    #1a1a1a;
  --color-secondary:  #c5a059;
  --color-accent:     #0f172a;
  --color-bg:         #ffffff;
  --color-muted:      #f9f9f9;
  --color-border:     #e5e5e5;
  --color-text:       #333333;
  --color-text-light: #666666;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius:   4px;
  --shadow:   0 2px 12px rgba(0,0,0,.08);
  --shadow-lg:0 8px 32px rgba(0,0,0,.12);

  --max-width: 1200px;
  --section-gap: 4rem;
}

/* ============================================================
   BASE RESET & TYPOGRAPHY
   ============================================================ */

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color .2s;
}
a:hover { color: var(--color-primary); }

img { max-width: 100%; height: auto; }

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-gap) 0;
}

.section--muted {
  background: var(--color-muted);
}

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

.btn,
.wp-block-button__link {
  display: inline-block;
  padding: .875rem 2rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .03em;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn:hover,
.wp-block-button__link:hover {
  transform: translateY(-1px);
}

/* Primary */
.btn-primary,
.wp-block-button.is-style-fill .wp-block-button__link {
  background: var(--color-primary);
  color: #fff !important;
  border-color: var(--color-primary);
}
.btn-primary:hover,
.wp-block-button.is-style-fill .wp-block-button__link:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #fff !important;
}

/* Outline — light background context */
.btn-outline,
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--color-primary);
  color: #fff !important;
}

/* Outline — dark background context (hero, cta, trust-bar) */
.hero .btn-outline,
.cta-banner .btn-outline,
.trust-bar .btn-outline,
.local-hero .btn-outline,
[style*="background"] .btn-outline {
  color: #fff !important;
  border-color: rgba(255,255,255,.75) !important;
}
.hero .btn-outline:hover,
.cta-banner .btn-outline:hover,
.local-hero .btn-outline:hover {
  background: rgba(255,255,255,.15) !important;
  border-color: #fff !important;
}

/* Gold/Secondary variant */
.btn-gold {
  background: var(--color-secondary);
  color: var(--color-primary) !important;
  border-color: var(--color-secondary);
}
.btn-gold:hover {
  background: #b08940;
  border-color: #b08940;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */

.site-header {
  background: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.site-header a {
  color: #fff;
}

.site-header .nav-link:hover,
.site-header .current-menu-item > a {
  color: var(--color-secondary) !important;
}

/* Kontakt-Button im Menü */
.menu-item-kontakt > a,
.menu-item.kontakt-btn > a {
  background: var(--color-secondary);
  color: var(--color-primary) !important;
  padding: .4rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
}
.menu-item-kontakt > a:hover,
.menu-item.kontakt-btn > a:hover {
  background: #b08940;
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: center;
  background: var(--color-accent);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .55;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 2rem 1.5rem;
  color: #fff;
}

.hero__eyebrow {
  display: inline-block;
  color: var(--color-secondary);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero__title {
  color: #fff;
  margin-bottom: 1.25rem;
}

.hero__sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================================
   TRUST NUMBERS
   ============================================================ */

.trust-bar {
  background: var(--color-primary);
  color: #fff;
  padding: 2.5rem 0;
}

.trust-bar__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  text-align: center;
}

.trust-bar__number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-secondary);
  display: block;
}

.trust-bar__label {
  font-size: .875rem;
  color: rgba(255,255,255,.8);
  margin-top: .25rem;
}

/* ============================================================
   SERVICE CARDS
   ============================================================ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.service-card__icon {
  width: 56px;
  height: 56px;
  background: var(--color-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: #fff;
  font-size: 1.4rem;
}

.service-card__title {
  font-size: 1.2rem;
  margin-bottom: .75rem;
}

.service-card__text {
  color: var(--color-text-light);
  font-size: .95rem;
  line-height: 1.65;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header__tag {
  display: inline-block;
  color: var(--color-secondary);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: .75rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header__desc {
  color: var(--color-text-light);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   REFERENZEN / GALERIE
   ============================================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--color-border);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,.7) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.gallery-item:hover .gallery-item__overlay {
  opacity: 1;
}

.gallery-item__label {
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
}

/* ============================================================
   CTA BANNER
   ============================================================ */

.cta-banner {
  background: var(--color-accent);
  color: #fff;
  text-align: center;
  padding: 4rem 1.5rem;
}

.cta-banner h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.cta-banner p {
  color: rgba(255,255,255,.8);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner .btn-gold {
  font-size: 1.05rem;
  padding: 1rem 2.5rem;
}

/* ============================================================
   ÜBER MICH
   ============================================================ */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.about__img {
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 3/4;
}

.about__quote {
  border-left: 4px solid var(--color-secondary);
  padding-left: 1.25rem;
  font-style: italic;
  color: var(--color-text-light);
  margin: 1.5rem 0;
  font-size: 1.05rem;
}

/* ============================================================
   KONTAKTFORMULAR
   ============================================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.contact-info__item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.contact-info__icon {
  width: 44px;
  height: 44px;
  background: var(--color-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

/* WPForms styling override */
.wpforms-form .wpforms-field input,
.wpforms-form .wpforms-field textarea,
.wpforms-form .wpforms-field select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  font-family: var(--font-body);
  font-size: .95rem;
  width: 100%;
  transition: border-color .2s;
}
.wpforms-form .wpforms-field input:focus,
.wpforms-form .wpforms-field textarea:focus {
  border-color: var(--color-secondary);
  outline: none;
}
.wpforms-form .wpforms-submit-container button {
  background: var(--color-primary) !important;
  border-radius: var(--radius) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  padding: .875rem 2rem !important;
  transition: background .2s !important;
}
.wpforms-form .wpforms-submit-container button:hover {
  background: var(--color-secondary) !important;
}

/* ============================================================
   FAQ
   ============================================================ */

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
}

.faq-item:first-child { border-top: 1px solid var(--color-border); }

.faq-question {
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--color-secondary);
  flex-shrink: 0;
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  display: none;
  padding-top: .875rem;
  color: var(--color-text-light);
  line-height: 1.75;
}

.faq-item.open .faq-answer {
  display: block;
}

/* ============================================================
   PREISKALKULATOR
   ============================================================ */

.kalkulator-wrap {
  background: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 2.5rem;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.kalkulator-wrap h3 {
  margin-bottom: 1.5rem;
}

.kalk-field {
  margin-bottom: 1.25rem;
}

.kalk-field label {
  display: block;
  font-weight: 600;
  margin-bottom: .4rem;
  font-size: .9rem;
}

.kalk-field select,
.kalk-field input[type="number"] {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  background: #fff;
}

.kalk-result {
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-top: 1.5rem;
  display: none;
}

.kalk-result.visible { display: block; }

.kalk-result__price {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-secondary);
  font-weight: 700;
}

.kalk-result__hint {
  font-size: .8rem;
  color: rgba(255,255,255,.7);
  margin-top: .4rem;
}

.kalk-result__cta {
  margin-top: 1rem;
}

/* ============================================================
   LEISTUNGEN DETAIL
   ============================================================ */

.leistung-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  margin-bottom: 5rem;
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--color-border);
}

.leistung-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.leistung-block--reverse {
  direction: rtl;
}
.leistung-block--reverse > * {
  direction: ltr;
}

@media (max-width: 768px) {
  .leistung-block, .leistung-block--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
}

.leistung-block img {
  border-radius: 8px;
  box-shadow: var(--shadow);
  width: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.leistung-block ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
}

.leistung-block ul li {
  padding: .4rem 0 .4rem 1.5rem;
  position: relative;
  color: var(--color-text-light);
}

.leistung-block ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-secondary);
  font-weight: 700;
}

/* ============================================================
   LOKALE SEO SEITEN
   ============================================================ */

.local-hero {
  background: var(--color-accent);
  color: #fff;
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.local-hero h1 {
  color: #fff;
  margin-bottom: 1rem;
}

.local-hero p {
  color: rgba(255,255,255,.8);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

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

.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,.75);
  padding: 3rem 0 1.5rem;
}

.site-footer a {
  color: rgba(255,255,255,.75);
  transition: color .2s;
}
.site-footer a:hover {
  color: var(--color-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .8rem;
}

/* ============================================================
   BADGES & TRUST ICONS
   ============================================================ */

.trust-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 30px;
  padding: .4rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text);
}

.trust-badge__icon {
  color: var(--color-secondary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
  .hero {
    min-height: 100svh;
  }
  .hero__actions {
    flex-direction: column;
  }
  .trust-bar__number {
    font-size: 2rem;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* Kadence-spezifische Overrides */
.kb-theme-header-wrap,
.wp-site-blocks > header {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ============================================================
   KADENCE LAYOUT FIXES
   ============================================================ */

/* 1. Hide Kadence page title / entry-hero section */
.entry-hero,
.page-hero-section,
.entry-hero-layout-standard,
.inner-title,
.title-align-default,
.page .entry-header,
.site-above-header-wrap,
.page-title-above-content,
.kadence-page-title-layout-normal,
.entry-content-wrap > .entry-header,
.wp-site-blocks .page .wp-block-post-title {
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* 2. Remove the 80px margin-top Kadence adds on .content-area after hiding the title */
.content-area,
.page .content-area {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* 3. Remove top padding from first block (after hidden title) */
.page .entry-content {
  padding-top: 0 !important;
}
.page .entry-content > *:first-child,
.page .entry-content > .wp-block-group:first-child {
  margin-top: 0 !important;
}

/* 3. Full-width breakout for hero/banner blocks inside Kadence container */
.page .entry-content > .wp-block-group.hero,
.page .entry-content > .wp-block-group.trust-bar,
.page .entry-content > .wp-block-group.cta-banner,
.page .entry-content > .wp-block-group.local-hero,
.page .entry-content > .wp-block-group.section,
.page .entry-content > .wp-block-group.section--muted,
.home .entry-content > .wp-block-group,
/* Kadence row layout wrapper full-width */
.page .entry-content .kb-row-layout-id {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
  width: 100vw;
}

/* 4. Remove default WP block margin-bottom gaps between sections */
.wp-block-group.hero,
.wp-block-group.trust-bar,
.wp-block-group.section,
.wp-block-group.section--muted,
.wp-block-group.cta-banner,
.wp-block-group.local-hero {
  margin-bottom: 0 !important;
}

/* 5. Trust-badges in dark contexts (hero, local-hero) → lighter styling */
.hero .trust-badge,
.local-hero .trust-badge {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
  color: #fff;
}

/* 6. Tighten section-header bottom margin */
.section-header {
  margin-bottom: 2.5rem;
}

/* 7. Leistung-block spacing tightened */
.leistung-block {
  margin-bottom: 4rem;
  padding-bottom: 4rem;
}

/* 8. Gallery grid tighter gap */
.gallery-grid {
  gap: .75rem;
}

/* 9. Hero content — remove extra top/bottom padding so content feels tight */
.hero .container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* 10. Kadence nav active-item highlight */
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
  color: var(--color-secondary) !important;
}

/* ============================================================
   MOBILE SPACING TIGHTENING
   ============================================================ */
@media (max-width: 768px) {
  :root { --section-gap: 3rem; }
  .hero { min-height: 65vh; }
  .cta-banner { padding: 3rem 1.5rem; }
  .leistung-block { margin-bottom: 3rem; padding-bottom: 3rem; }
  .section-header { margin-bottom: 2rem; }
}
