/*
Theme Name: Atelier Hasenclever
Theme URI: https://tanja-hasenclever.de
Author: Ingo Hasenclever
Description: Künstlerportfolio-Theme für Tanja Hasenclever — Tierporträts in Pastell. Block-Theme auf Basis von WordPress 6.x, eigene CI (mauve / pastell-grün), Anton + Lora self-hosted.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: atelier-hasenclever
Tags: portfolio, art, gallery, block-styles, full-site-editing, custom-colors, custom-menu, featured-images
*/

/* Theme-Basics sind in theme.json. Hier nur ergänzende Styles, die sich
   in theme.json nicht sauber ausdrücken lassen. */

/* === Globale Eleganz === */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* === Galerie-Karten — Grid + Hover === */
.wp-block-query .wp-block-post-template.is-layout-grid {
  column-gap: 2rem;
  row-gap: 3rem;
}
.werk-card {
  transition: transform .35s ease, box-shadow .35s ease;
  will-change: transform;
  min-width: 0; /* damit Grid-Item nicht über die Spalte hinauswächst */
}
.werk-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(58, 48, 51, 0.15);
}
.werk-card img {
  transition: filter .35s ease;
}
.werk-card .wp-block-post-title {
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  padding-right: 0.5rem;
  font-size: clamp(1rem, 2vw, 1.15rem) !important;
  line-height: 1.25 !important;
  letter-spacing: 0.01em !important;
}

/* === Logo im Header === */
.site-logo img {
  height: 56px;
  width: auto;
}
@media (max-width: 600px) {
  .site-logo img { height: 44px; }
}

/* === Header-Navigation: harte Farbsetzung gegen WP-Default-Vererbung === */
.site-header .wp-block-navigation a,
.site-header .wp-block-navigation .wp-block-navigation-item__label,
.site-header .wp-block-navigation .wp-block-navigation-item__content {
  color: var(--wp--preset--color--accent) !important;
  text-decoration: none !important;
}
.site-header .wp-block-navigation a:hover,
.site-header .wp-block-navigation a:focus-visible {
  color: var(--wp--preset--color--accent-soft) !important;
}
.site-header .wp-block-navigation .current-menu-item a {
  text-decoration: underline !important;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* Auf Mobile etwas kompakter */
@media (max-width: 600px) {
  .site-header .wp-block-navigation {
    font-size: 0.85rem;
  }
  .site-header .wp-block-navigation__container {
    gap: 0.75rem !important;
  }
  /* Logo kleiner auf Mobile, damit Nav daneben Platz hat */
  .site-header .site-logo img {
    height: 36px;
  }
}

/* === Footer-Links: weiß/hell auf Mauve === */
.site-footer a {
  color: var(--wp--preset--color--background) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--wp--preset--color--accent-soft) !important;
  text-decoration: underline;
}

/* === Social-Links im Footer === */
.site-footer .wp-block-social-links a {
  text-decoration: none !important;
}
.site-footer .wp-block-social-link {
  background: transparent !important;
  transition: transform .2s ease, opacity .2s ease;
}
.site-footer .wp-block-social-link:hover {
  transform: translateY(-2px);
  opacity: 0.85;
}
.site-footer .wp-block-social-link svg {
  width: 28px;
  height: 28px;
}

/* (Werk-Karten-Titel: oben bei Galerie-Karten geregelt) */

/* === Hero-Bereich === */
.hero-bereich {
  min-height: 60vh;
}

/* === Lightbox-Hint (echte Lightbox kommt via Core-Block) === */
figure.wp-block-image img {
  cursor: zoom-in;
}

/* === Preisliste (wp:table mit Klasse .preisliste) === */
.preisliste table {
  border-collapse: collapse;
  width: 100%;
  background: var(--wp--preset--color--white);
}
.preisliste thead {
  background: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--background);
}
.preisliste th {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: left;
  padding: 0.9rem 1rem;
}
.preisliste td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #d8d8d8;
}
.preisliste tr:last-child td {
  border-bottom: none;
}
.preisliste tbody tr:nth-child(even) td {
  background: #f5f3f1;
}
.preisliste td:last-child {
  white-space: nowrap;
  font-weight: 600;
}

