/*!
Theme Name: Blocksy Child - Valašská OB
Theme URI: https://valasska.skob-zlin.cz
Author: Frgy
Template: blocksy
Description: Child theme for Valašská oblast orientačního běhu
Version: 2.0.1
Text Domain: blocksy-child-valasska
*/

/* ======================================================
   VALAŠSKÁ OB — MODERN SPORT THEME
   ====================================================== */

:root {
    --ob-orange: #F26522;
    --ob-orange-dark: #D95A1E;
    --ob-orange-light: rgba(242, 101, 34, 0.12);
    --ob-black: #1a1a1a;
    --ob-white: #ffffff;
    --ob-offwhite: #f8f7f4;
    --ob-gray-100: #f5f4f0;
    --ob-gray-200: #e8e6e1;
    --ob-gray-500: #888;
    --ob-gray-700: #444;
    --ob-shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --ob-shadow-md: 0 8px 24px rgba(0,0,0,0.10);
    --ob-shadow-lg: 0 16px 48px rgba(0,0,0,0.14);
    --ob-radius: 12px;
    --ob-radius-lg: 20px;
    --ob-transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== GLOBAL BACKGROUND ===== */
body {
    background: var(--ob-offwhite) !important;
}

/* Remove any top gap between header and hero */
.page-id-86 .ct-container,
.page-id-86 .content-area,
.page-id-86 .site-content,
.page-id-86 main,
.page-id-86 article,
.page-id-86 .entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Make sure the entire page uses offwhite, not flat white */
.page-id-86 .entry-content > .wp-block-group.has-white-background-color.has-background,
.page-id-86 .entry-content > .wp-block-group.has-background[style*="background-color:#ffffff"],
.page-id-86 .entry-content > .wp-block-group.has-background[style*="background-color: #ffffff"] {
    background-color: transparent !important;
}

/* ===== HERO SECTION ===== */
.hero-cover {
    position: relative;
    margin-top: 0 !important;
    overflow: hidden; /* Prevent slider overflow */
}

/* Hero Carousel Styles */
.hero-carousel {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-carousel .splide__track,
.hero-carousel .splide__list,
.hero-carousel .splide__slide {
    height: 100% !important;
}

.hero-carousel-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 32%; /* default; overridden per-slide via inline style */
    background-repeat: no-repeat;
}

/* Dark overlay for text readability */
.hero-carousel::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.32);
    z-index: 2;
    pointer-events: none;
}

.hero-cover .wp-block-cover__inner-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 3; /* Above the carousel and its overlay */
}

.hero-cover h1 {
    text-shadow: 0 4px 30px rgba(0,0,0,0.5);
    letter-spacing: 3px;
}

.hero-cover p {
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    opacity: 0.92;
}

/* Hero buttons */
.hero-cover .wp-block-button.is-style-fill .wp-block-button__link {
    background: var(--ob-orange) !important;
    color: var(--ob-white) !important;
    border: 2px solid var(--ob-orange) !important;
    box-shadow: 0 4px 20px rgba(242,101,34,0.4);
    transition: all var(--ob-transition);
}

.hero-cover .wp-block-button.is-style-fill .wp-block-button__link:hover {
    background: var(--ob-orange-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(242,101,34,0.55);
}

.hero-cover .wp-block-button.is-style-outline .wp-block-button__link {
    border: 2px solid rgba(255,255,255,0.85) !important;
    color: var(--ob-white) !important;
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.08) !important;
    transition: all var(--ob-transition);
}

.hero-cover .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: var(--ob-white) !important;
    color: var(--ob-black) !important;
    border-color: var(--ob-white) !important;
    transform: translateY(-2px);
}

/* ===== SECTION HEADINGS with orange underline ===== */
.section-heading {
    display: block;
    width: fit-content;
    margin-left: auto !important;
    margin-right: auto !important;
    position: relative;
    padding-bottom: 16px !important;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1.5px;
}

/* Hide the page-title field in the block editor canvas to match the front-end (Blocksy disables it per-page). */
.editor-styles-wrapper .editor-post-title,
.editor-styles-wrapper .wp-block-post-title,
.editor-visual-editor__post-title-wrapper {
    display: none !important;
}

.section-heading::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--ob-orange);
    border-radius: 2px;
}

/* ===== SECTION: NEWS ===== */
.news-section {
    background: linear-gradient(180deg, var(--ob-offwhite) 0%, var(--ob-gray-100) 100%) !important;
    position: relative;
}

/* wp:query news cards */
.news-section .wp-block-post-template {
    gap: 28px !important;
}

