/*
Theme Name: Jičín srdcem (blocks)
Theme URI: https://jicin-srdcem.cz
Author: Jičín srdcem
Author URI: https://jicin-srdcem.cz
Description: Bloková (Full Site Editing) šablona pro politické hnutí a jeho kandidáty. Stránky se skládají z top-level layoutů (šablon), částí (header/patička) a patternů přímo v Editoru webu. Plně responzivní, optimalizováno pro PC i mobil.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jicin-srdcem-blocks
Tags: full-site-editing, block-patterns, politics, campaign, one-page, responsive, custom-colors, block-styles, translation-ready
*/

/* =====================================================================
   Pomocné proměnné (navázané na presety z theme.json)
   ===================================================================== */
:root {
    --js-radius: 18px;
    --js-radius-s: 12px;
    --js-shadow: 0 14px 40px -18px rgba(20, 60, 48, 0.35);
    --js-shadow-s: 0 6px 18px -10px rgba(20, 60, 48, 0.3);
    --js-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --js-line: var(--wp--preset--color--line);
    --js-bg: var(--wp--preset--color--graphite);
    --js-red-primary: var(--wp--preset--color--red-primary);
    --js-red-secondary: var(--wp--preset--color--red-secondary);
    --js-ink-2: var(--wp--preset--color--ink-2);
}

html {
    scroll-behavior: smooth;
}
body {
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}
img {
    max-width: 100%;
    height: auto;
}

.no-start-margin {
    margin-block-start: 0;
}

/* Plynulé přechody karet */
.js-card-hover {
    transition:
        transform 0.3s var(--js-ease),
        box-shadow 0.3s var(--js-ease),
        border-color 0.3s var(--js-ease);
}
.js-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--js-shadow);
}

/* =====================================================================
   Eyebrow (malý nadpisek nad sekcí)
   ===================================================================== */
.js-eyebrow {
    font-size: 0.78rem !important;
    font-weight: 650;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--wp--preset--color--ink-2) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.9rem !important;
}
.js-eyebrow::before {
    content: "";
    width: 26px;
    height: 1.5px;
    background: var(--js-red-primary);
    display: inline-block;
}
.js-eyebrow.is-light {
    color: #ffd8a8 !important;
}

/* =====================================================================
   Tlačítka — varianty (block styles)
   ===================================================================== */
.wp-block-button.is-style-ghost .wp-block-button__link {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
}
.wp-block-button.is-style-ghost .wp-block-button__link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.7);
}
.wp-block-button.is-style-ink .wp-block-button__link {
    background: var(--js-red-primary);
    color: #fff;
}
.wp-block-button.is-style-ink .wp-block-button__link:hover {
    background: var(--js-red-secondary);
}
.wp-block-button .wp-block-button__link {
    transition:
        transform 0.25s var(--js-ease),
        background 0.25s var(--js-ease);
}
.wp-block-button .wp-block-button__link:hover {
    transform: translateY(-2px);
}

/* =====================================================================
   HERO
   ===================================================================== */
.js-hero {
    position: relative;
    color: #fff;
    overflow: hidden;
    padding-top: clamp(4rem, 9vw, 7rem);
    padding-bottom: clamp(4rem, 9vw, 7rem);
}
.js-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 90px;
    background: var(--wp--preset--color--paper);
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 55%);
    pointer-events: none;
}
.js-hero :where(h1, h2, h3, p) {
    color: #fff;
}
.js-hero h1 .js-accent {
    color: #ff9d8a;
    font-style: italic;
    font-weight: 700;
}

.js-hero .background > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: -1;
}
.js-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    font-weight: 650;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #ffd8a8;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 0.45rem 0.9rem;
    border-radius: 100px;
}
.js-hero .js-eyebrow {
    color: white !important;
}
.js-hero-lead {
    font-size: clamp(1.05rem, 2.2vw, 1.28rem) !important;
    color: rgba(255, 255, 255, 0.86) !important;
    max-width: 36ch;
}
.js-hero-stats {
    gap: 2rem !important;
}
.js-hero-stats .js-stat b {
    font-family: var(--wp--preset--font-family--fraunces);
    font-size: 1.9rem;
    display: block;
    line-height: 1;
}
.js-hero-stats .js-stat span {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Ilustrace: Valdická brána + srdce */
.js-hero-art {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}
.js-hero-art .js-tower {
    width: min(330px, 80%);
    filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.4));
    animation: js-floaty 7s ease-in-out infinite;
}
.js-hero-art .js-heart-lg {
    position: absolute;
    right: 4%;
    top: -4%;
    width: 92px;
    animation: js-pulse 3.4s ease-in-out infinite;
}
.js-hero-art .js-heart-sm {
    position: absolute;
    left: 2%;
    bottom: 12%;
    width: 52px;
    opacity: 0.9;
    animation: js-pulse 3.4s ease-in-out infinite 0.8s;
}

