:root {
    --site-text: #172033;
    --site-muted: #64748b;
    --site-line: #e2e8f0;
    --site-accent: #4f46e5;
    --site-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { color: var(--site-text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.65; margin: 0; }
img { height: auto; max-width: 100%; }
a { color: var(--site-accent); }
.site-container { margin: 0 auto; max-width: var(--site-width); padding-left: 24px; padding-right: 24px; width: 100%; }
.site-header { background: rgba(255,255,255,.96); border-bottom: 1px solid var(--site-line); position: sticky; top: 0; z-index: 100; }
.header-inner { align-items: center; display: flex; min-height: 72px; }
.site-brand { color: var(--site-text); font-size: 1.15rem; font-weight: 800; letter-spacing: -.025em; margin-right: 36px; text-decoration: none; }
.site-nav { margin-left: auto; }
.main-menu, .submenu { list-style: none; margin: 0; padding: 0; }
.main-menu { align-items: center; display: flex; flex-wrap: wrap; gap: 4px; }
.main-menu > li { position: relative; }
.main-menu a { border-radius: 7px; color: #334155; display: block; font-size: .92rem; font-weight: 650; padding: 10px 12px; text-decoration: none; }
.main-menu a:hover { background: #f1f5f9; color: var(--site-accent); }
.submenu { background: white; border: 1px solid var(--site-line); border-radius: 10px; box-shadow: 0 16px 40px rgba(15,23,42,.12); display: none; left: 0; min-width: 210px; padding: 7px; position: absolute; top: 100%; }
.submenu .submenu { left: 100%; top: -7px; }
.has-children:hover > .submenu { display: block; }
.menu-toggle { background: transparent; border: 1px solid var(--site-line); border-radius: 7px; display: none; margin-left: auto; padding: 7px 11px; }
.site-main { min-height: 58vh; }
.content-article { padding-bottom: 80px; padding-top: 64px; }
.wysiwyg-content { font-size: 1.04rem; margin: 0 auto; max-width: 920px; }
.wysiwyg-content h1 { font-size: clamp(2rem, 5vw, 3.8rem); letter-spacing: -.045em; line-height: 1.08; margin: 0 0 32px; }
.wysiwyg-content h2 { font-size: 2rem; letter-spacing: -.03em; line-height: 1.2; margin: 48px 0 18px; }
.wysiwyg-content h3 { font-size: 1.45rem; margin: 36px 0 14px; }
.wysiwyg-content p { margin: 0 0 1.35em; }
.wysiwyg-content table { border-collapse: collapse; margin: 28px 0; width: 100%; }
.wysiwyg-content th, .wysiwyg-content td { border: 1px solid var(--site-line); padding: 10px 12px; text-align: left; }
.wysiwyg-content blockquote { border-left: 4px solid var(--site-accent); color: #475569; margin: 28px 0; padding: 8px 0 8px 22px; }
.page-header h1 { font-size: clamp(2rem, 5vw, 3.8rem); letter-spacing: -.045em; line-height: 1.08; }
.content-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 36px; }
.content-card { border: 1px solid var(--site-line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.content-card-image { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.content-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.content-card-image:hover img { transform: scale(1.025); }
.content-card-body { padding: 24px; display: flex; flex: 1; flex-direction: column; align-items: flex-start; }
.content-card time, .content-meta { color: var(--site-muted); font-size: .85rem; }
.content-card h2 { font-size: 1.4rem; line-height: 1.25; margin: 12px 0; overflow-wrap: anywhere; }
.content-card h2 a { color: var(--site-text); text-decoration: none; }
.content-card h2 a:hover { color: var(--site-accent); }
.content-card p { color: var(--site-muted); margin: 0 0 24px; white-space: pre-line; overflow-wrap: anywhere; }
.content-read-more { margin-top: auto; font-weight: 700; text-decoration: none; }
.content-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; margin-top: 44px; }
.publication-detail > .page-header, .content-back { max-width: 920px; margin-left: auto; margin-right: auto; display: block; }
.content-back { margin-bottom: 32px; }
.content-lead { font-size: 1.2rem; color: var(--site-muted); white-space: pre-line; }
.publication-cover { display: block; max-height: 600px; width: 100%; object-fit: cover; border-radius: 12px; margin: 32px 0 44px; }
.content-empty { color: var(--site-muted); padding: 32px 0; }
.contact-form-section { max-width: 920px; margin: 48px auto 0; border-top: 1px solid var(--site-line); padding-top: 24px; scroll-margin-top: 95px; }
.contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.contact-field { min-width: 0; }
.contact-field-wide { grid-column: 1 / -1; }
.contact-field label { display: block; margin-bottom: 7px; font-weight: 650; }
.contact-field input:not([type=checkbox]), .contact-field textarea, .contact-field select { box-sizing: border-box; width: 100%; padding: 11px 12px; border: 1px solid var(--site-line); border-radius: 7px; color: var(--site-text); background: white; font: inherit; }
.contact-field input:focus-visible, .contact-field textarea:focus-visible, .contact-field select:focus-visible { outline: 3px solid var(--site-accent); outline-offset: 2px; }
.contact-field textarea { resize: vertical; }
.contact-checkbox { display: flex !important; align-items: flex-start; gap: 10px; }
.contact-checkbox input { margin-top: 7px; }
.contact-form-section button { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.contact-required { color: var(--site-muted); font-size: .85rem; margin: 18px 0 0; }
.contact-success, .contact-errors { padding: 16px 20px; border-radius: 8px; margin: 0 0 24px; }
.contact-success { color: #166534; background: #dcfce7; }
.contact-errors { color: #991b1b; background: #fee2e2; }
.contact-errors p { margin: 0; }
.contact-honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 600px) { .contact-fields { grid-template-columns: 1fr; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 900px) { .content-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .content-card-grid { grid-template-columns: 1fr; } .content-card-body { padding: 20px; } }
.gallery-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 44px; }
.gallery-grid figure { margin: 0; }
.gallery-grid a { aspect-ratio: 4 / 3; border-radius: 10px; display: block; overflow: hidden; }
.gallery-grid img { height: 100%; object-fit: cover; transition: transform .25s; width: 100%; }
.gallery-grid a:hover img { transform: scale(1.025); }
.gallery-grid a:focus-visible { outline: 3px solid var(--site-accent); outline-offset: 4px; }
.gallery-grid figcaption { color: var(--site-muted); font-size: .85rem; padding-top: 7px; }
.site-footer { background: #f8fafc; border-top: 1px solid var(--site-line); color: var(--site-muted); font-size: .88rem; }
.footer-inner { align-items: center; display: flex; justify-content: space-between; min-height: 110px; }
.footer-inner div:last-child { display: flex; gap: 18px; }
.not-found { padding-bottom: 100px; padding-top: 100px; text-align: center; }
.not-found > span { color: var(--site-accent); font-size: 1rem; font-weight: 800; }
.not-found h1 { font-size: 2.4rem; letter-spacing: -.04em; }
.not-found p { color: var(--site-muted); }
.site-button { background: var(--site-accent); border-radius: 8px; color: white; display: inline-block; font-weight: 700; margin-top: 14px; padding: 11px 18px; text-decoration: none; }

.homepage-modal { align-items: center; display: flex; inset: 0; justify-content: center; padding: 24px; position: fixed; z-index: 1000; }
.homepage-modal[hidden] { display: none; }
.modal-backdrop { background: rgba(15,23,42,.72); border: 0; inset: 0; position: absolute; }
.modal-panel { max-height: calc(100vh - 48px); max-width: 900px; position: relative; z-index: 1; }
.modal-panel img { border-radius: 12px; display: block; max-height: calc(100vh - 48px); object-fit: contain; }
.modal-close { align-items: center; background: white; border: 0; border-radius: 50%; box-shadow: 0 4px 20px rgba(0,0,0,.18); cursor: pointer; display: flex; font-size: 1.6rem; height: 38px; justify-content: center; position: absolute; right: -13px; top: -13px; width: 38px; z-index: 2; }

.lightbox { align-items: center; display: flex; inset: 0; justify-content: center; padding: 56px 80px; position: fixed; z-index: 1100; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop { background: rgba(8, 15, 30, .94); border: 0; cursor: zoom-out; inset: 0; position: absolute; }
.lightbox-dialog { align-items: center; display: flex; flex-direction: column; height: 100%; justify-content: center; max-width: 1500px; position: relative; width: 100%; z-index: 1; }
.lightbox-image { display: block; max-height: calc(100vh - 150px); max-width: 100%; object-fit: contain; user-select: none; }
.lightbox-caption { color: white; font-size: .9rem; margin: 14px 0 0; max-width: 800px; text-align: center; }
.lightbox-counter { color: rgba(255,255,255,.7); font-size: .78rem; left: 22px; position: fixed; top: 20px; }
.lightbox-close, .lightbox-nav { align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: white; cursor: pointer; display: flex; justify-content: center; transition: background .15s; z-index: 2; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.24); }
.lightbox-close:focus-visible, .lightbox-nav:focus-visible { outline: 3px solid white; outline-offset: 3px; }
.lightbox-close { border-radius: 50%; font-size: 1.7rem; height: 44px; position: fixed; right: 22px; top: 18px; width: 44px; }
.lightbox-nav { border-radius: 50%; font-size: 2rem; height: 52px; position: fixed; top: 50%; transform: translateY(-50%); width: 52px; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-nav[hidden] { display: none; }

@media (max-width: 800px) {
    .menu-toggle { display: block; }
    .site-nav { background: white; border-top: 1px solid var(--site-line); display: none; left: 0; padding: 10px 24px 18px; position: absolute; right: 0; top: 72px; }
    .site-nav.open { display: block; }
    .main-menu { align-items: stretch; display: block; }
    .submenu, .submenu .submenu { border: 0; box-shadow: none; display: block; padding: 0 0 0 18px; position: static; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lightbox { padding: 64px 18px 72px; }
    .lightbox-image { max-height: calc(100vh - 160px); }
    .lightbox-nav { bottom: 16px; height: 46px; top: auto; transform: none; width: 46px; }
    .lightbox-prev { left: calc(50% - 58px); }
    .lightbox-next { right: calc(50% - 58px); }
    .lightbox-counter { left: 18px; }
    .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; }
}

@media (max-width: 520px) {
    .site-container { padding-left: 18px; padding-right: 18px; }
    .content-article { padding-bottom: 54px; padding-top: 42px; }
    .gallery-grid { grid-template-columns: 1fr; }
    .footer-inner div:last-child { flex-direction: column; gap: 4px; }
}
