:root {
    --ksp-bg: #FFF9F6;
    --ksp-text: #3D2B34;
    --ksp-cta: #7A3B54;
    --ksp-cta-text: #FFFFFF;
}

/* Hero image slider — full-bleed width is set at runtime by JS (see
   ksp_full_bleed_script) since BeTheme's #Wrapper isn't reliably
   viewport-width; see the note on .ksp-latest-slider for why. */
.ksp-hero-slider {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.ksp-hero-slider-track {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
}

.ksp-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    display: block;
}

.ksp-hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.ksp-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.ksp-hero-slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 32px;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 10px #874D64, 0 1px 4px #874D64, 0 0 20px #874D64;
    max-width: 60%;
}

.ksp-hero-slide-caption-normal,
.ksp-hero-slide-caption-accent {
    display: block;
}

.ksp-hero-slide-caption-normal {
    font-family: inherit;
    font-size: clamp(1.1rem, 1vw + 0.85rem, 1.6rem);
    font-weight: 600;
}

.ksp-hero-slide-caption-accent {
    font-family: 'Fraunces', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.8rem, 2.4vw + 1.2rem, 3.4rem);
    font-weight: 600;
}

.ksp-hero-slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.ksp-hero-slider-dots button {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
}

.ksp-hero-slider-dots button.is-active {
    background: var(--ksp-cta);
}

@media only screen and (max-width: 767px) {
    .ksp-hero-slider-track {
        aspect-ratio: 4 / 3;
    }

    .ksp-hero-slide img {
        object-position: right center;
    }

    .ksp-hero-slide-caption {
        top: auto;
        bottom: 0;
        transform: none;
        max-width: 100%;
        padding: 56px 20px 24px;
        background: linear-gradient(to top, #874D64 0%, rgba(135, 77, 100, 0.5) 55%, rgba(135, 77, 100, 0) 100%);
        text-shadow: none;
    }
}

body {
    background: var(--ksp-bg);
    color: var(--ksp-text);
}

.ksp-btn {
    display: inline-block;
    background: var(--ksp-cta);
    color: var(--ksp-cta-text);
    border-radius: 999px;
    padding: 12px 28px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ksp-btn:hover {
    opacity: 0.9;
    color: var(--ksp-cta-text);
    transform: translateY(-2px);
}

.ksp-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 20px;
    border: 2px solid var(--ksp-cta);
    border-radius: 999px;
    color: var(--ksp-cta);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ksp-read-more::after {
    content: "\2192";
    transition: transform 0.2s ease;
}

.ksp-read-more:hover {
    background: var(--ksp-cta);
    color: var(--ksp-cta-text);
    transform: translateY(-2px);
}

.ksp-read-more:hover::after {
    transform: translateX(3px);
}

/* Subtle scroll-reveal: fade + slide up the first time an element enters
   the viewport (see ksp_reveal_script in functions.php). Stagger delays are
   set inline per item via ksp_reveal_delay(). */
.ksp-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.ksp-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .ksp-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Hover-lift for cards/tiles across the site. */
.ksp-zone-tile,
.ksp-topic-tile,
.ksp-cta-card,
.ksp-latest-slider-card,
.ksp-related-item,
.ksp-more-strip-item {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ksp-zone-tile:hover,
.ksp-topic-tile:hover,
.ksp-cta-card:hover,
.ksp-latest-slider-card:hover,
.ksp-related-item:hover,
.ksp-more-strip-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(122, 59, 84, 0.15);
}

.ksp-article-row {
    transition: transform 0.2s ease;
}

.ksp-article-row:hover {
    transform: translateX(4px);
}

/* Top utility bar: email + CTA + social icons, injected via wp_body_open */
.ksp-top-bar {
    background: var(--ksp-bg);
    border-bottom: 1px solid #f0e4de;
}

.ksp-top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    flex-wrap: wrap;
}

.ksp-top-bar-email {
    color: var(--ksp-text);
    text-decoration: none;
    font-size: 0.9rem;
}

.ksp-top-bar-email:hover {
    color: var(--ksp-cta);
}

.ksp-top-bar-cta {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.ksp-top-bar-social {
    display: flex;
    gap: 12px;
}

.ksp-top-bar-social a {
    color: var(--ksp-cta);
    font-size: 1.1rem;
    text-decoration: none;
}

.ksp-top-bar-social a:hover {
    opacity: 0.7;
}

@media only screen and (max-width: 767px) {
    .ksp-top-bar-inner {
        justify-content: center;
        gap: 10px;
        padding: 8px 16px;
    }

    .ksp-top-bar-email {
        font-size: 0.75rem;
    }

    .ksp-top-bar-cta {
        padding: 6px 14px;
        font-size: 0.75rem;
    }

    .ksp-top-bar-social {
        gap: 8px;
    }

    .ksp-top-bar-social a {
        font-size: 1rem;
    }
}

.ksp-hero {
    background: var(--ksp-bg);
    text-align: center;
    padding: 64px 24px;
}

.ksp-hero-inner {
    max-width: 640px;
    margin: 0 auto;
}

.ksp-zone-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    padding: 0 24px 64px;
    max-width: 1100px;
    margin: 0 auto;
}

.ksp-zone-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 96px;
    border-radius: 16px;
    border: 2px solid transparent;
    text-decoration: none;
    padding: 16px;
}

.ksp-zone-tile-label {
    font-weight: 700;
}

