/*
Theme Name:   Ashley Child
Template:     ashley
Description:  Child theme for Ashley - custom mobile menu (hamburger) behaviour for HTL Villach department pages.
Version:      1.0.0
*/

/* Note: this file loads AFTER the parent's style.css (dependency set in functions.php, section 1),
   so rules here win over parent rules with the same specificity. */

/* Skip link: visually hidden until focused */
.skip-link:not(:focus) {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed; left: 1rem; top: 1rem; z-index: 100000;
  padding: .75rem 1.25rem;
  background: #000; color: #fff;
  outline: 3px solid #ffe000;
}

#main:focus { outline: none; }

/* H1: current breadcrumb item – parent theme uses opacity .4 (≈ 3.7:1);
   .6 meets WCAG 4.5:1 on dark (≈ 7.4:1) and light (≈ 5.7:1) backgrounds. */
ul.mil-breadcrumbs li:last-child a {
  opacity: 0.6;
}

/* S1: circle text on the home hero – parent theme uses rgba(255,255,255,.4) (≈ 3.7:1);
   .6 gives ≈ 7.4:1 on black. Hover (white) still comes from the parent theme. */
.mil-circle-text svg.mil-ct-svg text {
  fill: rgba(255, 255, 255, 0.6);
}

/* =========================================================
   Menu overlay on small screens (07.11.2026, 09.11.2026)
   The parent theme hides the right menu column (Schule,
   contact, opening hours) at <=1024px wide OR <=800px high.
   Since 09.11.2026 the right column stays visible above 1200px
   wide down to 700px high (see "Menu overlay on low desktop
   screens" below), so the small-screen layout is used at
   <=1024px wide, <=699px high, or <=1200px wide and <=800px
   high. Elements with the class htlv-menu-mobile-only are
   shown only there:
   - menu item "Schule" (Design > Menüs > Hauptmenü)
   - text widget "contact" in the menu template (Elementor 899)
   ========================================================= */

/* Elements only for small screens: menu item "Schule" (CSS class in
   Design > Menüs) and the contact widget in the menu template */
.htlv-menu-mobile-only { display: none !important; }

@media (max-width: 1024px), (max-height: 699px), (max-width: 1200px) and (max-height: 800px) {
	.mil-menu-frame li.htlv-menu-mobile-only { display: list-item !important; }
	.mil-menu-frame .elementor-widget.htlv-menu-mobile-only { display: block !important; }

	/* Overlay scrolls if the menu is taller than the screen */
	.mil-menu-frame { overflow-y: auto; -webkit-overflow-scrolling: touch; }

	/* Left column = full width, full height; contact is pushed to the bottom */
	.mil-menu-frame .mil-menu-content .e-con {
		--width: 100%;
		--padding-top: 0px;
		--padding-bottom: 0px;
		--padding-left: 0px;
		--padding-right: 0px;
	}
	.mil-menu-frame .mil-menu-content .e-con:has(> .elementor-widget-ashley-popup-menu) {
		min-height: 100vh;
		min-height: 100dvh; /* mobile browsers: visible height without address bar */
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap;
	}
	.mil-menu-frame .mil-main-menu {
		height: auto;
		justify-content: flex-start;
		align-items: flex-start;
		padding: 130px 0 40px;
	}
	.mil-menu-frame .htlv-menu-contact { margin-top: auto; }
}

/* =========================================================
   Menu overlay on low desktop screens (09.11.2026)
   Laptops such as 1512x768 or 1366x768 (above 1200px wide)
   have enough width for the right column, but the theme hides
   it at <=800px high.
   Show it again from 700px high and tighten its vertical
   spacing so "Schule" and the contact block fit.
   ========================================================= */
