/* ============================================================
   A1 Umzüge – WordPress-spezifische Ergänzungen
   (WP-States, Scroll-Reveals, Cookie-Banner, Admin-Bar)
   ============================================================ */

:root {
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-heading: 'Poppins', system-ui, sans-serif;
    --color-primary: #25A9E0;
}

html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; height: auto; }

/* ---------- Admin bar offset (fixed navbar) ---------- */
.admin-bar #a1-navbar { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar #a1-navbar { top: 46px; }
}

/* ---------- Scroll-Reveal (IntersectionObserver → .a1-io-in) ---------- */
.a1-io {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
    transition-delay: var(--a1-delay, 0ms);
    will-change: opacity, transform;
}
.a1-io.a1-io-scale { transform: translateY(28px) scale(.96); }
.a1-io.a1-io-left  { transform: translateX(-32px); }
.a1-io.a1-io-right { transform: translateX(32px); }
.a1-io.a1-io-in {
    opacity: 1;
    transform: none;
}
/* ---------- Grow-line reveals (.a1-grow-x → .a1-io-in via site.js) ---------- */
.a1-grow-x {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .9s cubic-bezier(.22,.61,.36,1);
    transition-delay: var(--a1-delay, 0ms);
}
.a1-grow-x.a1-io-in { transform: scaleX(1); }

/* ---------- Hero underline grow (runs on load, framer growX parity) ---------- */
@keyframes a1-grow-x-anim {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}
.a1-grow-line {
    transform-origin: left center;
    animation: a1-grow-x-anim .8s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: var(--a1-d, 500ms);
}

/* ---------- Gentle float (InstagramPhone phone mockup) ---------- */
@keyframes a1-float-y {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}
.a1-float-y { animation: a1-float-y 5s ease-in-out infinite; }

