/* ================================================================
   KozeePet A+ Content Builder - Frontend Styles
   Inspired by Amazon A+ Content modules
   ================================================================ */

.kaplus-content-wrapper {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
	overflow: hidden;
}

/* ================================================================
   Grid System - Flexbox layout for mixed-width blocks
   ================================================================ */

.kaplus-grid {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.kaplus-grid-item {
    box-sizing: border-box;
    padding: 0.5rem;
    min-width: 0;
}

.kaplus-w-1-1 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}
.kaplus-w-1-2 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
}
.kaplus-w-1-3 {
    flex: 0 0 33.3333% !important;
    max-width: 33.3333% !important;
}
.kaplus-w-2-3 {
    flex: 0 0 66.6667% !important;
    max-width: 66.6667% !important;
}
.kaplus-w-1-4 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
}
.kaplus-w-3-4 {
    flex: 0 0 75% !important;
    max-width: 75% !important;
}
.kaplus-w-1-5 {
    flex: 0 0 20% !important;
    max-width: 20% !important;
}
.kaplus-w-2-5 {
    flex: 0 0 40% !important;
    max-width: 40% !important;
}
.kaplus-w-3-5 {
    flex: 0 0 60% !important;
    max-width: 60% !important;
}
.kaplus-w-4-5 {
    flex: 0 0 80% !important;
    max-width: 80% !important;
}

/* ================================================================
   Module: Hero Image
   ================================================================ */

.kaplus-hero-image {
    overflow: hidden;
    border-radius: var(--radius-md, 12px);
}

.kaplus-hero-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.kaplus-hero-image-wrapper.kaplus-hero-image-fixed {
    overflow: hidden;
}

.kaplus-hero-image-wrapper.kaplus-hero-image-fixed img {
    width: 100%;
    height: 100%;
}

/* ================================================================
   Module: Text
   ================================================================ */

.kaplus-text-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--kz-text, #1f2937);
}

.kaplus-text-content h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: var(--space-sm, 1rem);
    color: var(--kz-primary, #111827);
    letter-spacing: -0.02em;
}

.kaplus-text-content p {
    margin-bottom: var(--space-sm, 1rem);
}

.kaplus-text-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: var(--space-sm, 1rem);
}

.kaplus-text-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* ================================================================
   Module: Bullet Points
   ================================================================ */

.kaplus-bullet-list {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0;
}

.kaplus-bullet-list li {
    margin-bottom: 0.6rem;
    line-height: 1.7;
    font-size: 1rem;
    color: var(--kz-text, #1f2937);
}

.kaplus-bullet-list li:last-child {
    margin-bottom: 0;
}

/* ================================================================
   Module: Feature Grid
   ================================================================ */

.kaplus-feature-grid-inner {
    display: grid;
    gap: var(--space-sm, 1rem);
}

.kaplus-cols-1 .kaplus-feature-grid-inner {
    grid-template-columns: 1fr;
}

.kaplus-cols-2 .kaplus-feature-grid-inner {
    grid-template-columns: repeat(2, 1fr);
}

.kaplus-cols-3 .kaplus-feature-grid-inner {
    grid-template-columns: repeat(3, 1fr);
}

.kaplus-cols-4 .kaplus-feature-grid-inner {
    grid-template-columns: repeat(4, 1fr);
}

.kaplus-cols-5 .kaplus-feature-grid-inner {
    grid-template-columns: repeat(5, 1fr);
}

.kaplus-cols-6 .kaplus-feature-grid-inner {
    grid-template-columns: repeat(6, 1fr);
}

.kaplus-feature-card {
    text-align: center;
    background: var(--kz-surface, #f8fafc);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    height: 100%;
}

.kaplus-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md, 0 10px 15px -3px rgba(0, 0, 0, 0.08));
}

.kaplus-feature-img {
    line-height: 0;
    overflow: hidden;
}

.kaplus-feature-img img {
    width: 100%;
    height: auto;
    display: block;
}