.news-section .wp-block-post {
    background: var(--ob-white);
    border-radius: var(--ob-radius);
    overflow: hidden;
    box-shadow: var(--ob-shadow-sm);
    transition: all var(--ob-transition);
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

.news-section .wp-block-post:hover {
    transform: translateY(-6px);
    box-shadow: var(--ob-shadow-lg);
}

.news-section .wp-block-post a {
    position: relative;
    z-index: 2;
}

.news-section .wp-block-post::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--ob-orange), var(--ob-orange-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--ob-transition);
}

.news-section .wp-block-post:hover::after {
    transform: scaleX(1);
}

/* Featured image in news card */
.news-section .wp-block-post-featured-image {
    overflow: hidden;
    border-radius: var(--ob-radius) var(--ob-radius) 0 0;
    margin: 0 !important;
}

.news-section .wp-block-post-featured-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-section .wp-block-post:hover .wp-block-post-featured-image img {
    transform: scale(1.06);
}

.news-card-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* News card inner content */
.news-card-content {
    padding: 24px !important;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-section .wp-block-post-date {
    font-size: 13px !important;
    color: var(--ob-orange) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px !important;
}

.news-section .wp-block-post-title {
    margin-bottom: 10px !important;
}

.news-section .wp-block-post-title a {
    color: var(--ob-black);
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.3;
    transition: color var(--ob-transition);
}

.news-section .wp-block-post-title a:hover {
    color: var(--ob-orange);
}

.news-section .wp-block-post-excerpt {
    color: var(--ob-gray-700);
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-section .wp-block-post-excerpt__more-text {
    margin-top: auto !important;
}

.news-section .wp-block-post-excerpt__more-link {
    display: inline-block;
    color: var(--ob-orange) !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all var(--ob-transition);
}

.news-section .wp-block-post-excerpt__more-link:hover {
    color: var(--ob-orange-dark) !important;
    transform: translateX(4px);
}

/* All-posts button */
.news-section .wp-block-button .wp-block-button__link {
    background: transparent !important;
    color: var(--ob-orange) !important;
    border: 2px solid var(--ob-orange) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--ob-transition);
}

.news-section .wp-block-button .wp-block-button__link:hover {
    background: var(--ob-orange) !important;
    color: var(--ob-white) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242,101,34,0.35);
}

/* ===== SECTION: CO NABÍZÍME (Feature Boxes) ===== */
.features-section {
    background: linear-gradient(160deg, var(--ob-gray-100) 0%, #ede9e3 50%, var(--ob-gray-100) 100%) !important;
    position: relative;
    overflow: hidden;
}

/* Decorative background element */
.features-section::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(242,101,34,0.05);
    pointer-events: none;
}

.features-section::after {
    content: "";
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(242,101,34,0.04);
    pointer-events: none;
}

/* Feature card */
.feature-card {
    background: var(--ob-white) !important;
    border-radius: var(--ob-radius-lg) !important;
    border: none !important;
    position: relative;
    overflow: hidden;
    box-shadow: var(--ob-shadow-sm);
    transition: all var(--ob-transition);
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ob-orange), #ff8c42);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--ob-transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--ob-shadow-lg);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

/* Large decorative number */
.feature-number {
    font-size: 64px;
    font-weight: 900 !important;
    line-height: 1 !important;
    background: linear-gradient(135deg, var(--ob-orange) 0%, #ff8c42 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.9;
    margin-bottom: 0 !important;
    letter-spacing: -2px !important;
    font-family: "Montserrat", sans-serif !important;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ob-black);
    margin-bottom: 12px !important;
}

.feature-card p {
    color: var(--ob-gray-700) !important;
    font-size: 15px;
    line-height: 1.7 !important;
}

/* ===== SECTION: SPONSORS ===== */
.sponsors-section {
    background: linear-gradient(180deg, var(--ob-gray-100) 0%, var(--ob-offwhite) 100%) !important;
    position: relative;
}

.sponsors-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 1000px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ob-gray-200), transparent);
}

.sponsors-section .wp-block-image,
.sponsors-section .wp-block-column p {
    transition: transform var(--ob-transition);
}

.sponsors-section .wp-block-image:hover,
.sponsors-section .wp-block-column p:hover {
    transform: scale(1.05);
}

.sponsors-section a {
    color: #fe5900 !important;
    text-decoration: none;
    transition: color var(--ob-transition);
}

.sponsors-section a:hover {
    color: var(--ob-orange-dark) !important;
}

/* ===== SOCIAL + CONTACT FOOTER AREA ===== */
.social-contact-section {
    background: linear-gradient(180deg, var(--ob-offwhite) 0%, var(--ob-gray-100) 100%) !important;
    position: relative;
}

