/*
Theme Name: Zur Alten Mühle
Theme URI: https://zuraltenmuehle.de
Author: Custom Theme
Description: Minimales Theme für Elementor. Liefert Design-System (Farben, Fonts, CSS-Variablen) – alle Seiteninhalte werden in Elementor erstellt.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: altemuehle
*/

/* =====================================================
   GOOGLE FONTS – Playfair Display + DM Sans
   ===================================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* =====================================================
   CSS-VARIABLEN – Design-System (aus Horizons-Projekt)
   ===================================================== */
:root {
  /* Farben */
  --am-background:        hsl(40, 30%, 96%);   /* warmes Creme */
  --am-foreground:        hsl(25, 30%, 20%);   /* dunkelbraun */
  --am-primary:           hsl(35, 85%, 55%);   /* Amber/Orange */
  --am-primary-fg:        hsl(0, 0%, 100%);
  --am-secondary:         hsl(140, 40%, 30%);  /* Dunkelgrün */
  --am-secondary-fg:      hsl(0, 0%, 100%);
  --am-accent:            hsl(15, 70%, 60%);   /* Terrakotta */
  --am-accent-fg:         hsl(0, 0%, 100%);
  --am-muted:             hsl(40, 20%, 90%);   /* helles Creme */
  --am-muted-fg:          hsl(25, 20%, 40%);
  --am-card:              hsl(40, 25%, 98%);
  --am-card-fg:           hsl(25, 30%, 20%);
  --am-border:            hsl(30, 20%, 75%);
  --am-ring:              hsl(35, 85%, 55%);

  /* Typografie */
  --am-font-heading:      'Playfair Display', Georgia, serif;
  --am-font-body:         'DM Sans', system-ui, sans-serif;

  /* Abstände & Radien */
  --am-radius:            0.75rem;
  --am-radius-sm:         calc(0.75rem - 2px);
  --am-radius-lg:         calc(0.75rem + 4px);
  --am-max-width:         1280px;
  --am-section-padding:   96px;

  /* Schatten */
  --am-shadow-sm:         0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --am-shadow-md:         0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.04);
  --am-shadow-lg:         0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
}

/* =====================================================
   RESET & BASIS-STYLES
   ===================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--am-font-body);
  background-color: var(--am-background);
  color: var(--am-foreground);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--am-font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--am-foreground);
  text-wrap: balance;
}

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

a {
  color: var(--am-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--am-accent);
}

/* =====================================================
   ELEMENTOR RESET – Elementor braucht sauberen Body
   ===================================================== */
.elementor-section-wrap,
.elementor-section {
  overflow: visible;
}

/* Verhindert dass WordPress-Theme-Margins Elementor stören */
.site-content,
.entry-content,
.page-content {
  margin: 0;
  padding: 0;
}

/* =====================================================
   ELEMENTOR GLOBAL CLASSES
   Hier kannst du Elementor Global Classes definieren
   (Einstellungen → Style → Custom CSS)
   Diese CSS-Klassen kannst du in Elementor direkt nutzen
   ===================================================== */

/* --- Hintergrundfarben --- */
.bg-primary    { background-color: var(--am-primary) !important; }
.bg-secondary  { background-color: var(--am-secondary) !important; }
.bg-accent     { background-color: var(--am-accent) !important; }
.bg-muted      { background-color: var(--am-muted) !important; }
.bg-card       { background-color: var(--am-card) !important; }
.bg-white      { background-color: #ffffff !important; }

/* --- Textfarben --- */
.text-primary   { color: var(--am-primary) !important; }
.text-secondary { color: var(--am-secondary) !important; }
.text-accent    { color: var(--am-accent) !important; }
.text-muted     { color: var(--am-muted-fg) !important; }
.text-white     { color: #ffffff !important; }
.text-foreground{ color: var(--am-foreground) !important; }

/* --- Radien --- */
.rounded        { border-radius: var(--am-radius) !important; }
.rounded-sm     { border-radius: var(--am-radius-sm) !important; }
.rounded-lg     { border-radius: var(--am-radius-lg) !important; }
.rounded-xl     { border-radius: 1rem !important; }
.rounded-2xl    { border-radius: 1.5rem !important; }
.rounded-full   { border-radius: 9999px !important; }

/* --- Schatten --- */
.shadow-sm { box-shadow: var(--am-shadow-sm) !important; }
.shadow-md { box-shadow: var(--am-shadow-md) !important; }
.shadow-lg { box-shadow: var(--am-shadow-lg) !important; }

/* --- Typografie-Helfer --- */
.font-heading { font-family: var(--am-font-heading) !important; }
.font-body    { font-family: var(--am-font-body) !important; }
.tracking-tight { letter-spacing: -0.02em !important; }

/* =====================================================
   SECTION-STYLES – für Elementor-Sektionen
   ===================================================== */

/* Standard-Sektion Padding */
.section-padding {
  padding-top: var(--am-section-padding);
  padding-bottom: var(--am-section-padding);
}

.section-padding-sm {
  padding-top: calc(var(--am-section-padding) / 2);
  padding-bottom: calc(var(--am-section-padding) / 2);
}

/* Container-Breite */
.container-wide {
  max-width: var(--am-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* =====================================================
   HERO SECTION STYLES
   ===================================================== */
.am-hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.am-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.70),
    rgba(0,0,0,0.50),
    rgba(0,0,0,0.70)
  );
  z-index: 1;
}

.am-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 1.5rem;
}

.am-hero__title {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  color: #ffffff;
  font-family: var(--am-font-heading);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.am-hero__subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: rgba(255,255,255,0.90);
  font-family: var(--am-font-body);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* =====================================================
   BUTTON STYLES
   ===================================================== */
.am-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--am-font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--am-radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
}

