/*
Theme Name:        Kosmetik Winkler
Description:       Onepager-Theme für Kosmetik Winkler (Linz), abgestimmt auf den SiteOrigin Page Builder. Zeilen werden über CSS-Klassen gestaltet (kw-row, kw-info, kw-band, kw-parallax, kw-gallery).
Version:           1.0.0
Requires at least: 6.0
Requires PHP:      7.4
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       kosmetik-winkler
*/

/* =========================================================
   1. Variablen & Grundlagen
   ========================================================= */
:root {
  --purple:      #7e6b87;
  --purple-dark: #745f7e;
  --brown:       #897761;
  --footer:      #635655;
  --socket:      #524a4a;
  --heading:     #919191;
  --text:        #444444;
  --line:        #e1e1e1;
  --white:       #ffffff;
  --container:   1210px;
  --gutter:      50px;
  --header-h:    88px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: Arial, Helvetica, Verdana, sans-serif;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
}

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

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

p { margin: 0 0 1em; }

h4 {
  margin: 22px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
}
h4:first-child { margin-top: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.skip-link:focus {
  clip: auto; width: auto; height: auto;
  top: 8px; left: 8px; z-index: 1000;
  padding: 10px 16px;
  background: var(--white);
}

/* WordPress-Standardklassen */
.alignleft  { float: left;  margin: 0 20px 10px 0; }
.alignright { float: right; margin: 0 0 10px 20px; }
.aligncenter { display: block; margin: 0 auto 10px; }
.wp-caption-text { font-size: 11px; color: var(--heading); }

/* =========================================================
   2. Header & Navigation
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}
.custom-logo-link { display: block; }
.custom-logo { display: block; height: 52px; width: auto; }

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  height: var(--header-h);
}
.main-nav li { display: flex; }
.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 13px;
  font-weight: 600;
  color: var(--purple);
  border-left: 1px solid var(--line);
}
.main-nav li:last-child a { border-right: 1px solid var(--line); }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--purple);
  transform: scaleX(0);
  transition: transform .25s;
}
.main-nav a:hover::after,
.main-nav a.active::after,
.main-nav .current-menu-item > a::after { transform: scaleX(1); }
.main-nav a.active { color: #333; }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: var(--purple);
  transition: transform .25s, opacity .25s;
}

/* =========================================================
   3. Bausteine (gelten für Page Builder UND normale Seiten)
   ========================================================= */
.section { padding: 50px 0 60px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 30px;
  font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--heading);
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.band { height: 300px; }
.band--title { height: 60px; }
.band--purple { background: var(--purple); }

/* Zitat */
.kw-quote {
  margin: 0;
  padding: 0 0 0 20px;
  border-left: 7px solid var(--purple);
  font-size: 14px;
  font-style: italic;
  line-height: 1.75;
}
.kw-quote cite {
  display: block;
  margin-top: 15px;
  font-size: 11px;
  font-style: normal;
  color: var(--heading);
}

/* Leistungen */
.service-cat {
  margin: 0 0 20px;
  font-family: "Lato", sans-serif;
  font-size: 26px;
  font-weight: 300;
  font-style: italic;
  color: var(--purple);
}
.service + .service-cat { margin-top: 40px; }
.service {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.service:last-child { border-bottom: 0; margin-bottom: 0; }
.service h4 { margin-top: 0; }
.price { margin: 0; font-weight: 700; color: var(--purple); }
.highlight { font-weight: 700; font-style: italic; color: var(--purple); }

/* Buchtipp */
.book { display: flex; gap: 25px; align-items: flex-start; }
.book img { width: 137px; flex-shrink: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }

/* Kontakt */
.contact-data p { margin: 0 0 12px; }
.fb { display: inline-flex; color: inherit; margin-top: 6px; }
.fb:hover { color: var(--purple); }

.map {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 260px;
  padding: 30px;
  text-align: center;
  background: #f8f8f8;
  border: 1px solid var(--line);
}
.map.is-loaded { padding: 0; }
.map iframe { width: 100%; min-height: 320px; border: 0; }

.btn {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 40px;
  border: 0;
  border-radius: 3px;
  background: var(--purple);
  color: var(--white);
  font: 700 13px Arial, sans-serif;
  cursor: pointer;
  transition: background .2s;
}
.btn:hover { background: var(--purple-dark); color: var(--white); }

/* Galerie */
.gallery { position: relative; overflow: hidden; }
.gallery-track {
  display: flex;
  gap: 1px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img {
  flex: 0 0 auto;
  display: block;
  height: 300px;
  width: auto;
  max-width: none;
  object-fit: cover;
  scroll-snap-align: start;
  transition: opacity .3s;
}
.gallery-track img:hover { opacity: .85; }
.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 60px;
  border: 0;
  background: rgba(0, 0, 0, .3);
  color: var(--white);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s, background .2s;
}
.gallery:hover .gallery-btn { opacity: 1; }
.gallery-btn:hover { background: rgba(0, 0, 0, .55); }
.gallery-btn.prev { left: 0; }
.gallery-btn.next { right: 0; }

/* =========================================================
   4. SiteOrigin Page Builder – Zeilen-Klassen
   (Zeile bearbeiten → Design → Attribute → „Zeilen-Klasse“)
   ========================================================= */
.kw-pb .site-main .panel-layout .panel-grid { margin-bottom: 0 !important; }
.kw-pb .so-panel:last-child { margin-bottom: 0; }

/* Inhaltszeile mit Containerbreite */
.kw-row {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 50px var(--gutter) 60px;
  background: var(--white);
}
.kw-row--head { padding-bottom: 0; }
.kw-row--head .section-title { margin-bottom: 30px; }
.kw-row--body { padding-top: 0; }

/* Volle Breite, Inhalt in Containerbreite (Info-Leiste) */
.kw-info {
  padding: 50px max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  background: var(--brown);
  color: var(--white);
}
.kw-info h4 {
  margin: 0 0 8px;
  font-family: "Lato", sans-serif;
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  opacity: .85;
}
.kw-info p { margin: 0; }
.kw-info a { color: var(--white); font-weight: 700; }

/* Farbbänder */
.kw-band { min-height: 300px; }
.kw-band--title { min-height: 60px; }
.kw-band--purple { background: var(--purple); }
.kw-band--purple-dark { background: var(--purple-dark); }
.kw-band--brown { background: var(--brown); }

/* Parallax-Bild (Bild über Zeilen-Hintergrund überschreibbar) */
.kw-parallax {
  min-height: 768px;
  background: url("assets/img/parallax.jpg") center / cover no-repeat fixed;
}

/* Galerie volle Breite */
.kw-gallery { padding: 0; }

/* Bilder in Spalten */
.kw-row .panel-grid-cell img,
.kw-fallback img { display: block; }
.kw-row .textwidget img.kw-cover { width: 100%; }
.kw-brands { max-width: 445px; margin-top: 20px; }

/* Fallback-HTML (wenn der Page Builder deaktiviert ist) */
.kw-fallback .kw-row { display: flex; gap: var(--gutter); }
.kw-fallback .kw-row > .kw-cell { flex: 1; }
.kw-fallback .kw-row > .kw-cell--wide { flex: 2; }

/* =========================================================
   5. Unterseiten
   ========================================================= */
.page-content { max-width: 870px; }
.page-content h2 {
  margin: 35px 0 10px;
  font-family: "Lato", sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--purple);
}
.entry { margin-bottom: 40px; }
.entry-title { font-family: "Lato", sans-serif; font-weight: 400; font-size: 20px; margin: 0 0 4px; }
.entry-meta { color: var(--heading); font-size: 11px; }

/* =========================================================
   6. Footer
   ========================================================= */
.site-footer {
  padding: 50px 0 40px;
  background: var(--footer);
  color: #eee;
  font-size: 12px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.site-footer h3 {
  margin: 0 0 15px;
  font-family: "Lato", sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #c9bfcf;
}
.site-footer a,
.site-footer .fb { color: var(--white); }

.socket {
  padding: 15px 0;
  background: var(--socket);
  color: #eee;
  font-size: 11px;
}

.to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 2px;
  background: rgba(0, 0, 0, .3);
  color: var(--white);
  font-size: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.to-top.visible { opacity: 1; pointer-events: auto; }
.to-top:hover { color: var(--white); background: rgba(0, 0, 0, .5); }

/* =========================================================
   7. Responsive
   ========================================================= */
@media (max-width: 989px) {
  :root { --gutter: 25px; }
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    transition: max-height .3s ease;
  }
  .main-nav.open { max-height: 480px; }
  .main-nav ul { flex-direction: column; height: auto; }
  .main-nav a {
    padding: 14px 25px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .main-nav li:last-child a { border-right: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .kw-band { min-height: 160px; }
  .kw-parallax { min-height: 420px; background-attachment: scroll; }
}

@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (max-width: 767px) {
  :root { --gutter: 16px; --header-h: 70px; }
  .custom-logo { height: 42px; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-track img { height: 200px; }
  .gallery-btn { opacity: 1; }
  .kw-band { min-height: 100px; }
  .kw-band--title, .band--title { min-height: 30px; height: 30px; }
  .kw-parallax { min-height: 280px; }
  .book { flex-direction: column; }
  .to-top { right: 16px; bottom: 16px; }
  .kw-fallback .kw-row { flex-direction: column; }
}