.social-contact-section .wp-block-separator {
    border-color: var(--ob-gray-200) !important;
    opacity: 0.5;
}

.social-contact-section .wp-block-social-links .wp-social-link {
    transition: all var(--ob-transition);
}

.social-contact-section .wp-block-social-links .wp-social-link:hover {
    background: var(--ob-orange-dark) !important;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 16px rgba(242,101,34,0.35);
}

.social-contact-section .contact-link a {
    color: var(--ob-gray-500) !important;
    text-decoration: none;
    font-size: 13px;
    transition: color var(--ob-transition);
}

.social-contact-section .contact-link a:hover {
    color: var(--ob-orange) !important;
}

/* ======================================================
   CORE BLOCK SUPPORTS (INJECTED FOR GLOBAL FOOTER)
   Matches the exact layout generated by Gutenberg on the homepage
   ====================================================== */
.wp-container-core-group-is-layout-c2b718a2 > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width:1200px;margin-left:auto !important;margin-right:auto !important;}
.wp-container-core-group-is-layout-c2b718a2 > .alignwide{max-width:1200px;}
.wp-container-core-group-is-layout-c2b718a2 .alignfull{max-width:none;}
.wp-container-core-group-is-layout-c2b718a2 > .alignfull{margin-right:calc(24px * -1);margin-left:calc(24px * -1);}

.wp-container-core-columns-is-layout-dfcdbb8e{flex-wrap:nowrap;gap:2em 48px;}

.wp-container-core-group-is-layout-659dfdd4 > :where(:not(.alignleft):not(.alignright):not(.alignfull)){max-width:800px;margin-left:auto !important;margin-right:auto !important;}
.wp-container-core-group-is-layout-659dfdd4 > .alignwide{max-width:800px;}
.wp-container-core-group-is-layout-659dfdd4 .alignfull{max-width:none;}
.wp-container-core-group-is-layout-659dfdd4 > .alignfull{margin-right:calc(24px * -1);margin-left:calc(24px * -1);}

.wp-container-core-social-links-is-layout-7c5b669a{gap:0.5em 16px;}

/* ===== GENERAL BUTTON STYLES ===== */
.wp-block-button__link {
    border-radius: 6px !important;
    transition: all var(--ob-transition);
}

/* ===== GENERAL SEPARATOR ACCENT ===== */
.wp-block-separator {
    border-color: var(--ob-gray-200) !important;
}

/* ===== PREVENT TRANSITION-END MICROSHIFT =====
   When an element transforms on hover (translateY, scale, ...), the browser promotes it
   to a GPU compositor layer during the transition and destroys the layer when it ends,
   re-rasterizing text/icons at pixel-snapped coordinates → visible sub-pixel jump.
   Forcing a permanent compositor layer via `will-change` keeps the rasterization stable. */
.feature-card,
.news-section .wp-block-post,
.news-section .wp-block-post-featured-image img,
.sponsors-section .wp-block-image,
.sponsors-section .wp-block-column p,
.social-contact-section .wp-block-social-links .wp-social-link,
.hero-cover .wp-block-button__link {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* ===== HEADER NAV ===== */
header.ct-header,
.ct-header [data-row],
.ct-header [data-row] > div {
    background-color: var(--ob-offwhite) !important;
}

header [data-id="menu"] a:hover,
header .ct-menu-link:hover {
    color: var(--ob-orange) !important;
}

/* Sticky header subtle shadow */
header.ct-header[data-sticky] {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

/* Tighter header (was 120px). Override directly on the row and its inner <div>.
   Remove Blocksy's default bottom border on the header middle row. */
.ct-header [data-row="middle"],
.ct-header [data-row="middle"] > div {
    --height: 80px !important;
    --shrink-height: 80px !important;
    min-height: 80px !important;
    --theme-border-bottom: none !important;
    border-bottom: none !important;
}

/* ===== PAGE HERO / TITLE (static pages like /dokumenty/ etc.) =====
   Brings Blocksy's default page hero in line with the homepage section
   headings and the Novinky archive title — warm-gray gradient band +
   centered H1 with orange underline. Full-bleed (spans viewport width)
   to match the Novinky archive header. */

/* Kill the top padding on Blocksy's container wrapper for pages so the
   hero sits flush beneath the header (no offwhite "band" above it). */
body:not(.home) .ct-container-full[data-vertical-spacing*="top"] {
    padding-top: 0 !important;
}

/* Hero band — spans the full viewport width regardless of container width */
.hero-section[data-type="type-1"] {
    background: linear-gradient(180deg, var(--ob-gray-100) 0%, var(--ob-offwhite) 100%);
    padding: 52px 24px 28px !important;
    text-align: center !important;
    margin: 0 calc(50% - 50vw) 32px !important;
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box;
}
.hero-section[data-type="type-1"] .entry-header {
    max-width: 900px !important;
    margin: 0 auto !important;
    text-align: center !important;
}
.hero-section[data-type="type-1"] .page-title {
    display: inline-block !important;
    font-size: clamp(28px, 3vw, 40px) !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 3px !important;
    color: var(--ob-black) !important;
    padding-bottom: 14px !important;
    margin: 0 auto !important;
    position: relative !important;
    float: none !important;
}
.hero-section[data-type="type-1"] .page-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--ob-orange);
    border-radius: 2px;
}

