/* Single event page (single-event.php) and single project page (patterns/single-project.php).
   Selectors are scoped to .ap-event-single / .ap-project-single so loading this globally is harmless. */

/* ==========================================================================
   Single event -- Figma Mobile-Lietuviu/EVENT/Renginys.SVG (402 wide):
   back link, photo with category tag + white title, three detail rows with
   icon boxes (bold line + grey line), full-width Register, "Apie renginį",
   share card, "Renginio vieta žemėlapyje" (real OpenStreetMap embed).
   Desktop has no Figma frame: same parts, photo on the content rail, two columns.
   ========================================================================== */
.ap-event-single { background: #F8F8F6; padding: 0 0 5rem; }
.ap-ev { max-width: 1100px; margin: 0 auto; padding: 32px 40px 72px; box-sizing: border-box; color: #080808; }
.ap-ev *, .ap-ev *::before, .ap-ev *::after { box-sizing: border-box; }

.ap-ev__back { display: inline-flex; align-items: center; gap: 10px; color: #080808; text-decoration: none; font-family: var(--font-heading); font-weight: 500; font-size: 16px; line-height: 1.3; margin: 0 0 20px; }
.ap-ev__back:hover { text-decoration: underline; text-underline-offset: 4px; }
.ap-ev__back:focus-visible, .ap-ev a:focus-visible, .ap-ev button:focus-visible { outline: 3px solid #2A6D36; outline-offset: 3px; }

.ap-ev__hero { position: relative; height: 460px; border-radius: 20px; overflow: hidden; background: #DFDFDF; }
.ap-ev__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Old Figma extracts carry a white strip + logo ring in their bottom 29%: show the photo part only. */
.ap-ev__hero.is-extract .ap-ev__img { height: 141%; object-position: 50% 0 !important; }
.ap-ev__hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.62) 100%); pointer-events: none; }
.ap-ev__hero.is-empty { background: #2A6D36; }
.ap-ev__hero.is-empty::after { background: none; }
.ap-ev__hero-text { position: absolute; left: 48px; right: 48px; bottom: 40px; z-index: 1; }
.ap-ev__tag { display: inline-block; background: #EF5E35; color: #FFFFFF; font-family: var(--font-heading); font-weight: 600; font-size: 13px; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; padding: 6px 10px; border-radius: 4px; margin: 0 0 12px; }
.ap-event-single h1.ap-ev__title { font-family: var(--font-heading); font-weight: 600; font-size: 44px; line-height: 1.2; color: #FFFFFF; margin: 0; overflow-wrap: break-word; hyphens: none; }
.ap-ev__save.bookmark-btn { position: absolute; top: 20px; right: 20px; z-index: 2; width: 36px; height: 36px; border: none; border-radius: 6px; background: rgba(0,0,0,0.5); color: #FFFFFF; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: none; }

.ap-ev__grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; margin-top: 40px; }

.ap-ev__facts { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.ap-ev__facts li { display: flex; align-items: flex-start; gap: 14px; margin: 0; }
.ap-ev__icon { flex: none; width: 36px; height: 36px; border-radius: 8px; background: #E9EDE9; color: #0F2613; display: flex; align-items: center; justify-content: center; }
.ap-ev__facts strong { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 17px; line-height: 1.35; color: #080808; padding-top: 1px; }
.ap-ev__facts small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 15px; line-height: 1.4; color: #636363; margin-top: 2px; }

.ap-ev__cta { margin: 0 0 40px; }
.ap-ev__btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; max-width: 420px; min-height: 48px; padding: 10px 28px; border: none; border-radius: 999px; background: #2A6D36; color: #FFFFFF; font-family: var(--font-heading); font-weight: 500; font-size: 18px; line-height: 1.2; text-decoration: none; cursor: pointer; box-shadow: none; }
.ap-ev__btn:hover { background: #23582D; color: #FFFFFF; }
.ap-ev__ended { margin: 0; display: flex; align-items: center; justify-content: center; width: 100%; max-width: 420px; min-height: 48px; border-radius: 999px; background: #EFEFEF; color: #4B4B4B; font-family: var(--font-heading); font-weight: 500; font-size: 17px; }
.ap-ev__note { margin: 10px 0 0; font-size: 14px; color: #636363; }

.ap-event-single h2.ap-ev__h2 { font-family: var(--font-heading); font-weight: 600; font-size: 24px; line-height: 1.3; color: #0F2613; margin: 0 0 12px; }
.ap-ev__about { margin: 0 0 32px; }
.ap-ev__more { margin: 0; }
.ap-ev__more a { color: #080808; text-decoration: underline; text-underline-offset: 4px; font-size: 16px; }

.ap-ev__side { display: flex; flex-direction: column; gap: 32px; }
.ap-ev__share { background: rgba(189, 210, 193, 0.4); border-radius: 12px; padding: 20px 24px; }
.ap-ev__share-title { margin: 0 0 14px; font-family: var(--font-heading); font-weight: 600; font-size: 15px; line-height: 1.35; color: #0F2613; }
.ap-ev__share-icons { display: flex; align-items: center; gap: 18px; }
.ap-ev__share-icons a { display: flex; align-items: center; justify-content: center; }
.ap-ev__share-icons .is-fb { color: #1877F2; } .ap-ev__share-icons .is-wa { color: #25D366; }
.ap-ev__share-icons .is-ig { color: #E4405F; } .ap-ev__share-icons .is-yt { color: #FF0000; }
.ap-ev__map-frame { border-radius: 12px; overflow: hidden; border: 1px solid #DFDFDF; background: #EFEFEF; height: 280px; }
.ap-ev__map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.ap-ev__map-link { margin: 10px 0 0; font-size: 14px; }
.ap-ev__map-link a { color: #2A6D36; text-decoration: underline; text-underline-offset: 3px; }

/* Description (post_content) */
.ap-event-single .ap-event-body { max-width: 62ch; font-family: var(--font-body); font-size: 16px; line-height: 1.65; color: #080808; }
.ap-event-single .ap-event-body > :first-child { margin-top: 0; }
.ap-event-single .ap-event-body > :last-child { margin-bottom: 0; }
.ap-event-single .ap-event-body p, .ap-event-single .ap-event-body li { font-family: var(--font-body); font-weight: 400; }
.ap-event-single .ap-event-body p { margin: 0 0 1rem; }
.ap-event-single .ap-event-body h2, .ap-event-single .ap-event-body h3, .ap-event-single .ap-event-body h4 { font-family: var(--font-heading); font-weight: 600; color: #080808; line-height: 1.3; margin: 1.5rem 0 0.6rem; }
.wp-site-blocks .ap-event-single .ap-event-body h2, .ap-event-single .ap-event-body h2 { font-size: 20px !important; }
.wp-site-blocks .ap-event-single .ap-event-body h3, .ap-event-single .ap-event-body h3, .ap-event-single .ap-event-body h4 { font-size: 18px !important; }
.ap-event-single .ap-event-body ul, .ap-event-single .ap-event-body ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.ap-event-single .ap-event-body li { margin: 0 0 0.35rem; }
.ap-event-single .ap-event-body a { color: #2A6D36; text-decoration: underline; text-underline-offset: 3px; }
.ap-event-single .ap-event-body blockquote { margin: 1.5rem 0; padding: 0.25rem 0 0.25rem 1.25rem; border-left: 3px solid #2A6D36; }
.ap-event-single .ap-event-body img { max-width: 100%; height: auto; border-radius: 12px; }

/* Registration modal */
.ap-event-reg__field label { font-weight: 600; }
.ap-event-reg__submit { font-family: var(--font-heading); font-weight: 600; box-shadow: none; }

@media (max-width: 1100px) {
    .ap-ev { padding: 28px 32px 64px; }
    .ap-ev__hero { height: clamp(300px, 38vw, 420px); }
    .ap-ev__hero-text { left: 32px; right: 32px; bottom: 28px; }
    .ap-event-single h1.ap-ev__title { font-size: 36px; }
    .ap-ev__grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; }
}
@media (max-width: 860px) {
    .ap-ev__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 28px; }
    .ap-ev__side { max-width: 560px; }
}
/* Phone: Figma frame. Photo 6px from the edges with square corners; text 26px in. */
@media (max-width: 600px) {
    .ap-event-single { padding-bottom: 40px; }
    .ap-ev { padding: 14px 0 40px; }
    .ap-ev__back { margin: 0 20px 12px; font-size: 15px; gap: 8px; }
    .ap-ev__back svg { width: 22px; height: 22px; }
    .ap-ev__hero { height: 260px; margin: 0 6px; border-radius: 0; }
    .ap-ev__hero::after { background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.6) 100%); }
    .ap-ev__hero-text { left: 20px; right: 20px; bottom: 20px; }
    .ap-ev__tag { font-size: 11px; padding: 5px 8px; margin-bottom: 10px; }
    .ap-event-single h1.ap-ev__title { font-size: 24px; line-height: 1.25; }
    .wp-site-blocks .ap-event-single h1.ap-ev__title { font-size: 24px !important; }
    .ap-ev__save.bookmark-btn { top: 12px; right: 12px; width: 28px; height: 28px; }
    .ap-ev__grid { margin-top: 22px; padding: 0 26px; gap: 28px; }
    .ap-ev__facts { gap: 14px; margin-bottom: 26px; }
    .ap-ev__facts li { gap: 12px; }
    .ap-ev__icon { width: 30px; height: 30px; border-radius: 6px; }
    .ap-ev__icon svg { width: 18px; height: 18px; }
    .ap-ev__facts strong { font-size: 14px; }
    .ap-ev__facts small { font-size: 13px; margin-top: 1px; }
    .ap-ev__cta { margin-bottom: 26px; }
    .ap-ev__btn, .ap-ev__ended { max-width: none; min-height: 45px; font-size: 17px; }
    .ap-event-single h2.ap-ev__h2, .wp-site-blocks .ap-event-single h2.ap-ev__h2 { font-size: 18px !important; line-height: 1.3 !important; margin-bottom: 8px; }
    .ap-ev__about { margin-bottom: 24px; }
    .ap-event-single .ap-event-body { font-size: 15px; line-height: 1.45; color: #2B2B2B; }
    .wp-site-blocks .ap-event-single .ap-event-body h2, .ap-event-single .ap-event-body h2,
    .wp-site-blocks .ap-event-single .ap-event-body h3, .ap-event-single .ap-event-body h3, .ap-event-single .ap-event-body h4 { font-size: 16px !important; margin: 1.1rem 0 0.4rem; }
    .ap-ev__side { gap: 26px; max-width: none; }
    .ap-ev__share { padding: 16px; }
    .ap-ev__share-title { font-size: 14px; margin-bottom: 12px; }
    .ap-ev__map-frame { height: 210px; }
}

/* Dark mode: the page keeps a dark surface; photo text is already white. */
[data-theme="dark"] .ap-event-single { background: transparent; }
[data-theme="dark"] .ap-ev, [data-theme="dark"] .ap-ev__back, [data-theme="dark"] .ap-ev__facts strong,
[data-theme="dark"] .ap-event-single h2.ap-ev__h2, [data-theme="dark"] .ap-ev__more a,
[data-theme="dark"] .ap-event-single .ap-event-body, [data-theme="dark"] .ap-event-single .ap-event-body h2,
[data-theme="dark"] .ap-event-single .ap-event-body h3, [data-theme="dark"] .ap-event-single .ap-event-body h4,
[data-theme="dark"] .ap-event-single .ap-event-body li, [data-theme="dark"] .ap-ev__share-title { color: #F8F8F6; }
[data-theme="dark"] .ap-ev__facts small, [data-theme="dark"] .ap-ev__note { color: #C9C9C9; }
[data-theme="dark"] .ap-ev__icon { background: rgba(189, 210, 193, 0.16); color: #F8F8F6; }
[data-theme="dark"] .ap-ev__share { background: rgba(189, 210, 193, 0.14); }
[data-theme="dark"] .ap-ev__ended { background: #334155; color: #DFDFDF; }
[data-theme="dark"] .ap-event-single .ap-event-body a, [data-theme="dark"] .ap-ev__map-link a { color: #BDD2C1; }
[data-theme="dark"] .ap-event-single .ap-event-body blockquote { border-left-color: #BDD2C1; }

/* single project */
.ap-project-single .ap-project-banner { width: 100%; height: 529px; object-fit: cover; display: block; }
.ap-project-single .ap-project-body { max-width: 956px; margin: 0 auto; padding: 3rem 0 5rem; box-sizing: border-box; }
.ap-project-single .ap-project-body p, .ap-project-single .ap-project-body div { box-sizing: border-box; }
@media (max-width: 1100px) {
    .ap-project-single .ap-project-body { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 700px) {
    .ap-project-single .ap-project-banner { height: 240px; }
    .ap-project-single .ap-project-title { font-size: 32px !important; }
    .ap-project-single .ap-project-type { font-size: 24px !important; }
    .ap-project-single .ap-project-text { font-size: 18px !important; line-height: 1.6 !important; }
}
[data-theme="dark"] .ap-project-single .ap-project-body * { color: #F8F8F6 !important; }
[data-theme="dark"] .ap-project-single .ap-project-status { color: #F7D0BD !important; }
[data-theme="dark"] .ap-project-single .ap-project-cta { background: #2A6D36; color: #FFFFFF !important; }
[data-theme="dark"] .ap-project-single .ap-project-cta--off { background: #334155; color: #DFDFDF !important; }
[data-theme="dark"] .ap-project-single .ap-project-cta { background: #2A6D36 !important; color: #FFFFFF !important; }
[data-theme="dark"] .ap-project-single .ap-project-cta--off { background: #334155 !important; color: #DFDFDF !important; }
/* single project, round 3: weights that survive any inline default, and scaled type for in-between widths */
.ap-project-single h1.ap-project-title { font-weight: 600 !important; }
.ap-project-single .ap-project-type { font-weight: 500 !important; }
.ap-project-single .ap-project-body > div > a:first-child { font-weight: 600; }
@media (max-width: 1100px) and (min-width: 701px) {
    .ap-project-single .ap-project-banner { height: clamp(260px, 36.7vw, 529px); }
    .ap-project-single .ap-project-title { font-size: 40px !important; }
    .ap-project-single .ap-project-type { font-size: 30px !important; }
    .ap-project-single .ap-project-text { font-size: 20px !important; line-height: 1.5 !important; }
}
@media (max-width: 700px) {
    .ap-project-single .ap-project-body { padding-left: 22px; padding-right: 22px; }
    .ap-project-single .ap-project-title { font-size: 28px !important; }
    .ap-project-single .ap-project-type { font-size: 22px !important; }
    .ap-project-single .ap-project-text { font-size: 16px !important; line-height: 1.5 !important; }
}