.js-hero-width {
    min-width: 80%;
}

@keyframes js-floaty {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}
@keyframes js-pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.12);
    }
}

/* =====================================================================
   Sekce – mezery a varianty pozadí jdou přes theme.json/Group,
   tady jen jemné doplňky
   ===================================================================== */
.js-section-head {
    max-width: 640px;
}
.js-section-head p {
    color: var(--js-ink-2);
    font-size: 1.08rem;
}

/* =====================================================================
   Hodnoty (value cards)
   ===================================================================== */
.js-programme-point {
    background: #fff;
    border: 1px solid var(--js-line);
    border-radius: var(--js-radius);
    height: 100%;
    flex-flow: row !important;
}

.js-programme-point .js-programme-point__ic {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(238, 90, 82, 0.12);
    color: var(--js-red-primary);
    flex: 0 0 auto;
}
.js-programme-point .js-programme-point__ic svg {
    width: 26px;
    height: 26px;
}
.js-programme-point h3 {
    font-size: 1.3rem;
}
.js-programme-point p {
    color: var(--js-ink-2);
    font-size: 0.95rem;
    margin: 0;
}

#program .wp-block-group.is-layout-grid {
    grid-auto-rows: 1fr;
}
/* =====================================================================
   Program (priority)
   ===================================================================== */
.js-prio {
    background: #fff;
    border: 1px solid var(--js-line);
    border-radius: var(--js-radius);
    height: 100%;
}
.js-prio .js-prio__num {
    font-family: var(--wp--preset--font-family--fraunces);
    font-size: 1.5rem;
    color: var(--js-red-primary);
    background: var(--wp--preset--color--red-primary);
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 600;
    flex: none;
}
.js-prio h3 {
    font-size: 1.3rem;
    margin-bottom: 0.35rem;
}
.js-prio p {
    color: var(--js-ink-2);
    font-size: 0.97rem;
    margin: 0;
}

/* =====================================================================
   Kandidáti (Query Loop)
   ===================================================================== */
.js-cand-grid .wp-block-post {
    background: #fff;
    border: 1px solid var(--js-line);
    border-radius: var(--js-radius);
    overflow: hidden;
    transition:
        transform 0.3s var(--js-ease),
        box-shadow 0.3s var(--js-ease);
}
.js-cand-grid .wp-block-post:hover {
    transform: translateY(-5px);
    box-shadow: var(--js-shadow);
}
.js-cand__photo {
    position: relative;
    aspect-ratio: 1/1.08;
    background: var(--js-bg);
    overflow: hidden;
    margin: 0;
}
.js-cand__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.js-cand__photo .wp-block-post-featured-image {
    height: 100%;
    margin: 0;
}
.js-cand__photo .wp-block-post-featured-image a,
.js-cand__photo .wp-block-post-featured-image img {
    height: 100%;
}
.js-cand__rank {
    position: absolute;
    top: 0.7rem;
    left: 0.7rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--js-red-primary);
    color: #fff !important;
    font-weight: 700;
    display: grid;
    place-items: center;
    font-size: 0.95rem;
    box-shadow: var(--js-shadow-s);
    margin: 0 !important;
    z-index: 2;
}
.js-cand__body {
    padding: 1.1rem 1.15rem 1.3rem !important;
}
.js-cand__body .wp-block-post-title {
    font-size: 1.18rem !important;
    margin: 0 0 0.15rem;
}
.js-cand__body .wp-block-post-title a {
    text-decoration: none;
    color: var(--js-ink-2);
}
.js-cand__meta {
    color: var(--js-ink-2);
    font-size: 0.88rem;
    margin: 0;
}

/* =====================================================================
   Aktuality (Query Loop)
   ===================================================================== */
