/**
 * Kurka – whole-site look (theme header, menu, content, footer).
 * Loaded by "PCM Ustawienia → Wygląd strony". Tuned for the Blocksy theme
 * (it is built on --theme-* variables), with plain selectors for others.
 */

body.pcm-site-kurka {
    /* own tokens (the plugin overwrites the four colours from Konfiguracja) */
    --k-moss: #1f4d3a;
    --k-moss-2: #2d6a4f;
    --k-coral: #e0533d;
    --k-ink: #1d2a24;
    --k-cream: #faf6ee;
    --k-sand: #f1e8d6;
    --k-muted: #5d6b63;
    --k-line: rgba(31, 77, 58, .12);
    --k-footer: #16372a;

    /* Blocksy palette: 1 links/buttons, 2 hover, 3 text, 4 headings, 5 borders, 6-7 light backgrounds, 8 white */
    --theme-palette-color-1: var(--k-moss-2);
    --theme-palette-color-2: var(--k-coral);
    --theme-palette-color-3: var(--k-ink);
    --theme-palette-color-4: var(--k-moss);
    --theme-palette-color-5: #e5dcc8;
    --theme-palette-color-6: var(--k-sand);
    --theme-palette-color-7: var(--k-cream);
    --theme-palette-color-8: #ffffff;
    --theme-text-color: var(--k-ink);
    --theme-headings-color: var(--k-moss);
    --theme-link-initial-color: var(--k-moss-2);
    --theme-link-hover-color: var(--k-coral);
    --theme-border-color: var(--k-line);
    --theme-button-background-initial-color: var(--k-coral);
    --theme-button-background-hover-color: var(--k-moss);
    --theme-button-text-initial-color: #ffffff;
    --theme-button-text-hover-color: #ffffff;
    --theme-button-border-radius: 999px;
    --theme-form-border-radius: 14px;
    --theme-form-field-border-initial-color: var(--k-line);
    --theme-form-field-border-focus-color: var(--k-moss-2);
    --dropdown-background-color: #ffffff;

    background-color: var(--k-cream) !important;
    color: var(--k-ink);
}

/* ---------- fonts ---------- */
body.pcm-site-fonts {
    --theme-font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
body.pcm-site-fonts h1, body.pcm-site-fonts h2, body.pcm-site-fonts h3,
body.pcm-site-fonts h4, body.pcm-site-fonts h5, body.pcm-site-fonts h6,
body.pcm-site-fonts .page-title, body.pcm-site-fonts .entry-title, body.pcm-site-fonts .site-title {
    --theme-font-family: "Fraunces", Georgia, serif;
    font-family: "Fraunces", Georgia, serif;
    letter-spacing: -.01em;
    text-wrap: balance;
}
body.pcm-site-kurka h1, body.pcm-site-kurka h2, body.pcm-site-kurka h3, body.pcm-site-kurka h4 { color: var(--k-moss); }

/* ---------- content ---------- */
body.pcm-site-kurka .entry-content a:not([class]) {
    color: var(--k-moss-2);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--k-coral) 55%, transparent);
    text-underline-offset: 3px;
}
body.pcm-site-kurka .entry-content a:not([class]):hover { color: var(--k-coral); }
body.pcm-site-kurka .hero-section .page-title,
body.pcm-site-kurka .entry-header .page-title { font-size: clamp(32px, 4.4vw, 52px); }
body.pcm-site-kurka .hero-section[data-type="type-2"] { background-color: var(--k-sand); }
body.pcm-site-kurka blockquote { border-left: 4px solid var(--k-coral); background: #fff; border-radius: 0 18px 18px 0; padding: 16px 22px; }
body.pcm-site-kurka .entry-content img { border-radius: 16px; }
body.pcm-site-hide-home-title.home .hero-section,
body.pcm-site-hide-home-title.home .entry-header { display: none; }

/* theme blog cards (archives, search) */
body.pcm-site-kurka .entries .entry-card,
body.pcm-site-kurka article.entry-card {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 10px 30px -14px rgba(31, 77, 58, .30);
    overflow: hidden;
}

/* ---------- buttons & forms ---------- */
body.pcm-site-kurka .wp-block-button__link,
body.pcm-site-kurka .ct-button,
body.pcm-site-kurka input[type="submit"],
body.pcm-site-kurka button[type="submit"]:not(.pcm-l-chip) {
    border-radius: 999px !important;
    font-family: inherit;
    font-weight: 800;
    letter-spacing: 0 !important;
    text-transform: none !important;
}
body.pcm-site-kurka .wp-block-button:not(.is-style-outline) .wp-block-button__link {
    background-color: var(--k-coral);
    color: #fff;
}
body.pcm-site-kurka .wp-block-button.is-style-outline .wp-block-button__link {
    color: var(--k-moss);
    border-color: var(--k-moss);
}
body.pcm-site-kurka input[type="text"], body.pcm-site-kurka input[type="email"],
body.pcm-site-kurka input[type="search"], body.pcm-site-kurka input[type="tel"],
body.pcm-site-kurka textarea, body.pcm-site-kurka select {
    border-radius: 14px !important;
    border: 2px solid var(--k-line) !important;
    background: #fff;
}
body.pcm-site-kurka input:focus, body.pcm-site-kurka textarea:focus, body.pcm-site-kurka select:focus {
    border-color: var(--k-moss-2) !important;
    box-shadow: 0 0 0 4px rgba(45, 106, 79, .14) !important;
    outline: 0;
}

/* ---------- header & menu ---------- */
body.pcm-site-header #header [data-row] {
    background-color: rgba(250, 246, 238, .94) !important;
    border-bottom: 1px solid var(--k-line);
}
body.pcm-site-header #header.ct-sticky [data-row],
body.pcm-site-header [data-sticky*="yes"] [data-row] { backdrop-filter: blur(10px); }
body.pcm-site-header #header .ct-menu-link,
body.pcm-site-header .site-header .menu a {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    color: var(--k-ink) !important;
}
body.pcm-site-header #header .ct-menu-link:hover,
body.pcm-site-header #header .current-menu-item > .ct-menu-link,
body.pcm-site-header #header .current-menu-ancestor > .ct-menu-link {
    color: var(--k-coral) !important;
}
body.pcm-site-header #header [data-id="menu"] > ul > li.current-menu-item > .ct-menu-link,
body.pcm-site-header #header [data-id="menu"] > ul > li.current-menu-ancestor > .ct-menu-link {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 8px;
    text-decoration-color: var(--k-coral);
}
body.pcm-site-header #header .sub-menu {
    background: #fff !important;
    border-radius: 16px;
    box-shadow: 0 18px 40px -16px rgba(31, 77, 58, .38) !important;
    padding: 8px !important;
    overflow: hidden;
}
body.pcm-site-header #header .sub-menu .ct-menu-link { border-radius: 10px; padding: 10px 14px !important; }
body.pcm-site-header #header .sub-menu .ct-menu-link:hover { background: #eef5ec; }
body.pcm-site-header #offcanvas .ct-panel-inner { background: var(--k-cream) !important; }
body.pcm-site-header #offcanvas .ct-menu-link { color: var(--k-moss) !important; font-weight: 800 !important; text-transform: none !important; }

