
@media (min-width: 900px) {
  .event-article__content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
  }
}

@media (min-width: 900px) {
  .event-article__content > * + * {
    margin-left: 1.875rem;
  }
}

@media (max-width: 899px) {
  .event-article__content > * + * {
    margin-top: 2rem;
  }
}

.event-article__img {
  position: relative;
  width: 50%;
  overflow: hidden;
  float: left;
  margin-right: 50px;
  margin-bottom: 20px;
}

@media (max-width: 899px) {
  .event-article__img {
    max-width: 50%;
  }
}

@media (max-width: 899px) and (max-width: 550px) {
  .event-article__img {
    max-width: unset;
    width: 100%;
    float: none;
    margin-right: 0;
    margin-bottom: 0;
  }
}

.event-article__img__container {
  padding-top: 100%;
}

.event-article__img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
}

@media (min-width: 900px) {
  .event-article__main {
    width: 100%;
    -ms-flex-negative: 0;
    flex-shrink: 0;
  }
}

@media (min-width: 900px) {
  .event-article__main > * + * {
    margin-top: 2.625rem;
  }
}

@media (max-width: 899px) {
  .event-article__main > * + * {
    margin-top: 2.25rem;
  }
}

.event-article-details {
  background-color: var(--color-bg-secondary);
}

@media (min-width: 900px) {
  .event-article-details {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    padding: 1.25rem 2.25rem 1.625rem;
  }
}

@media (max-width: 899px) {
  .event-article-details {
    padding: 1rem 1.625rem 1.25rem;
  }
}

@media (min-width: 1200px) {
  .event-article-details > * + * {
    margin-left: 3.75rem;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .event-article-details > * + * {
    margin-left: 2.5rem;
  }
}

@media (max-width: 899px) {
  .event-article-details > * + * {
    margin-top: 1.75rem;
  }
}

.event-article-details__column {
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 140%;
  color: var(--color-text-muted);
}

@media (min-width: 900px) {
  .event-article-details__column {
    max-width: 10.25rem;
  }
}

@media (min-width: 900px) {
  .event-article-details__column > * + * {
    margin-top: 0.875rem;
  }
}

@media (max-width: 899px) {
  .event-article-details__column > * + * {
    margin-top: 0.625rem;
  }
}

.event-article-details__value {
  line-height: inherit;
  color: var(--color-text-heading);
}

@media (min-width: 900px) {
  .event-article-details__value {
    font-size: 1.5rem;
  }
}

@media (max-width: 899px) {
  .event-article-details__value {
    font-size: 1.25rem;
  }
}

.article-grid > * + * {
  margin-top: 0.5625rem;
}

@media (max-width: 899px) {
  .article-grid._desk {
    display: none;
  }
}

@media (min-width: 900px) {
  .article-grid._mob {
    display: none;
  }
}

.article-grid__row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  text-align: center;
  line-height: 140%;
  font-weight: 500;
  color: var(--color-text-heading);
}

@media (min-width: 900px) {
  .article-grid__row {
    background-color: var(--color-bg-secondary);
    font-size: 0.75rem;
  }
}

@media (min-width: 900px) and (min-width: 1600px) {
  .article-grid__row {
    font-size: 0.875rem;
  }
}

@media (max-width: 899px) {
  .article-grid__row {
    font-size: 0.875rem;
  }
}

.article-grid__row._title {
  font-weight: 400;
  color: var(--color-text-primary);
}

@media (max-width: 899px) {
  .article-grid__row._big-margin {
    margin-top: 2rem;
  }
}

@media (min-width: 900px) {
  .article-grid__row > * + * {
    margin-left: 1rem;
  }
}

@media (min-width: 900px) and (min-width: 1600px) {
  .article-grid__row > * + * {
    margin-left: 1.875rem;
  }
}

.article-grid__column {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: 100%;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
}

@media (min-width: 900px) {
  .article-grid__column {
    padding: 0.875rem 0.5rem;
  }
}

@media (min-width: 900px) and (min-width: 1600px) {
  .article-grid__column {
    padding: 1rem 0.875rem;
  }
}

@media (max-width: 899px) {
  .article-grid__column {
    background-color: var(--color-bg-secondary);
    padding: 1rem var(--wrap-1);
  }
}