.js-news-grid .wp-block-post {
    background: #fff;
    border: 1px solid var(--js-line);
    border-radius: var(--js-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform 0.3s var(--js-ease),
        box-shadow 0.3s var(--js-ease);
}
.js-news-grid .wp-block-post:hover {
    transform: translateY(-4px);
    box-shadow: var(--js-shadow);
}
.js-news-grid .wp-block-post-featured-image {
    aspect-ratio: 16/9;
    margin: 0;
    background: var(--wp--preset--color--red-primary);
}
.js-news-grid .wp-block-post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.js-news__body {
    padding: 1.3rem 1.4rem 1.5rem !important;
}
.js-news__body .wp-block-post-title {
    font-size: 1.25rem !important;
    line-height: 1.2;
    margin: 0 0 0.5rem;
}
.js-news__date {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wp--preset--color--ink-2);
    font-weight: 600;
    margin: 0 0 0.6rem;
}
.js-news__body .wp-block-post-excerpt {
    color: var(--js-ink-2);
    font-size: 0.94rem;
}

/* =====================================================================
   Zapojte se / kontakt
   ===================================================================== */
.js-join {
    border-radius: clamp(20px, 4vw, 34px);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.js-join::before {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 260px;
    height: 260px;
    background: radial-gradient(
        circle,
        #8C767360,
        transparent 70%
    );
    pointer-events: none;
}
.js-join :where(h2, p) {
    color: #fff;
    position: relative;
}
.js-form {
    position: relative;
    display: grid;
    gap: 0.8rem;
}
.js-form input,
.js-form textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 0.9rem 1.1rem;
    border-radius: var(--js-radius-s);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font: inherit;
    font-size: 0.96rem;
}
.js-form textarea {
    resize: vertical;
    min-height: 96px;
}
.js-form input::placeholder,
.js-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.55);
}
.js-form input:focus,
.js-form textarea:focus {
    outline: 2px solid var(--js-red-primary);
    border-color: transparent;
}
.js-form button {
    background: var(--js-red-primary);
    color: #fff;
    border: 0;
    border-radius: 100px;
    padding: 0.9rem 1.5rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition:
        background 0.25s var(--js-ease),
        transform 0.25s var(--js-ease);
}
.js-form button:hover {
    background: var(--wp--preset--color--red-secondary);
    transform: translateY(-2px);
}
.js-form .js-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}
.js-form .js-status {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin: 0;
}
.js-form .js-status.ok {
    background: rgba(255, 255, 255, 0.14);
}
.js-form .js-status.err {
    background: rgba(238, 90, 82, 0.25);
}

/* =====================================================================
   Hlavička / patička
   ===================================================================== */
.js-header-wrap {
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid var(--js-line);
}
.js-header-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1; /* vrstva pod obsahem hlavičky */
    background: rgba(252, 250, 245, 0.75);
    backdrop-filter: blur(7px);
}

.js-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
.js-brand .js-heart-mark {
    width: 34px;
    height: 34px;
    color: var(--js-red-primary);
    flex: none;
}
.js-header .wp-block-navigation {
    font-weight: 500;
}
.js-header .wp-block-navigation a:hover {
    color: var(--js-red-primary);
}
.js-footer {
    background: var(--js-bg);
    color: rgba(255, 255, 255, 0.78);
}
.js-footer :where(h3, h4, strong) {
    color: #fff;
}
.js-footer a {
    color: rgba(255, 255, 255, 0.78);
}
.js-footer a:hover {
    color: #fff;
}
.js-footer .js-brand {
    color: #fff;
}
.js-footer-heading {
    font-family: var(--wp--preset--font-family--inter) !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
}
.js-footer .wp-block-social-links .wp-social-link {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transition:
        background 0.25s,
        transform 0.25s;
}
.js-footer .wp-block-social-links .wp-social-link:hover {
    background: var(--js-red-primary);
    transform: translateY(-2px);
}
.js-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* =====================================================================
   Responsivita doplňková
   ===================================================================== */
@media (max-width: 781px) {
    .js-hero-art {
        order: -1;
        margin-bottom: 2rem;
    }
    .js-hero-art .js-tower {
        width: 220px;
    }
    .js-leader__photo {
        max-width: 360px;
        margin-inline: auto;
    }
}

/* =====================================================================
   Přístupnost
   ===================================================================== */
:where(a, button, input, .wp-block-navigation-item__content):focus-visible {
    outline: 3px solid var(--js-red-primary);
    outline-offset: 2px;
    border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