.am-btn:active { transform: scale(0.98); }

.am-btn-primary {
  background-color: var(--am-primary);
  color: var(--am-primary-fg);
}
.am-btn-primary:hover {
  filter: brightness(1.1);
  color: var(--am-primary-fg);
}

.am-btn-secondary {
  background-color: var(--am-secondary);
  color: var(--am-secondary-fg);
}
.am-btn-secondary:hover {
  filter: brightness(1.1);
  color: var(--am-secondary-fg);
}

.am-btn-outline {
  background-color: transparent;
  color: var(--am-primary);
  border: 2px solid var(--am-primary);
}
.am-btn-outline:hover {
  background-color: var(--am-primary);
  color: var(--am-primary-fg);
}

.am-btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

/* =====================================================
   CARD STYLES
   ===================================================== */
.am-card {
  background-color: var(--am-card);
  border-radius: var(--am-radius-lg);
  box-shadow: var(--am-shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.am-card:hover {
  box-shadow: var(--am-shadow-lg);
  transform: translateY(-4px);
}

.am-card__body {
  padding: 1.5rem;
}

.am-card__title {
  font-family: var(--am-font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--am-foreground);
  margin-bottom: 0.5rem;
}

.am-card__text {
  color: var(--am-muted-fg);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* Karte mit Ikonen-Badge */
.am-icon-badge {
  width: 3rem;
  height: 3rem;
  background-color: color-mix(in srgb, var(--am-primary) 15%, transparent);
  border-radius: var(--am-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

/* =====================================================
   GETRÄNKE-KARTE – linke Border-Linie
   ===================================================== */
.am-drink-item {
  border-left: 3px solid var(--am-primary);
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.am-drink-item__name {
  font-weight: 600;
  color: var(--am-foreground);
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}

.am-drink-item__desc {
  font-size: 0.875rem;
  color: var(--am-muted-fg);
  line-height: 1.5;
}

.am-drink-item--accent  { border-color: var(--am-accent); }
.am-drink-item--secondary { border-color: var(--am-secondary); }

/* =====================================================
   GALERIE
   ===================================================== */
.am-gallery-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--am-radius-lg);
  transition: transform 0.5s ease;
  display: block;
}

.am-gallery-img:hover {
  transform: scale(1.05);
}

.am-gallery-wrap {
  overflow: hidden;
  border-radius: var(--am-radius-lg);
  box-shadow: var(--am-shadow-md);
}

/* =====================================================
   KONTAKT & ÖFFNUNGSZEITEN
   ===================================================== */
.am-info-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.am-info-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-color: color-mix(in srgb, var(--am-primary) 15%, transparent);
  border-radius: var(--am-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--am-primary);
}

/* =====================================================
   FAQ / AKKORDEON
   ===================================================== */
.am-faq-item {
  background-color: var(--am-card);
  border-radius: var(--am-radius-lg);
  box-shadow: var(--am-shadow-sm);
  margin-bottom: 1rem;
  overflow: hidden;
  border: none;
}

/* =====================================================
   HEADER STYLES (für wp-nav-menus falls genutzt)
   ===================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background-color: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--am-shadow-md);
}

.site-header.transparent {
  background-color: transparent;
}

.site-header__inner {
  max-width: var(--am-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.site-header__logo-mark {
  width: 3rem;
  height: 3rem;
  background-color: var(--am-primary);
  border-radius: var(--am-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--am-font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--am-primary-fg);
  flex-shrink: 0;
}

.site-header__logo-text {
  font-family: var(--am-font-body);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--am-foreground);
  letter-spacing: -0.01em;
}

.site-header__logo-sub {
  font-size: 0.75rem;
  color: var(--am-muted-fg);
  display: block;
}

/* =====================================================
   FOOTER STYLES
   ===================================================== */
.site-footer {
  background-color: var(--am-secondary);
  color: var(--am-secondary-fg);
}

.site-footer__inner {
  max-width: var(--am-max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}

/* =====================================================
   ELEMENTOR SPEZIFISCH – Override für Elementor-Elemente
   damit das Design-System greift
   ===================================================== */

/* Elementor Button-Override – damit Elementor unsere Farben nutzt */
.elementor-button.am-btn-primary {
  background-color: var(--am-primary) !important;
  color: #fff !important;
  border-radius: var(--am-radius) !important;
}

/* Heading Override */
.elementor-heading-title {
  font-family: var(--am-font-heading) !important;
  letter-spacing: -0.02em;
}

/* Widget-Abstände normalisieren */
.elementor-widget:not(:last-child) {
  margin-bottom: 0;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceY {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease both;
}

.animate-bounce {
  animation: bounceY 1.5s ease-in-out infinite;
}

/* Scroll-Trigger Klassen (für Elementor Motion Effects oder AOS) */
[data-aos="fade-up"] { /* kompatibel mit AOS.js falls genutzt */ }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
  :root {
    --am-section-padding: 72px;
  }
}

@media (max-width: 768px) {
  :root {
    --am-section-padding: 56px;
  }

  .am-hero__title {
    font-size: 2.5rem;
  }

  .am-gallery-img {
    height: 240px;
  }
}

@media (max-width: 480px) {
  :root {
    --am-section-padding: 48px;
  }
}

/* =====================================================
   WORDPRESS-SPEZIFISCHE KORREKTUREN
   ===================================================== */

/* Admin Bar Offset */
body.admin-bar .site-header {
  top: 32px;
}

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

/* Elementor Full-Width Template – kein unnötiges Padding */
.elementor-template-full-width .site-content,
.page-template-elementor_canvas .site-content {
  padding: 0 !important;
  margin: 0 !important;
}

/* Elementor Container max-width alignment */
.e-con {
  --container-max-width: var(--am-max-width);
}