@media (min-width: 1201px) and (max-height: 800px) and (min-height: 700px) {
	body .mil-menu-frame .mil-menu-right-frame,
	body .mil-wrapper-popup .mil-menu-right-frame { display: flex; }

	.mil-menu-frame .mil-menu-right { padding-bottom: 40px; }
	.mil-menu-frame .mil-menu-right .mil-mb-60 { margin-bottom: 28px; }
	.mil-menu-frame .mil-menu-right > .row:last-child > [class*="col-"] { margin-bottom: 0; }
	.mil-menu-frame .mil-menu-right .mil-mb-30 { margin-bottom: 14px; }
	.mil-menu-frame .mil-menu-right > .row:first-child h6 { margin-bottom: 14px !important; }
	.mil-menu-frame .mil-menu-right .mil-menu-list li { margin-bottom: 6px; }
}

/* =========================================================
   Close button of the open menu (09.11.2026)
   The Customizer lifts the page header (header.mil-frame) to
   z-index 999 so its menu button stays clickable above content.
   The open menu overlay has z-index 9 in the theme, so the
   header's own (black) X lay on top of the overlay's white X
   and the X looked dark grey. The overlay is invisible and not
   clickable while closed, so it can sit above the header.
   Only above 1200px: below that the theme itself gives the
   header z-index 999 and the X in the header is the one used.
   ========================================================= */
@media (min-width: 1201px) {
	div.mil-menu-frame { z-index: 1000; }
}

/* Left aligned, on the page gutter line */
@media (max-width: 1200px) {
	.mil-menu-frame > .container {
		max-width: none;
		padding-left: var(--htlv-gutter, 30px);
		padding-right: var(--htlv-gutter, 30px);
	}
	.mil-menu-frame .mil-main-menu ul { align-items: flex-start !important; }
	.mil-menu-frame .mil-main-menu ul li,
	.mil-menu-frame .mil-main-menu ul li.mil-has-children ul li { text-align: left !important; }
	.mil-menu-frame .mil-main-menu ul li a { justify-content: flex-start; }
	.mil-menu-frame .mil-main-menu ul li { margin-bottom: 24px; }
	.mil-menu-frame .mil-main-menu ul li.mil-has-children ul li { margin-bottom: 2px; }
	.mil-menu-frame .mil-main-menu ul li.mil-has-children ul li:first-child { margin-top: 16px; }
	.mil-menu-frame .mil-main-menu ul li.mil-has-children ul li a { padding: 6px 0; } /* larger tap target */
}

/* Contact block at the bottom of the menu (Elementor text widget, class htlv-menu-contact) */
.htlv-menu-contact {
	padding: 24px 0 40px;
	border-top: 1px solid rgba(255, 255, 255, .15);
	font-size: 15px;
	line-height: 1.7;
	color: rgba(255, 255, 255, .7);
}
.htlv-menu-contact p { margin: 0 0 14px; color: inherit; font-size: inherit; }
.htlv-menu-contact p:last-child { margin-bottom: 0; }
.htlv-menu-contact strong { display: block; color: #fff; font-weight: 500; }
.htlv-menu-contact a { color: rgba(255, 255, 255, .85); }

/* Desktop: heading "Schule" in the right column at menu level, links like
   sub-items – matches the menu item "Schule" on small screens.
   Colours/sizes = --htlv-menu-* and --htlv-label-size in the Customizer CSS */
.mil-menu-frame .mil-menu-right > .row:first-child h6 {
	font-size: 34px;
	font-weight: 500;
	line-height: 1.2;
	color: rgba(255, 255, 255, .85);
	margin-bottom: 24px !important;
}
.mil-menu-frame .mil-menu-right > .row:first-child .mil-menu-list li a span {
	font-size: var(--htlv-label-size, 14px);
	letter-spacing: 2px;
	text-transform: uppercase;
	font-weight: 500;
	color: rgba(255, 255, 255, .7);
	transition: color .4s cubic-bezier(0, 0, .3642, 1);
}
.mil-menu-frame .mil-menu-right > .row:first-child .mil-menu-list li a:hover span { color: #fff; }