/* ===== HEADER SOCIAL ICONS =====
   The real SVG is injected into the menu item title via the
   nav_menu_item_title filter (functions.php). The original label stays as
   screen-reader-text for a11y. */
.ct-header [data-id="menu"] .menu-item.social-icon > .ct-menu-link {
    padding-inline: 10px !important;
    gap: 0;
    overflow: visible !important;
}
.ct-header [data-id="menu"] .menu-item.social-icon > .ct-menu-link .social-svg {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: transform var(--ob-transition);
}
.ct-header [data-id="menu"] .menu-item.social-icon > .ct-menu-link:hover .social-svg {
    transform: scale(1.15);
}
/* Blocksy hover adds `svg { fill: orange }` globally; force the Instagram
   outline shapes to stay unfilled so only their stroke turns orange. */
.ct-header [data-id="menu"] .menu-item.social-icon-ig .social-svg .ig-frame,
.ct-header [data-id="menu"] .menu-item.social-icon-ig .social-svg .ig-lens {
    fill: none !important;
    stroke: currentColor;
}
.ct-header [data-id="menu"] .menu-item.social-icon-ig .social-svg .ig-dot {
    fill: currentColor !important;
    stroke: none;
}
.ct-header [data-id="menu"] .menu-item.social-icon .screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Pull the desktop dropdown closer to the menu text.
   Blocksy anchors .sub-menu at `top: 100%` of the <li>. With the 80px
   header row, a -10px margin keeps it perfectly aligned with the menu items. */
.ct-header [data-id="menu"] > ul > li > .sub-menu {
    margin-top: -10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .feature-number {
        font-size: 48px !important;
    }
}

@media (max-width: 781px) {
    .hero-cover h1 {
        font-size: 36px;
    }

    .hero-cover p {
        font-size: 16px;
    }

    .feature-card {
        margin-bottom: 16px;
    }

    .feature-number {
        font-size: 42px !important;
    }

    .news-section .wp-block-post-featured-image img {
        height: 160px;
    }

    .sponsors-section .wp-block-image img {
        max-height: 55px;
    }

    .sponsors-section img.wp-image-17 {
        max-height: 70px;
    }

    .sponsors-section img.wp-image-18 {
        max-height: 45px;
    }
}

@media (max-width: 480px) {
    .hero-cover h1 {
        font-size: 28px;
    }

    .hero-cover .wp-block-buttons {
        flex-direction: column;
    }
}

/* ===== SMOOTH SCROLL ===== */
html {
    scroll-behavior: smooth;
}

/* ===== SELECTION COLOR ===== */
::selection {
    background: var(--ob-orange-light);
    color: var(--ob-black);
}

/* ===== SPACING FIXES — HOMEPAGE ONLY ===== */