/* ---------- footer ---------- */
body.pcm-site-footer .ct-footer,
body.pcm-site-footer .ct-footer [data-row],
body.pcm-site-footer .site-footer {
    background-color: var(--k-footer) !important;
    color: #c9dacd !important;
    --theme-text-color: #c9dacd;
    --theme-link-initial-color: #ffffff;
    --theme-link-hover-color: #f2c14e;
    --theme-headings-color: #ffffff;
    border-top: 0 !important;
}
body.pcm-site-footer .ct-footer h1, body.pcm-site-footer .ct-footer h2, body.pcm-site-footer .ct-footer h3,
body.pcm-site-footer .ct-footer h4, body.pcm-site-footer .ct-footer .widget-title { color: #fff !important; }
body.pcm-site-footer .ct-footer a { color: #fff; }
body.pcm-site-footer .ct-footer a:hover { color: #f2c14e; }
body.pcm-site-footer .ct-footer .widget,
body.pcm-site-footer .ct-footer .wp-block-group {
    background: transparent !important;
    box-shadow: none !important;
}

/* ---------- reading width of articles and single entries ---------- */
body.pcm-site-kurka.single .entry-content > :where(p, ul, ol, h2, h3, h4, blockquote, figure:not(.alignwide):not(.alignfull)) {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
body.pcm-site-kurka.single .entry-content > p { font-size: 17px; line-height: 1.7; }

/* ---------- page title band (pages whose theme title is off) ---------- */
body.pcm-site-page-titles.page .hero-section,
body.pcm-site-page-titles.page .entry-header { display: none; }
body.pcm-site-kurka .pcm-page-head {
    position: relative;
    overflow: hidden;
    margin: 0 0 36px;
    padding: 40px 44px 46px;
    border-radius: 28px;
    background: linear-gradient(135deg, #fdf3d9 0%, #eef6ef 55%, #d7ecf3 100%);
}
body.pcm-site-kurka .pcm-page-head::after {
    content: ""; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%;
    background: #f2c14e; opacity: .35;
}
body.pcm-site-kurka .pcm-page-head-kicker {
    display: inline-block; background: #fff; color: var(--k-moss-2); font-weight: 800; font-size: 12px;
    letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
}
body.pcm-site-kurka .pcm-page-head h1 {
    margin: 14px 0 0; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.1; color: var(--k-moss);
    position: relative; z-index: 1;
}
body.pcm-site-kurka .pcm-page-head p { margin: 12px 0 0; color: var(--k-muted); font-size: 18px; max-width: 680px; position: relative; z-index: 1; }
@media (max-width: 700px) { body.pcm-site-kurka .pcm-page-head { padding: 28px 22px 32px; } }

/* ---------- no author, no publish date anywhere ---------- */
body.pcm-site-hide-meta .entry-meta,
body.pcm-site-hide-meta .ct-meta-element-author,
body.pcm-site-hide-meta .ct-meta-element-date,
body.pcm-site-hide-meta .post-meta,
body.pcm-site-hide-meta .posted-on,
body.pcm-site-hide-meta .byline,
body.pcm-site-hide-meta .author-box,
body.pcm-site-hide-meta .ct-author-box,
body.pcm-site-hide-meta .wp-block-post-author,
body.pcm-site-hide-meta .wp-block-post-date { display: none !important; }

/* ---------- photo galleries in posts ([gallery]) ---------- */
body.pcm-site-kurka .gallery { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
body.pcm-site-kurka .gallery .gallery-item { width: auto !important; margin: 0 !important; max-width: none !important; }
body.pcm-site-kurka .gallery img { width: 100%; height: 220px; object-fit: cover; border-radius: 16px !important; border: 0 !important; transition: transform .3s; }
body.pcm-site-kurka .gallery a:hover img { transform: scale(1.03); }
body.pcm-site-kurka .gallery br { display: none; }
@media (max-width: 700px) { body.pcm-site-kurka .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } body.pcm-site-kurka .gallery img { height: 150px; } }

/* Menu item with the CSS class "pcm-menu-cta" (e.g. "Wesprzyj nas") shown as a button */
body.pcm-site-header #header .menu-item.pcm-menu-cta > .ct-menu-link {
    background: var(--k-coral, #e0533d); color: #fff !important; border-radius: 999px;
    padding: 9px 18px !important; margin-left: 6px; height: auto; line-height: 1.2;
}
body.pcm-site-header #header .menu-item.pcm-menu-cta > .ct-menu-link:hover { background: #c9442f; }
body.pcm-site-header #header .menu-item.pcm-menu-cta > .ct-menu-link::before,
body.pcm-site-header #header .menu-item.pcm-menu-cta > .ct-menu-link::after { display: none !important; }

/* ---------- phone menu (Blocksy #offcanvas): Kurka look, items slide in one by one ---------- */
body.pcm-site-header #offcanvas { --side-panel-width: min(88vw, 400px); background: rgba(31, 77, 58, .45); backdrop-filter: blur(4px); }
body.pcm-site-header #offcanvas .ct-panel-inner { background: #faf6ee; border-radius: 28px 0 0 28px; box-shadow: -18px 0 50px rgba(31, 77, 58, .25); }
body.pcm-site-header #offcanvas .ct-panel-actions { padding: 18px 20px 0; }
body.pcm-site-header #offcanvas .ct-toggle-close {
    width: 44px; height: 44px; border-radius: 50% !important; background: #1f4d3a !important; --theme-icon-color: #fff; color: #fff;
    display: grid; place-items: center; transition: transform .3s ease, background .2s;
}
body.pcm-site-header #offcanvas .ct-toggle-close svg { fill: #fff; width: 14px; height: 14px; }
body.pcm-site-header #offcanvas .ct-toggle-close:hover { transform: rotate(90deg); background: #e0533d !important; }
body.pcm-site-header #offcanvas .ct-panel-content-inner { padding: 6px 26px 120px; }
body.pcm-site-header #offcanvas .mobile-menu > ul > li { border-bottom: 1px solid #e7e2d6; }
body.pcm-site-header #offcanvas .mobile-menu > ul > li > .ct-sub-menu-parent > a,
body.pcm-site-header #offcanvas .mobile-menu > ul > li > a {
    font-family: "Fraunces", Georgia, serif; font-size: 24px; font-weight: 700; line-height: 1.2;
    color: #1f4d3a; padding: 14px 0; --menu-item-padding: 14px 0;
}
body.pcm-site-header #offcanvas .mobile-menu a:hover,
body.pcm-site-header #offcanvas .mobile-menu .current-menu-item > a,
body.pcm-site-header #offcanvas .mobile-menu .current-menu-item > .ct-sub-menu-parent > a { color: #e0533d; }
body.pcm-site-header #offcanvas .ct-toggle-dropdown-mobile {
    width: 36px; height: 36px; border-radius: 50%; background: #e3f0e4; display: grid; place-items: center; margin-left: 10px;
    --theme-icon-color: #1f4d3a; transition: transform .3s ease, background .2s;
}
body.pcm-site-header #offcanvas .ct-toggle-dropdown-mobile[aria-expanded="true"] { transform: rotate(180deg); background: #cfe3cd; }
body.pcm-site-header #offcanvas .sub-menu { margin: 0 0 12px; padding-left: 14px; border-left: 3px solid #cfe3cd; }
body.pcm-site-header #offcanvas .sub-menu a { font-family: "Nunito", system-ui, sans-serif; font-size: 17px; font-weight: 700; color: #3d4a44; padding: 8px 0; }
/* "Wesprzyj nas" as a full-width button */
body.pcm-site-header #offcanvas .mobile-menu > ul > li.pcm-menu-cta { border-bottom: 0; margin-top: 22px; }
body.pcm-site-header #offcanvas .mobile-menu > ul > li.pcm-menu-cta > a {
    display: flex !important; justify-content: center; align-items: center; gap: 8px; margin: 0 !important;
    font-family: "Nunito", system-ui, sans-serif; font-size: 18px; font-weight: 800;
    background: #e0533d; color: #fff !important; border-radius: 999px; padding: 15px 20px !important;
    box-shadow: 0 8px 20px rgba(224, 83, 61, .35);
}
body.pcm-site-header #offcanvas .mobile-menu > ul > li.pcm-menu-cta > a::before { content: "♥"; font-size: 18px; }
/* Items slide in one after another when the menu opens */
body.pcm-site-header #offcanvas.active .mobile-menu > ul > li { animation: pcm-mm-in .5s cubic-bezier(.2, 1, .3, 1) both; }
body.pcm-site-header #offcanvas.active .mobile-menu > ul > li:nth-child(2) { animation-delay: .05s; }
body.pcm-site-header #offcanvas.active .mobile-menu > ul > li:nth-child(3) { animation-delay: .1s; }
body.pcm-site-header #offcanvas.active .mobile-menu > ul > li:nth-child(4) { animation-delay: .15s; }
body.pcm-site-header #offcanvas.active .mobile-menu > ul > li:nth-child(5) { animation-delay: .2s; }
body.pcm-site-header #offcanvas.active .mobile-menu > ul > li:nth-child(6) { animation-delay: .25s; }
body.pcm-site-header #offcanvas.active .mobile-menu > ul > li:nth-child(7) { animation-delay: .3s; }
body.pcm-site-header #offcanvas.active .mobile-menu > ul > li:nth-child(8) { animation-delay: .35s; }
@keyframes pcm-mm-in { from { opacity: 0; transform: translateX(40px); } }
/* The moorhen from the logo flies across the bottom of the open menu */
body.pcm-site-header #offcanvas .ct-panel-inner::after {
    content: ""; position: absolute; left: 26px; bottom: 26px; width: 90px; height: 56px; opacity: .9; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 56'%3E%3Cpath d='M4 18c14 4 24 8 36 8s22 2 30 8c-12 2-26 4-40 4-10 0-18 0-24-2 0-6-1-12-2-18z' fill='%23d62b35'/%3E%3Cpath d='M22 38c10-6 26-10 40-12 6-1 10 2 9 5-2 8-10 14-22 16-10 2-20 0-27-9z' fill='%2322262d'/%3E%3Cpath d='M60 26c4-6 10-10 15-10 5 0 7 4 6 7-1 4-6 6-11 8z' fill='%2322262d'/%3E%3Cpath d='M78 20l9 2-8 4z' fill='%23d62b35'/%3E%3Cpath d='M86 21c2 0 3 1 2 2l-2 1z' fill='%23f2c14e'/%3E%3Cpath d='M34 44l-6 8M42 46l-2 9' stroke='%23c3cf1f' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
body.pcm-site-header #offcanvas.active .ct-panel-inner::after { animation: pcm-mm-fly 3.2s .4s ease-in-out infinite; }
@keyframes pcm-mm-fly { 0%, 100% { transform: translate(0, 0) rotate(-4deg); } 50% { transform: translate(14px, -8px) rotate(2deg); } }
/* Menu button in the header: round and green */
body.pcm-site-header .ct-header .ct-header-trigger[data-id="trigger"] {
    width: 46px !important; height: 46px !important; border-radius: 50% !important; background: #1f4d3a !important;
    --theme-icon-color: #fff; --theme-icon-hover-color: #fff; color: #fff;
    display: inline-grid !important; place-items: center; transition: transform .2s ease, background .2s;
}
body.pcm-site-header .ct-header .ct-header-trigger[data-id="trigger"] svg { fill: #fff; }
body.pcm-site-header .ct-header .ct-header-trigger[data-id="trigger"]:hover { background: #e0533d !important; transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) {
    body.pcm-site-header #offcanvas.active .mobile-menu > ul > li,
    body.pcm-site-header #offcanvas.active .ct-panel-inner::after { animation: none !important; }
}
