/*
 * Responsive fixes — overrides loaded after main bundle.
 * Purpose: surgical mobile/tablet/desktop adjustments without touching SCSS build.
 * Kept as plain CSS so no rebuild is ever required to ship a fix.
 *
 * Breakpoints aligned with SCSS: sm 640, md 768, lg 1024, xl 1280.
 */

/* ── Fix #1: hero label overlap with fixed header on md+ ───────────────────
 * Problem: on 768–1280px the hero label "PREMIUM ÄSTHETIK-TECHNOLOGIE"
 * sits at the same vertical position as the fixed transparent header,
 * visually colliding with the logo.
 * Root cause: .hero__container uses justify-content: center with padding,
 * so padding-top is absorbed by flex centering. We need a true top offset.
 * Fix: top-align the hero content on md+ so padding-top kicks in. */
@media (min-width: 768px) {
    .hero__container {
        justify-content: flex-start !important;
        padding-top: 10rem !important; /* 160px — clears header + gives breathing room */
    }
}

/* ── Fix #2: contact email overflow on 390–414px ───────────────────────────
 * Long email "Dach@beautytechnologytrade.com" overflows the flex row
 * on narrow mobiles. Allow the value to wrap anywhere. */
.contact__detail-value {
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

/* ── Fix #3: anchor scroll lands under fixed header ────────────────────────
 * Clicking #events/#contact hides section labels behind header on every size.
 * scroll-margin-top reserves vertical space when scrolling into view.
 * Applied globally (mobile header ~60px, desktop ~80px), leaving slack. */
section[id] {
    scroll-margin-top: 5rem; /* 80px baseline for mobile header */
}
@media (min-width: 768px) {
    section[id] {
        scroll-margin-top: 6rem; /* clearance below scrolled header (~56px) */
    }
}

/* ── Fix #4: hero label readability on small mobiles ───────────────────────
 * On 360–414px viewports the hero image occupies 100% width and the label
 * ends up over the face. Strengthen the left-to-right white gradient behind
 * the label so text stays readable against the image. */
@media (max-width: 767px) {
    .hero__label {
        position: relative;
        z-index: 2;
    }
    .hero__label::before {
        content: "";
        position: absolute;
        inset: -0.25rem -1rem -0.25rem -0.25rem;
        background: linear-gradient(
            to right,
            rgba(255, 255, 255, 0.95) 0%,
            rgba(255, 255, 255, 0.85) 60%,
            rgba(255, 255, 255, 0) 100%
        );
        z-index: -1;
        pointer-events: none;
    }
}

/* ── Fix #5: footer horizontal overflow on tablet 768–1023px ──────────────
 * Audit @768px: body scrollWidth 830px vs viewport 768px; culprit .footer__main
 * scrollWidth 782px. Root cause: .footer__grid switches to 4 equal columns at
 * md (768px), but column content (email "Dach@beautytechnologytrade.com",
 * street "Wilhelm-Hertz-Straße 12 B") exceeds the ~180px track width because
 * grid items default to min-width:auto (min-content), forcing tracks wider
 * than 1fr. Fix: drop to 2 columns between 768px and 1023px (4-col stays on
 * lg+), and allow long contact strings to wrap. Desktop (≥1024px) and mobile
 * (<768px) layouts are untouched. */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .footer__grid > * {
        min-width: 0;
    }
    .footer__contact-item,
    .footer__contact-item a {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}
