/*
 * Kastellorizo — inner pages v2.
 * Calmer typography, a readable text column and a consistent page header for
 * pages, posts and archives. Loaded on every page except the homepage, only
 * when kz_inner_v2() is true (see includes/helper-functions.php).
 */

:root {
    --kz-navy: #0b3563;
    --kz-blue: #1a5f98;
    --kz-ink: #1d2b36;
    --kz-muted: #4a5a68;
    --kz-line: #e3e8ee;
    --kz-soft: #f3f6fa;
    --kz-col: 820px;
}

/* ---------------------------------------------------------------- Pages & posts */

.blog-main article.inner {
    max-width: var(--kz-col);
    margin: 0 auto;
}

.blog-main article.inner > .entry-header {
    text-align: left;
    margin: 32px 0 24px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--kz-line);
}

.blog-main article.inner h1.entry-title {
    font-family: Inter, sans-serif;
    font-size: clamp(26px, 2.6vw, 36px) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em;
    color: var(--kz-navy) !important;
    text-align: left !important;
    margin: 0 !important;
}

/* The content row carried 50px top/bottom margins and side padding. */
.blog-main article.inner > .row {
    margin: 0 0 48px !important;
    padding: 0 !important;
}

.blog-main .article-content {
    font-family: Inter, sans-serif;
    color: var(--kz-ink);
}

.blog-main .article-content p,
.blog-main .article-content li {
    font-size: 17px !important;
    line-height: 1.7 !important;
    color: var(--kz-ink);
}

.blog-main .article-content p {
    margin: 0 0 1em !important;
}

/* The theme's style.css forces `line-height: 3 !important; font-size: 15px`
   on every single post/CPT with a long selector; match it and win by one step. */
html body.single .container .grid .blog-main article > .row .article-content p,
html body.single .container .grid .blog-main article > .row .article-content li {
    font-size: 17px !important;
    line-height: 1.7 !important;
}

html body.single .container .grid .blog-main article > .row .article-content p.kz-subhead {
    font-size: 19px !important;
    line-height: 1.3 !important;
}

/* Editors often use a paragraph that is entirely bold as a sub-heading; a small
   script in the footer marks those with .kz-subhead (CSS alone can't tell
   "whole paragraph bold" from "one bold word"). */
.blog-main .article-content p.kz-subhead,
.blog-main .article-content h2,
.blog-main .article-content h3,
.blog-main .article-content h4 {
    color: var(--kz-navy);
    font-weight: 700;
    line-height: 1.3 !important;
    margin: 1.6em 0 0.5em !important;
}

.blog-main .article-content p.kz-subhead { font-size: 19px !important; }
.blog-main .article-content h2 { font-size: 24px !important; }
.blog-main .article-content h3 { font-size: 20px !important; }
.blog-main .article-content h4 { font-size: 18px !important; }

.blog-main .article-content a {
    color: var(--kz-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-main .article-content a:hover { color: var(--kz-navy); }

.blog-main .article-content ul,
.blog-main .article-content ol {
    padding-left: 1.3em;
    margin: 0 0 1.1em;
}

.blog-main .article-content li { margin: 0.25em 0; }

.blog-main .article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.blog-main .article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.2em;
    font-size: 15px;
}

.blog-main .article-content th,
.blog-main .article-content td {
    border: 1px solid var(--kz-line);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.blog-main .article-content th { background: var(--kz-soft); }

/* Share row: quiet, aligned with the text column. */
.blog-main .share-buttons {
    margin-top: 32px !important;
    padding-top: 16px;
    border-top: 1px solid var(--kz-line);
    justify-content: flex-start !important;
    font-size: 14px;
}

/* ------------------------------------------ Accordions (Ultimate Blocks toggle) */

.blog-main .wp-block-ub-content-toggle-accordion {
    border: 1px solid var(--kz-line) !important;
    border-radius: 12px !important;
    overflow: hidden;
    margin: 0 0 12px !important;
}

.blog-main .wp-block-ub-content-toggle-accordion-title-wrap {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding-right: 20px !important;
    margin: 0 !important;
    background: var(--kz-soft) !important;
    transition: background 0.2s;
}

.blog-main .wp-block-ub-content-toggle-accordion-title-wrap:hover { background: #e8f0f8 !important; }

.blog-main .wp-block-ub-content-toggle-accordion-title {
    flex: 1;
    margin: 0 !important;
    padding: 16px 20px !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    color: var(--kz-navy) !important;
}

.blog-main .wp-block-ub-content-toggle-accordion-toggle-wrap { color: var(--kz-navy) !important; }

.blog-main .wp-block-ub-content-toggle-accordion-content-wrap {
    padding: 16px 20px !important;
    border-top: 1px solid var(--kz-line);
}

/* -------------------------------------------------------------------- Archives */

/* The archive wrapper is a flex row: stack header and list and centre them. */
main > section#primary {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
}

/* Archives render an empty sidebar list (<li class="parent"> </li>) above the
   posts; hide it only when it has no links. */
main > section#primary > ul#sidebar:not(:has(a)) {
    display: none !important;
}

main > section > header.page-header {
    width: 100%;
    max-width: var(--kz-col);
    margin: 32px auto 8px;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--kz-line);
    text-align: left;
}

main > section > header.page-header h1.page-title {
    font-family: Inter, sans-serif;
    font-size: clamp(26px, 2.6vw, 36px) !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
    color: var(--kz-navy) !important;
    text-align: left !important;
    margin: 0 !important;
}

#content.site-content {
    width: 100%;
    max-width: var(--kz-col);
    margin: 20px auto 56px !important;
}

#content.site-content a.single-item {
    display: block;
    padding: 18px 22px !important;
    margin: 0 0 12px !important;
    background: #fff;
    border: 1px solid var(--kz-line) !important;
    border-radius: 14px;
    box-shadow: none !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#content.site-content a.single-item:hover,
#content.site-content a.single-item:focus-visible {
    border-color: #b9cde0 !important;
    box-shadow: 0 6px 18px rgba(15, 45, 80, 0.08) !important;
}

#content.site-content a.single-item .entry-header small {
    font-size: 13px !important;
    color: var(--kz-muted);
}

#content.site-content a.single-item h1.entry-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    color: var(--kz-navy) !important;
    margin: 6px 0 0 !important;
}

#content.site-content a.single-item .read-more {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600;
    color: var(--kz-blue) !important;
    text-align: left !important;
    margin: 10px 0 0 !important;
}

/* ---------------------------------------------------------------------- Mobile */

@media screen and (max-width: 700px) {
    .blog-main article.inner > .entry-header,
    main > section > header.page-header { margin-top: 20px; }

    .blog-main .article-content p,
    .blog-main .article-content li,
    html body.single .container .grid .blog-main article > .row .article-content p,
    html body.single .container .grid .blog-main article > .row .article-content li { font-size: 16px !important; }

    #content.site-content a.single-item { padding: 16px !important; }
}