.kaplus-feature-img.kaplus-feature-img-fixed img {
    width: 100%;
    height: 100%;
}

.kaplus-feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--kz-primary, #111827);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
    padding: var(--space-md, 2rem) var(--space-md, 2rem) 0;
}

.kaplus-feature-text p {
    font-size: 0.95rem;
    color: var(--kz-text-light, #6b7280);
    line-height: 1.7;
    padding: 0 var(--space-md, 2rem) var(--space-md, 2rem);
}

/* ================================================================
   Module: Text & Image
   ================================================================ */

.kaplus-text-image-inner {
    display: flex;
    align-items: center;
    gap: var(--space-lg, 4rem);
}

.kaplus-text-image-right .kaplus-text-image-inner {
    flex-direction: row-reverse;
}

.kaplus-text-image-top .kaplus-text-image-inner {
    flex-direction: column;
    gap: var(--space-md, 2rem);
}

.kaplus-text-image-bottom .kaplus-text-image-inner {
    flex-direction: column-reverse;
    gap: var(--space-md, 2rem);
}

.kaplus-text-image-top .kaplus-text-image-col,
.kaplus-text-image-bottom .kaplus-text-image-col {
    flex: none;
    width: 100%;
}

.kaplus-text-image-col {
    flex: 1;
}

.kaplus-ti-img img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md, 12px);
}

.kaplus-ti-text h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--kz-primary, #111827);
    margin-bottom: var(--space-sm, 1rem);
    letter-spacing: -0.02em;
}

.kaplus-ti-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--kz-text-light, #6b7280);
    margin-bottom: var(--space-sm, 1rem);
}