/* ---------- Legal / generic prose content ---------- */
.a1-legal h1 { font-size: 1.875rem; font-weight: 700; color: #111827; margin-bottom: 2rem; }
.a1-legal h2 { font-size: 1.5rem; font-weight: 600; color: #111827; margin: 2rem 0 1rem; }
.a1-legal h3 { font-size: 1.25rem; font-weight: 600; color: #111827; margin: 1.5rem 0 .75rem; }
.a1-legal p  { margin-bottom: 1rem; line-height: 1.7; }
.a1-legal ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.a1-legal ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1rem; }
.a1-legal li { margin-bottom: .35rem; line-height: 1.6; }
.a1-legal a  { color: #25A9E0; }
.a1-legal a:hover { text-decoration: underline; }
.a1-legal strong { font-weight: 600; }
.a1-legal section + section { margin-top: 2rem; }
.a1-legal table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.a1-legal th, .a1-legal td { border: 1px solid #e5e7eb; padding: .5rem .75rem; text-align: left; }
.a1-legal th { background: #f9fafb; font-weight: 600; }

/* ---------- Blog article body (single.php) ---------- */
.a1-article h2 { font-size: 1.5rem; font-weight: 700; color: #0d2340; margin: 2.5rem 0 1rem; }
.a1-article h3 { font-size: 1.25rem; font-weight: 700; color: #0d2340; margin: 2rem 0 .75rem; }
.a1-article p  { color: #374151; line-height: 1.75; margin-bottom: 1rem; font-size: 1.0625rem; }
.a1-article ul { list-style: none; margin: 1.25rem 0; }
.a1-article ul li { position: relative; padding-left: 2rem; margin-bottom: .75rem; color: #374151; line-height: 1.7; }
.a1-article ul li::before {
    content: ''; position: absolute; left: 0; top: .45rem;
    width: 1.1rem; height: 1.1rem; border-radius: 9999px;
    background: rgba(37,169,224,.1); border: 1px solid rgba(37,169,224,.3);
}
.a1-article ul li::after {
    content: ''; position: absolute; left: .32rem; top: .72rem;
    width: .42rem; height: .22rem;
    border-left: 2px solid #25A9E0; border-bottom: 2px solid #25A9E0;
    transform: rotate(-45deg);
}
.a1-article ol { list-style: decimal; padding-left: 1.5rem; margin: 1.25rem 0; }
.a1-article ol li { margin-bottom: .5rem; color: #374151; line-height: 1.7; }
.a1-article a { color: #25A9E0; }
.a1-article a:hover { text-decoration: underline; }
.a1-article strong { font-weight: 700; color: #111827; }
.a1-article blockquote { border-left: 4px solid #25A9E0; padding-left: 1.25rem; margin: 1.5rem 0; color: #4b5563; font-style: italic; }

/* ---------- Referenzen category filter ---------- */
.a1-ref-cat.is-active { background: #25A9E0; color: #fff; box-shadow: 0 4px 6px -1px rgba(0,0,0,.1); }
.a1-ref-cat:not(.is-active) { background: #fff; color: #374151; border: 1px solid #e5e7eb; }
.a1-ref-cat:not(.is-active):hover { background: #f3f4f6; }
.a1-ref-card { transition: all .3s ease; }
.a1-ref-card:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,.1); border-color: rgba(37,169,224,.3); }
.a1-ref-card.is-hidden { display: none; }

@media (prefers-reduced-motion: reduce) {
    .a1-io { opacity: 1; transform: none; transition: none; }
    .a1-grow-x { transform: none; }
    .a1-grow-line, .a1-float-y { animation: none; }
    html { scroll-behavior: auto; }
}

/* ---------- Hero load animations (framer-motion Ersatz) ---------- */
@keyframes a1-hero-scale {
    from { transform: scale(1.12); }
    to   { transform: scale(1); }
}
.a1-hero-media { animation: a1-hero-scale 1.4s cubic-bezier(.22,.61,.36,1) both; }

@keyframes a1-mask-up {
    from { clip-path: inset(100% 0 0 0); transform: translateY(12%); }
    to   { clip-path: inset(0 0 0 0);    transform: translateY(0); }
}
.a1-mask-line {
    display: block;
    animation: a1-mask-up .9s cubic-bezier(.22,.61,.36,1) both;
    animation-delay: var(--a1-d, 0ms);
}
@keyframes a1-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
}
.a1-fade-up { animation: a1-fade-up .8s cubic-bezier(.22,.61,.36,1) both; animation-delay: var(--a1-d, 0ms); }

/* ---------- Cookie-Banner ---------- */
.a1-cookie-banner {
    position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 90;
    max-width: 46rem; margin: 0 auto;
}
@media (min-width: 768px) {
    .a1-cookie-banner { left: auto; right: 1.5rem; bottom: 1.5rem; }
}

/* ---------- Google-Maps-Gate ---------- */
.a1-maps-gate {
    position: relative; overflow: hidden; border-radius: 1rem;
    background: linear-gradient(135deg, #0d2340 0%, #132c4d 100%);
    min-height: 320px; display: flex; align-items: center; justify-content: center;
}
.a1-maps-gate iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Form notices ---------- */
.a1-form-note {
    border-radius: .75rem; padding: .9rem 1.1rem; font-size: .925rem; line-height: 1.5;
}
.a1-form-note--ok   { background: rgba(34,197,94,.12); color: #15803d; border: 1px solid rgba(34,197,94,.35); }
.a1-form-note--err  { background: rgba(239,68,68,.10); color: #b91c1c; border: 1px solid rgba(239,68,68,.35); }
.a1-form-note--info { background: rgba(37,169,224,.10); color: #0c4a6e; border: 1px solid rgba(37,169,224,.35); }

/* ---------- Edit link (logged-in editors) ---------- */
.a1-edit-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.6rem; height: 1.6rem; margin-left: .4rem; border-radius: .4rem;
    background: #25A9E0; color: #fff; font-size: .8rem; text-decoration: none;
    vertical-align: middle; opacity: .85;
}
.a1-edit-link:hover { opacity: 1; }

/* ---------- Umzugsrechner (client-rendered) ---------- */
#a1-rechner { min-height: 20rem; }
.a1-rechner-loading {
    display: flex; align-items: center; justify-content: center;
    min-height: 20rem; color: #64748b; font-size: .95rem;
}
.a1-rechner-loading::after {
    content: ''; width: 1.4rem; height: 1.4rem; margin-left: .6rem;
    border: 2px solid #dbeafe; border-top-color: #25A9E0; border-radius: 50%;
    animation: a1-spin .8s linear infinite;
}
@keyframes a1-spin { to { transform: rotate(360deg); } }

/* ---------- Misc ---------- */
.a1-dropdown-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
[data-a1-nav-item] .a1-dropdown-open,
[data-a1-nav-item] > [data-a1-dropdown].opacity-100 { /* handled by JS toggling classes */ }

/* Tailwind preflight sets border-color; keep parity with Next build */
*, ::before, ::after { border-color: #e5e7eb; }

/* Responsive display helpers for .a1-mask-line (extra.css loads after site.css,
   so plain .hidden loses against .a1-mask-line{display:block} — need higher specificity) */
.a1-mask-line.hidden { display: none; }
@media (min-width: 640px) {
    .a1-mask-line.sm\:hidden { display: none; }
    .a1-mask-line.sm\:block { display: block; }
}

/* Giant outlined footer wordmark is rendered as inline SVG in footer.php. */