/* === Kontakt-Formular === */
.kontakt-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.kontakt-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.kontakt-form .form-label {
  font-family: "Anton", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wp--preset--color--accent);
}
.kontakt-form input[type="text"],
.kontakt-form input[type="email"],
.kontakt-form textarea {
  font-family: "Lora", serif;
  font-size: 1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #c8c8c8;
  border-radius: 2px;
  background: var(--wp--preset--color--white);
  color: var(--wp--preset--color--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.kontakt-form input:focus,
.kontakt-form textarea:focus {
  outline: none;
  border-color: var(--wp--preset--color--accent);
  box-shadow: 0 0 0 3px rgba(130, 104, 107, 0.15);
}
.kontakt-form textarea {
  resize: vertical;
  min-height: 140px;
}
.kontakt-submit {
  align-self: flex-start;
  font-family: "Anton", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--background);
  border: none;
  border-radius: 2px;
  padding: 0.85rem 1.6rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  position: relative;
  min-width: 180px;
}
.kontakt-submit:hover:not(:disabled) {
  background: var(--wp--preset--color--accent-soft);
  color: var(--wp--preset--color--text);
}
.kontakt-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.kontakt-submit-spinner {
  display: none;
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: kontakt-spin .8s linear infinite;
}
.kontakt-submit.is-loading .kontakt-submit-spinner { display: block; }
@keyframes kontakt-spin { to { transform: rotate(360deg); } }
.kontakt-status {
  font-style: italic;
  margin-top: 0.5rem;
  min-height: 1.5em;
}
.kontakt-status.is-success { color: #2d6a4f; }
.kontakt-status.is-error   { color: #9d2929; }
.kontakt-note {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.25rem;
}

/* === FAQ-Akkordeon (wp:details als Q&A) === */
.faq-item {
  border-bottom: 1px solid #d8d8d8;
  padding: 0;
  margin: 0 0 0 0 !important;
}
.faq-item:first-of-type {
  border-top: 1px solid #d8d8d8;
}
.faq-item > summary {
  font-family: "Anton", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wp--preset--color--accent);
  cursor: pointer;
  padding: 1rem 2.5rem 1rem 0.25rem;
  position: relative;
  list-style: none;
  transition: color .15s ease;
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::marker { display: none; content: ''; }
.faq-item > summary::after {
  content: '+';
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Anton", sans-serif;
  font-size: 1.5rem;
  color: var(--wp--preset--color--accent-soft);
  transition: transform .25s ease;
  line-height: 1;
}
.faq-item[open] > summary::after {
  content: '–';
  color: var(--wp--preset--color--accent);
}
.faq-item > summary:hover {
  color: var(--wp--preset--color--accent-soft);
}
.faq-item[open] > summary {
  color: var(--wp--preset--color--accent-soft);
}
.faq-item p {
  padding: 0 0.25rem 1rem;
  margin-top: 0;
  line-height: 1.75;
}
.faq-item a {
  color: var(--wp--preset--color--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.faq-item a:hover {
  color: var(--wp--preset--color--accent-soft);
}

/* === WhatsApp-Floating-Button === */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  z-index: 9999;
  text-decoration: none !important;
  transition: transform .2s ease, box-shadow .2s ease;
  animation: whatsapp-fab-pulse 2.6s ease-in-out 1.5s 2;
}
.whatsapp-fab svg {
  width: 34px;
  height: 34px;
  display: block;
}
.whatsapp-fab:hover,
.whatsapp-fab:focus-visible {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.45);
  color: #fff !important;
  outline: none;
}
@keyframes whatsapp-fab-pulse {
  0%   { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70%  { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), 0 0 0 18px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), 0 0 0 0 rgba(37, 211, 102, 0); }
}
@media (max-width: 600px) {
  .whatsapp-fab {
    bottom: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
  }
  .whatsapp-fab svg { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-fab { animation: none; }
}

/* === Atelier-Galerie: einfaches CSS-Grid (überschreibt WP-Gallery-Flex) === */
.atelier-galerie {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 2rem !important;
  margin: 2rem 0 !important;
  padding: 0 !important;
  align-items: start !important;
}
@media (max-width: 720px) {
  .atelier-galerie {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
  }
}
@media (max-width: 480px) {
  .atelier-galerie {
    grid-template-columns: 1fr !important;
  }
}
.atelier-galerie > figure {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex: none !important;
  flex-basis: auto !important;
  break-inside: avoid;
}
.atelier-galerie > figure img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  object-fit: cover !important;
  aspect-ratio: 4 / 3 !important;
}
.atelier-galerie figcaption,
.atelier-galerie .wp-element-caption {
  position: static !important;
  background: none !important;
  color: var(--wp--preset--color--text) !important;
  font-family: "Lora", Georgia, serif !important;
  font-style: italic !important;
  font-size: 0.9rem !important;
  line-height: 1.4 !important;
  text-align: center !important;
  padding: 0.6rem 0.25rem 0 !important;
  margin: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  width: auto !important;
  inset: auto !important;
}

/* === Stimmen / Reviews === */
.stimmen-section {
  background: var(--wp--preset--color--background);
}
.stimmen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem !important;
}
@media (max-width: 720px) {
  .stimmen-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
.stimme-card {
  background: var(--wp--preset--color--white);
  padding: 2rem 2rem 1.75rem !important;
  border-left: 3px solid var(--wp--preset--color--accent-soft);
  position: relative;
  display: flex;
  flex-direction: column;
}
.stimme-card::before {
  content: "\201E";
  font-family: "Anton", Impact, sans-serif;
  font-size: 4.5rem;
  color: var(--wp--preset--color--accent-soft);
  position: absolute;
  left: 1.2rem;
  top: -0.2rem;
  line-height: 1;
  opacity: 0.7;
  pointer-events: none;
}
.stimme-zitat {
  font-family: "Lora", Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 1.25rem !important;
  padding-left: 1.5rem;
  color: var(--wp--preset--color--text);
}
.stimme-autor {
  font-family: "Anton", Impact, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  color: var(--wp--preset--color--accent);
  margin: 0 !important;
  padding-left: 1.5rem;
}

/* === Druck === */
@media print {
  .wp-block-navigation, .site-footer, .kontakt-form, .whatsapp-fab { display: none; }
  .faq-item { break-inside: avoid; }
  .faq-item summary { font-weight: bold; }
  .faq-item > summary::after { display: none; }
  .stimme-card { break-inside: avoid; }
}
