/*
Theme Name: [haito] base
Theme URI: https://haito.ch/sites
Author: [haito] builder, Basel
Description: Basis-Theme für Websites aus dem [haito] builder. Gestaltung pro Kunde im Kind-Theme. Keine Cookies, keine Tracker, Schriften lokal.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: haito-base
*/

/* Grundlegende Hilfsklassen. Farben, Schriften und Abstände kommen aus theme.json. */

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { -webkit-font-smoothing: antialiased; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--wp--preset--color--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 1000;
  padding: 10px 16px; background: var(--wp--preset--color--ink); color: var(--wp--preset--color--base);
}
.skip-link:focus { left: 8px; }

/* Kopfzeile: fester Rand, Logo links, Menü rechts */
.haito-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.haito-header .wp-block-site-logo img { max-height: 56px; width: auto; }

/* Rote/farbige Trennbereiche: Text immer hell */
.haito-band { color: var(--wp--preset--color--base); }
.haito-band a { color: inherit; }
.haito-band h2, .haito-band h3 { color: inherit; }

/* Karten */
.haito-card {
  background: var(--wp--preset--color--base);
  border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--haito-radius, 16px);
  padding: var(--wp--preset--spacing--40);
  height: 100%;
}
.haito-card h3 { margin-top: 0; }

/* Icon vor Titel */
.haito-icon { width: 40px; height: 40px; color: var(--wp--preset--color--accent); flex: none; }
.haito-icon svg { width: 100%; height: 100%; }

/* Öffnungszeiten als saubere Zeilen */
.haito-hours { list-style: none; padding: 0; margin: 0; }
.haito-hours li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.haito-hours li:last-child { border-bottom: none; }

/* Team-Liste */
.haito-team { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: var(--wp--preset--spacing--50); }
.haito-team li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--wp--preset--color--line); }
@media (max-width: 700px) { .haito-team { columns: 1; } }

/* Platzhalterbild */
.haito-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, var(--wp--preset--color--contrast-light) 0 12px, var(--wp--preset--color--line) 12px 14px);
  color: var(--wp--preset--color--contrast);
  border-radius: var(--haito-radius, 16px);
  min-height: 240px; font-size: var(--wp--preset--font-size--small); text-align: center; padding: 24px;
}

/* Fusszeile */
.haito-footer { border-top: 1px solid var(--wp--preset--color--line); font-size: var(--wp--preset--font-size--small); }

/* Druck */
@media print { .haito-header nav, .haito-footer nav { display: none; } }

/* Lange Wörter in schmalen Karten trennen */
h1, h2, h3 { hyphens: auto; overflow-wrap: anywhere; }
.haito-hours li { flex-wrap: wrap; }
.haito-hours li strong { flex: 1 1 45%; }
.haito-hours li span { flex: 1 1 50%; text-align: right; }
