/*
Theme Name: AfD Coesfeld - Elementor Child Theme
Description: Child-Theme von Hello Elementor. Uebernimmt die Gestaltung von afd-kreis-coesfeld.de (Child-Theme "scharf gestellt") und enthaelt Ersatzbausteine fuer Elementor-Pro-Funktionen (Kopf/Fuss, Menue, Beitragsliste, Galerie, Pop-ups), solange Elementor Pro nicht installiert ist.
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
*/

/* Schrift "Bitter": Im Original sind die Bitter-Schriftdateien defekt, Besucher sehen
   die serifenlose Ersatzschrift. Diese leere Schriftdefinition bildet das nach (auch
   dann, wenn Bitter lokal installiert ist). Fuer echtes Bitter: Block entfernen und
   in functions.php 'bitter' wieder laden. */
@font-face { font-family: "Bitter"; src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans"); font-weight: 100 500; }
@font-face { font-family: "Bitter"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"), local("Helvetica Bold"), local("Liberation Sans Bold"); font-weight: 600 800; }
@font-face { font-family: "Bitter"; src: local("Arial Black"), local("Arial-Black"), local("Helvetica Neue Black"), local("Arial Bold"), local("Liberation Sans Bold"); font-weight: 900; }
/* Gleiches gilt im Original fuer "Lato". */
@font-face { font-family: "Lato"; src: local("Arial"), local("ArialMT"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans"); font-weight: 100 500; }
@font-face { font-family: "Lato"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"), local("Helvetica Bold"), local("Liberation Sans Bold"); font-weight: 600 800; }
@font-face { font-family: "Lato"; src: local("Arial Black"), local("Arial-Black"), local("Helvetica Neue Black"), local("Arial Bold"), local("Liberation Sans Bold"); font-weight: 900; }

/* --- Ersatz Elementor-Pro: Galerie --- */
.afd-gallery { display: grid; grid-template-columns: repeat(var(--afd-gal-cols, 4), 1fr); gap: 10px; }
.afd-gallery a { display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.afd-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.afd-gallery a:hover img { transform: scale(1.05); }
@media (max-width: 767px) { .afd-gallery { grid-template-columns: repeat(2, 1fr); } }

/* --- Ersatz Elementor-Pro: Navigationsmenue --- */
.elementor-nav-menu--main .elementor-nav-menu li { position: relative; }
.elementor-nav-menu--main .elementor-nav-menu li:hover > ul.sub-menu,
.elementor-nav-menu--main .elementor-nav-menu li.afd-open > ul.sub-menu { display: block; }
.elementor-nav-menu--main ul.sub-menu { position: absolute; top: 100%; left: 0; min-width: 14em; z-index: 9999; background: #fff; }
.elementor-nav-menu--dropdown ul.sub-menu { position: static; display: none; }
.elementor-nav-menu--dropdown li.afd-open > ul.sub-menu { display: block; }

/* --- Ersatz Elementor-Pro: Pop-ups --- */
.afd-popup { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; padding: 20px; }
.afd-popup.afd-popup--open { display: flex; }
.afd-popup__overlay { position: absolute; inset: 0; }
.afd-popup__box { position: relative; max-width: 100%; max-height: 90vh; overflow: auto; background: #fff; }
.afd-popup__close { position: absolute; top: 8px; right: 12px; background: none !important; border: 0; font-size: 28px; line-height: 1; color: #333 !important; cursor: pointer; z-index: 2; padding: 0; }

/* --- Kontaktformular (Contact Form 7 statt Gravity Forms) --- */
/* Masse wie Gravity Forms im Original */
.wpcf7-form { color: #333; font-size: 16px; }
.wpcf7-form label { display: block; margin: 0 0 16px; font-weight: 700; font-size: 16px; line-height: 1; color: #333; }
.wpcf7-form .afd-req { font-weight: 400; font-size: 13px; color: #d20a11; padding-left: 4px; }
.wpcf7-form .afd-form-row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.wpcf7-form input[type="text"], .wpcf7-form input[type="email"], .wpcf7-form select, .wpcf7-form textarea {
	display: block; width: 100%; margin-top: 8px; padding: 10px; font-size: 15px; font-weight: 400; line-height: 1.5;
	color: #000; background: #fff; border: 1px solid #e0e0e0; border-radius: 5px; box-sizing: border-box; }
.wpcf7-form input[type="text"], .wpcf7-form input[type="email"] { height: 45px; }
.wpcf7-form select { height: 44px; }
.wpcf7-form textarea { height: 192px; }
.wpcf7-form label:has(textarea) { margin-bottom: 82px; } /* Abstand wie im Original-Formular */
.wpcf7-form .afd-form-note { font-size: 16px; line-height: 1.5; margin: 0 0 16px; }
.wpcf7-form .wpcf7-submit { padding: 8px 16px; font-size: 18px; border-radius: 3px; cursor: pointer; margin-top: 8px; }
.wpcf7-form .wpcf7-spinner { vertical-align: middle; }
@media (max-width: 767px) { .wpcf7-form .afd-form-row--2 { grid-template-columns: 1fr; } }

/* Kopfzeilen-Abschnitt "Sticky" wie im Original (siehe pro-fallback.js) */
.afd-sticky--active { position: fixed !important; top: 0; left: 0; right: 0; width: 100% !important; z-index: 1000; }
body.admin-bar .afd-sticky--active { top: 32px; }
@media (max-width: 782px) { body.admin-bar .afd-sticky--active { top: 46px; } }