.article-grid__column p span {
  display: block;
}



.event-article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  font-size: 0.9em;
  color: var(--color-text-primary);
}

.event-takeaways {
  background-color: var(--color-bg-secondary);
  border-left: 4px solid var(--color-accent);
  padding: 15px 20px;
  margin: 20px 0;
  font-size: 0.95em;
}

.event-takeaways h3 {
  margin-top: 0;
  font-size: 1.2em;
  color: var(--color-text-primary);
}

.event-takeaways ul {
  margin-bottom: 0;
  padding-left: 20px;
}

.event-takeaways li {
  margin-bottom: 8px;
}

.event-actions {
  margin: 30px 0;
  padding: 20px;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.event-actions strong {
  margin-right: 10px;
  font-weight: 600;
}

.event-actions a {
  text-decoration: none;
  padding: 8px 12px;
  color: var(--color-white);
  font-weight: 500;
  transition: background-color 0.2s ease-in-out;
}

.event-actions a:hover {
  opacity: 0.9;
}

.event-article__main p {
  font-size: 1.125rem;
  color: var(--color-text-primary);
  font-weight: 400;
  margin-bottom: 1.2rem;
}

/* On a phone a paragraph takes the article's size (typography.css) instead of its own 18px. */
@media (max-width: 768px) {
  .event-article__main p {
    font-size: inherit;
  }
}

.event-article__main p:last-child {
  margin-bottom: 0;
}

.event-article__main p,
.event-article__main li {
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.event-article__typography .file {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  max-width: 100%;
  padding: 10px;
  border-radius: 0 !important;
}

.event-article__typography .file__label {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-article__typography .file__img {
  width: 100%;
  height: auto;
  display: block;
}

.event-article__typography .file__img__hover {
  display: none;
}

.event-article__typography .file__text {
  display: flex;
  flex-direction: column;
}

.event-article__typography blockquote,
.event-article__typography .wp-block-quote {
    position: relative;
    display: block !important;
    width: auto !important; 
    max-width: 100% !important;
    overflow: hidden !important; 
    padding: 24px 32px 24px 64px;
    background: var(--color-bg-secondary);
    border-left: 6px solid var(--color-border-strong);
    box-sizing: border-box;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--color-text-primary);
    font-style: normal;
}

.event-article__typography blockquote::before,
.event-article__typography .wp-block-quote::before {
    content: "";
    position: absolute;
    left: 24px;
    top: 28px;
    width: 24px;
    height: 24px;
    background-color: var(--color-text-heading);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M14.017 21v-7.391c0-5.704 3.731-9.57 8.983-10.609l.995 2.151c-2.432.917-3.995 3.638-3.995 5.849h4v10h-9.983zm-14.017 0v-7.391c0-5.704 3.748-9.57 9-10.609l.996 2.151c-2.433.917-3.996 3.638-3.996 5.849h3.983v10h-9.983z'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M14.017 21v-7.391c0-5.704 3.731-9.57 8.983-10.609l.995 2.151c-2.432.917-3.995 3.638-3.995 5.849h4v10h-9.983zm-14.017 0v-7.391c0-5.704 3.748-9.57 9-10.609l.996 2.151c-2.433.917-3.996 3.638-3.996 5.849h3.983v10h-9.983z'/%3E%3C/svg%3E") no-repeat center / contain;
    opacity: 0.3;
}

@media (max-width: 767px) {
    .event-article__typography blockquote,
    .event-article__typography .wp-block-quote,
    .event-article__typography blockquote.alignleft,
    .event-article__typography .wp-block-quote.alignleft,
    .event-article__typography blockquote.alignright,
    .event-article__typography .wp-block-quote.alignright {
        float: none !important;
        width: 100% !important;
        margin: 24px 0 !important;
        padding: 20px 20px 20px 60px !important; 
        font-size: 1.05rem;
        border-left: 4px solid var(--color-border-strong) !important;
    }
    
    .event-article__typography blockquote::before,
    .event-article__typography .wp-block-quote::before {
        left: 16px !important;
        top: 22px !important;
        width: 24px !important;
        height: 24px !important;
        -webkit-mask-size: contain !important;
        mask-size: contain !important;
        z-index: 2 !important;
    }
}

.event-article__typography blockquote p,
.event-article__typography .wp-block-quote p {
    margin: 0 !important;
}

.event-article__typography blockquote cite,
.event-article__typography .wp-block-quote cite,
.event-article__typography .wp-block-quote__citation {
    display: block;
    margin-top: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    font-style: normal;
}

.event-article__typography blockquote.alignleft,
.event-article__typography .wp-block-quote.alignleft {
    float: left !important;
    width: 50% !important;
    margin: 8px 32px 24px 0 !important;
    overflow: visible !important;
}

.event-article__typography blockquote.alignright,
.event-article__typography .wp-block-quote.alignright {
    float: right !important;
    width: 50% !important;
    margin: 8px 0 24px 32px !important;
    overflow: visible !important;
}

@media (max-width: 767px) {
    .event-article__typography blockquote,
    .event-article__typography .wp-block-quote,
    .event-article__typography blockquote.alignleft,
    .event-article__typography .wp-block-quote.alignleft,
    .event-article__typography blockquote.alignright,
    .event-article__typography .wp-block-quote.alignright {
        float: none !important;
        width: 100% !important;
        margin: 32px 0 !important;
        padding: 20px 20px 20px 48px;
        font-size: 1.05rem;
        border-left: 4px solid var(--color-border-strong);
    }
    
    .event-article__typography blockquote::before,
    .event-article__typography .wp-block-quote::before {
        left: 16px;
        top: 20px;
        width: 20px;
        height: 20px;
    }
}

.event-article__typography blockquote:not(.wp-embedded-content) p,
.event-article__typography .wp-block-quote:not(.wp-embedded-content) p {
    margin-bottom: 16px !important;
}

.event-article__typography blockquote:not(.wp-embedded-content) > *:last-child,
.event-article__typography .wp-block-quote:not(.wp-embedded-content) > *:last-child {
    margin-bottom: 0 !important;
}

.event-article__typography blockquote:not(.wp-embedded-content) cite,
.event-article__typography .wp-block-quote:not(.wp-embedded-content) cite,
.event-article__typography .wp-block-quote__citation {
    display: block;
    margin-top: 24px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-muted);
    font-style: normal;
}

.event-article__typography blockquote:not(.wp-embedded-content) cite::before,
.event-article__typography .wp-block-quote:not(.wp-embedded-content) cite::before,
.event-article__typography .wp-block-quote__citation::before {
    content: "\2014 ";
}

/* Event Meta Badge in Header */
.event-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1;
    padding: 0;
    margin: 0;
    border: none;
    box-sizing: border-box;
    flex-shrink: 0;
    user-select: none;
    vertical-align: middle;
    transition: color 0.15s ease;
}