.ksp-latest-slider {
    background: linear-gradient(135deg, #F3EDFB 0%, #FDECE3 50%, #FCE8EF 100%);
    padding: 48px 0;
    margin-bottom: 72px;
    box-sizing: border-box;
}

.ksp-latest-slider-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.ksp-latest-slider-inner h2 {
    text-align: center;
    margin: 0 0 24px;
    color: var(--ksp-cta);
}

.ksp-latest-slider-viewport {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ksp-latest-slider-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    padding-bottom: 8px;
}

.ksp-latest-slider-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
    text-decoration: none;
    color: var(--ksp-text);
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.ksp-latest-slider-card-img img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.ksp-latest-slider-card-title {
    display: block;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.95rem;
}

.ksp-latest-slider-arrow {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    background: var(--ksp-cta);
    color: #FFFFFF;
    font-size: 1rem;
    cursor: pointer;
}

.ksp-latest-slider-arrow:hover {
    opacity: 0.85;
}

@media only screen and (max-width: 767px) {
    .ksp-latest-slider-arrow {
        display: none;
    }

    .ksp-latest-slider-card {
        flex-basis: 180px;
    }

    .ksp-latest-slider-card-img img {
        height: 110px;
    }

    .ksp-latest-slider-card-title {
        font-size: 0.85rem;
        padding: 10px 12px;
    }
}

.ksp-topic-tiles {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 64px;
    text-align: center;
}

.ksp-topic-tiles h2 {
    margin-bottom: 24px;
}

.ksp-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.ksp-topic-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 72px;
    border-radius: 12px;
    background: #FFFFFF;
    border: 1px solid #eee;
    border-top: 4px solid var(--ksp-cta);
    text-decoration: none;
    color: var(--ksp-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-top-color 0.15s ease;
    padding: 12px;
}

.ksp-topic-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.ksp-topic-tile:nth-child(6n + 1) { border-top-color: #F2A6C4; }
.ksp-topic-tile:nth-child(6n + 2) { border-top-color: #F3A984; }
.ksp-topic-tile:nth-child(6n + 3) { border-top-color: #B79AD9; }
.ksp-topic-tile:nth-child(6n + 4) { border-top-color: #9ECBB0; }
.ksp-topic-tile:nth-child(6n + 5) { border-top-color: #E8C56B; }
.ksp-topic-tile:nth-child(6n + 6) { border-top-color: #8FB6D9; }

.ksp-topic-tile-label {
    font-weight: 600;
    position: relative;
    padding-left: 20px;
}

.ksp-topic-tile-label::before {
    content: "♥";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85em;
    opacity: 0.5;
}

.ksp-zone-description {
    max-width: 800px;
    margin: 24px auto 0;
    padding: 0 24px;
    color: var(--ksp-text);
}

.ksp-zone-description h1,
.ksp-zone-description h2,
.ksp-zone-description h3 {
    color: var(--ksp-text);
    margin-top: 24px;
}

.ksp-cta-cards {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 24px auto;
    padding: 0 24px;
}

.ksp-cta-card {
    flex: 1 1 220px;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.ksp-cta-card-title {
    display: block;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 700;
    border-radius: 999px;
    padding: 12px 20px;
    margin-bottom: 12px;
}

.ksp-cta-card-title:hover {
    opacity: 0.9;
}

.ksp-cta-card-excerpt {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ksp-text);
}

.ksp-subcat-tabs {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 16px 24px;
    border-bottom: 2px solid #eee;
}

.ksp-subcat-tabs a {
    text-decoration: none;
    color: var(--ksp-text);
    padding-bottom: 8px;
}

.ksp-subcat-tabs a.is-active {
    border-bottom: 2px solid var(--ksp-cta);
    font-weight: 700;
}

.ksp-article-list {
    list-style: none;
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.ksp-article-row {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ksp-article-empty {
    padding: 32px 0;
    color: var(--ksp-text);
    opacity: 0.6;
    font-style: italic;
    text-align: center;
}

.ksp-article-thumb img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
}

.navigation.pagination {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
    text-align: center;
}

.navigation.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fafafa;
    color: var(--ksp-text);
    text-decoration: none;
    font-weight: 600;
}

.navigation.pagination .page-numbers:hover {
    background: var(--ksp-bg);
    color: var(--ksp-cta);
}

.navigation.pagination .page-numbers.current {
    background: var(--ksp-cta);
    color: var(--ksp-cta-text);
}

.navigation.pagination .page-numbers.dots {
    background: none;
}

.ksp-more-strip {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.ksp-more-strip-items {
    display: flex;
    gap: 16px;
    overflow-x: auto;
}

.ksp-more-strip-item {
    flex: 0 0 160px;
    text-decoration: none;
    color: var(--ksp-text);
}

.ksp-more-strip-item img {
    width: 100%;
    border-radius: 12px;
}

.ksp-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px 24px 48px;
}

.ksp-zone-badge {
    display: inline-block;
    color: #fff;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.ksp-article-meta {
    color: #888;
    font-size: 0.85rem;
}

.ksp-inline-cta {
    background: var(--ksp-bg);
    border: 1px solid var(--ksp-cta);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin: 24px 0;
}

.ksp-related-items {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ksp-related-item {
    flex: 0 0 140px;
    text-decoration: none;
    color: var(--ksp-text);
}

.ksp-related-item img {
    width: 100%;
    border-radius: 12px;
}

.ksp-article-sidebar {
    max-width: 800px;
    margin: 0 auto 48px;
    padding: 0 24px;
}

.ksp-sidebar-block {
    background: #fafafa;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.ksp-sidebar-social {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.ksp-sidebar-social a {
    color: var(--ksp-cta);
    font-size: 2.8rem;
    text-decoration: none;
}

.ksp-sidebar-social a:hover {
    opacity: 0.7;
}