/* 1. Kill Blocksy page wrapper padding on homepage */
.page-id-86 .ct-container-full {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Kill Blocksy vertical spacing on homepage container */
.page-id-86 [data-vertical-spacing] {
    --theme-content-vertical-spacing: 0px !important;
}

/* 2. Remove margins between full-width sections */
.page-id-86 .entry-content > .alignfull {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.page-id-86 .entry-content.is-layout-constrained > .alignfull + .alignfull {
    margin-block-start: 0 !important;
}

/* 3. Entry-content no spacing */
.page-id-86 .entry-content {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 4. Article wrapper */
.page-id-86 article.page .entry-content {
    padding: 0 !important;
}

.page-id-86 article.type-page {
    margin: 0 !important;
    padding: 0 !important;
}

/* 5. Section-specific */
.news-section,
.features-section,
.sponsors-section,
.social-contact-section {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* 6. Query loop grid gap */
.news-grid.wp-block-post-template {
    --wp--style--block-gap: 24px;
}



/* ======================================================
   SINGLE POST — NOVINKY DETAIL PAGE
   ====================================================== */

.novinky-single {
    background: linear-gradient(180deg, var(--ob-offwhite) 0%, var(--ob-gray-100) 100%);
    padding-bottom: 80px;
}

/* ----- Hero with featured image ----- */
.novinky-single-hero {
    position: relative;
    display: grid;
    color: var(--ob-white);
    overflow: hidden;
    background: var(--ob-gray-100);
    max-width: 1000px;
    width: calc(100% - 48px);
    margin: 40px auto 0;
    border-radius: var(--ob-radius-lg);
    box-shadow: var(--ob-shadow-md);
}

.novinky-single-hero > * {
    grid-column: 1;
    grid-row: 1;
}

.novinky-single-hero-bg {
    width: 100%;
    height: auto;
    display: block;
}

.novinky-single-hero-dim {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
}

.novinky-single-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    align-self: end;
    padding: 48px 24px 176px;
    box-sizing: border-box;
}

/* ----- Plain header (no featured image) ----- */
.novinky-single-header-plain {
    background: linear-gradient(180deg, var(--ob-offwhite), var(--ob-gray-100));
    padding: 40px 24px 48px;
    text-align: center;
}
.novinky-single-header-plain .novinky-single-cat-plain {
    color: var(--ob-white) !important;
    border: 2px solid var(--ob-orange);
    background: var(--ob-orange);
    padding: 4px 12px; /* adjust for border width */
}
.novinky-single-title-plain {
    color: var(--ob-black) !important;
    font-weight: 700;
    text-shadow: none;
}
.novinky-single-meta-plain {
    color: var(--ob-gray-700) !important;
    justify-content: center;
}

/* ----- Category pill ----- */
.novinky-single-cat {
    display: inline-block;
    background: var(--ob-orange);
    color: var(--ob-white) !important;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    margin-bottom: 18px;
}

/* ----- Headline ----- */
.novinky-single-title {
    color: var(--ob-white);
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 900;
    line-height: 1.15;
    margin: 0 0 18px;
    letter-spacing: 0.5px;
    text-shadow: 0 4px 30px rgba(0,0,0,0.45);
}

/* ----- Meta row ----- */
.novinky-single-meta {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}
.novinky-single-meta .novinky-single-author::before {
    content: "·";
    margin-right: 20px;
    opacity: 0.6;
}
.novinky-single-meta-plain .novinky-single-author::before {
    content: "·";
    margin-right: 20px;
    color: var(--ob-orange);
}

/* ----- Article body ----- */
.novinky-single-body {
    max-width: 800px;
    margin: -160px auto 0;
    padding: 48px 40px;
    background: var(--ob-white);
    border-radius: var(--ob-radius);
    box-shadow: var(--ob-shadow-md);
    position: relative;
    z-index: 3;
}
.novinky-single-header-plain + .novinky-single-body {
    margin-top: 0;
    box-shadow: var(--ob-shadow-sm);
}

.novinky-single-content {
    font-size: 16px;
    line-height: 1.75;
    color: var(--ob-gray-700);
}
.novinky-single-content > :first-child {
    margin-top: 0;
}
.novinky-single-content h2,
.novinky-single-content h3,
.novinky-single-content h4 {
    color: var(--ob-black);
    margin-top: 1.8em;
    margin-bottom: 0.5em;
    line-height: 1.25;
}
.novinky-single-content h2 { font-size: 26px; }
.novinky-single-content h3 { font-size: 22px; }
.novinky-single-content h4 { font-size: 18px; }
.novinky-single-content a {
    color: var(--ob-orange);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--ob-transition);
}
.novinky-single-content a:hover {
    color: var(--ob-orange-dark);
}
.novinky-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--ob-radius);
    margin: 1.5em 0;
}
.novinky-single-content blockquote {
    border-left: 4px solid var(--ob-orange);
    padding: 8px 20px;
    margin: 1.5em 0;
    font-style: italic;
    color: var(--ob-black);
    background: var(--ob-orange-light);
    border-radius: 0 var(--ob-radius) var(--ob-radius) 0;
}

/* ----- Fotogalerie section ----- */
.novinky-single-gallery {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--ob-gray-200);
}
.novinky-single-gallery-title {
    display: inline-block;
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--ob-black);
    margin: 0 0 24px;
    padding-bottom: 10px;
    position: relative;
}
.novinky-single-gallery-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--ob-orange);
    border-radius: 2px;
}
.novinky-single-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.novinky-single-gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: none;
    background: var(--ob-gray-100);
    border-radius: var(--ob-radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--ob-shadow-sm);
    transition: transform var(--ob-transition), box-shadow var(--ob-transition);
}
.novinky-single-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.novinky-single-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--ob-shadow-md);
}
.novinky-single-gallery-item:hover img {
    transform: scale(1.06);
}
.novinky-single-gallery-item:focus-visible {
    outline: 2px solid var(--ob-orange);
    outline-offset: 2px;
}