.event-meta-badge__icon {
    flex-shrink: 0;
    stroke: var(--color-text-heading);
    opacity: 0.9;
    vertical-align: middle;
    display: inline-block;
}

.event-meta-badge__text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    line-height: 1;
}

.event-meta-badge__date {
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1;
    transition: color 0.15s ease;
}

.event-meta-badge__time {
    color: var(--color-text-secondary);
    font-weight: 400;
    line-height: 1;
}

.event-meta-badge__more {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    background: transparent;
    color: var(--color-text-heading);
    padding: 0;
    margin-left: 5px;
    border: none;
    border-radius: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(var(--color-tint--rgb), 0.3);
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.event-meta-badge--interactive {
    cursor: pointer;
}

@media (hover: hover) {
    .event-meta-badge--interactive:hover {
        color: var(--color-text-heading);
    }
    .event-meta-badge--interactive:hover .event-meta-badge__date {
        color: var(--color-text-heading);
    }
    .event-meta-badge--interactive:hover .event-meta-badge__more {
        color: var(--color-text-heading);
        text-decoration-color: var(--color-text-heading);
    }
}

/* Inner Header Info & Meta Bar Responsive Styles */
._inner-header__info {
    position: relative;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 16px;
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
}

._inner-header__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1 1 auto;
}

._inner-header__author {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex-shrink: 1;
}

._inner-header__author-link,
._inner-header__author-name {
    color: var(--color-text-heading);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    line-height: 1.2;
}

._inner-header__dates-group {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    line-height: 1;
}

