/**
 * Footer Burger Menu – Responsive Styles
 *
 * Footer-Layout aus zwei Teilen:
 *   Links:  Linkliste / Burger-Menü  (.site-footer-section)
 *   Rechts: Copyright                 (.site-footer-section)
 *
 * Kadence nutzt CSS Grid (.site-top-footer-inner-wrap, 2 Spalten).
 * Dieses Stylesheet steuert das Burger-Verhalten innerhalb des Grids.
 *
 * Desktop (>=1025px):         Grid normal, alle Links sichtbar, kein Burger.
 * Mobile  (<=1024px) zu:      Burger links, Copyright rechts (Grid-Row).
 * Mobile  (<=1024px) offen:   Burger-Section spannt alle Spalten,
 *                             Copyright rutscht in nächste Grid-Row.
 */

/* --------------------------------------------------------------------------
   1. Basis: Burger-Button standardmässig ausblenden
   -------------------------------------------------------------------------- */

.barmbini-footer-burger-toggle {
	display: none;
	align-items: center;
	justify-content: flex-start;
	gap: 0.5rem;
	padding: 0.25rem 0;
	font-size: 1rem;
	font-weight: 600;
	color: var(--global-palette3, #333);
	background-color: transparent;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	line-height: 1.4;
}

.barmbini-footer-burger-toggle:hover {
	background-color: transparent;
}

.barmbini-footer-burger-toggle:focus-visible {
	outline: 2px solid var(--global-palette1, #2271b1);
	outline-offset: 2px;
}

/* Burger-Icon (drei Striche) */
.barmbini-footer-burger-icon {
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: 24px;
	height: 18px;
	flex-shrink: 0;
}

.barmbini-footer-burger-icon span {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--global-palette3, #333);
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Animation: drei Striche --> X */
.barmbini-footer-burger-toggle[aria-expanded="true"] .barmbini-footer-burger-icon span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.barmbini-footer-burger-toggle[aria-expanded="true"] .barmbini-footer-burger-icon span:nth-child(2) {
	opacity: 0;
}

.barmbini-footer-burger-toggle[aria-expanded="true"] .barmbini-footer-burger-icon span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   2. Container und Menü-Liste
   -------------------------------------------------------------------------- */

.barmbini-footer-burger-container {
	position: relative;
}

.barmbini-footer-burger-container .menu {
	transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

/* --------------------------------------------------------------------------
   3. Desktop (>=1025px): Grid normal, Links sichtbar, kein Burger
   -------------------------------------------------------------------------- */

@media screen and (min-width: 1025px) {
	/* Grid-Zellen vertikal zentrieren */
	.site-top-footer-inner-wrap,
	.site-bottom-footer-inner-wrap {
		align-items: center;
	}

	/* Beide Footer-Sections intern zentrieren */
	.site-top-footer-inner-wrap > .site-footer-section {
		display: flex;
		align-items: center;
	}

	.barmbini-footer-burger-toggle {
		display: none;
	}

	.barmbini-footer-burger-container .menu {
		display: flex;
		max-height: none;
		opacity: 1;
		overflow: visible;
		gap: 1.5rem;
	}

	.barmbini-footer-burger-container .menu li {
		list-style: none;
	}

	.barmbini-footer-burger-container .menu li a {
		padding: 0;
		border-bottom: none;
	}
}

/* --------------------------------------------------------------------------
   4. Tablet / Mobile (<=1024px)
   -------------------------------------------------------------------------- */

@media screen and (max-width: 1024px) {

	/* ---- 4a. Grid auf 2 Spalten zwingen: Burger | Copyright ---- */
	.site-top-footer-inner-wrap,
	.site-bottom-footer-inner-wrap {
		grid-template-columns: 50px auto !important;
		align-items: center;
	}

	/* ---- Desktop: Vertikalzentrierung NUR für Top-Footer ---- */
	.site-top-footer-inner-wrap > .site-footer-section {
		display: flex;
		align-items: center;
	}

	/* ---- 4b. Burger-Button sichtbar, linksbündig ---- */
	.barmbini-footer-burger-toggle {
		display: flex;
	}

	/* ---- 4c. Geschlossen: Menü unsichtbar, Grid bleibt zweispaltig ---- */
	.barmbini-footer-burger-container:not(.is-open) .menu {
		display: block;
		max-height: 0;
		overflow: hidden;
		opacity: 0;
		padding: 0;
		margin: 0;
		list-style: none;
	}

	/* ---- 4d. Geöffnet: Menü sichtbar, mit Scroll bei Überlauf ---- */
	.barmbini-footer-burger-container.is-open .menu {
		max-height: 220px;
		overflow-y: auto;
		opacity: 1;
		padding: 0.25rem 0 0 0;
	}

	/* ---- 4e. Geöffnet: Grid auf 1 Spalte (alle Sections volle Breite) ---- */
	.barmbini-footer-grid-open {
		grid-template-columns: 1fr !important;
	}

	/* ---- 4f. Menüpunkte vertikal stapeln ---- */
	.barmbini-footer-burger-container .menu li {
		display: block;
		width: 100%;
	}

	.barmbini-footer-burger-container .menu li a {
		display: block;
		padding: 0.4rem 0.5rem;
		font-size: 0.9rem;
		border-bottom: 1px solid var(--global-palette7, #e8e2d6);
		color: var(--global-palette3, #333);
		text-decoration: none;
	}

	.barmbini-footer-burger-container .menu li a:hover {
		color: var(--global-palette1, #000);
	}

	.barmbini-footer-burger-container .menu li:last-child a {
		border-bottom: none;
	}
}