.kaplus-ti-content p {
    font-size: 1rem;
    color: var(--kz-text, #1f2937);
    line-height: 1.8;
    margin-bottom: var(--space-sm, 1rem);
}

/* ================================================================
   Module: Info Table
   ================================================================ */

.kaplus-info-table {
    overflow-x: auto;
}

.kaplus-info-table-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--kz-border, #e5e7eb);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
	background: var(--kz-surface, #f8fafc);
}

.kaplus-info-table-table thead {
    background: var(--kz-surface, #f8fafc);
}

.kaplus-info-table-table th,
.kaplus-info-table-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--kz-border, #e5e7eb);
}

.kaplus-info-table-table th {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--kz-primary, #111827);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kaplus-table-blank {
    background: transparent;
}

.kaplus-table-header-img {
    overflow: hidden;
}

.kaplus-table-header-img img {
    width: 80px;
    height: auto;
    margin: 0 auto 0.5rem;
}

.kaplus-table-header-img.kaplus-table-header-fixed img {
    width: 80px;
    height: 100%;
    margin: 0 auto;
}

.kaplus-table-header-label {
    font-size: 0.85rem;
    color: var(--kz-text, #1f2937);
}

.kaplus-table-key {
    font-weight: 700;
    color: var(--kz-primary, #111827);
    text-align: left;
    background: var(--kz-surface, #f8fafc);
    width: 160px;
}

.kaplus-table-value {
    color: var(--kz-text, #1f2937);
    font-size: 0.95rem;
}

.kaplus-info-table-table tr:last-child td,
.kaplus-info-table-table tr:last-child th {
    border-bottom: none;
}

/* ================================================================
   Module: Tech Specs
   ================================================================ */

.kaplus-tech-specs-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--kz-border, #e5e7eb);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
}

.kaplus-tech-specs-table tr {
    border-bottom: 1px solid var(--kz-border, #e5e7eb);
}

.kaplus-tech-specs-table tr:last-child {
    border-bottom: none;
}

.kaplus-spec-key {
    width: 200px;
    padding: 1rem 1.25rem;
    font-weight: 700;
    color: var(--kz-primary, #111827);
    background: var(--kz-surface, #f8fafc);
    border-right: 1px solid var(--kz-border, #e5e7eb);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kaplus-spec-value {
    padding: 1rem 1.25rem;
    color: var(--kz-text, #1f2937);
    font-size: 0.95rem;
}

/* ================================================================
   Module: Q&A Accordion
   ================================================================ */

.kaplus-qa-list {
    border: 1px solid var(--kz-border, #e5e7eb);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
}

.kaplus-qa-item {
    border-bottom: 1px solid var(--kz-border, #e5e7eb);
}

.kaplus-qa-item:last-child {
    border-bottom: none;
}

.kaplus-qa-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    color: var(--kz-primary, #111827);
    background: var(--kz-background, #ffffff);
    transition: background 0.2s ease;
    user-select: none;
}

.kaplus-qa-question:hover {
    background: var(--kz-surface, #f8fafc);
}

.kaplus-qa-icon {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--kz-text-light, #6b7280);
    transition: transform 0.2s ease;
    line-height: 1;
}

.kaplus-qa-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--kz-surface, #f8fafc);
}

.kaplus-qa-answer p {
    padding: 0 1.5rem 1.25rem;
    color: var(--kz-text, #1f2937);
    line-height: 1.7;
    font-size: 0.95rem;
    margin: 0;
}

/* ================================================================
   Module: Video
   ================================================================ */

.kaplus-video-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--kz-primary, #111827);
    margin-bottom: var(--space-sm, 1rem);
    letter-spacing: -0.02em;
}

.kaplus-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md, 12px);
    background: #000;
}

.kaplus-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.kaplus-video-wrapper.kaplus-video-local {
    padding-bottom: 0;
    height: auto;
}

.kaplus-video-wrapper video {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: var(--radius-md, 12px);
}

/* ================================================================
   Module: Image & Text Overlay
   ================================================================ */

.kaplus-image-overlay {
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
}

.kaplus-overlay-wrap {
    position: relative;
    line-height: 0;
}

.kaplus-overlay-img {
    width: 100%;
    height: auto;
    display: block;
}

.kaplus-overlay-wrap.kaplus-overlay-fixed {
    overflow: hidden;
}

.kaplus-overlay-wrap.kaplus-overlay-fixed .kaplus-overlay-img {
    width: 100%;
    height: 100%;
}

.kaplus-overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-lg, 4rem) var(--space-md, 2rem);
    box-sizing: border-box;
}

.kaplus-overlay-light .kaplus-overlay-content {
    background: rgba(0, 0, 0, 0.35);
}

.kaplus-overlay-dark .kaplus-overlay-content {
    background: rgba(255, 255, 255, 0.35);
}

.kaplus-overlay-light .kaplus-overlay-heading,
.kaplus-overlay-light .kaplus-overlay-desc {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.kaplus-overlay-dark .kaplus-overlay-heading,
.kaplus-overlay-dark .kaplus-overlay-desc {
    color: #111827;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.kaplus-overlay-heading {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--space-sm, 1rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.kaplus-overlay-desc {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 900px) {
    .kaplus-cols-4 .kaplus-feature-grid-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .kaplus-cols-5 .kaplus-feature-grid-inner {
        grid-template-columns: repeat(3, 1fr);
    }

    .kaplus-cols-6 .kaplus-feature-grid-inner {
        grid-template-columns: repeat(3, 1fr);
    }

    .kaplus-text-image-inner {
        flex-direction: column !important;
        gap: var(--space-md, 2rem);
    }

    .kaplus-ti-img img {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .kaplus-w-1-2,
    .kaplus-w-1-3,
    .kaplus-w-2-3,
    .kaplus-w-1-4,
    .kaplus-w-3-4,
    .kaplus-w-1-5,
    .kaplus-w-2-5,
    .kaplus-w-3-5,
    .kaplus-w-4-5 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .kaplus-overlay-heading {
        font-size: 1.75rem;
    }

    .kaplus-overlay-desc {
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    .kaplus-cols-2 .kaplus-feature-grid-inner,
    .kaplus-cols-3 .kaplus-feature-grid-inner,
    .kaplus-cols-4 .kaplus-feature-grid-inner,
    .kaplus-cols-5 .kaplus-feature-grid-inner,
    .kaplus-cols-6 .kaplus-feature-grid-inner {
        grid-template-columns: 1fr;
    }

    .kaplus-info-table-table th,
    .kaplus-info-table-table td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .kaplus-table-header-img img {
        width: 60px;
    }
}

/* ================================================================
   Theme: Light / Dark
   ================================================================ */

.kaplus-theme-light {
    --kz-text: #1f2937;
    --kz-primary: #111827;
    --kz-text-light: #6b7280;
    --kz-surface: #f8fafc;
    --kz-background: #ffffff;
    --kz-border: #e5e7eb;
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.kaplus-theme-dark {
    --kz-text: #e5e7eb;
    --kz-primary: #f9fafb;
    --kz-text-light: #9ca3af;
    --kz-surface: #1f2937;
    --kz-background: #111827;
    --kz-border: #374151;
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* ================================================================
   Module: Hero Section
   ================================================================ */

.kaplus-hero-section {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 12px 30px rgba(23, 50, 77, 0.12);
    display: flex;
    align-items: stretch;
}

.kaplus-hero-inner {
    width: 100%;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 28px;
    padding: 56px;
}

.kaplus-hero-stacked .kaplus-hero-inner {
    grid-template-columns: 1fr;
}

.kaplus-hero-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* When no visual cards are present, content spans the full width */
.kaplus-hero-content:only-child {
    grid-column: 1 / -1;
}

.kaplus-hero-content:only-child .kaplus-hero-heading,
.kaplus-hero-content:only-child .kaplus-hero-body,
.kaplus-hero-stacked .kaplus-hero-heading,
.kaplus-hero-stacked .kaplus-hero-body {
    max-width: none;
}

.kaplus-hero-center .kaplus-hero-content {
    align-items: center;
    text-align: center;
}

.kaplus-hero-text {
    flex: 1 1 auto;
}

.kaplus-hero-center .kaplus-hero-actions {
    justify-content: center;
}

.kaplus-hero-eyebrow {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: var(--radius-md, 12px);
    background: var(--hero-eyebrow-bg, rgba(255, 255, 255, 0.14));
    border: 1px solid var(--hero-eyebrow-bg, rgba(255, 255, 255, 0.24));
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    align-self: flex-start;
    color: var(--hero-eyebrow-color) !important;
}

.kaplus-hero-center .kaplus-hero-eyebrow {
    align-self: center;
}

.kaplus-hero-dark .kaplus-hero-eyebrow {
    background: var(--hero-eyebrow-bg, rgba(0, 0, 0, 0.08));
    border: 1px solid var(--hero-eyebrow-bg, rgba(0, 0, 0, 0.16));
}

.kaplus-hero-heading {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    letter-spacing: -0.04em;
    max-width: var(--hero-heading-max-width, 760px);
    line-height: 1.15;
    margin: 0 0 16px;
    color: var(--hero-heading-color) !important;
}

.kaplus-hero-center .kaplus-hero-heading {
    max-width: var(--hero-heading-max-width, 800px);
}

.kaplus-hero-body {
    max-width: var(--hero-body-max-width, 650px);
    font-size: 18px;
    margin: 0 0 24px;
    line-height: 1.6;
    opacity: 0.9;
    color: var(--hero-body-color) !important;
}

.kaplus-hero-center .kaplus-hero-body {
    max-width: var(--hero-body-max-width, 700px);
}

/* Light text (default for dark backgrounds) */
.kaplus-hero-light,
.kaplus-hero-light .kaplus-hero-heading,
.kaplus-hero-light .kaplus-hero-body {
    color: #ffffff;
}

.kaplus-hero-light .kaplus-hero-body {
    color: rgba(255, 255, 255, 0.9);
}

/* Dark text (for light backgrounds) */
.kaplus-hero-dark,
.kaplus-hero-dark .kaplus-hero-heading {
    color: #111827;
}

.kaplus-hero-dark .kaplus-hero-body {
    color: #374151;
}

/* Action buttons */
.kaplus-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
    padding-top: 32px;
}

.kaplus-hero-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: var(--radius-md, 12px);
    background: rgba(255, 255, 255, 0.95);
    color: var(--kp-navy, #17324d);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.kaplus-hero-pill:hover {
    background: #ffffff;
    transform: translateY(-1px);
}

.kaplus-hero-dark .kaplus-hero-pill {
    background: rgba(23, 50, 77, 0.95);
    color: #ffffff;
}

.kaplus-hero-dark .kaplus-hero-pill:hover {
    background: #17324d;
}

/* Visual cards */
.kaplus-hero-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kaplus-hero-card {
    min-height: 300px;
    border-radius: 28px;
    background: linear-gradient(
        160deg,
        rgba(255, 255, 255, 0.92),
        rgba(234, 244, 251, 0.92)
    );
    color: #17324d;
    padding: 28px;
    display: grid;
    place-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.kaplus-hero-card-inner {
    position: relative;
    z-index: 1;
    width: 100%;
}

.kaplus-hero-card-icon {
    font-size: 74px;
    display: block;
    margin-bottom: 16px;
    line-height: 1;
}

.kaplus-hero-card-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.kaplus-hero-card-subtitle {
    color: #6d6d6d;
    font-size: 16px;
    max-width: 340px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Stacked layout: cards below content */
.kaplus-hero-stacked .kaplus-hero-cards {
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 24px;
}

.kaplus-hero-stacked .kaplus-hero-card {
    flex: 1;
    min-width: 220px;
    min-height: 280px;
}

@media (max-width: 980px) {
    .kaplus-hero-inner {
        grid-template-columns: 1fr;
        padding: 34px;
    }

    .kaplus-hero-stacked .kaplus-hero-inner {
        grid-template-columns: 1fr;
    }

    .kaplus-hero-cards {
        margin-top: 24px;
    }

    .kaplus-hero-stacked .kaplus-hero-card {
        min-width: 180px;
    }
}

@media (max-width: 640px) {
    .kaplus-hero-section {
        border-radius: 22px;
    }

    .kaplus-hero-inner {
        padding: 26px;
    }

    .kaplus-hero-card {
        min-height: 280px;
    }
}

/* ================================================================
   Module: Timeline
   ================================================================ */

.kaplus-timeline {
    --ink: #28323a;
    --muted: #64717c;
    --cream: #fff9ee;
    --card: #ffffff;
    --fabric: #f3eadb;
    --thread: #bf604b;
    --thread-dark: #8f3e30;
    --sage: #607f62;
    --gold: #d3a246;
    --shadow: 0 18px 45px rgba(52, 39, 27, 0.15);
    --flip-speed: 720ms;

    position: relative;
    padding: 54px 0 86px;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--ink);
}

.kaplus-timeline-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px dashed rgba(191, 96, 75, 0.55);
    color: var(--thread-dark);
    background: rgba(255, 255, 255, 0.62);
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.kaplus-timeline h1 {
    margin: 20px 0 12px;
    font-size: clamp(2.35rem, 7vw, 5.15rem);
    line-height: 0.95;
    letter-spacing: -0.055em;
    color: var(--ink);
}

.kaplus-timeline-subtitle {
    max-width: 790px;
    margin: 0 auto;
    color: var(--muted);
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 1.08rem;
    line-height: 1.65;
}

.kaplus-timeline-floating-thread {
    position: absolute;
    right: 5%;
    top: 30px;
    width: 118px;
    height: 96px;
    pointer-events: none;
    animation: kaplusTimelineBob 3.4s ease-in-out infinite;
}

.kaplus-timeline-reel {
    position: absolute;
    right: 0;
    top: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        #fff 0 17%,
        var(--gold) 18% 29%,
        #f6d581 30% 36%,
        var(--thread) 37% 100%
    );
    box-shadow: var(--shadow);
}

.kaplus-timeline-loose-thread {
    position: absolute;
    left: 0;
    bottom: 8px;
    width: 95px;
    height: 38px;
}

.kaplus-timeline-loose-thread svg,
.kaplus-timeline-wavy svg {
    display: block;
    width: 100%;
    height: 100%;
}

.kaplus-timeline-shell {
    position: relative;
    padding: 26px 0 10px;
}

.kaplus-timeline-wavy {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 70px;
    transform: translateX(-50%);
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.kaplus-timeline-wavy svg {
    height: 100%;
    min-height: 3340px;
    overflow: hidden;
}

.kaplus-timeline-thread-line {
    fill: none;
    stroke: var(--thread);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-dasharray: 2 13;
    animation:
        kaplusTimelineStitchMove 2.8s linear infinite,
        kaplusTimelineThreadBreathe 2.6s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(191, 96, 75, 0.22));
}

.kaplus-timeline-scissors {
    position: sticky;
    top: 48px;
    left: auto;
    width: 50px;
    height: 50px;
    z-index: 8;
    display: grid;
    place-items: center;
    margin: 0 auto -54px;
    border-radius: 999px;
    background: rgba(255, 249, 238, 0.96);
    border: 1px solid rgba(191, 96, 75, 0.28);
    box-shadow: 0 14px 28px rgba(52, 39, 27, 0.16);
    font-size: 27px;
    transform-origin: center center;
    animation:
        kaplusTimelineScissorsBob 2.4s ease-in-out infinite,
        kaplusTimelineSnip 1.35s ease-in-out infinite;
}

.kaplus-timeline-grid {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 30px;
    padding-top: 42px;
}

.kaplus-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: max-content;
    padding: 12px 0;
}

.kaplus-timeline-item::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    border: 3px solid var(--thread);
    background: #fffaf1;
    box-shadow: 0 0 0 8px rgba(191, 96, 75, 0.1);
    z-index: 3;
    animation: kaplusTimelineBobSmall 2.15s ease-in-out infinite;
}

.kaplus-timeline-item:nth-child(2n)::before {
    animation-delay: -0.7s;
}

.kaplus-timeline-item:nth-child(3n)::before {
    animation-delay: -1.2s;
}

.kaplus-timeline-connector {
    position: absolute;
    top: 50%;
    width: 52px;
    border-top: 2px dotted var(--thread);
    z-index: 2;
    animation: kaplusTimelineThreadBreathe 2.2s ease-in-out infinite;
}

.kaplus-timeline-item:nth-child(odd) .kaplus-timeline-connector {
    left: calc(50% - 52px);
}

.kaplus-timeline-item:nth-child(even) .kaplus-timeline-connector {
    left: 50%;
}

.kaplus-timeline-flip {
    width: min(92%, 510px);
    min-height: unset;
    perspective: 1200px;
}

.kaplus-timeline-item:nth-child(odd) .kaplus-timeline-flip {
    grid-column: 1;
    justify-self: end;
    margin-right: 52px;
}

.kaplus-timeline-item:nth-child(even) .kaplus-timeline-flip {
    grid-column: 2;
    justify-self: start;
    margin-left: 52px;
}

.kaplus-timeline-flip-inner {
    position: relative;
    width: 100%;
    display: grid;
    transform-style: preserve-3d;
    transition: transform var(--flip-speed) cubic-bezier(0.2, 0.8, 0.2, 1);
}

.kaplus-timeline-flip:hover .kaplus-timeline-flip-inner,
.kaplus-timeline-flip:focus-within .kaplus-timeline-flip-inner {
    transform: rotateY(180deg);
}

.kaplus-timeline-face {
    position: relative;
    grid-area: 1 / 1;
    min-height: 172px;
    height: auto;
    border-radius: 28px;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(40, 50, 58, 0.08);
}

.kaplus-timeline-front {
    padding: 25px 25px 24px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
}

.kaplus-timeline-front::before {
    content: "";
    position: absolute;
    inset: 11px;
    border: 1px dashed rgba(191, 96, 75, 0.34);
    border-radius: 22px;
    pointer-events: none;
}

.kaplus-timeline-back {
    transform: rotateY(180deg);
    display: grid;
    place-items: end start;
    min-height: 172px;
    isolation: isolate;
}

.kaplus-timeline-back::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: var(--fabric);
    background-image: var(--image, none);
    background-size: cover;
    background-position: var(--focal-x, 50%) var(--focal-y, 50%);
    transform: scale(1.04);
}

.kaplus-timeline-flip:hover .kaplus-timeline-back::before,
.kaplus-timeline-flip:focus-within .kaplus-timeline-back::before {
    transform: scale(1.12);
}

.kaplus-timeline-back::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        180deg,
        rgba(24, 28, 31, 0.05),
        rgba(24, 28, 31, 0.68)
    );
}

.kaplus-timeline-caption {
    width: 100%;
    padding: 22px 24px;
    color: white;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.kaplus-timeline-caption strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.kaplus-timeline-caption span {
    display: block;
    opacity: 0.9;
    line-height: 1.42;
}

.kaplus-timeline-date {
    display: inline-block;
    margin-bottom: 11px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--sage);
    background: rgba(96, 127, 98, 0.12);
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 0.84rem;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.kaplus-timeline-front h2 {
    margin: 0 0 8px;
    font-size: clamp(1.24rem, 2.25vw, 1.62rem);
    line-height: 1.1;
}

.kaplus-timeline-desc,
.kaplus-timeline-front p {
    margin: 0;
    color: #4d5963;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 0.96rem;
    line-height: 1.56;
}

.kaplus-timeline-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 7px 11px;
    border-radius: 12px;
    color: #74540f;
    background: rgba(211, 162, 70, 0.18);
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 0.8rem;
    font-weight: 850;
}

.kaplus-timeline-hint {
    display: inline-block;
    margin-left: 8px;
    color: var(--muted);
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
}

.kaplus-timeline-needle {
    position: absolute;
    left: 18px;
    bottom: 10px;
    width: 200px;
    height: 100px;
    pointer-events: none;
    opacity: 0.8;
    z-index: 5;
}

.kaplus-timeline-needle svg {
    width: 100%;
    height: 100%;
}

/* Auto-generated back-face patterns (when no uploaded image) */
.kaplus-timeline-item:not([style*="--image"]):nth-child(6n + 1)
    .kaplus-timeline-back::before {
    background:
        linear-gradient(
            135deg,
            rgba(255, 249, 238, 0.12),
            rgba(40, 50, 58, 0.4)
        ),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(191, 96, 75, 0.08) 10px,
            rgba(191, 96, 75, 0.08) 11px
        );
}

.kaplus-timeline-item:not([style*="--image"]):nth-child(6n + 2)
    .kaplus-timeline-back::before {
    background:
        linear-gradient(
            135deg,
            rgba(255, 249, 238, 0.1),
            rgba(40, 50, 58, 0.45)
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 12px,
            rgba(96, 127, 98, 0.1) 12px,
            rgba(96, 127, 98, 0.1) 13px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 12px,
            rgba(96, 127, 98, 0.1) 12px,
            rgba(96, 127, 98, 0.1) 13px
        );
}

.kaplus-timeline-item:not([style*="--image"]):nth-child(6n + 3)
    .kaplus-timeline-back::before {
    background:
        linear-gradient(
            135deg,
            rgba(255, 249, 238, 0.08),
            rgba(40, 50, 58, 0.5)
        ),
        radial-gradient(
            circle at 25% 25%,
            rgba(211, 162, 70, 0.12) 2px,
            transparent 2px
        ),
        radial-gradient(
            circle at 75% 75%,
            rgba(211, 162, 70, 0.12) 2px,
            transparent 2px
        );
    background-size:
        auto,
        24px 24px,
        24px 24px;
}

.kaplus-timeline-item:not([style*="--image"]):nth-child(6n + 4)
    .kaplus-timeline-back::before {
    background:
        linear-gradient(
            135deg,
            rgba(255, 249, 238, 0.1),
            rgba(40, 50, 58, 0.5)
        ),
        repeating-linear-gradient(
            60deg,
            transparent,
            transparent 8px,
            rgba(191, 96, 75, 0.07) 8px,
            rgba(191, 96, 75, 0.07) 9px
        ),
        repeating-linear-gradient(
            120deg,
            transparent,
            transparent 8px,
            rgba(191, 96, 75, 0.07) 8px,
            rgba(191, 96, 75, 0.07) 9px
        );
}

.kaplus-timeline-item:not([style*="--image"]):nth-child(6n + 5)
    .kaplus-timeline-back::before {
    background:
        linear-gradient(
            135deg,
            rgba(255, 249, 238, 0.08),
            rgba(40, 50, 58, 0.52)
        ),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 14px,
            rgba(211, 162, 70, 0.09) 14px,
            rgba(211, 162, 70, 0.09) 15px
        );
}

.kaplus-timeline-item:not([style*="--image"]):nth-child(6n + 6)
    .kaplus-timeline-back::before {
    background:
        linear-gradient(
            135deg,
            rgba(255, 249, 238, 0.08),
            rgba(40, 50, 58, 0.52)
        ),
        linear-gradient(135deg, rgba(96, 127, 98, 0.1) 25%, transparent 25%),
        linear-gradient(225deg, rgba(96, 127, 98, 0.1) 25%, transparent 25%),
        linear-gradient(315deg, rgba(96, 127, 98, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, rgba(96, 127, 98, 0.1) 25%, transparent 25%);
    background-size:
        auto,
        22px 22px,
        22px 22px,
        22px 22px,
        22px 22px;
}

@keyframes kaplusTimelineStitchMove {
    to {
        stroke-dashoffset: -30;
    }
}

@keyframes kaplusTimelineScissorsBob {
    0%,
    100% {
        translate: 0 0;
    }
    50% {
        translate: 0 8px;
    }
}

@keyframes kaplusTimelineThreadBreathe {
    0%,
    100% {
        transform: translateY(0);
        opacity: 0.86;
    }
    50% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

@keyframes kaplusTimelineBob {
    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }
    50% {
        transform: translateY(13px) rotate(4deg);
    }
}

@keyframes kaplusTimelineBobSmall {
    0%,
    100% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(-50%, calc(-50% - 7px));
    }
}

@keyframes kaplusTimelineSnip {
    0%,
    100% {
        rotate: -9deg;
        scale: 1;
    }
    50% {
        rotate: 9deg;
        scale: 1.06;
    }
}

@media (max-width: 860px) {
    .kaplus-timeline-floating-thread {
        position: relative;
        top: auto;
        right: auto;
        margin: 24px auto 0;
    }
    .kaplus-timeline-wavy {
        left: 27px;
        width: 54px;
        transform: none;
    }
    .kaplus-timeline-wavy svg {
        transform: translateX(-8px);
    }
    .kaplus-timeline-scissors {
        margin-left: 2px;
        margin-right: 0;
    }
    .kaplus-timeline-item {
        display: block;
        min-height: 0;
        padding-left: 64px;
        margin-bottom: 26px;
    }
    .kaplus-timeline-item::before {
        left: 27px;
    }
    .kaplus-timeline-connector {
        left: 27px !important;
        width: 38px;
    }
    .kaplus-timeline-item:nth-child(odd) .kaplus-timeline-flip,
    .kaplus-timeline-item:nth-child(even) .kaplus-timeline-flip {
        width: 100%;
        margin: 0;
    }
    .kaplus-timeline-flip,
    .kaplus-timeline-flip-inner,
    .kaplus-timeline-face {
        min-height: unset;
    }
    .kaplus-timeline-face {
        min-height: 210px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kaplus-timeline *,
    .kaplus-timeline *::before,
    .kaplus-timeline *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }
    .kaplus-timeline-flip:hover .kaplus-timeline-flip-inner,
    .kaplus-timeline-flip:focus-within .kaplus-timeline-flip-inner {
        transform: none;
    }
}