@media (max-width: 781px) {
    .novinky-single-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}
@media (max-width: 480px) {
    .novinky-single-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ----- Lightbox ----- */
.novinky-single-lightbox {
    padding: 0;
    border: none;
    background: transparent;
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}
.novinky-single-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(4px);
}
.novinky-single-lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}
.novinky-single-lightbox-img {
    max-width: 92vw;
    max-height: 86vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    user-select: none;
}
.novinky-single-lightbox-close,
.novinky-single-lightbox-prev,
.novinky-single-lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.1);
    color: var(--ob-white);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ob-transition);
    font-family: inherit;
    line-height: 1;
    padding: 0;
}
.novinky-single-lightbox-close {
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    font-size: 24px;
}
.novinky-single-lightbox-prev,
.novinky-single-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    font-size: 32px;
    font-weight: 300;
}
.novinky-single-lightbox-prev { left: 24px; }
.novinky-single-lightbox-next { right: 24px; }

.novinky-single-lightbox-close:hover,
.novinky-single-lightbox-prev:hover,
.novinky-single-lightbox-next:hover {
    background: var(--ob-orange);
    border-color: var(--ob-orange);
}
.novinky-single-lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.novinky-single-lightbox-next:hover { transform: translateY(-50%) translateX(3px); }

@media (max-width: 600px) {
    .novinky-single-lightbox-close { top: 12px; right: 12px; width: 38px; height: 38px; font-size: 20px; }
    .novinky-single-lightbox-prev,
    .novinky-single-lightbox-next { width: 40px; height: 40px; font-size: 24px; }
    .novinky-single-lightbox-prev { left: 8px; }
    .novinky-single-lightbox-next { right: 8px; }
}

/* ----- Back link ----- */
.novinky-single-backlink {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--ob-gray-200);
    text-align: center;
}
.novinky-single-backlink a {
    color: var(--ob-orange);
    font-weight: 600;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--ob-transition);
    display: inline-block;
}
.novinky-single-backlink a:hover {
    color: var(--ob-orange-dark);
    transform: translateX(-4px);
}

/* ----- Comments ----- */
.novinky-single-comments {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--ob-gray-200);
}
.novinky-single-comments .comments-title,
.novinky-single-comments h2.comments-title,
.novinky-single-comments h3#reply-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--ob-black);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}
.novinky-single-comments .comment-list {
    list-style: none;
    padding: 0;
}
.novinky-single-comments .comment-list li.comment {
    background: var(--ob-offwhite);
    border-radius: var(--ob-radius);
    padding: 20px 24px;
    margin-bottom: 16px;
    border-left: 3px solid var(--ob-orange);
}
.novinky-single-comments .comment-author .fn {
    color: var(--ob-black);
    font-weight: 700;
}
.novinky-single-comments .comment-metadata a {
    color: var(--ob-gray-500);
    font-size: 12px;
    text-decoration: none;
}
.novinky-single-comments .comment-form label {
    font-weight: 600;
    color: var(--ob-gray-700);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.novinky-single-comments .comment-form input[type="text"],
.novinky-single-comments .comment-form input[type="email"],
.novinky-single-comments .comment-form input[type="url"],
.novinky-single-comments .comment-form textarea {
    border: 1px solid var(--ob-gray-200);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 15px;
    width: 100%;
    background: var(--ob-white);
    transition: border-color var(--ob-transition);
}
.novinky-single-comments .comment-form input:focus,
.novinky-single-comments .comment-form textarea:focus {
    border-color: var(--ob-orange);
    outline: none;
}
.novinky-single-comments .form-submit .submit {
    background: var(--ob-orange);
    color: var(--ob-white);
    border: none;
    padding: 12px 32px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--ob-transition);
}
.novinky-single-comments .form-submit .submit:hover {
    background: var(--ob-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(242,101,34,0.35);
}

/* ----- Responsive ----- */
@media (max-width: 781px) {
    .novinky-single-hero {
        /* replace open-ended min-height with a fixed height so the image fills it */
        min-height: 0;
        height: 260px;
        padding: 0;           /* container padding was shrinking the image */
    }
    .novinky-single-hero-bg {
        height: 100%;         /* fill the 260px grid track */
        object-fit: cover;    /* crop to aspect ratio, no gray gap */
    }
    .novinky-single-hero-inner {
        /* was 48px 24px 176px — the 176px was only needed for the desktop overlap */
        padding: 16px 20px 52px;
    }
    .novinky-single-body {
        margin: -24px 16px 0;
        padding: 32px 22px;
    }
    .novinky-single-meta {
        gap: 12px;
        font-size: 13px;
    }
    .novinky-single-meta .novinky-single-author::before,
    .novinky-single-meta-plain .novinky-single-author::before {
        display: none;
    }
}

/* ======================================================
   CATEGORY ARCHIVE (/category/...)
   ====================================================== */
.novinky-archive {
    background: var(--ob-offwhite);
    padding-bottom: 80px;
}

/* ----- Header ----- */
.novinky-archive-header {
    background: linear-gradient(180deg, var(--ob-gray-100) 0%, var(--ob-offwhite) 100%);
    padding: 52px 24px 20px;
    text-align: center;
}
.novinky-archive-header-inner {
    max-width: 900px;
    margin: 0 auto;
}
.novinky-archive-title {
    display: inline-block;
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0 0 16px;
    color: var(--ob-black);
    padding-bottom: 14px;
    position: relative;
}
.novinky-archive-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--ob-orange);
    border-radius: 2px;
}
.novinky-archive-description {
    color: var(--ob-gray-700);
    font-size: 16px;
    line-height: 1.6;
    max-width: 640px;
    margin: 16px auto 0;
}

