/* ==========================================================================
   Heimat- und Kulturverein Aresing e.V. — Theme
   Nachbau der bisherigen WordPress-Seite (Hello Elementor + Elementor Pro).
   Breakpoints wie Elementor: Tablet ≤ 1024 px, Handy ≤ 767 px.
   ========================================================================== */

:root {
    --huk-black: #000000;
    --huk-pink: #F52CD2;          /* Akzentfarbe (Linien, Menü-Hover, Links) */
    --huk-pink-more: #FF08D9;     /* „Weiterlesen »“ */
    --huk-text: #000000;
    --huk-muted: #777777;
    --huk-grey: #F3F3F3;          /* Abschnitt „Über unseren Verein“ */
    --huk-footer: #F0F0F0;        /* Fußzeile mit Wolken */
    --huk-serif: 'Merriweather', Georgia, serif;
    --huk-title: 'Roboto Serif', Georgia, serif;
    --huk-sans: 'Roboto', Arial, sans-serif;
    --huk-container: 1140px;
    --huk-header-h: 66px;
}

/* ── Grundlagen (wie Hello Elementor reset.css) ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: #fff;
    color: #333;
    font-family: var(--huk-serif);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
a { color: var(--huk-pink); text-decoration: none; background-color: transparent; }
a:hover, a:active { color: #333366; }
h1, h2, h3, h4, h5, h6 { margin-block-start: .5rem; margin-block-end: 1rem; font-family: inherit; font-weight: 500; line-height: 1.2; color: inherit; }
p { margin-block-start: 0; margin-block-end: .9rem; }
b, strong { font-weight: 700; }
figure { margin: 0; }

.huk-skip {
    position: absolute; left: -9999px; top: 0; z-index: 100001;
    background: #fff; color: #000; padding: 10px 16px; font-weight: 700;
}
.huk-skip:focus { left: 10px; top: 10px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

.huk-con { max-width: var(--huk-container); margin: 0 auto; }

/* ── Kopfzeile (fest oben, halbtransparent) ─────────────────────────────── */
.huk-header-spacer { height: var(--huk-header-h); }
.huk-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 99;
    background-color: rgba(255, 255, 255, .44);   /* #FFFFFF70 */
    padding: 0 10px;
}
.has-admin-bar .huk-header { top: 40px; }
.huk-header__inner {
    max-width: var(--huk-container); margin: 0 auto;
    display: flex; flex-direction: row; align-items: center; gap: 20px;
    padding: 10px 0; min-height: var(--huk-header-h);
}
.huk-brand { display: flex; align-items: center; gap: 20px; color: #000; text-decoration: none; }
.huk-brand:hover { color: #000; }
.huk-brand__logo { width: 36px; height: 36px; flex: 0 0 auto; }
.huk-brand__text { display: flex; flex-direction: column; justify-content: center; }
.huk-brand__title {
    margin: 0; font-family: var(--huk-title); font-size: 24px; font-weight: 700;
    line-height: 26px; letter-spacing: .6px; color: #000;
}
.huk-brand__subtitle {
    margin: 0; font-family: var(--huk-title); font-size: 20px; font-weight: 600;
    line-height: 1; letter-spacing: .2px; color: #000;
}

.huk-nav { flex: 1 0 auto; display: flex; justify-content: flex-end; }
.huk-nav__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.huk-nav__list a {
    display: block; padding: 13px 20px; line-height: 20px;
    font-family: var(--huk-serif); font-size: 16px; font-weight: 600; color: #000;
    transition: color .3s;
}
.huk-nav__list a:hover, .huk-nav__list a:focus-visible { color: var(--huk-pink); }

/* Menü-Knopf (Tablet/Handy) */
.huk-burger {
    display: none; margin-left: auto; flex: 0 0 auto;
    width: 33px; height: 33px; padding: 5.5px; border: 0; border-radius: 3px;
    background: rgba(0, 0, 0, .05); color: #33373d; cursor: pointer;
}
.huk-burger svg { width: 22px; height: 22px; display: block; fill: currentColor; }
.huk-burger .huk-burger__close { display: none; }
.huk-menu-open .huk-burger .huk-burger__open { display: none; }
.huk-menu-open .huk-burger .huk-burger__close { display: block; }

.huk-dropdown {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; box-shadow: 0 6px 12px rgba(0, 0, 0, .08);
}
.huk-dropdown ul { list-style: none; margin: 0; padding: 0; }
.huk-dropdown a {
    display: block; padding: 10px 20px; line-height: 20px;
    font-family: var(--huk-serif); font-size: 13px; font-weight: 600; color: #33373d;
    border-left: 8px solid transparent;
}
.huk-dropdown a:hover, .huk-dropdown a:focus-visible,
.huk-dropdown .is-active > a { background: #55595c; color: #fff; }
.huk-menu-open .huk-dropdown { display: block; }

/* ── Startseite: Titelbild ──────────────────────────────────────────────── */
.huk-hero {
    min-height: 648px;
    display: flex; flex-direction: column; justify-content: center; gap: 20px;
    background-color: #9fb7d5;
    background-repeat: no-repeat; background-size: cover;
    background-position: 0 -315px;
    text-align: center; color: #fff; overflow: hidden;
}
.huk-hero__headline {
    margin: 8px 0 16px; padding: 0 10px;
    font-family: var(--huk-serif); font-size: 52px; font-weight: 600; line-height: 1.2;
    color: #fff;
}
.huk-hero__plain { text-shadow: 0 0 10px rgba(0, 0, 0, .85); }
.huk-hero__mark {
    position: relative; display: inline-block;
    text-shadow: 0 0 10px rgba(0, 0, 0, .72);
}
.huk-hero__mark svg {
    position: absolute; top: 50%; left: 50%; z-index: -1;
    width: calc(100% + 20px); height: calc(100% + 20px);
    transform: translate(-50%, -50%); overflow: visible; pointer-events: none;
}
.huk-hero__mark path {
    fill: none; stroke: #fff; stroke-width: 9;
    stroke-dasharray: 1500; stroke-dashoffset: 1500;
    animation: huk-underline 9.2s ease-in-out infinite;
}
.huk-hero__headline { position: relative; z-index: 0; }
@keyframes huk-underline {
    0%   { stroke-dashoffset: 1500; opacity: 1; }
    13%  { stroke-dashoffset: 0; opacity: 1; }
    95%  { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .huk-hero__mark path { animation: none; stroke-dashoffset: 0; }
}
.huk-hero__sub {
    margin: 0; padding: 0 10px;
    font-family: var(--huk-serif); font-size: 28px; font-weight: 600; line-height: 1;
    color: #fff; text-shadow: 0 0 10px rgba(0, 0, 0, .82);
}

/* ── Abschnitte (Container mit 20-px-Abständen wie Elementor) ───────────── */
.huk-section { padding: 0 10px; }
.huk-section--grey { background: var(--huk-grey); }
.huk-section__inner {
    max-width: var(--huk-container); margin: 0 auto; padding: 10px 0;
    display: flex; flex-direction: column; gap: 20px;
}
.huk-anchor { display: block; height: 0; scroll-margin-top: var(--huk-header-h); }
.huk-spacer { height: var(--h, 50px); }
.huk-h2 {
    margin: 0; text-align: center;
    font-family: var(--huk-serif); font-size: 40px; font-weight: 800; line-height: 1;
    color: #000;
}
.huk-divider { padding: 15px 0; display: flex; justify-content: center; }
.huk-divider span { display: block; width: 9%; border-top: 5px solid var(--huk-pink); }

.huk-about {
    display: grid; grid-template-columns: 1fr 3fr; gap: 20px; padding: 10px;
}
.huk-about__img img { width: 100%; height: auto; }
.huk-about__text {
    display: flex; flex-direction: column; justify-content: center; padding: 10px;
    font-family: var(--huk-serif); font-size: 20px; font-weight: 400; line-height: 1.5; color: var(--huk-text);
}
.huk-about__text > :last-child { margin-bottom: 0; }

/* ── Beitrags-Kacheln „Einblick in unser Vereinsleben“ ─────────────────── */
.huk-posts {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 30px; row-gap: 35px;
}
.huk-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border-radius: 16px;
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, .15);
    transition: box-shadow .25s;
}
.huk-card:hover { box-shadow: 0 0 30px 0 rgba(0, 0, 0, .15); }
.huk-card__thumb { position: relative; display: block; width: 100%; margin-bottom: 20px; }
.huk-card__thumb-inner { position: relative; padding-bottom: 66%; overflow: hidden; background: #ddd; }
.huk-card__thumb img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    transition: filter .3s;
}
.huk-card__thumb::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background-image: linear-gradient(0deg, rgba(0, 0, 0, .35), transparent 75%);
    opacity: 0; transition: opacity .3s ease-out;
}
.huk-card:hover .huk-card__thumb::after { opacity: 1; }
.huk-card__text {
    flex-grow: 1; display: flex; flex-direction: column;
    padding: 0 30px; margin: 0 0 18px;
}
.huk-card__title {
    margin: 0 0 25px; font-family: var(--huk-serif); font-size: 28px; font-weight: 800; line-height: 1.2;
}
.huk-card__title a { color: #000; }
.huk-card__excerpt { margin-bottom: 33px; }
.huk-card__excerpt p {
    margin: 0; font-family: var(--huk-serif); font-size: 20px; font-weight: 400; line-height: 1.5; color: var(--huk-muted);
}
.huk-card__more {
    margin-top: auto; margin-bottom: 18px; align-self: flex-start;
    font-family: var(--huk-sans); font-size: 13px; font-weight: 500; line-height: 1.5;
    text-transform: uppercase; color: var(--huk-pink-more);
}
.huk-card__more:hover { color: var(--huk-pink-more); text-decoration: underline; }

/* ── Einzelner Beitrag ──────────────────────────────────────────────────── */
.huk-single { padding: 0 10px; }
.huk-single__inner {
    max-width: var(--huk-container); margin: 0 auto; padding: 172px 0 10px;
    display: flex; flex-direction: column; gap: 20px;
}
.huk-single__title {
    margin: 0; font-family: var(--huk-serif); font-size: 40px; font-weight: 800; line-height: 1; color: #000;
}
.huk-content {
    font-family: var(--huk-serif); font-size: 20px; font-weight: 400; line-height: 1.5; color: var(--huk-text);
}
.huk-content > :last-child { margin-bottom: 0; }
.huk-content h2 { font-size: 32px; font-weight: 800; }
.huk-content h3 { font-size: 26px; font-weight: 700; }
.huk-content h4 { font-size: 22px; font-weight: 700; }
.huk-content ul, .huk-content ol { margin: 0 0 .9rem; padding-left: 1.4em; }
.huk-content blockquote { margin: 0 0 .9rem; padding-left: 20px; border-left: 4px solid var(--huk-pink); font-style: italic; }
.huk-content img { display: block; margin-bottom: 20px; }
.huk-content p > img:only-child { margin-bottom: 0; }
.huk-content hr { border: 0; border-top: 1px solid #ddd; margin: 1.5rem 0; }
.huk-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; font-size: .9em; }
.huk-content th, .huk-content td { border: 1px solid hsla(0, 0%, 50%, .5); padding: 8px 12px; text-align: left; }

/* Galerie wie im WordPress-Block-Editor: 3 Spalten, letzte Reihe füllt die Breite */
.huk-content .gallery {
    display: flex; flex-wrap: wrap; align-items: normal; gap: 24px;
    margin: 0 0 20px;
}
.huk-content .gallery-item {
    position: relative; display: flex; flex-direction: column; justify-content: center;
    flex-grow: 1; width: calc(33.33% - 16px); margin: 0; overflow: hidden; cursor: zoom-in;
}
.huk-content .gallery[data-count="1"] .gallery-item { width: 100%; }
.huk-content .gallery[data-count="2"] .gallery-item { width: calc(50% - 12px); }
.huk-content .gallery-item img {
    display: block; width: 100%; height: 100%; flex: 1 0 0%; object-fit: cover; margin: 0;
}


/* Vor/Zurück-Navigation unter dem Beitrag */
.huk-postnav-wrap { padding: 0 10px; }
.huk-postnav {
    max-width: var(--huk-container); margin: 0 auto; padding: 10px 0;
    display: flex; align-items: stretch; min-height: 56px;
}
.huk-postnav__link { flex: 1 1 50%; display: flex; align-items: center; min-width: 0; }
.huk-postnav__link--next { justify-content: flex-end; text-align: right; }
.huk-postnav__link a { display: flex; align-items: center; gap: 15px; max-width: 100%; min-width: 0; color: #000; }
.huk-postnav__text { display: block; min-width: 0; overflow: hidden; }
.huk-postnav__arrow { flex: 0 0 auto; display: flex; color: #d5d8dc; }
.huk-postnav__arrow svg { width: 30px; height: 30px; fill: currentColor; }
.huk-postnav__label {
    display: block; font-family: 'Roboto Slab', var(--huk-serif); font-size: 12.8px; line-height: 1.5;
    text-transform: uppercase; color: #000;
}
.huk-postnav__title {
    display: block; font-family: 'Roboto Slab', var(--huk-serif); font-size: 11.2px; line-height: 1.5;
    color: var(--huk-pink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.huk-postnav__sep { flex: 0 0 1px; width: 1px; margin: 0 10px; background: #d5d8dc; }

/* ── Textseite / Suche / 404 ────────────────────────────────────────────── */
.huk-page { padding: 0 10px; }
.huk-page__inner {
    max-width: var(--huk-container); margin: 0 auto; padding: 100px 0 60px;
    display: flex; flex-direction: column; gap: 20px;
}
.huk-search { display: flex; gap: 10px; max-width: 600px; }
.huk-search input {
    flex: 1; min-width: 0; padding: 10px 14px; font: inherit; font-size: 18px;
    border: 1px solid #ccc; border-radius: 6px;
}
.huk-search button, .huk-button {
    display: inline-block; padding: 10px 22px; border: 0; border-radius: 6px; cursor: pointer;
    background: var(--huk-pink); color: #fff; font: 600 16px var(--huk-serif);
}
.huk-search button:hover, .huk-button:hover { background: #d81fb7; color: #fff; }
.huk-pagination { display: flex; gap: 8px; justify-content: center; font-family: var(--huk-serif); }
.huk-pagination a, .huk-pagination span { padding: 6px 12px; border-radius: 6px; }
.huk-pagination .is-current { background: var(--huk-pink); color: #fff; }

/* ── Fußzeile mit Wolken ────────────────────────────────────────────────── */
.huk-footer {
    position: relative; overflow: hidden;
    background: var(--huk-footer); padding: 0 10px;
}
.huk-footer__clouds {
    position: absolute; top: -1px; left: 0; width: 100%; overflow: hidden; line-height: 0;
    pointer-events: none;
}
.huk-footer__clouds svg {
    display: block; position: relative; left: 50%; transform: translateX(-50%);
    width: calc(100% + 1.3px); height: auto;
}
.huk-footer__clouds path { fill: #fff; }
.huk-footer__inner {
    position: relative; z-index: 1;
    max-width: var(--huk-container); margin: 0 auto; padding: 10px 0;
    font-family: var(--huk-serif); font-size: 20px; font-weight: 400; line-height: 1.5; color: var(--huk-text);
}
.huk-footer__inner p { margin: 0 0 14.4px; }
.huk-footer__inner a { color: inherit; }
.huk-footer__inner a:hover { color: var(--huk-pink); }
.huk-footer__links { margin-top: 10px; font-size: 16px; }
.huk-footer__links a { margin-right: 18px; }

/* ── Lightbox ───────────────────────────────────────────────────────────── */
#huk-lightbox {
    position: fixed; inset: 0; z-index: 100000; display: none;
    align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .92);
}
#huk-lightbox.is-open { display: flex; }
#huk-lightbox figure { margin: 0; max-width: 92vw; max-height: 88vh; text-align: center; }
#huk-lightbox img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; object-fit: contain; }
#huk-lightbox button {
    position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
    font-size: 44px; line-height: 1; padding: 14px; opacity: .85;
}
#huk-lightbox button:hover { opacity: 1; }
#huk-lightbox .lb-close { top: 6px; right: 10px; font-size: 36px; }
#huk-lightbox .lb-prev { left: 6px; top: 50%; transform: translateY(-50%); }
#huk-lightbox .lb-next { right: 6px; top: 50%; transform: translateY(-50%); }
#huk-lightbox .lb-count { position: absolute; top: 20px; left: 20px; color: #ddd; font: 14px var(--huk-sans); }

/* ── Admin-Leiste (nur für angemeldete Verwalter sichtbar) ──────────────── */
#huk-admin-bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 40px;
    background: #1f2937; color: #e5e7eb; font: 14px/40px system-ui, -apple-system, sans-serif;
}
.has-admin-bar { padding-top: 40px; }
.huk-admin-bar__inner { display: flex; gap: 18px; align-items: center; padding: 0 16px; white-space: nowrap; overflow-x: auto; }
.huk-admin-bar__inner a { color: #fff; }
.huk-admin-bar__inner a:hover { color: #fbcfe8; }
.huk-admin-bar__edit { background: var(--huk-pink); padding: 0 12px; border-radius: 4px; line-height: 28px; }
.huk-admin-bar__edit:hover { color: #fff !important; background: #d81fb7; }
.huk-admin-bar__warn { background: #f59e0b; color: #111; padding: 0 10px; border-radius: 4px; line-height: 26px; }
.huk-admin-bar__spacer { flex: 1; }
.huk-draft-note {
    background: #fff7d6; border: 1px solid #f2d36b; color: #5c4600; border-radius: 8px;
    padding: 10px 16px; font: 15px/1.4 system-ui, sans-serif;
}

/* ── Tablet (≤ 1024 px) ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .huk-header__inner { justify-content: center; position: relative; }
    .huk-nav { display: none; }
    .huk-burger { display: block; }
    .huk-header__inner { position: static; }
    .huk-header { position: fixed; }
    .huk-hero { background-position: 0 0; }
}

/* ── Handy (≤ 767 px) ───────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .huk-brand__title { font-size: 19px; }
    .huk-brand__subtitle { font-size: 16px; }
    .huk-brand { gap: 20px; }
    .huk-about { grid-template-columns: 1fr; }
    .huk-posts { grid-template-columns: 1fr; }
    .huk-card__thumb-inner { padding-bottom: 50%; }
    .huk-single__inner { padding-top: 120px; }
    .huk-single__title { font-size: 32px; line-height: 1.15; }
    .huk-h2 { line-height: 1.1; }
    .huk-content .gallery { gap: 16px; }
    .huk-content .gallery-item { width: calc(50% - 8px); }
    .huk-content .gallery[data-count="1"] .gallery-item,
    .huk-content .gallery .gallery-item:last-child:nth-child(odd) { width: 100%; }
    .huk-postnav__title { white-space: normal; }
    .huk-page__inner { padding-top: 60px; }
}