._inner-header__sep {
    display: inline-block;
    width: 1px;
    height: 14px;
    background: var(--color-border);
    flex-shrink: 0;
    vertical-align: middle;
}

._inner-header__published-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    white-space: nowrap;
    color: var(--color-text-secondary);
    line-height: 1;
    font-size: inherit;
    vertical-align: middle;
    padding: 0;
    margin: 0;
}

._inner-header__date-icon {
    opacity: 0.75;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.article-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

._inner-header__share-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-heading);
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

._inner-header__share-btn:hover {
    background-color: var(--color-bg-tertiary);
}

/*
 * Phones: author on the first line, dates on the second, the share button
 * centred beside both. Everything on the second line starts where the
 * author's name starts: each icon sits in a column as wide as the 24px
 * avatar (5px + 14px + 5px, then the avatar's own 7px gap), so the two lines
 * read as one aligned block. News and events keep the same 6px between the
 * lines; before, a news date touched the name and an event's stood 14px off.
 */
@media (max-width: 640px) {
    ._inner-header__info {
        align-items: center;
        padding-bottom: 14px;
        margin-bottom: 20px;
        gap: 8px;
    }

    ._inner-header__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        font-size: 0.8125rem;
    }

    ._inner-header__author {
        width: 100%;
    }

    /* A long name such as the press centre's takes a second line instead of an ellipsis. */
    ._inner-header__author-link,
    ._inner-header__author-name {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 1.3;
    }

    /* Hide the author-date divider on mobile */
    ._inner-header__sep--author {
        display: none !important;
    }

    ._inner-header__dates-group {
        display: flex;
        align-items: center;
        row-gap: 8px;
        column-gap: 14px;
        width: 100%;
        flex-wrap: wrap;
        margin-top: 0;
        padding-left: 0;
        box-sizing: border-box;
    }

    /* On mobile, hide the horizontal pipe separator between the date items so wrapped/stacked items look clean */
    ._inner-header__sep--dates {
        display: none !important;
    }

    ._inner-header__published-date,
    .event-meta-badge {
        gap: 0;
        padding: 0;
        margin: 0;
        line-height: 1.2;
    }

    ._inner-header__date-icon,
    .event-meta-badge__icon {
        margin: 0 12px 0 5px;
    }

    /* Only the first item of the line stands under the avatar; the next one follows the text. */
    ._inner-header__dates-group > * + * ._inner-header__date-icon {
        margin: 0 6px 0 0;
    }

    .event-meta-badge {
        font-size: 0.8125rem;
    }

    .event-meta-badge__more {
        font-size: 0.8125rem;
    }

    /* A 44px target for the thumb; the negative margin keeps the icon on the text's right edge. */
    ._inner-header__share-btn {
        padding: 12px;
        margin-right: -12px;
    }
}



/* The row of networks and the tags under a news post. On a phone the 50px and
   25px of the desktop, after the text's own last margin, read as the article
   having ended a screen ago. */
.article-footer-meta {
    margin-top: 50px;
}
.social-follow-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px 0;
    border-top: 1px solid var(--color-border);
}
@media (max-width: 767px) {
    .article-footer-meta {
        margin-top: 24px;
    }
    .social-follow-block {
        padding: 20px 0;
        margin-bottom: 24px;
    }
}

/* Posts carried over from the old site often end in a paragraph holding only
   a line break, which added a blank line before the block above. typography.css
   gives every paragraph display: block !important, so this has to be too. */
.event-article__typography > p:last-child:empty,
.event-article__typography > p:last-child:has(> br:only-child) {
    display: none !important;
}

/* The networks under a news post (template-parts/content.php), from «Контакти» → «Соцмережі»:
   the theme's icons carry fill="black", so the colour is set here. */
.social-follow-block__link {
    display: inline-flex;
    width: 24px;
    height: 24px;
    color: var(--color-text-heading);
}
/* A 44px target around the 24px icon; the margin keeps the icons where they were. */
@media (pointer: coarse) {
    .social-follow-block__link {
        width: 44px;
        height: 44px;
        padding: 10px;
        margin: -10px;
    }
}
.social-follow-block__link svg,
.social-follow-block__link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.social-follow-block__link svg path:not([fill="none"]) {
    fill: currentColor;
}