/* ----- Subcategory filter chips ----- */
.novinky-archive-filter {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.novinky-archive-chip {
    display: inline-block;
    background: var(--ob-white);
    color: var(--ob-gray-700);
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-decoration: none;
    border: 2px solid var(--ob-gray-200);
    transition: all var(--ob-transition);
}
.novinky-archive-chip:hover {
    border-color: var(--ob-orange);
    color: var(--ob-orange);
}
.novinky-archive-chip.is-active {
    background: var(--ob-orange);
    color: var(--ob-white);
    border-color: var(--ob-orange);
}

/* ----- Body / grid ----- */
.novinky-archive-body {
    max-width: 1200px;
    margin: 24px auto 0;
    padding: 0 24px;
}
.novinky-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ----- Card ----- */
.novinky-archive-card {
    background: var(--ob-white);
    border-radius: var(--ob-radius);
    overflow: hidden;
    box-shadow: var(--ob-shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    position: relative;
    transition: all var(--ob-transition);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.novinky-archive-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--ob-orange), var(--ob-orange-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--ob-transition);
}
.novinky-archive-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--ob-shadow-lg);
}
.novinky-archive-card:hover::after {
    transform: scaleX(1);
}
.novinky-archive-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}
.novinky-archive-card-image {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--ob-gray-100);
}
.novinky-archive-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}
.novinky-archive-card-image.novinky-archive-card-image-placeholder {
    background-color: rgba(242,101,34,0.05);
    background-image:
        url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23F26522" stroke-opacity="0.32" stroke-width="1.25"%3E%3Crect x="3" y="3" width="18" height="18" rx="2" ry="2"/%3E%3Ccircle cx="8.5" cy="8.5" r="1.5"/%3E%3Cpolyline points="21 15 16 10 5 21"/%3E%3C/svg%3E'),
        linear-gradient(135deg, rgba(242,101,34,0.08) 0%, rgba(242,101,34,0.02) 100%);
    background-size: 64px, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}
.news-card-wrapper:not(:has(.wp-block-post-featured-image))::before {
    content: "";
    display: block;
    height: 200px;
    background-color: rgba(242,101,34,0.05);
    background-image:
        url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23F26522" stroke-opacity="0.32" stroke-width="1.25"%3E%3Crect x="3" y="3" width="18" height="18" rx="2" ry="2"/%3E%3Ccircle cx="8.5" cy="8.5" r="1.5"/%3E%3Cpolyline points="21 15 16 10 5 21"/%3E%3C/svg%3E'),
        linear-gradient(135deg, rgba(242,101,34,0.08) 0%, rgba(242,101,34,0.02) 100%);
    background-size: 64px, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    border-radius: var(--ob-radius) var(--ob-radius) 0 0;
}
@media (max-width: 781px) {
    .news-card-wrapper:not(:has(.wp-block-post-featured-image))::before {
        height: 160px;
    }
}
.novinky-archive-card:hover .novinky-archive-card-image img {
    transform: scale(1.06);
}
.novinky-archive-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.novinky-archive-card-date {
    font-size: 12px;
    color: var(--ob-orange);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
}
.novinky-archive-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ob-black);
    margin: 0 0 10px;
    transition: color var(--ob-transition);
}
.novinky-archive-card:hover .novinky-archive-card-title {
    color: var(--ob-orange);
}
.novinky-archive-card-excerpt {
    color: var(--ob-gray-700);
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 12px;
}
.novinky-archive-card-readmore {
    color: var(--ob-orange);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all var(--ob-transition);
    display: inline-block;
    margin-top: auto;
}
.novinky-archive-card:hover .novinky-archive-card-readmore {
    transform: translateX(4px);
}

