/*
 Theme Name:   LGDA wordpress theme
 Theme URI:    http://www.lgda.lt
 Description:  LGDA website theme
 Author:       A/
 Author URI:   http://www.graphicdesign.lt
 Template:     gridly
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, responsive-layout, accessibility-ready
 Text Domain:  gridly-lgda
*/

/* Brandbook 4.3: Gothic A1 Regular / SemiBold / Bold, served from this theme. */
@font-face {
    font-family: "Gothic A1";
    src: url("fonts/gothic-a1-regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    /* Use the Latin fallback for U+2026; Gothic A1 places its dots at midline. */
    unicode-range: U+0000-2025, U+2027-10FFFF;
}
@font-face {
    font-family: "Gothic A1";
    src: url("fonts/gothic-a1-semibold.woff2") format("woff2");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    /* Use the Latin fallback for U+2026; Gothic A1 places its dots at midline. */
    unicode-range: U+0000-2025, U+2027-10FFFF;
}
@font-face {
    font-family: "Gothic A1";
    src: url("fonts/gothic-a1-bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    /* Use the Latin fallback for U+2026; Gothic A1 places its dots at midline. */
    unicode-range: U+0000-2025, U+2027-10FFFF;
}

/* Shared spacing and typography for the LDA child theme. */
:root {
    --lda-font: "Gothic A1", Arial, sans-serif;
    --lda-text: #242424;
    --lda-heading: #000;
    --lda-muted: #666;
    --lda-interactive: #000;
    --lda-container-width: 1192px;
    --lda-page-gutter: 20px;
    --lda-card-padding: 24px;
    --lda-grid-gap: 24px;
    /* Type sizes, line heights and text spacing follow a 4px rhythm. */
    --lda-type-body: 16px;
    --lda-leading-body: 24px;
    --lda-type-h1: 32px;
    --lda-leading-h1: 40px;
    --lda-type-card: 20px;
    --lda-leading-card: 24px;
    --lda-text-space: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--lda-font); font-size: var(--lda-type-body); line-height: var(--lda-leading-body); font-weight: 400; color: var(--lda-text); -webkit-text-size-adjust: 100%; }
#wrap { width: calc(100% - var(--lda-page-gutter) - var(--lda-page-gutter)); max-width: var(--lda-container-width); margin-left: auto; margin-right: auto; overflow: visible; }
p, ul, ol, li { font-family: var(--lda-font); font-size: inherit; line-height: inherit; color: inherit; }
p { padding: 0; margin: 0 0 var(--lda-text-space); }
h1, h2, h3, h4, h5, h6 { font-family: var(--lda-font); color: var(--lda-heading); font-weight: 700; width: auto; max-width: none; margin: 0 0 var(--lda-text-space); padding: 0; letter-spacing: -0.025em; overflow-wrap: break-word; }
h1 { font-size: var(--lda-type-h1); line-height: var(--lda-leading-h1); }
h2 { font-size: 28px; line-height: 36px; }
h3 { font-size: 24px; line-height: 32px; }
h4 { font-size: 20px; line-height: 28px; }
h5, h6 { font-size: 16px; line-height: 24px; }
h3, h4, h5, h6 { font-weight: 600; }
strong, b { font-weight: 700; }
input, button, textarea, select { font: inherit; }
img { max-width: 100%; height: auto; }
iframe, video, embed, #logo svg { max-width: 100%; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--lda-interactive); outline-offset: 4px; }

/* Navigation wraps instead of hiding entries behind its former fixed height. */
#nav { clear: both; width: 100%; height: auto; overflow: visible; background: none; border-top: 1px solid #e5e5e5; padding: 16px 0; margin-bottom: 12px; }
#nav ul { display: flex; flex-wrap: wrap; gap: 4px 24px; height: auto; line-height: 24px; margin: 0; padding: 0; }
#nav ul li { display: block; float: none; list-style: none; padding: 0; margin: 0; font-size: 16px; }
#nav ul li a { width: auto; height: auto; min-height: 44px; display: flex; align-items: center; margin: 0; padding: 8px 0; border-bottom: 0; box-shadow: inset 0 -2px transparent; }
/* Override the parent theme's 6px hover border and link fading without changing geometry. */
#nav ul li a:hover, #nav ul li a:focus-visible, #nav ul li.current-menu-item > a { border-bottom: 0; opacity: 1; box-shadow: inset 0 -2px var(--lda-interactive); }

/* The same type scale continues into article and static page views. */
.single-post .type-post, body.page .type-page { display: block; float: none; width: 100%; margin: 12px 0 0; }
.single-post .post-copy, body.page .page-copy { width: 100%; max-width: 72ch; margin: 0 auto; padding: 24px var(--lda-card-padding); font-size: var(--lda-type-body); line-height: var(--lda-leading-body); overflow-wrap: anywhere; }
.post-copy h1, .post-copy h2, .post-copy h3, .post-copy h4, .page-copy h1, .page-copy h2, .page-copy h3, .page-copy h4 { width: 100%; max-width: none; margin: 32px 0 16px; padding: 0; }
.post-copy h1, .page-copy h1 { font-size: var(--lda-type-h1); line-height: var(--lda-leading-h1); margin-top: 0; }
.post-copy p, .page-copy p, .post-copy li, .page-copy li { width: auto; max-width: none; padding: 0; margin: 0 0 var(--lda-text-space); font-family: var(--lda-font); font-size: inherit; line-height: inherit; color: inherit; }
.post-copy ul, .post-copy ol, .page-copy ul, .page-copy ol { margin: 0 0 24px; padding-left: 24px; }
.post-copy blockquote { margin: 24px 0; padding: 0 0 0 24px; border-left: 3px solid var(--lda-interactive); }
.post-copy blockquote p { max-width: none; margin: 0; padding: 0; line-height: inherit; }
.post-copy p.gridly-date, .page-copy p.gridly-date { width: auto; max-width: none; font-size: 16px; line-height: 24px; color: var(--lda-muted); padding: 0; margin-bottom: 28px; }
.post-copy p.tag_list { font-size: 16px; padding: 0; color: var(--lda-muted); }
.post-copy figcaption, .page-copy figcaption { font-size: 16px; line-height: 24px; color: var(--lda-muted); margin-top: 8px; }
.single-post article .gridly-image { max-height: none; }
.single-post .type-post img, body.page .type-page img { max-width: 100%; height: auto; }

/* Image-first editorial cards; unequal titles still flow through real Masonry. */
#post-area { display: block; position: relative; column-gap: var(--lda-grid-gap); width: 100%; height: auto; margin-top: 24px; }
#post-area .post { display: block; float: left; position: relative; width: var(--lda-card-width, 100%); min-width: 0; margin: 0 0 48px; border: 0; background: #fff; }
#post-area .gridly-image, #post-area .gridly-image > a { display: block; width: 100%; }
#post-area .gridly-image > a { aspect-ratio: 2 / 1; overflow: hidden; background: #f5f5f5; opacity: 1; }
#post-area .gridly-image img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
#post-area .post .gridly-copy { display: flow-root; position: relative; width: 100%; min-width: 0; margin: 0; padding: var(--lda-card-padding); overflow: visible; overflow-wrap: break-word; }
#post-area .lda-news-card__categories { margin: 0 0 8px; color: var(--lda-muted); font-size: 12px; line-height: 20px; }
#post-area .lda-news-card__categories a { color: inherit; font-weight: 400; opacity: 1; }
#post-area .post .gridly-copy h2 { width: 100%; max-width: none; font-size: var(--lda-type-card); line-height: var(--lda-leading-card); letter-spacing: -0.02em; margin: 0 0 8px; padding: 0; }
#post-area .post .gridly-copy h2 a { display: block; width: 100%; color: #000; opacity: 1; }
#post-area .post .gridly-copy h2 a:hover, #post-area .lda-news-card__categories a:hover { text-decoration: underline; text-underline-offset: 4px; }
#post-area .post .gridly-copy p { width: auto; max-width: none; padding: 0; margin: 0 0 12px; font-family: var(--lda-font); font-size: 16px; line-height: 24px; color: var(--lda-muted); }
#post-area .post .gridly-copy .lda-news-card__teaser { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
#post-area .post .gridly-copy .lda-news-card__event { font-size: 12px; line-height: 20px; }
#post-area .post .gridly-copy .gridly-date { display: block; float: none; clear: both; width: auto; max-width: none; min-height: 0; margin: 16px 0 0; padding: 0; background: none; color: var(--lda-muted); font-size: 12px; line-height: 20px; }
/* A wide hero leads into a centered reading column, inside the shared 1192px shell. */
.single-post .lda-detail-card, body.page .lda-detail-card { display: block; float: none; width: 100%; max-width: var(--lda-container-width); margin: 24px auto 0; border: 0; background: #fff; }
.lda-detail-card__figure { width: 100%; margin: 0; }
.single-post .lda-detail-card__figure .lda-detail-card__image, body.page .lda-detail-card__figure .lda-detail-card__image { display: block; width: 100%; height: auto; max-width: 100%; max-height: none; margin: 0; }
.lda-detail-card__figure figcaption { width: calc(100% - var(--lda-card-padding) - var(--lda-card-padding)); max-width: 680px; margin: 12px auto 0; padding: 0; color: var(--lda-muted); font-size: 12px; line-height: 20px; }
.lda-detail-card__copy { width: calc(100% - var(--lda-card-padding) - var(--lda-card-padding)); max-width: 680px; margin: 0 auto; padding: 48px 0; }
.lda-detail-card__header { margin-bottom: 40px; }
.lda-detail-card__categories { margin: 0 0 16px; color: var(--lda-muted); font-size: 16px; line-height: 24px; }
.lda-detail-card__categories a { color: inherit; font-weight: 400; opacity: 1; }
.lda-detail-card__categories a:hover { text-decoration: underline; text-underline-offset: 4px; }
.lda-detail-card__title { width: 100%; max-width: none; margin: 0; padding: 0; font-size: var(--lda-type-h1); line-height: var(--lda-leading-h1); letter-spacing: -0.02em; }
.lda-detail-card__date { display: block; margin-top: 24px; color: var(--lda-muted); font-size: 16px; line-height: 24px; }
.single-post .lda-detail-card .lda-detail-card__content, body.page .lda-detail-card .lda-detail-card__content { width: 100%; max-width: none; margin: 0; padding: 0; font-size: 20px; line-height: 32px; letter-spacing: -0.003em; overflow-wrap: break-word; }
.lda-detail-card__content :is(p, ul, ol, blockquote) { width: auto; max-width: none; margin: 0 0 32px; padding: 0; font-family: var(--lda-font); font-size: inherit; line-height: inherit; color: inherit; }
.lda-detail-card__content :is(h1, h2, h3, h4, h5, h6) { width: 100%; margin: 48px 0 16px; padding: 0; }
.lda-detail-card__content :is(h1, h2) { font-size: 28px; line-height: 36px; }
.lda-detail-card__content h3 { font-size: 24px; line-height: 32px; }
.lda-detail-card__content h4 { font-size: 20px; line-height: 28px; }
.lda-detail-card__content :is(h5, h6) { font-size: 16px; line-height: 24px; }
.lda-detail-card__content :is(strong, b) { color: inherit; }
.lda-detail-card__content > p:empty { display: none; }
.lda-detail-card__content > :first-child { margin-top: 0; }
.lda-detail-card__content > :last-child { margin-bottom: 0; }
.lda-detail-card__content :is(p, li, blockquote) a { border-bottom: 0; color: #000; opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.lda-detail-card__content :is(p, li, blockquote) a:hover { opacity: 1; text-decoration-thickness: 2px; }
.lda-detail-card__content :is(ul, ol) { padding-left: 28px; }
.lda-detail-card__content li { margin: 0 0 12px; padding-left: 4px; font-size: inherit; line-height: inherit; list-style-position: outside; }
.lda-detail-card__content li > :last-child { margin-bottom: 0; }
.lda-detail-card__content blockquote { padding-left: 24px; border-left: 2px solid #000; }
.lda-detail-card__content blockquote p { margin: 0; font-size: inherit; line-height: inherit; }
.lda-detail-card__content hr { width: 100%; height: 0; margin: 48px 0; border: 0; border-top: 1px solid #e5e5e5; background: none; }
.lda-detail-card__content :is(figure, .wp-block-image) { margin: 40px 0; }
.lda-detail-card__content img { max-width: 100%; height: auto; }
.lda-detail-card__content figcaption { margin-top: 12px; color: var(--lda-muted); font-size: 12px; line-height: 20px; }
.lda-detail-card__content .wp-block-table { max-width: 100%; overflow-x: auto; }
.lda-detail-card__tags { margin: 48px 0 0; padding-top: 24px; border-top: 1px solid #e5e5e5; font-size: 16px; line-height: 24px; }
.lda-detail-card__tags a { color: #000; text-decoration: underline; text-underline-offset: 4px; }
.lda-article-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; width: 100%; max-width: var(--lda-container-width); margin: 64px auto 0; }
.lda-article-nav--single { grid-template-columns: minmax(0, 1fr); }
.lda-article-nav__link {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    padding: 24px;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    opacity: 1;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: background-color 160ms ease, color 160ms ease;
}
.lda-article-nav__label { display: flex; align-items: center; gap: 12px; font-size: 16px; line-height: 24px; }
.lda-article-nav__label svg { flex: 0 0 24px; }
.lda-article-nav__link--older .lda-article-nav__label { justify-content: space-between; }
.lda-article-nav__title { display: block; font-size: 20px; font-weight: 600; line-height: 28px; }
.lda-article-nav__link:hover, .lda-article-nav__link:focus-visible { background: #000; color: #fff; opacity: 1; }
@media (max-width: 640px) {
    .lda-article-nav { grid-template-columns: 1fr; gap: 16px; }
    .lda-article-nav__link { padding: 20px; }
}

#footer-area { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 28px; float: none; margin-top: 40px; padding-top: 28px; }
#footer-area .widget { display: block; float: none; width: auto; min-width: 0; margin: 0; padding: 0; font-family: var(--lda-font); font-size: 16px; line-height: 24px; }
#footer-area .widget h3 { font-size: 20px; line-height: 28px; color: var(--lda-heading); }
#copyright p { font-size: 16px; line-height: 24px; color: var(--lda-muted); margin: 24px 0; }
.post-nav { clear: both; padding-top: 24px; font-size: 16px; line-height: 24px; }

/* Archive navigation remains a real link, with a stable button-sized hit area. */
.lda-pagination {
    clear: both;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    margin-top: 32px;
    padding: 24px 0;
    border-top: 1px solid #e5e5e5;
}
.lda-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-width: 240px;
    max-width: 100%;
    height: 56px;
    padding: 0 24px;
    border: 1px solid var(--lda-heading);
    background: #fff;
    color: var(--lda-heading);
    font-family: var(--lda-font);
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    text-decoration: none;
    opacity: 1;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.lda-pagination a:hover, .lda-pagination a:focus-visible {
    border-color: var(--lda-interactive);
    background: var(--lda-interactive);
    color: #fff;
    opacity: 1;
}
.lda-pagination svg { flex: 0 0 24px; width: 24px; height: 24px; }

/* Shared footer search form: accessible label, 16/24 type and 56px controls. */
.lda-search { width: 100%; max-width: 480px; margin: 0; }
.lda-search__label { display: block; margin: 0 0 8px; font-size: 16px; font-weight: 600; line-height: 24px; }
.lda-search__controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.lda-search__input {
    appearance: none;
    width: 100%;
    min-width: 0;
    height: 56px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid #000;
    border-radius: 0;
    background: #fff;
    color: #000;
    font-family: var(--lda-font);
    font-size: 16px;
    line-height: 24px;
}
.lda-search__input::placeholder { color: #666; opacity: 1; }
.lda-search__submit {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 56px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid #000;
    border-radius: 0;
    background: #fff;
    color: #000;
    font-family: var(--lda-font);
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease;
}
.lda-search__submit:hover, .lda-search__submit:focus-visible { background: #000; color: #fff; }
.lda-search__input:focus-visible, .lda-search__submit:focus-visible { outline: none !important; outline-offset: 0; }
.lda-search__input:focus-visible { box-shadow: inset 0 0 0 1px #000; }
.lda-search__submit svg { flex: 0 0 20px; width: 20px; height: 20px; }
@media (max-width: 480px) {
    #nav ul { column-gap: 20px; }
    .lda-pagination a { width: 100%; }
}
@media (min-width: 768px) {
    :root { --lda-page-gutter: 24px; --lda-type-h1: 44px; --lda-leading-h1: 52px; }
}
@media (min-width: 1024px) {
    :root { --lda-page-gutter: 40px; }
}
@media (max-width: 767px) {
    :root { --lda-card-padding: 20px; }
    #post-area .post { margin-bottom: 40px; }
    .lda-detail-card__copy { padding-top: 32px; padding-bottom: 32px; }
    .lda-detail-card__header { margin-bottom: 32px; }
    .lda-article-nav { margin-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Missing pages follow the same white surface and reading rhythm as articles. */
.lda-error-card { clear: both; width: 100%; margin: 24px 0 0; background: #fff; }
.lda-error-card__copy { width: calc(100% - var(--lda-card-padding) - var(--lda-card-padding)); max-width: 680px; margin: 0 auto; padding: 64px 0; }
.lda-error-card .lda-error-card__eyebrow { margin: 0 0 16px; padding: 0; color: var(--lda-muted); font-size: 16px; font-weight: 600; line-height: 24px; }
.lda-error-card h1 { margin: 0 0 24px; padding: 0; font-size: var(--lda-type-h1); line-height: var(--lda-leading-h1); }
.lda-error-card .lda-error-card__intro { margin: 0 0 32px; padding: 0; font-size: 20px; line-height: 32px; }
.lda-error-card .lda-search { max-width: 100%; }
.lda-error-card__actions { margin-top: 32px; }
.lda-error-card__home { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; max-width: 100%; padding: 12px 24px; border: 1px solid #000; background: #fff; color: #000; font-size: 16px; font-weight: 600; line-height: 24px; opacity: 1; text-decoration: none; transition: background-color 160ms ease, color 160ms ease; }
.lda-error-card__home svg { flex: 0 0 24px; }
.lda-error-card__home:hover, .lda-error-card__home:focus-visible { background: #000; color: #fff; opacity: 1; }
@media (max-width: 767px) {
    .lda-error-card__copy { padding: 32px 0; }
    .lda-error-card .lda-search__controls { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .lda-error-card__home { width: 100%; }
}

/* Account links share the logo row and remain visible at narrow widths. */
#logo { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; min-width: 0; max-width: none !important; margin-bottom: 0; }
#logo .lda-site-logo { display: block; flex: 0 0 125px; width: 125px; height: 80px; opacity: 1; }
#logo .lda-site-logo > svg { display: block; float: none; }
#extra-features { flex: 0 1 auto; min-width: 0; max-width: calc(100% - 149px); }
#logo .login-meniu { display: flex; float: none; flex-direction: column; align-items: flex-end; gap: 0; min-width: 0; margin: 0; padding: 0 0 0 24px; border-left: 1px solid #000; text-transform: none; }
#logo .login-meniu a { color: #000; opacity: 1; text-decoration: none; }
#logo .login-meniu .user-name { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 44px; max-width: 100%; font-size: 16px; font-weight: 600; line-height: 24px; text-align: right; text-transform: none; }
#logo .user-name span { min-width: 0; overflow-wrap: anywhere; }
#logo .login-meniu .lda-account__icon { display: block; float: none; flex: 0 0 20px; width: 20px; height: 20px; }
#logo .login-meniu .lda-account__logout { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 0; font-size: 12px; font-weight: 400; line-height: 20px; }
#logo .login-meniu a:hover, #logo .login-meniu a:focus-visible { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 767px) {
    #logo { gap: 16px; }
    #extra-features { max-width: calc(100% - 141px); }
    #logo .login-meniu { padding-left: 16px; }
}