/* ----- Empty state ----- */
.novinky-archive-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--ob-gray-500);
    font-size: 17px;
}

/* ----- Pagination ----- */
.novinky-archive-pagination {
    margin-top: 56px;
    text-align: center;
}
.novinky-archive-pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    margin: 0 3px;
    color: var(--ob-gray-700);
    background: var(--ob-white);
    border: 2px solid var(--ob-gray-200);
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    min-width: 44px;
    transition: all var(--ob-transition);
}
.novinky-archive-pagination .page-numbers:hover {
    border-color: var(--ob-orange);
    color: var(--ob-orange);
}
.novinky-archive-pagination .page-numbers.current {
    background: var(--ob-orange);
    color: var(--ob-white);
    border-color: var(--ob-orange);
}
.novinky-archive-pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

/* ----- Responsive ----- */
@media (max-width: 960px) {
    .novinky-archive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}
@media (max-width: 600px) {
    .novinky-archive-grid {
        grid-template-columns: 1fr;
    }
    .novinky-archive-header {
        padding: 56px 20px 36px;
    }
    .novinky-archive-body {
        margin-top: 32px;
    }
}

/* Global Footer Section Responsive Fixes */
@media (max-width: 781px) {
    .sponsors-section .wp-block-columns {
        flex-direction: column !important;
        gap: 40px !important;
    }
    .sponsors-section .wp-block-column {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
}

/* ===== FOOTER SPACING FIXES ===== */

/* Force footer top row padding */
.ct-footer [data-row="top"] > div {
    padding-block: 40px !important;
}

/* Copyright row padding */
.ct-footer [data-row="bottom"] > div {
    padding-block: 20px !important;
}

/* ======================================================
   HOMEPAGE ABOVE-FOLD COMPRESSION
   Lift the first Novinky row (image + title) above the
   fold on ~900px viewports. Overrides inline block styles
   via !important; scoped to .page-id-86 so other pages
   keep their defaults.
   ====================================================== */

/* Shorter hero + less internal padding (inline block sets 600px / 100px) */
.page-id-86 .hero-cover {
    min-height: 360px !important;
    padding-top: 40px !important;
    padding-bottom: 40px !important;
}

/* Less breathing room above the Novinky heading (inline block sets 80px) */
.page-id-86 .news-section {
    padding-top: 24px !important;
}

/* Pull the first card row closer to the heading (inline sets 40px) */
.page-id-86 .news-section > .section-heading {
    margin-bottom: 28px !important;
}

@media (max-width: 781px) {
    .page-id-86 .hero-cover {
        min-height: 360px !important;
        padding-top: 44px !important;
        padding-bottom: 44px !important;
    }
    .page-id-86 .news-section {
        padding-top: 36px !important;
    }
}

/* ======================================================
   GUTENBERG EDITOR SYNCHRONIZATION
   Ensures the "Edit page" view matches the front-end.
   ====================================================== */

/* Force the global offwhite background in the editor */
.editor-styles-wrapper {
    background: var(--ob-offwhite) !important;
}

/* Reset editor-only block margins that cause wide gaps compared to front-end */
.editor-styles-wrapper .wp-block {
    margin-block-start: 0;
    margin-block-end: 0;
}

/* Eliminate internal block gaps in the editor layout */
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container > .wp-block {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Match Hero dimensions in editor */
.editor-styles-wrapper .hero-cover.wp-block-cover {
    min-height: 360px !important;
    margin-top: 0 !important;
}

/* Hero text shadows and spacing in editor */
.editor-styles-wrapper .hero-cover h1 {
    text-shadow: 0 4px 30px rgba(0,0,0,0.5);
    letter-spacing: 3px;
    margin-top: 0;
}

/* Mock the carousel overlay in editor (since carousel filter is front-end only) */
.editor-styles-wrapper .hero-cover.wp-block-cover .wp-block-cover__background {
    background-color: rgba(0, 0, 0, 0.45) !important;
    opacity: 1 !important;
}

/* Tighten spacing for Novinky sections in editor */
.editor-styles-wrapper .news-section {
    padding-top: 24px !important;
}

