/**
 * Itinerary World Styles
 *
 * Styles for public itinerary pages (archive, single, cards)
 *
 * @package KTPA
 * @since 1.1.0
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */

:root {
    --ktp-primary: #2563eb;
    --ktp-primary-dark: #1d4ed8;
    --ktp-primary-light: #dbeafe;
    --ktp-secondary: #64748b;
    --ktp-accent: #f59e0b;
    --ktp-success: #10b981;
    --ktp-danger: #ef4444;

    --ktp-text: #1e293b;
    --ktp-text-light: #64748b;
    --ktp-text-muted: #94a3b8;

    --ktp-bg: #ffffff;
    --ktp-bg-light: #f8fafc;
    --ktp-bg-dark: #f1f5f9;

    --ktp-border: #e2e8f0;
    --ktp-border-light: #f1f5f9;

    --ktp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --ktp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --ktp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --ktp-radius-sm: 6px;
    --ktp-radius: 8px;
    --ktp-radius-lg: 12px;
    --ktp-radius-xl: 16px;

    --ktp-container-width: 1200px;
    --ktp-container-padding: 20px;
}

/* ==========================================================================
   Base & Layout
   ========================================================================== */

/* Single itinerary page - proper width constraints */
.ktp-single-itinerary {
    width: 100%;
    max-width: 100vw;
}

.ktp-container {
    max-width: var(--ktp-container-width);
    margin: 0 auto;
    padding-left: var(--ktp-container-padding);
    padding-right: var(--ktp-container-padding);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.ktp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: var(--ktp-radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ktp-btn-primary {
    background: var(--ktp-primary);
    color: #fff;
}

.ktp-btn-primary:hover {
    background: var(--ktp-primary-dark);
    color: #fff;
}

.ktp-btn-secondary {
    background: var(--ktp-bg-dark);
    color: var(--ktp-text);
}

.ktp-btn-secondary:hover {
    background: var(--ktp-border);
}

.ktp-btn-large {
    padding: 16px 32px;
    font-size: 17px;
}

.ktp-btn-icon {
    font-size: 1.1em;
}

.ktp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Hero Section (Single & Archive)
   ========================================================================== */

.ktp-hero {
    position: relative;
    min-height: 350px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.ktp-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.ktp-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ktp-hero-placeholder {
    background: linear-gradient(135deg, var(--ktp-primary-light) 0%, var(--ktp-bg-dark) 100%);
}

.ktp-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.1) 100%);
}

.ktp-hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 40px 0;
    color: #fff;
}

/* Breadcrumbs */
.ktp-breadcrumbs {
    margin-bottom: 16px;
    font-size: 14px;
    opacity: 0.9;
}

.ktp-breadcrumbs a {
    color: #fff;
    text-decoration: none;
}

.ktp-breadcrumbs a:hover {
    text-decoration: underline;
}

.ktp-breadcrumb-sep {
    margin: 0 8px;
    opacity: 0.6;
}

/* Hero Title */
.ktp-hero-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.2;
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
}

/* Badges */
.ktp-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.ktp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.ktp-badge-icon {
    font-size: 14px;
}

/* Style Tags (Legacy) */
.ktp-style-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ktp-style-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 16px;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.ktp-style-tag:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* Travel Vibes (New Display) */
.ktp-travel-vibes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    font-size: 14px;
    line-height: 1.6;
}

.ktp-vibes-label {
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
}

.ktp-vibes-list {
    color: rgba(255,255,255,0.95);
    font-weight: 400;
}

@media (max-width: 767px) {
    .ktp-travel-vibes {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px 12px;
        font-size: 13px;
    }

    .ktp-vibes-list {
        line-height: 1.8;
    }
}

/* Hero Engagement Stats (Bottom Right of Cover) */
.ktp-hero-stats {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: rgba(0,0,0,0.5);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    font-size: 13px;
    color: rgba(255,255,255,0.95);
    z-index: 10;
}

.ktp-hero-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.ktp-hero-stat svg {
    opacity: 0.9;
}

@media (max-width: 767px) {
    .ktp-hero-stats {
        bottom: 12px;
        right: 12px;
        gap: 10px;
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* ==========================================================================
   Archive Hero
   ========================================================================== */

.ktp-archive-hero {
    position: relative;
    background: url('/wp-content/uploads/2026/01/Korea-Itinerary-Showcase-Cover-Spring.jpg') center/cover no-repeat;
    color: #fff;
    padding: 80px 0 60px;
    text-align: center;
}

.ktp-archive-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 0;
}

.ktp-archive-hero .ktp-container {
    position: relative;
    z-index: 1;
}

.ktp-archive-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 16px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.3);
}

.ktp-archive-intro {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 32px;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Archive Search Box (Pill with Button) */
.ktp-archive-search {
    max-width: 560px;
    margin: 0 auto 32px;
}

.ktp-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.ktp-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    z-index: 2;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.ktp-search-input {
    flex: 1;
    min-width: 0;
    padding: 16px 24px;
    font-size: 16px;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--ktp-text);
    outline: none;
    box-shadow: none !important;
}

.ktp-search-input::placeholder {
    color: var(--ktp-text-muted);
}

.ktp-search-btn {
    flex-shrink: 0;
    padding: 12px 28px;
    margin: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: #fb501b;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ktp-search-btn:hover {
    background: #e04516;
}

/* Quick Links */
.ktp-quick-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.ktp-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease;
}

.ktp-quick-link:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* ==========================================================================
   Taxonomy Archive (Destination, Duration, etc.)
   ========================================================================== */

.ktp-taxonomy-archive {
    min-height: 60vh;
}

.ktp-taxonomy-hero {
    position: relative;
    padding: 60px 0 50px;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.ktp-taxonomy-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Destination-specific backgrounds with images
   To change images: Replace the URL in each background property */
.ktp-taxonomy-hero-bg[data-destination="seoul"] {
    background-image: url('/wp-content/uploads/2026/01/KTP-Seoul-Itinerary-Archive-Cover.jpg');
}

.ktp-taxonomy-hero-bg[data-destination="busan"] {
    background-image: url('/wp-content/uploads/2026/01/KTP-Busan-Itinerary-Archive-Cover.jpg');
}

.ktp-taxonomy-hero-bg[data-destination="jeju"] {
    background-image: url('/wp-content/uploads/2026/01/KTP-Jeju-Island-Itinerary-Archive-Cover.jpg');
}

/* Fallback gradient for destinations without specific images */
.ktp-taxonomy-hero-bg:not([data-destination="seoul"]):not([data-destination="busan"]):not([data-destination="jeju"]) {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
}

.ktp-taxonomy-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
}

.ktp-taxonomy-hero .ktp-container {
    position: relative;
    z-index: 2;
}

.ktp-taxonomy-hero .ktp-breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.ktp-taxonomy-hero .ktp-breadcrumbs a {
    color: #fff;
    text-decoration: none;
}

.ktp-taxonomy-hero .ktp-breadcrumbs a:hover {
    text-decoration: underline;
}

.ktp-taxonomy-hero .ktp-breadcrumb-sep {
    margin: 0 8px;
    opacity: 0.7;
}

.ktp-taxonomy-hero .ktp-breadcrumb-current {
    opacity: 0.9;
}

.ktp-taxonomy-title {
    font-size: 42px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.ktp-taxonomy-description {
    font-size: 17px;
    max-width: 600px;
    margin: 0 auto 16px;
    opacity: 0.95;
    line-height: 1.6;
}

.ktp-taxonomy-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.ktp-taxonomy-stats .ktp-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Destination Search Box - Unified pill style */
.ktp-destination-search {
    margin-top: 24px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* Stats below search on destination pages */
.ktp-destination-search + .ktp-taxonomy-stats {
    margin-top: 20px;
}

/* Destination Section Headers */
.ktp-destination-section {
    margin-bottom: 48px;
}

.ktp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.ktp-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--ktp-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ktp-section-icon {
    font-size: 22px;
}

.ktp-section-count {
    font-size: 14px;
    color: var(--ktp-text-muted);
    padding: 4px 12px;
    background: var(--ktp-bg-light);
    border-radius: 16px;
}

/* Popular Section Grid - slightly larger cards */
.ktp-card-grid-popular {
    grid-template-columns: repeat(3, 1fr);
}

/* No Search Results */
.ktp-no-search-results {
    text-align: center;
    padding: 48px 24px;
    background: var(--ktp-bg-light);
    border-radius: 12px;
}

.ktp-no-search-results h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--ktp-text);
}

.ktp-no-search-results p {
    color: var(--ktp-text-muted);
    margin: 0 0 20px;
}

/* Responsive - Destination/Taxonomy Pages */
@media (max-width: 768px) {
    .ktp-destination-search {
        max-width: 100%;
        padding: 0 16px;
    }

    /* Mobile search: Keep horizontal pill layout, compact button */
    .ktp-destination-search .ktp-search-wrapper {
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    }

    .ktp-destination-search .ktp-search-wrapper .ktp-search-input {
        padding: 14px 16px;
        font-size: 15px;
    }

    .ktp-destination-search .ktp-search-wrapper .ktp-search-btn {
        padding: 10px 18px;
        font-size: 14px;
        margin: 5px;
    }

    .ktp-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ktp-section-title {
        font-size: 20px;
    }

    .ktp-card-grid-popular {
        grid-template-columns: repeat(2, 1fr);
    }

    .ktp-taxonomy-stats {
        margin-top: 16px;
    }

    .ktp-taxonomy-stats .ktp-stat {
        font-size: 13px;
        padding: 5px 12px;
    }
}

@media (max-width: 480px) {
    .ktp-card-grid-popular {
        grid-template-columns: 1fr;
    }
}

.ktp-taxonomy-content {
    padding: 40px 0 60px;
    background: var(--ktp-bg);
}

.ktp-taxonomy-cta {
    margin-top: 48px;
}

.ktp-cta-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 1px solid var(--ktp-border);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.ktp-cta-box h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--ktp-text);
    margin: 0 0 8px;
}

.ktp-cta-box p {
    color: var(--ktp-text-muted);
    margin: 0 0 20px;
}

/* ==========================================================================
   Filters
   ========================================================================== */

.ktp-filters-section {
    background: var(--ktp-bg);
    border-bottom: 1px solid var(--ktp-border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Filter toggle button - hidden on desktop */
.ktp-filters-toggle {
    display: none;
}

.ktp-filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}

.ktp-filter-group {
    flex: 1;
    min-width: 150px;
}

.ktp-filter-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ktp-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    transition: opacity 0.2s ease, height 0.2s ease, margin 0.2s ease;
}

/* Scrolled state - hide labels */
.ktp-filters-section.ktp-filters-scrolled {
    padding: 12px 0;
}

.ktp-filters-section.ktp-filters-scrolled .ktp-filter-label {
    opacity: 0;
    height: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.ktp-filter-select {
    width: 100%;
    height: 42px;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--ktp-border);
    border-radius: var(--ktp-radius);
    background: var(--ktp-bg);
    color: var(--ktp-text);
    cursor: pointer;
    box-sizing: border-box;
}

/* Add consistent dropdown arrow to native <select> elements - matches All Styles triangle */
select.ktp-filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239ca3af' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 10px 6px;
}

.ktp-filter-select:focus {
    outline: none;
    border-color: var(--ktp-primary);
    box-shadow: 0 0 0 3px var(--ktp-primary-light);
}

/* Search Input */
.ktp-filter-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--ktp-border);
    border-radius: var(--ktp-radius);
    background: var(--ktp-bg);
    color: var(--ktp-text);
}

.ktp-filter-input:focus {
    outline: none;
    border-color: var(--ktp-primary);
    box-shadow: 0 0 0 3px var(--ktp-primary-light);
}

.ktp-filter-input::placeholder {
    color: var(--ktp-text-muted);
}

/* Multi-Select Dropdown */
.ktp-multiselect {
    position: relative;
}

.ktp-multiselect-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    cursor: pointer;
    background: var(--ktp-bg);
    /* Ensure button matches select height */
    height: 42px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    /* Use same SVG triangle as native <select> elements */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239ca3af' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 10px 6px;
    padding-right: 36px;
}

/* Hide the text arrow since we use SVG now */
.ktp-multiselect-arrow {
    display: none;
}

/* Rotate SVG arrow when dropdown is open */
.ktp-multiselect-open .ktp-multiselect-toggle {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239ca3af' d='M0 6l5-6 5 6z'/%3E%3C/svg%3E");
}

.ktp-multiselect-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--ktp-bg);
    border: 1px solid var(--ktp-border);
    border-radius: var(--ktp-radius);
    box-shadow: var(--ktp-shadow-lg);
    max-height: 280px;
    overflow-y: auto;
    z-index: 200;
    display: none;
}

.ktp-multiselect-open .ktp-multiselect-dropdown {
    display: block;
}

.ktp-multiselect-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ktp-multiselect-option:hover {
    background: var(--ktp-bg-light);
}

.ktp-multiselect-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ktp-primary);
    cursor: pointer;
}

.ktp-option-text {
    flex: 1;
    font-size: 14px;
    color: var(--ktp-text);
}

.ktp-option-count {
    color: var(--ktp-text-muted);
    font-size: 13px;
    margin-left: 4px;
}

.ktp-filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ktp-btn-filter {
    padding: 10px 20px;
    background: var(--ktp-primary);
    color: #fff;
    border: none;
    border-radius: var(--ktp-radius);
    font-weight: 600;
    cursor: pointer;
}

.ktp-btn-filter:hover {
    background: var(--ktp-primary-dark);
}

.ktp-clear-filters {
    color: var(--ktp-text-light);
    font-size: 14px;
    text-decoration: none;
}

.ktp-clear-filters:hover {
    color: var(--ktp-danger);
}

/* ==========================================================================
   Results Header
   ========================================================================== */

.ktp-archive-main {
    padding: 40px 0;
    background: var(--ktp-bg-light);
    min-height: 400px;
}

.ktp-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.ktp-results-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.ktp-results-count {
    color: var(--ktp-text-light);
    font-size: 14px;
}

/* Fix 3: Mobile - Stack header title and count on separate lines */
@media (max-width: 767px) {
    /* "Browse All Itineraries" results header on archive */
    .ktp-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .ktp-results-title {
        font-size: 20px;
        line-height: 1.3;
    }

    .ktp-results-count {
        font-size: 13px;
        color: var(--ktp-text-muted);
    }
}

/* ==========================================================================
   Featured Sections (Trending, Favorites, Fresh)
   ========================================================================== */

.ktp-featured-section {
    padding: 40px 0;
    background: var(--ktp-bg);
}

.ktp-featured-section:nth-child(even) {
    background: var(--ktp-bg-light);
}

.ktp-section-header {
    margin-bottom: 24px;
}

.ktp-section-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ktp-section-icon {
    font-size: 28px;
}

.ktp-section-subtitle {
    font-size: 14px;
    color: var(--ktp-text-light);
    margin: 0;
}

/* Horizontal scrolling card row for featured sections */
.ktp-card-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .ktp-card-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .ktp-card-row {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        padding-bottom: 16px;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .ktp-card-row .ktp-itinerary-card {
        flex: 0 0 280px;
        scroll-snap-align: start;
    }

    .ktp-featured-section {
        padding: 24px 0;
    }

    .ktp-section-title {
        font-size: 20px;
    }

    .ktp-section-icon {
        font-size: 24px;
    }
}

/* ==========================================================================
   Card Grid
   ========================================================================== */

.ktp-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ==========================================================================
   Itinerary Card
   ========================================================================== */

.ktp-itinerary-card {
    background: var(--ktp-bg);
    border-radius: var(--ktp-radius-lg);
    overflow: hidden;
    box-shadow: var(--ktp-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* Fix 1: Enable flex column for footer pinning */
    display: flex;
    flex-direction: column;
}

.ktp-itinerary-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ktp-shadow-lg);
}

.ktp-card-image-link {
    display: block;
}

.ktp-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: var(--ktp-bg-dark);
}

.ktp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ktp-itinerary-card:hover .ktp-card-image img {
    transform: scale(1.05);
}

.ktp-card-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ktp-primary-light) 0%, var(--ktp-bg-dark) 100%);
}

.ktp-placeholder-icon {
    font-size: 48px;
    opacity: 0.5;
}

/* Experience Badge on Card Image */
.ktp-card-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 16px;
    backdrop-filter: blur(4px);
}

/* Delete Button on Own Cards */
.ktp-card-image-wrapper {
    position: relative;
}

.ktp-card-delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s, transform 0.2s;
    z-index: 10;
}

.ktp-card-owns:hover .ktp-card-delete-btn,
.ktp-card-delete-btn:focus {
    opacity: 1;
}

/* Always show delete button on mobile (no hover state) */
@media (max-width: 767px) {
    .ktp-card-owns .ktp-card-delete-btn {
        opacity: 1;
    }
}

.ktp-card-delete-btn:hover {
    background: rgba(220, 38, 38, 1);
    transform: scale(1.1);
}

.ktp-card-delete-btn svg {
    width: 16px;
    height: 16px;
}

/* Delete confirmation overlay */
.ktp-card-deleting {
    position: relative !important;
    pointer-events: none;
}

.ktp-card-deleting::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 100;
    border-radius: var(--ktp-radius);
}

.ktp-card-deleting::after {
    content: 'Deleting...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--ktp-primary);
    font-weight: 500;
    z-index: 101;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 50 50'%3E%3Cpath fill='%23e96228' d='M25 5A20 20 0 1 0 25 45 20 20 0 1 0 25 5z' opacity='0.2'/%3E%3Cpath fill='%23e96228' d='M25 5A20 20 0 0 1 45 25' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E") no-repeat center 10px;
    background-size: 40px 40px;
    padding-top: 50px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.ktp-card-content {
    padding: 20px;
    /* Fix 1: Flex column to pin footer at bottom */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ktp-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--ktp-text-light);
}

.ktp-card-destination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ktp-meta-icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    color: var(--ktp-text-muted);
}

.ktp-card-duration {
    color: var(--ktp-primary);
    font-weight: 600;
}

/* Clickable meta links (destination & duration) */
.ktp-meta-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.ktp-meta-link:hover {
    color: var(--ktp-primary);
    opacity: 0.85;
}

a.ktp-card-destination:hover .ktp-meta-icon {
    color: var(--ktp-primary);
}

a.ktp-card-duration:hover {
    color: var(--ktp-primary-dark, #d85818);
}

.ktp-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
}

.ktp-card-title a {
    color: var(--ktp-text);
    text-decoration: none;
}

.ktp-card-title a:hover {
    color: var(--ktp-primary);
}

.ktp-card-excerpt {
    font-size: 14px;
    color: var(--ktp-text-light);
    margin: 0 0 12px;
    line-height: 1.5;
}

.ktp-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    /* Fix 1: Push footer to bottom by filling remaining space */
    flex-grow: 1;
    align-content: flex-start;
}

.ktp-card-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--ktp-bg-dark);
    border-radius: 12px;
    font-size: 12px;
    color: var(--ktp-text-light);
}

.ktp-tag-more {
    background: var(--ktp-primary-light);
    color: var(--ktp-primary);
    position: relative;
    cursor: pointer;
}

/* Tooltip for +N badge */
.ktp-tag-more[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--ktp-text);
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
    border-radius: var(--ktp-radius-sm);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 10;
    pointer-events: none;
    box-shadow: var(--ktp-shadow);
}

/* Tooltip arrow */
.ktp-tag-more[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--ktp-text);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 10;
}

/* Show tooltip on hover */
.ktp-tag-more[data-tooltip]:hover::after,
.ktp-tag-more[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Mobile: show on touch/active */
.ktp-tag-more[data-tooltip]:active::after,
.ktp-tag-more[data-tooltip]:active::before {
    opacity: 1;
    visibility: visible;
}

.ktp-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--ktp-border-light);
    /* Fix 1: Ensure footer stays at bottom */
    margin-top: auto;
}

.ktp-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ktp-card-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.ktp-card-author-name {
    font-size: 13px;
    color: var(--ktp-text-light);
}

.ktp-card-cta {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--ktp-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.ktp-card-cta:hover {
    color: var(--ktp-primary-dark);
}

.ktp-cta-arrow {
    transition: transform 0.2s ease;
}

.ktp-card-cta:hover .ktp-cta-arrow {
    transform: translateX(3px);
}

/* ==========================================================================
   K-Rep Badges
   ========================================================================== */

.ktp-krep-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 12px;
    background: #e3f2fd;
    vertical-align: middle;
}

.ktp-krep-badge .ktp-badge-icon,
.ktp-krep-badge .ktp-badge-label {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", sans-serif;
    line-height: 1;
}

.ktp-krep-badge-small .ktp-badge-icon {
    font-size: 15px;
}

.ktp-krep-badge-small .ktp-badge-label {
    font-size: 12px;
    font-weight: 500;
}

.ktp-krep-badge-medium .ktp-badge-icon {
    font-size: 18px;
}

.ktp-krep-badge-medium .ktp-badge-label {
    font-size: 14px;
    font-weight: 500;
}

/* Level-specific colors (4-tier system) */
.ktp-krep-level-trailblazer { color: #9B59B6; background: #f3e5f5; }
.ktp-krep-level-pathfinder { color: #1565c0; background: #e3f2fd; }
.ktp-krep-level-traveler { color: #2e7d32; background: #e8f5e9; }
.ktp-krep-level-newbie { color: #616161; background: #f5f5f5; }

/* Profile badge (larger, with points) */
.ktp-profile-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--ktp-bg-light);
    border-radius: var(--ktp-radius);
    margin: 16px 0;
}

.ktp-badge-icon-large {
    font-size: 32px;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", sans-serif;
    line-height: 1;
}

.ktp-badge-info {
    display: flex;
    flex-direction: column;
}

.ktp-badge-level {
    font-size: 16px;
    font-weight: 600;
    color: var(--ktp-text);
}

.ktp-badge-points {
    font-size: 13px;
    color: var(--ktp-text-light);
}

.ktp-badge-override {
    color: var(--ktp-success);
    font-size: 12px;
}

.ktp-badge-progress {
    font-size: 12px;
    color: var(--ktp-text-muted);
    margin-top: 4px;
}

.ktp-badge-progress.ktp-badge-max {
    color: var(--ktp-primary);
    font-weight: 500;
}

.ktp-badge-help {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--ktp-border);
    background: var(--ktp-bg);
    color: var(--ktp-text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: help;
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ktp-badge-help:hover {
    border-color: var(--ktp-primary);
    color: var(--ktp-primary);
    background: var(--ktp-primary-light, #fff5f5);
}

/* Badge tooltip */
.ktp-badge-tooltip-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.ktp-badge-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    width: 280px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ktp-text);
}

.ktp-badge-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 16px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.ktp-badge-tooltip-wrapper:hover .ktp-badge-tooltip,
.ktp-badge-help:focus + .ktp-badge-tooltip {
    display: block;
}

.ktp-tooltip-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ktp-text);
    margin-bottom: 8px;
}

.ktp-tooltip-desc {
    color: var(--ktp-text-light);
    margin: 0 0 12px 0;
}

.ktp-tooltip-section {
    margin-bottom: 12px;
}

.ktp-tooltip-section:last-child {
    margin-bottom: 0;
}

.ktp-tooltip-section strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ktp-text);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ktp-tooltip-section ul {
    margin: 0;
    padding-left: 18px;
    color: var(--ktp-text-light);
}

.ktp-tooltip-section ul li {
    margin-bottom: 2px;
}

.ktp-tooltip-levels {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ktp-tooltip-level {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--ktp-text-light);
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif, var(--ktp-font);
}

.ktp-tooltip-level-current {
    background: var(--ktp-primary-light, #fff5f5);
    color: var(--ktp-primary);
    font-weight: 600;
}

/* Author block name row (inline badge) */
.ktp-author-block .ktp-author-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ktp-author-block .ktp-author-name-row .ktp-krep-badge {
    flex-shrink: 0;
}

/* ==========================================================================
   Card Meta with Engagement Stats
   ========================================================================== */

.ktp-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ktp-card-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ktp-card-meta-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--ktp-text-muted);
}

.ktp-card-stat {
    display: flex;
    align-items: center;
    gap: 3px;
}

.ktp-card-stat-icon {
    font-size: 13px;
}

.ktp-card-stat-value {
    font-size: 12px;
}

/* Author with badge in footer */
.ktp-card-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ktp-card-author-badge {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Fix 2: Mobile - Stack creator badge below name */
@media (max-width: 767px) {
    .ktp-card-author {
        flex-wrap: wrap;
        gap: 4px 8px;
    }

    .ktp-author-link {
        flex-shrink: 1;
        min-width: 0;
        max-width: calc(100% - 60px); /* Leave room for View CTA */
    }

    .ktp-card-author-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Force K-Rep badge to new line - use flex break */
    .ktp-card-author::before {
        content: '';
        order: 2;
        flex-basis: 100%;
        height: 0;
    }

    .ktp-card-author .ktp-krep-badge {
        order: 3;
        flex: 0 0 auto;
        margin-top: 0;
    }

    /* Keep verified badge inline with name */
    .ktp-card-author .ktp-verified-badge {
        order: 1;
    }

    /* Ensure footer has enough space */
    .ktp-card-footer {
        gap: 8px;
    }
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.ktp-pagination {
    margin-top: 40px;
    text-align: center;
}

.ktp-pagination-links {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ktp-pagination-links a,
.ktp-pagination-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--ktp-bg);
    border: 1px solid var(--ktp-border);
    border-radius: var(--ktp-radius);
    color: var(--ktp-text);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ktp-pagination-links a:hover {
    background: var(--ktp-primary);
    border-color: var(--ktp-primary);
    color: #fff;
}

.ktp-pagination-links .current {
    background: var(--ktp-primary);
    border-color: var(--ktp-primary);
    color: #fff;
}

.ktp-pagination-links .dots {
    background: transparent;
    border: none;
}

/* ==========================================================================
   No Results
   ========================================================================== */

.ktp-no-results {
    text-align: center;
    padding: 60px 20px;
}

.ktp-no-results-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.ktp-no-results h3 {
    font-size: 24px;
    margin: 0 0 8px;
}

.ktp-no-results p {
    color: var(--ktp-text-light);
    margin: 0 0 24px;
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.ktp-cta-section {
    padding: 60px 0;
    background: var(--ktp-bg);
}

.ktp-cta-box {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, var(--ktp-primary-light) 0%, #e0e7ff 100%);
    border-radius: var(--ktp-radius-xl);
}

.ktp-cta-box h2 {
    font-size: 28px;
    margin: 0 0 12px;
}

.ktp-cta-box p {
    font-size: 16px;
    color: var(--ktp-text-light);
    max-width: 500px;
    margin: 0 auto 24px;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.ktp-faq-section {
    padding: 60px 0 80px;
    background: var(--ktp-bg-light);
}

.ktp-faq-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 40px;
    color: var(--ktp-text);
}

.ktp-faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.ktp-faq-item {
    background: var(--ktp-bg);
    border-radius: var(--ktp-radius);
    margin-bottom: 12px;
    box-shadow: var(--ktp-shadow-sm);
    overflow: hidden;
}

.ktp-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--ktp-text);
    transition: background 0.2s ease;
}

.ktp-faq-question:hover {
    background: var(--ktp-bg-light);
    color: var(--ktp-text);
}

.ktp-faq-question-text {
    flex: 1;
    padding-right: 16px;
}

.ktp-faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 300;
    color: var(--ktp-primary);
    transition: transform 0.2s ease;
}

.ktp-faq-item.ktp-faq-open .ktp-faq-icon {
    transform: rotate(45deg);
}

.ktp-faq-answer {
    padding: 0 24px 20px;
    color: var(--ktp-text-light);
    line-height: 1.7;
}

.ktp-faq-answer[hidden] {
    display: none;
}

.ktp-faq-answer p {
    margin: 0;
}

@media (max-width: 768px) {
    .ktp-faq-section {
        padding: 40px 0 60px;
    }

    .ktp-faq-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .ktp-faq-question {
        padding: 16px 20px;
        font-size: 15px;
    }

    .ktp-faq-answer {
        padding: 0 20px 16px;
        font-size: 14px;
    }
}

/* ==========================================================================
   Single Itinerary - Main Layout
   ========================================================================== */

.ktp-main {
    padding: 40px 0;
    background: var(--ktp-bg-light);
}

.ktp-content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

.ktp-content-main {
    background: var(--ktp-bg);
    border-radius: var(--ktp-radius-lg);
    padding: 32px;
    box-shadow: var(--ktp-shadow-sm);
    /* Allow grid item to shrink below content width for horizontal scroll */
    min-width: 0;
}

/* Author Block */
.ktp-author-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--ktp-border-light);
}

.ktp-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.ktp-author-info {
    display: flex;
    flex-direction: column;
}

.ktp-author-name {
    font-weight: 600;
    color: var(--ktp-text);
}

.ktp-trip-dates {
    display: block;
    font-size: 13px;
    color: var(--ktp-text-light);
}

.ktp-publish-date {
    display: block;
    font-size: 11px;
    color: var(--ktp-text-lighter, #9ca3af);
    margin-top: 2px;
}

/* Author Link (clickable expert) */
.ktp-author-link {
    display: block;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.ktp-author-link:hover {
    transform: scale(1.05);
}

.ktp-author-name-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--ktp-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ktp-author-name-link:hover {
    color: var(--ktp-primary);
}

.ktp-expert-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #3b82f6;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
}

/* Description */
.ktp-description {
    margin-bottom: 32px;
}

.ktp-description h2 {
    font-size: 18px;
    margin: 0 0 12px;
}

.ktp-description p {
    color: var(--ktp-text-light);
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   Day Navigation
   ========================================================================== */

.ktp-day-navigation {
    margin-bottom: 24px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    width: 100%;
    /* Contain children without clipping map buttons */
    position: relative;
}

.ktp-day-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 4px 0;
}

/* Hide scrollbar but keep functionality */
.ktp-day-navigation::-webkit-scrollbar {
    height: 4px;
}

.ktp-day-navigation::-webkit-scrollbar-track {
    background: transparent;
}

.ktp-day-navigation::-webkit-scrollbar-thumb {
    background: var(--ktp-border);
    border-radius: 2px;
}

.ktp-day-navigation::-webkit-scrollbar-thumb:hover {
    background: var(--ktp-text-light);
}

.ktp-day-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 16px;
    background: var(--ktp-bg-dark);
    border: 2px solid transparent;
    border-radius: var(--ktp-radius);
    text-decoration: none;
    color: var(--ktp-text);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.ktp-day-chip:hover {
    background: var(--ktp-primary-light);
    color: var(--ktp-primary);
}

.ktp-day-chip.ktp-active {
    background: var(--ktp-primary);
    color: #fff;
    border-color: var(--ktp-primary);
}

.ktp-chip-number {
    font-weight: 600;
    font-size: 14px;
}

.ktp-chip-date {
    font-size: 12px;
    opacity: 0.8;
}

/* ==========================================================================
   Itinerary Content
   ========================================================================== */

.ktp-itinerary-wrapper h2 {
    font-size: 20px;
    margin: 0 0 24px;
}

.ktp-itinerary-content {
    /* Container for all days */
}

/* Day Section */
.ktp-day-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--ktp-border-light);
}

.ktp-day-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ktp-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border-radius: var(--ktp-radius);
    border-left: 4px solid var(--ktp-primary);
}

/* Fix 4: New title wrap for better mobile layout */
.ktp-day-title-wrap {
    flex: 1;
    min-width: 0;
}

.ktp-day-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--ktp-text);
}

/* Fix 4: Meta row contains date + View Map button */
.ktp-day-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.ktp-day-date {
    font-weight: 400;
    font-size: 14px;
    color: var(--ktp-text-light);
}

.ktp-day-label {
    font-weight: 400;
    color: var(--ktp-primary);
    font-size: 14px;
}

/* View Map Button - Day Header */
.ktp-view-day-map-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--ktp-bg);
    color: var(--ktp-primary);
    border: 1px solid var(--ktp-primary);
    border-radius: var(--ktp-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.ktp-view-day-map-btn:hover {
    background: var(--ktp-primary);
    color: #fff;
}

.ktp-view-day-map-btn:active {
    transform: scale(0.98);
}

.ktp-view-day-map-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .ktp-view-day-map-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .ktp-view-day-map-btn svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 380px) {
    .ktp-view-day-map-btn span {
        display: none;
    }

    .ktp-view-day-map-btn {
        padding: 8px;
    }
}

.ktp-day-narrative {
    color: var(--ktp-text-light);
    font-style: italic;
    margin: 0 0 20px;
    padding-left: 16px;
    border-left: 3px solid var(--ktp-primary-light);
}

/* Activities List */
.ktp-activities-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Activity Card */
.ktp-activity-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--ktp-bg-light);
    border-radius: var(--ktp-radius);
    border: 1px solid var(--ktp-border-light);
}

.ktp-activity-image {
    flex-shrink: 0;
    width: 100px;
    height: 80px;
    border-radius: var(--ktp-radius-sm);
    overflow: hidden;
}

.ktp-activity-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ktp-activity-content {
    flex: 1;
    min-width: 0;
}

.ktp-activity-time {
    display: inline-block;
    padding: 2px 8px;
    background: var(--ktp-primary);
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.ktp-activity-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--ktp-text);
}

.ktp-activity-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--ktp-text-light);
    margin-bottom: 8px;
}

.ktp-meta-sep {
    opacity: 0.5;
}

.ktp-activity-description {
    font-size: 14px;
    color: var(--ktp-text-light);
    margin: 0;
    line-height: 1.5;
}

.ktp-activity-tips {
    font-size: 13px;
    color: var(--ktp-accent);
    margin: 8px 0 0;
    padding: 8px;
    background: #fffbeb;
    border-radius: var(--ktp-radius-sm);
}

.ktp-no-activities {
    color: var(--ktp-text-light);
    font-style: italic;
    padding: 20px;
    text-align: center;
    background: var(--ktp-bg-light);
    border-radius: var(--ktp-radius);
}

/* ==========================================================================
   Sidebar / Sticky CTA
   ========================================================================== */

.ktp-content-sidebar {
    position: relative;
}

.ktp-sticky-cta {
    position: sticky;
    top: 100px;
}

.ktp-cta-card {
    background: var(--ktp-bg);
    border-radius: var(--ktp-radius-lg);
    padding: 24px;
    box-shadow: var(--ktp-shadow);
    margin-bottom: 20px;
}

.ktp-cta-card h3 {
    font-size: 18px;
    margin: 0 0 8px;
}

.ktp-cta-card > p {
    color: var(--ktp-text-light);
    font-size: 14px;
    margin: 0 0 20px;
}

.ktp-cta-card .ktp-btn {
    width: 100%;
    margin-bottom: 12px;
}

.ktp-cta-note {
    font-size: 12px;
    color: var(--ktp-text-muted);
    text-align: center;
    margin: 0;
}

.ktp-cta-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--ktp-text-muted);
    font-size: 13px;
}

.ktp-cta-divider::before,
.ktp-cta-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--ktp-border);
}

/* Quick Stats */
.ktp-quick-stats {
    background: var(--ktp-bg);
    border-radius: var(--ktp-radius-lg);
    padding: 20px;
    box-shadow: var(--ktp-shadow-sm);
}

.ktp-summary-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ktp-stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ktp-stat-icon {
    font-size: 18px;
}

.ktp-stat-value {
    font-size: 14px;
    color: var(--ktp-text);
}

.ktp-trip-theme {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--ktp-border-light);
}

.ktp-trip-theme p {
    font-size: 14px;
    font-style: italic;
    color: var(--ktp-text-light);
    margin: 0;
}

/* ==========================================================================
   Related Itineraries
   ========================================================================== */

.ktp-related-section {
    padding: 60px 0;
    background: var(--ktp-bg);
}

.ktp-related-section h2 {
    font-size: 24px;
    margin: 0 0 24px;
}

/* ==========================================================================
   Modal
   ========================================================================== */

.ktp-modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

/* Hidden attribute takes precedence - modal is hidden by default via HTML hidden attribute */
.ktp-modal[hidden] {
    display: none;
}

.ktp-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.ktp-modal-content {
    position: relative;
    background: var(--ktp-bg);
    padding: 32px;
    border-radius: var(--ktp-radius-lg);
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--ktp-shadow-lg);
}

.ktp-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--ktp-text-light);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.ktp-modal-close:hover {
    color: var(--ktp-text);
}

.ktp-modal-content h3 {
    font-size: 20px;
    margin: 0 0 12px;
}

.ktp-modal-content p {
    color: var(--ktp-text-light);
    margin: 0 0 24px;
}

.ktp-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ktp-modal-actions .ktp-btn {
    width: 100%;
}

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

@media (max-width: 1024px) {
    .ktp-content-grid {
        grid-template-columns: 1fr;
    }

    .ktp-sticky-cta {
        position: static;
    }

    .ktp-cta-card {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        align-items: center;
    }

    .ktp-cta-card h3,
    .ktp-cta-card > p {
        flex: 1;
        margin: 0;
        text-align: left;
    }

    .ktp-cta-card .ktp-btn {
        width: auto;
        margin: 0;
    }

    .ktp-cta-note,
    .ktp-cta-divider,
    .ktp-cta-card .ktp-btn-secondary {
        display: none;
    }
}

@media (max-width: 768px) {
    .ktp-hero {
        min-height: 280px;
    }

    .ktp-hero-title {
        font-size: 28px;
    }

    .ktp-archive-title {
        font-size: 32px;
    }

    .ktp-archive-intro {
        font-size: 16px;
        margin-bottom: 24px;
    }

    /* Mobile archive search: compact pill layout */
    .ktp-archive-search {
        max-width: 100%;
        margin: 0 auto 24px;
        padding: 0 16px;
    }

    .ktp-archive-search .ktp-search-wrapper {
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    }

    .ktp-archive-search .ktp-search-input {
        padding: 14px 16px;
        font-size: 15px;
    }

    .ktp-archive-search .ktp-search-btn {
        padding: 10px 18px;
        font-size: 14px;
        margin: 5px;
    }

    .ktp-quick-links {
        gap: 8px;
        padding: 0 16px;
    }

    .ktp-quick-link {
        padding: 6px 12px;
        font-size: 13px;
    }

    /* Mobile collapsible filters */
    .ktp-filters-section {
        padding: 12px 0;
    }

    /* Filter toggle button (mobile only) */
    .ktp-filters-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 36px 12px 16px;
        background: var(--ktp-bg);
        border: 1px solid var(--ktp-border);
        border-radius: var(--ktp-radius);
        font-size: 14px;
        font-weight: 500;
        color: var(--ktp-text);
        cursor: pointer;
        /* Use same SVG triangle as other filter dropdowns */
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239ca3af' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 14px center;
        background-size: 10px 6px;
        transition: border-color 0.2s;
    }

    .ktp-filters-toggle:hover,
    .ktp-filters-toggle:focus {
        border-color: var(--ktp-primary);
        outline: none;
    }

    .ktp-filters-toggle-icon {
        margin-right: 8px;
    }

    .ktp-filters-toggle-text {
        flex: 1;
        text-align: left;
    }

    .ktp-filters-toggle-count {
        color: var(--ktp-primary);
        font-weight: 600;
        margin-right: 8px;
    }

    /* Hide text arrow - using SVG background instead */
    .ktp-filters-toggle-arrow {
        display: none;
    }

    /* Rotate SVG arrow when filters panel is open */
    .ktp-filters-toggle.ktp-filters-open {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239ca3af' d='M0 6l5-6 5 6z'/%3E%3C/svg%3E");
    }

    /* Collapsed filter form (hidden by default on mobile) */
    .ktp-filters-form {
        display: none;
        margin-top: 12px;
        padding: 16px;
        background: var(--ktp-bg-light);
        border-radius: var(--ktp-radius);
    }

    .ktp-filters-form.ktp-filters-expanded {
        display: block;
    }

    /* Vertical filter layout when expanded */
    .ktp-filters-row {
        flex-direction: column;
        gap: 16px;
    }

    .ktp-filter-group {
        width: 100%;
    }

    /* Show labels when expanded */
    .ktp-filter-label {
        display: block;
        margin-bottom: 8px;
    }

    .ktp-filter-select {
        height: 44px;
        padding: 10px 36px 10px 14px; /* Preserve right padding for dropdown arrow */
        font-size: 14px;
    }

    .ktp-multiselect-toggle {
        height: 44px;
        padding: 10px 36px 10px 14px; /* Preserve right padding for dropdown arrow */
        font-size: 14px;
    }

    .ktp-filter-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 8px;
    }

    .ktp-btn-filter {
        flex: 1;
        padding: 12px 20px;
        font-size: 14px;
    }

    .ktp-clear-filters {
        display: inline-block;
        margin-left: 16px;
        padding: 12px 16px;
        font-size: 14px;
    }

    .ktp-card-grid {
        grid-template-columns: 1fr;
    }

    .ktp-content-main {
        padding: 20px;
        /* Ensure min-width: 0 on mobile too for horizontal scroll */
        min-width: 0;
    }

    .ktp-activity-card {
        flex-direction: column;
    }

    .ktp-activity-image {
        width: 100%;
        height: 150px;
    }

    .ktp-cta-card {
        flex-direction: column;
        text-align: center;
    }

    .ktp-cta-card h3,
    .ktp-cta-card > p {
        text-align: center;
    }

    .ktp-cta-card .ktp-btn {
        width: 100%;
    }

    .ktp-cta-note,
    .ktp-cta-divider,
    .ktp-cta-card .ktp-btn-secondary {
        display: block;
    }
}

@media (max-width: 480px) {
    .ktp-hero-badges {
        gap: 6px;
    }

    .ktp-badge {
        padding: 4px 8px;
        font-size: 12px;
    }

    .ktp-day-chips {
        gap: 6px;
    }

    .ktp-day-chip {
        padding: 8px 12px;
    }
}

/* ==========================================================================
   Author Link (on Cards)
   ========================================================================== */

.ktp-author-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}

.ktp-author-link:hover .ktp-card-author-name {
    color: var(--ktp-primary);
}

/* ==========================================================================
   Expert Profile Page (Mindtrip-style)
   ========================================================================== */

.ktp-expert-page {
    background: var(--ktp-bg);
    min-height: 100vh;
    padding: 40px 0 60px;
}

/* Expert Header */
.ktp-expert-header {
    padding-bottom: 32px;
    margin-bottom: 24px;
}

.ktp-expert-profile-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.ktp-expert-avatar {
    flex-shrink: 0;
}

.ktp-expert-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.ktp-expert-info {
    flex: 1;
    min-width: 0;
}

.ktp-expert-name-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ktp-expert-name {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: var(--ktp-text);
    line-height: 1.2;
}

.ktp-expert-username {
    font-size: 16px;
    color: var(--ktp-text-muted);
}

.ktp-expert-bio {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ktp-text-light);
    margin: 0 0 12px;
    max-width: 600px;
}

/* Expert Meta (location, website) */
.ktp-expert-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--ktp-text-light);
}

.ktp-expert-location {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ktp-expert-location svg {
    flex-shrink: 0;
    color: var(--ktp-text-muted);
}

.ktp-expert-website {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ktp-primary);
    text-decoration: none;
}

.ktp-expert-website:hover {
    text-decoration: underline;
}

.ktp-expert-website svg {
    flex-shrink: 0;
}

/* Social Icons (small icons, not pill buttons) */
.ktp-expert-socials {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.ktp-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--ktp-text-light);
    text-decoration: none;
    transition: all 0.2s ease;
}

.ktp-social-icon:hover {
    color: var(--ktp-primary);
    background: var(--ktp-bg-dark);
}

.ktp-social-icon svg {
    width: 20px;
    height: 20px;
}

/* Tabs (underline style) */
.ktp-expert-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--ktp-border);
    margin-bottom: 32px;
}

.ktp-expert-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ktp-text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.ktp-expert-tab svg {
    width: 16px;
    height: 16px;
}

.ktp-expert-tab:hover {
    color: var(--ktp-text);
}

.ktp-expert-tab.ktp-tab-active {
    color: var(--ktp-text);
    border-bottom-color: var(--ktp-text);
}

.ktp-tab-count {
    font-size: 14px;
    font-weight: 400;
    color: var(--ktp-text-muted);
}

/* Expert Content */
.ktp-expert-content {
    min-height: 300px;
}

/* Expert Grid (5 columns on desktop) */
.ktp-expert-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* Expert Card (minimal style) */
.ktp-expert-card {
    background: var(--ktp-bg);
    border-radius: var(--ktp-radius-lg);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ktp-expert-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ktp-shadow-lg);
}

.ktp-expert-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.ktp-expert-card-image {
    position: relative;
    height: 160px;
    overflow: hidden;
    border-radius: var(--ktp-radius-lg);
    background: var(--ktp-bg-dark);
}

.ktp-expert-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ktp-expert-card:hover .ktp-expert-card-image img {
    transform: scale(1.05);
}

.ktp-expert-card-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ktp-primary-light) 0%, var(--ktp-bg-dark) 100%);
}

.ktp-expert-card-placeholder span {
    font-size: 40px;
    opacity: 0.5;
}

/* "X places" Badge */
.ktp-places-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 14px;
    backdrop-filter: blur(4px);
}

/* Card Info */
.ktp-expert-card-info {
    padding: 14px 4px;
}

.ktp-expert-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.3;
    color: var(--ktp-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ktp-expert-card-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--ktp-text-muted);
    margin: 0;
}

.ktp-expert-card-location svg {
    flex-shrink: 0;
}

/* Expert Footer */
.ktp-expert-footer {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--ktp-border);
}

.ktp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ktp-text-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.ktp-back-link:hover {
    color: var(--ktp-primary);
}

/* Expert Profile Responsive */
@media (max-width: 1200px) {
    .ktp-expert-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .ktp-expert-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .ktp-expert-page {
        padding: 24px 0 40px;
    }

    .ktp-expert-profile-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .ktp-expert-avatar img {
        width: 80px;
        height: 80px;
    }

    .ktp-expert-name-row {
        justify-content: center;
    }

    .ktp-expert-name {
        font-size: 24px;
    }

    .ktp-expert-bio {
        max-width: 100%;
    }

    .ktp-expert-meta {
        justify-content: center;
    }

    .ktp-expert-socials {
        justify-content: center;
    }

    .ktp-expert-tabs {
        justify-content: flex-start;
    }

    .ktp-expert-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .ktp-expert-card-image {
        height: 140px;
    }
}

@media (max-width: 480px) {
    .ktp-expert-grid {
        grid-template-columns: 1fr;
    }

    .ktp-expert-card-image {
        height: 180px;
    }
}

/* ==========================================================================
   Enhanced Activity Card (Compact Layout)
   ========================================================================== */

/* Activity Header Row - Time on left, Map button on far right */
.ktp-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
    margin-bottom: 8px;
}

.ktp-activity-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: var(--ktp-primary);
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.ktp-time-duration {
    font-weight: 400;
    opacity: 0.9;
}

/* Map Button (icon) */
.ktp-map-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: var(--ktp-bg);
    border: 1px solid var(--ktp-border);
    border-radius: var(--ktp-radius-sm);
    color: var(--ktp-text-light);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ktp-map-btn:hover {
    background: var(--ktp-primary-light);
    border-color: var(--ktp-primary);
    color: var(--ktp-primary);
}

.ktp-map-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--ktp-primary-light);
}

/* ==========================================================================
   Practical Info Section
   ========================================================================== */

.ktp-activity-practical-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    padding: 8px 10px;
    background: var(--ktp-bg);
    border-radius: var(--ktp-radius-sm);
    border: 1px solid var(--ktp-border-light);
    font-size: 12px;
    color: var(--ktp-text-light);
}

.ktp-info-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.ktp-info-sep {
    color: var(--ktp-text-muted);
    margin: 0 4px;
}

.ktp-info-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ktp-info-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.ktp-info-item a {
    color: var(--ktp-text-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ktp-info-item a:hover {
    color: var(--ktp-primary);
}

.ktp-badge-reservation {
    padding: 1px 6px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

/* ==========================================================================
   Related Content Section (Collapsible)
   ========================================================================== */

.ktp-activity-related {
    margin-top: 12px;
    border-top: 1px solid var(--ktp-border-light);
    padding-top: 12px;
}

.ktp-related-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid var(--ktp-border);
    border-radius: var(--ktp-radius-sm);
    color: var(--ktp-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ktp-related-toggle:focus {
    outline: 2px solid var(--ktp-primary-light);
    outline-offset: 2px;
    color: var(--ktp-primary);
}

.ktp-related-toggle:active {
    color: var(--ktp-primary);
}

.ktp-related-toggle .ktp-related-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ktp-related-toggle .ktp-related-label::before {
    content: "📚";
    font-size: 14px;
}

.ktp-related-toggle:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: var(--ktp-primary);
    border-color: var(--ktp-primary-light);
}

.ktp-related-toggle-icon {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.ktp-activity-related.ktp-expanded .ktp-related-toggle-icon {
    transform: rotate(180deg);
}

/* Ensure toggle button stays visible when expanded */
.ktp-activity-related.ktp-expanded .ktp-related-toggle {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: var(--ktp-primary-light);
}

.ktp-activity-related.ktp-expanded .ktp-related-toggle .ktp-related-label {
    color: var(--ktp-primary);
}

.ktp-related-content {
    display: none;
    padding: 12px 0;
}

.ktp-activity-related.ktp-expanded .ktp-related-content {
    display: block;
}

.ktp-related-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--ktp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
}

.ktp-related-section-title:not(:first-child) {
    margin-top: 16px;
}

/* Related Items (Guides & Products) */
.ktp-related-guides-items,
.ktp-related-products-items {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.ktp-related-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 10px 10px;
    background: var(--ktp-bg);
    border: 1px solid var(--ktp-border);
    border-radius: var(--ktp-radius);
    text-decoration: none;
    color: var(--ktp-text);
    transition: all 0.2s ease;
    flex-shrink: 0;
    min-width: 180px;
    max-width: 240px;
}

.ktp-related-item:hover {
    border-color: var(--ktp-primary);
    box-shadow: var(--ktp-shadow-sm);
}

.ktp-related-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--ktp-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.ktp-related-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--ktp-bg-dark);
    border-radius: var(--ktp-radius-sm);
    font-size: 20px;
    flex-shrink: 0;
}

.ktp-related-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--ktp-text);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ktp-related-price {
    display: block;
    font-size: 12px;
    color: var(--ktp-primary);
    font-weight: 600;
    margin-top: 2px;
}

/* Guide specific styling */
.ktp-related-guide {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
}

.ktp-related-guide:hover {
    border-color: #3b82f6;
}

/* Product specific styling */
.ktp-related-product {
    background: linear-gradient(135deg, #fff 0%, #fffbeb 100%);
}

.ktp-related-product:hover {
    border-color: #f59e0b;
}

/* ==========================================================================
   Map Modal
   ========================================================================== */

.ktp-map-modal .ktp-modal-content {
    max-width: 700px;
    width: 95%;
    padding: 0;
    text-align: left;
    overflow: hidden;
}

.ktp-map-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--ktp-bg);
    border-bottom: 1px solid var(--ktp-border-light);
}

.ktp-map-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--ktp-text);
}

.ktp-map-modal-header .ktp-modal-close {
    position: static;
    padding: 4px 8px;
}

.ktp-activity-map {
    width: 100%;
    height: 400px;
    background: var(--ktp-bg-dark);
}

.ktp-map-modal-footer {
    padding: 16px 20px;
    background: var(--ktp-bg);
    border-top: 1px solid var(--ktp-border-light);
    display: flex;
    justify-content: flex-end;
}

.ktp-map-modal-footer .ktp-btn {
    margin-bottom: 0;
}

/* Mobile Map Modal */
@media (max-width: 768px) {
    .ktp-map-modal .ktp-modal-content {
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .ktp-activity-map {
        height: calc(100vh - 140px);
    }
}

/* ==========================================================================
   Activity Card Compact Layout Overrides
   ========================================================================== */

/* Ensure activity content flows properly with new layout */
.ktp-activity-card .ktp-activity-header + .ktp-activity-title {
    margin-top: 0;
}

/* Activity title styling adjustment */
.ktp-activity-card .ktp-activity-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.3;
}

/* Activity meta on single line */
.ktp-activity-card .ktp-activity-meta {
    margin-bottom: 6px;
    font-size: 12px;
}

/* Compact activity description */
.ktp-activity-card .ktp-activity-description {
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tips styling */
.ktp-activity-card .ktp-activity-tips {
    font-size: 12px;
    margin: 8px 0 0;
    padding: 6px 10px;
}

/* ==========================================================================
   Responsive for Enhanced Activity Card
   ========================================================================== */

@media (max-width: 768px) {
    .ktp-activity-header {
        flex-wrap: wrap;
    }

    .ktp-activity-practical-info {
        flex-direction: column;
        gap: 6px;
    }

    .ktp-related-guides-items,
    .ktp-related-products-items {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .ktp-related-item {
        min-width: 160px;
    }
}

@media (max-width: 480px) {
    .ktp-activity-card {
        padding: 12px;
    }

    .ktp-activity-image {
        width: 80px;
        height: 70px;
    }

    .ktp-map-btn {
        width: 32px;
        height: 32px;
    }

    .ktp-related-item {
        min-width: 140px;
        padding: 8px 10px 8px 8px;
    }

    .ktp-related-thumb {
        width: 36px;
        height: 36px;
    }
}

/* ==========================================================================
   Mobile Activity Card Layout (Side-by-Side)
   Title at top, Image+Time left, Practical info right
   ========================================================================== */

/* Desktop visibility: hide mobile elements */
.ktp-mobile-title,
.ktp-activity-mobile-layout {
    display: none;
}

/* Desktop: show standard elements */
.ktp-desktop-only,
.ktp-desktop-title {
    display: block;
}

/* Activity header needs flex display on desktop */
.ktp-activity-header.ktp-desktop-only {
    display: flex;
}

@media (max-width: 768px) {
    /* Hide desktop elements */
    .ktp-desktop-only,
    .ktp-desktop-title {
        display: none !important;
    }

    /* Show mobile title at top */
    .ktp-mobile-title {
        display: block;
        font-size: 15px;
        font-weight: 600;
        margin: 0 0 10px;
        line-height: 1.3;
        color: var(--ktp-text, #1f2937);
    }

    /* Side-by-side mobile layout */
    .ktp-activity-mobile-layout {
        display: flex;
        gap: 12px;
        margin-bottom: 10px;
    }

    /* Left column: Image + Time */
    .ktp-activity-left {
        flex-shrink: 0;
        width: 100px;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .ktp-activity-image-mobile {
        width: 100px;
        height: 80px;
        border-radius: 8px;
        overflow: hidden;
    }

    .ktp-activity-image-mobile img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .ktp-activity-time-mobile {
        display: inline-block;
        font-size: 12px;
        font-weight: 600;
        color: var(--ktp-primary, #6366f1);
        background: var(--ktp-primary-light, #eef2ff);
        padding: 4px 8px;
        border-radius: 6px;
        text-align: center;
    }

    .ktp-activity-time-mobile .ktp-time-duration {
        font-weight: 500;
        opacity: 0.8;
    }

    /* Right column: Practical info + Map button */
    .ktp-activity-right {
        flex: 1;
        min-width: 0;
    }

    .ktp-mobile-practical-info {
        position: relative;
    }

    /* Stacked info items */
    .ktp-mobile-info-items {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .ktp-mobile-info-items .ktp-info-item {
        display: flex;
        align-items: flex-start;
        gap: 6px;
        font-size: 12px;
        line-height: 1.4;
        color: var(--ktp-text-secondary, #6b7280);
    }

    .ktp-mobile-info-items .ktp-info-icon {
        flex-shrink: 0;
        font-size: 11px;
    }

    .ktp-mobile-info-items a {
        color: inherit;
        text-decoration: none;
    }

    .ktp-mobile-info-items a:hover {
        color: var(--ktp-primary, #6366f1);
    }

    /* View on map link */
    .ktp-view-map-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 12px;
        color: var(--ktp-primary, #6366f1);
        text-decoration: none;
        margin-top: 4px;
    }

    .ktp-view-map-link:hover {
        text-decoration: underline;
    }

    .ktp-view-map-link .ktp-info-icon {
        font-size: 12px;
    }

    /* Reduce card padding on mobile */
    .ktp-activity-card {
        padding: 14px;
    }

    /* Adjust content section margins */
    .ktp-activity-content {
        margin-top: 0;
    }

    /* Hide desktop image/header in content (mobile uses separate elements) */
    .ktp-activity-content .ktp-activity-image,
    .ktp-activity-content .ktp-activity-header {
        display: none;
    }

    /* Reduce gap between mobile layout and related guides */
    .ktp-activity-mobile-layout {
        margin-bottom: 6px;
    }

    /* Reduce spacing in content area on mobile */
    .ktp-activity-content .ktp-activity-meta {
        margin-bottom: 4px;
    }

    .ktp-activity-content .ktp-activity-description {
        margin-bottom: 4px;
    }

    .ktp-activity-content .ktp-activity-tips {
        margin: 4px 0;
    }

    /* Related guides section - reduce top margin on mobile */
    .ktp-activity-content .ktp-related-content-toggle {
        margin-top: 4px;
    }

    /* Remove margin/padding on related section for tighter mobile layout */
    .ktp-activity-related {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    /* Fix 4: Day header mobile layout - title full width, meta row below */
    .ktp-day-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .ktp-day-title-wrap {
        width: 100%;
    }

    .ktp-day-title {
        font-size: 16px;
    }

    /* Meta row: date on left, View Map on right */
    .ktp-day-meta {
        width: 100%;
        justify-content: space-between;
    }

    .ktp-day-date {
        font-size: 13px;
        font-weight: 400;
    }
}

/* ==========================================================================
   Day Route Map Modal
   ========================================================================== */

.ktp-day-route-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s ease;
}

.ktp-day-route-modal.active {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.3s ease;
}

.ktp-day-route-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ktp-day-route-modal.active .ktp-day-route-backdrop {
    opacity: 1;
}

.ktp-day-route-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 70vh;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
}

.ktp-day-route-modal.active .ktp-day-route-content {
    transform: translateY(0);
}

.ktp-map-modal-handle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.ktp-map-modal-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--ktp-text);
}

.ktp-map-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: var(--ktp-text-light);
    transition: background 0.2s ease;
}

.ktp-map-modal-close:hover {
    background: #e2e8f0;
    color: var(--ktp-text);
}

.ktp-map-container {
    flex: 1;
    width: 100%;
    min-height: 0;
}

/* Map info window styles */
.ktp-map-info {
    padding: 8px 4px;
    max-width: 220px;
}

.ktp-map-info-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
}

.ktp-map-info-address {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

/* Map info window with image (horizontal layout) */
.ktp-map-info-window {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 4px;
    max-width: 300px;
    min-width: 200px;
}

.ktp-map-info-window .ktp-info-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.ktp-map-info-window .ktp-info-content {
    flex: 1;
    min-width: 0;
}

.ktp-map-info-window .ktp-info-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
    line-height: 1.3;
}

.ktp-map-info-window .ktp-info-address {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

/* Google Maps info window overrides */
.gm-style-iw-d {
    overflow: hidden !important;
}

.gm-style-iw-chr {
    display: none !important;
}

.gm-style .gm-style-iw-c {
    padding: 12px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

.gm-style .gm-style-iw-tc::after {
    background: #ffffff !important;
}

@media (max-width: 767px) {
    .ktp-map-info-window {
        max-width: 240px;
        min-width: 180px;
    }

    .ktp-map-info-window .ktp-info-image {
        width: 50px;
        height: 50px;
    }

    .ktp-map-info-window .ktp-info-title {
        font-size: 13px;
    }

    .ktp-map-info-window .ktp-info-address {
        font-size: 11px;
    }
}

/* Map loading state */
.ktp-map-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f8fafc;
}

.ktp-map-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--ktp-primary);
    border-radius: 50%;
    animation: ktp-spin 0.8s linear infinite;
}

.ktp-map-loading-text {
    margin-top: 16px;
    font-size: 14px;
    color: #64748b;
}

@keyframes ktp-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 767px) {
    .ktp-day-route-content {
        max-width: 100%;
        height: 80vh;
        border-radius: 16px 16px 0 0;
    }

    .ktp-day-route-content .ktp-map-modal-handle {
        padding: 16px;
    }

    .ktp-day-route-content .ktp-map-modal-title {
        font-size: 15px;
    }
}

@media print {
    .ktp-day-route-modal,
    .ktp-view-day-map-btn {
        display: none !important;
    }
}

/* ============================================
   ENGAGEMENT BAR STYLES
   ============================================ */

.ktp-engagement-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 24px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.ktp-engagement-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ktp-engagement-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    transition: all 0.2s ease;
}

.ktp-engagement-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.ktp-engagement-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ktp-engagement-btn .ktp-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ktp-engagement-btn .ktp-btn-icon svg {
    transition: transform 0.2s ease, fill 0.2s ease;
}

.ktp-engagement-btn .ktp-btn-count {
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

/* Love button states */
.ktp-love-btn {
    color: #64748b;
}

.ktp-love-btn:hover {
    color: #ef4444;
    border-color: #fecaca;
    background: #fef2f2;
}

.ktp-love-btn:hover .ktp-btn-icon svg {
    transform: scale(1.1);
}

.ktp-love-btn.active {
    background: #fef2f2;
    border-color: #fecaca;
    color: #ef4444;
}

.ktp-love-btn.active:hover {
    background: #fee2e2;
}

/* Bookmark/Save button states */
.ktp-bookmark-btn {
    color: #64748b;
}

.ktp-bookmark-btn:hover {
    color: #3b82f6;
    border-color: #bfdbfe;
    background: #eff6ff;
}

.ktp-bookmark-btn:hover .ktp-btn-icon svg {
    transform: scale(1.1);
}

.ktp-bookmark-btn.active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #3b82f6;
}

.ktp-bookmark-btn.active:hover {
    background: #dbeafe;
}

/* Views stat (not interactive) */
.ktp-engagement-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    color: #94a3b8;
    background: #f8fafc;
    border-radius: 24px;
}

.ktp-engagement-stat .ktp-stat-icon {
    display: flex;
    align-items: center;
}

.ktp-engagement-stat .ktp-stat-count {
    font-weight: 700;
    color: #64748b;
}

/* Loading state for buttons */
.ktp-engagement-btn.loading {
    pointer-events: none;
}

.ktp-engagement-btn.loading .emoji {
    animation: ktp-pulse 1s ease-in-out infinite;
}

@keyframes ktp-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Login prompt tooltip */
.ktp-engagement-btn[data-login-required]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: #1e293b;
    color: #ffffff;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    margin-bottom: 8px;
}

.ktp-engagement-btn[data-login-required]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .ktp-engagement-bar {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
        padding: 12px 16px;
    }

    .ktp-engagement-btn {
        padding: 8px 12px;
        font-size: 13px;
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    .ktp-engagement-btn .ktp-btn-icon svg {
        width: 18px;
        height: 18px;
    }

    .ktp-engagement-stat {
        padding: 8px 12px;
        font-size: 13px;
        flex: 1;
        justify-content: center;
    }

    .ktp-engagement-stat .ktp-stat-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* ==========================================================================
   Mobile Sticky CTA
   ========================================================================== */

.ktp-mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    padding: 12px 16px;
    z-index: 1000;
}

.ktp-customize-btn-mobile {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: var(--ktp-radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ktp-customize-btn-mobile:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.ktp-customize-btn-mobile:active {
    transform: translateY(0);
}

@media (max-width: 767px) {
    .ktp-mobile-sticky-cta {
        display: block;
    }

    /* Add padding to main content to prevent sticky overlap */
    .ktp-itinerary-main {
        padding-bottom: 80px;
    }

    /* Hide desktop CTA card on mobile */
    .ktp-cta-card:not(.ktp-owner-card) {
        display: none;
    }
}

/* ==========================================================================
   Badge Grid System (Profile Display)
   ========================================================================== */

.ktp-badge-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 16px 0;
}

.ktp-badge-category {
    background: var(--ktp-bg-light);
    border-radius: var(--ktp-radius);
    padding: 16px;
}

.ktp-badge-category-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ktp-text);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ktp-badge-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.ktp-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: var(--ktp-bg);
    border-radius: var(--ktp-radius);
    border: 1px solid var(--ktp-border);
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
}

.ktp-badge-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ktp-badge-item .ktp-badge-icon {
    font-size: 28px;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", sans-serif;
    line-height: 1;
    margin-bottom: 6px;
}

.ktp-badge-item .ktp-badge-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--ktp-text);
    line-height: 1.2;
    margin-bottom: 4px;
}

/* Locked badge (grayscale) */
.ktp-badge-locked {
    opacity: 0.7;
}

.ktp-badge-locked .ktp-badge-icon {
    filter: grayscale(1);
    opacity: 0.6;
}

.ktp-badge-locked .ktp-badge-label {
    color: var(--ktp-text-muted);
}

/* Progress bar */
.ktp-badge-item .ktp-badge-progress {
    width: 100%;
    height: 4px;
    background: var(--ktp-border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.ktp-badge-item .ktp-badge-progress-bar {
    height: 100%;
    background: var(--ktp-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.ktp-badge-item .ktp-badge-count {
    font-size: 10px;
    color: var(--ktp-text-muted);
    margin-top: 2px;
}

/* Earned badge */
.ktp-badge-earned {
    border-color: var(--ktp-success);
    background: linear-gradient(135deg, var(--ktp-bg), rgba(39, 174, 96, 0.05));
}

.ktp-badge-earned:hover {
    border-color: var(--ktp-success);
}

.ktp-badge-earned .ktp-badge-check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: var(--ktp-success);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Compact badges (for cards) */
.ktp-earned-badges {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.ktp-mini-badge {
    font-size: 14px;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", sans-serif;
    line-height: 1;
}

.ktp-badge-more {
    font-size: 11px;
    color: var(--ktp-text-muted);
    background: var(--ktp-bg-light);
    padding: 2px 6px;
    border-radius: 10px;
}

/* Badge tooltip on hover */
.ktp-badge-item[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: var(--ktp-text);
    color: var(--ktp-bg);
    font-size: 11px;
    font-weight: 400;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}

.ktp-badge-item[title]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--ktp-text);
    z-index: 100;
}

/* Mobile responsive */
@media (max-width: 767px) {
    .ktp-badge-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .ktp-badge-item {
        padding: 10px 6px;
    }

    .ktp-badge-item .ktp-badge-icon {
        font-size: 24px;
    }

    .ktp-badge-item .ktp-badge-label {
        font-size: 10px;
    }
}

/* ==========================================================================
   Suggestions System
   ========================================================================== */

.ktp-suggestions-section {
    background: var(--ktp-bg-light);
    padding: 48px 0;
    margin-top: 48px;
}

.ktp-suggestions-header {
    margin-bottom: 24px;
}

.ktp-suggestions-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--ktp-text);
    margin: 0 0 8px 0;
}

.ktp-suggestions-count {
    font-weight: 400;
    color: var(--ktp-text-muted);
}

.ktp-suggestions-intro {
    color: var(--ktp-text-light);
    margin: 0;
}

/* Suggestion Form */
.ktp-suggestion-form {
    background: var(--ktp-bg);
    border-radius: var(--ktp-radius);
    border: 1px solid var(--ktp-border);
    padding: 16px;
    margin-bottom: 24px;
}

.ktp-suggestion-form-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.ktp-suggestion-form-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ktp-suggestion-category-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.ktp-category-chip {
    cursor: pointer;
}

.ktp-category-chip input {
    display: none;
}

.ktp-chip-content {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--ktp-bg-light);
    border: 1px solid var(--ktp-border);
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.2s;
}

.ktp-category-chip input:checked + .ktp-chip-content {
    background: var(--ktp-primary-light, #fff5f5);
    border-color: var(--ktp-primary);
    color: var(--ktp-primary);
}

.ktp-chip-icon {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.ktp-suggestion-form-body textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--ktp-border);
    border-radius: var(--ktp-radius);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 8px;
}

.ktp-suggestion-form-body textarea:focus {
    outline: none;
    border-color: var(--ktp-primary);
}

.ktp-suggestion-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ktp-char-count {
    font-size: 12px;
    color: var(--ktp-text-muted);
}

.ktp-submit-suggestion {
    padding: 8px 16px;
}

.ktp-suggestion-form-error,
.ktp-reply-error {
    color: var(--ktp-error, #dc3545);
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: var(--ktp-radius);
}

/* Login Prompt */
.ktp-suggestion-login-prompt {
    background: var(--ktp-bg);
    border: 1px dashed var(--ktp-border);
    border-radius: var(--ktp-radius);
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.ktp-suggestion-login-prompt p {
    margin: 0 0 12px 0;
    color: var(--ktp-text-light);
}

/* Suggestions List */
.ktp-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ktp-suggestions-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    color: var(--ktp-text-muted);
}

.ktp-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--ktp-border);
    border-top-color: var(--ktp-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Single Suggestion */
.ktp-suggestion {
    background: var(--ktp-bg);
    border: 1px solid var(--ktp-border);
    border-radius: var(--ktp-radius);
    padding: 16px;
}

.ktp-suggestion-helpful {
    border-color: var(--ktp-success);
    background: linear-gradient(135deg, var(--ktp-bg), rgba(39, 174, 96, 0.03));
}

.ktp-suggestion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ktp-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.ktp-category-tip {
    background: rgba(255, 193, 7, 0.15);
    color: #d4a106;
}

.ktp-category-question {
    background: rgba(52, 152, 219, 0.15);
    color: #2980b9;
}

.ktp-category-alternative {
    background: rgba(155, 89, 182, 0.15);
    color: #8e44ad;
}

.ktp-category-warning {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

.ktp-suggestion-time {
    font-size: 12px;
    color: var(--ktp-text-muted);
}

.ktp-suggestion-body {
    margin-bottom: 12px;
}

.ktp-suggestion-body p {
    margin: 0;
    font-size: 16px;
    color: var(--ktp-text);
    line-height: 1.6;
    white-space: pre-wrap;
}

.ktp-suggestion-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.ktp-suggestion-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ktp-author-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.ktp-suggestion-author .ktp-author-name,
.ktp-suggestion-author .ktp-author-name-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--ktp-text);
    text-decoration: none;
}

.ktp-suggestion-author .ktp-author-name-link:hover {
    color: var(--ktp-primary);
    text-decoration: underline;
}

.ktp-suggestion-author .ktp-author-level {
    font-size: 14px;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

/* K-Rep Level Badge in Suggestions */
.ktp-level-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.ktp-level-traveler {
    background: #e8f5e9;
    color: #2e7d32;
}

.ktp-level-pathfinder {
    background: #e3f2fd;
    color: #1565c0;
}

.ktp-level-trailblazer {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    color: #f57c00;
    font-weight: 600;
}

.ktp-owner-badge {
    font-size: 11px;
    background: var(--ktp-primary-light, #fff5f5);
    color: var(--ktp-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.ktp-verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #1da1f2;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.ktp-helpful-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--ktp-success);
    font-weight: 500;
}

/* Suggestion Actions */
.ktp-suggestion-actions {
    display: flex;
    gap: 8px;
}

.ktp-action-btn {
    background: none;
    border: 1px solid var(--ktp-border);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    color: var(--ktp-text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.ktp-action-btn:hover {
    border-color: var(--ktp-primary);
    color: var(--ktp-primary);
}

.ktp-action-btn.ktp-mark-helpful:hover {
    border-color: var(--ktp-success);
    color: var(--ktp-success);
}

.ktp-action-btn.ktp-delete-btn:hover {
    border-color: var(--ktp-error, #dc3545);
    color: var(--ktp-error, #dc3545);
}

.ktp-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Report Button Styles */
.ktp-action-btn.ktp-report-suggestion-btn:hover {
    border-color: var(--ktp-danger, #dc3545);
    color: var(--ktp-danger, #dc3545);
    background: transparent;
}

.ktp-action-btn.ktp-report-suggestion-btn.ktp-reported {
    color: var(--ktp-text-muted);
    background: var(--ktp-bg-light);
}

/* Suggestion Replies */
.ktp-suggestion-replies {
    margin-top: 16px;
    padding-left: 20px;
    border-left: 2px solid var(--ktp-border);
}

.ktp-suggestion-replies .ktp-suggestion {
    margin-top: 12px;
    background: var(--ktp-bg-light);
}

/* Empty State */
.ktp-suggestions-empty {
    text-align: center;
    padding: 48px 24px;
    background: var(--ktp-bg);
    border-radius: var(--ktp-radius);
    border: 1px dashed var(--ktp-border);
}

.ktp-empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.ktp-suggestions-empty p {
    margin: 0;
    color: var(--ktp-text-muted);
}

/* Reply Modal */
.ktp-reply-modal .ktp-modal-content {
    max-width: 500px;
}

.ktp-reply-quote {
    background: var(--ktp-bg-light);
    padding: 12px;
    border-radius: var(--ktp-radius);
    font-size: 13px;
    color: var(--ktp-text-light);
    margin-bottom: 16px;
    border-left: 3px solid var(--ktp-border);
}

.ktp-reply-modal textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--ktp-border);
    border-radius: var(--ktp-radius);
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 16px;
    resize: vertical;
}

.ktp-reply-modal textarea:focus {
    outline: none;
    border-color: var(--ktp-primary);
}

/* Toast Notifications */
#ktp-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ktp-toast {
    padding: 12px 20px;
    background: var(--ktp-text);
    color: var(--ktp-bg);
    border-radius: var(--ktp-radius);
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
}

.ktp-toast-success {
    background: var(--ktp-success);
}

.ktp-toast-error {
    background: var(--ktp-error, #dc3545);
}

.ktp-toast-fade {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Mobile Suggestions */
@media (max-width: 767px) {
    .ktp-suggestions-section {
        padding: 32px 0;
    }

    .ktp-suggestion-form-header {
        flex-direction: column;
    }

    .ktp-suggestion-form-avatar {
        display: none;
    }

    .ktp-suggestion-category-selector {
        width: 100%;
    }

    .ktp-suggestion-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .ktp-suggestion-actions {
        width: 100%;
        justify-content: flex-end;
    }

    #ktp-toast-container {
        left: 20px;
        right: 20px;
        bottom: 80px; /* Above mobile CTA */
    }

    .ktp-toast {
        width: 100%;
    }
}

/* ==========================================================================
   Report Modal & Report System
   ========================================================================== */

/* Report Button (Inline) */
.ktp-report-btn {
    color: var(--ktp-text-muted);
    border-color: var(--ktp-border);
}

.ktp-report-btn:hover {
    color: #dc3545;
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.05);
}

.ktp-report-btn.ktp-reported {
    color: var(--ktp-text-muted);
    background: var(--ktp-bg-light);
    cursor: not-allowed;
    opacity: 0.7;
}

.ktp-report-btn.ktp-reported:hover {
    color: var(--ktp-text-muted);
    border-color: var(--ktp-border);
    background: var(--ktp-bg-light);
}

/* Report Button for Suggestions */
.ktp-report-suggestion-btn {
    color: var(--ktp-text-muted);
}

.ktp-report-suggestion-btn:hover {
    color: #dc3545;
    border-color: #dc3545;
}

.ktp-report-suggestion-btn.ktp-reported {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Report Modal */
.ktp-report-modal .ktp-modal-content {
    max-width: 450px;
    text-align: left;
}

.ktp-report-modal .ktp-modal-content h3 {
    text-align: center;
    margin-bottom: 8px;
}

.ktp-report-modal .ktp-modal-content > p {
    text-align: center;
    margin-bottom: 20px;
}

/* Report Form */
.ktp-report-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Report Reasons */
.ktp-report-reasons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ktp-report-reason {
    display: block;
    cursor: pointer;
}

.ktp-report-reason input[type="radio"] {
    display: none;
}

.ktp-reason-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--ktp-bg-light);
    border: 2px solid var(--ktp-border);
    border-radius: var(--ktp-radius);
    transition: all 0.2s ease;
}

.ktp-report-reason:hover .ktp-reason-content {
    border-color: var(--ktp-primary-light);
    background: var(--ktp-bg);
}

.ktp-report-reason input[type="radio"]:checked + .ktp-reason-content {
    border-color: var(--ktp-primary);
    background: var(--ktp-primary-light, #fff5f5);
}

.ktp-reason-icon {
    font-size: 18px;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    flex-shrink: 0;
}

.ktp-reason-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--ktp-text);
}

/* Report Details */
.ktp-report-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ktp-report-details label {
    font-size: 13px;
    font-weight: 500;
    color: var(--ktp-text-light);
}

.ktp-report-details textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid var(--ktp-border);
    border-radius: var(--ktp-radius);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s;
}

.ktp-report-details textarea:focus {
    outline: none;
    border-color: var(--ktp-primary);
}

.ktp-report-details textarea::placeholder {
    color: var(--ktp-text-muted);
}

/* Report Actions */
.ktp-report-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 8px;
}

.ktp-report-actions .ktp-btn {
    min-width: 100px;
}

/* Danger Button */
.ktp-btn-danger {
    background: #dc3545;
    color: #fff;
    border: none;
}

.ktp-btn-danger:hover {
    background: #c82333;
}

.ktp-btn-danger:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Ghost Button */
.ktp-btn-ghost {
    background: transparent;
    color: var(--ktp-text-light);
    border: 1px solid var(--ktp-border);
}

.ktp-btn-ghost:hover {
    background: var(--ktp-bg-light);
    color: var(--ktp-text);
}

/* Report Form Error */
.ktp-report-form-error {
    color: #dc3545;
    font-size: 13px;
    padding: 8px 12px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: var(--ktp-radius);
    text-align: center;
}

/* Report Success State */
.ktp-report-success {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    text-align: center;
}

.ktp-report-success.ktp-show {
    display: flex;
}

.ktp-report-form.ktp-hide {
    display: none;
}

.ktp-success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ktp-report-success h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--ktp-text);
}

.ktp-report-success p {
    font-size: 14px;
    color: var(--ktp-text-light);
    margin: 0 0 20px 0;
}

/* Report Modal Mobile */
@media (max-width: 767px) {
    .ktp-report-modal .ktp-modal-content {
        max-width: 100%;
        width: 100%;
        margin: 0 16px;
    }

    .ktp-reason-content {
        padding: 10px 14px;
    }

    .ktp-reason-label {
        font-size: 13px;
    }

    .ktp-report-actions {
        flex-direction: column-reverse;
    }

    .ktp-report-actions .ktp-btn {
        width: 100%;
    }
}

/* ==========================================================================
   Profile K-Rep Badge
   ========================================================================== */

.ktp-profile-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--ktp-bg-light);
    border-radius: var(--ktp-radius-lg);
    margin: 12px 0;
}

.ktp-badge-icon-large {
    font-size: 32px;
    line-height: 1;
}

.ktp-badge-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ktp-badge-level {
    font-size: 16px;
    font-weight: 600;
    color: var(--ktp-text);
}

.ktp-badge-points {
    font-size: 14px;
    color: var(--ktp-text-light);
}

.ktp-badge-override {
    color: var(--ktp-success);
    font-size: 12px;
}

/* Progress Separator (no background) */
.ktp-progress-separator {
    color: var(--ktp-text-muted);
    margin: 0 2px;
}

/* Progress Text - Light blue background */
.ktp-progress-text {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
}

/* Badge Tooltip */
.ktp-badge-tooltip-wrapper {
    position: relative;
    margin-left: auto;
}

.ktp-badge-help {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--ktp-border);
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--ktp-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ktp-badge-help:hover {
    background: var(--ktp-primary);
    color: #fff;
}

.ktp-badge-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    width: 280px;
    padding: 16px;
    background: #fff;
    border-radius: var(--ktp-radius-lg);
    box-shadow: var(--ktp-shadow-lg);
    border: 1px solid var(--ktp-border);
    display: none;
    z-index: 1000;
    text-align: left;
}

/* Tooltip arrow pointing down */
.ktp-badge-tooltip::before {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 16px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #fff;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

.ktp-badge-help:focus + .ktp-badge-tooltip,
.ktp-badge-tooltip-wrapper:hover .ktp-badge-tooltip {
    display: block;
}

.ktp-tooltip-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ktp-text);
}

.ktp-tooltip-desc {
    font-size: 13px;
    color: var(--ktp-text-light);
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.ktp-tooltip-section {
    margin-bottom: 12px;
}

.ktp-tooltip-section:last-child {
    margin-bottom: 0;
}

.ktp-tooltip-section strong {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ktp-text-muted);
    display: block;
    margin-bottom: 6px;
}

.ktp-tooltip-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ktp-tooltip-section li {
    font-size: 13px;
    color: var(--ktp-text-light);
    padding: 4px 0;
}

.ktp-tooltip-levels {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.ktp-tooltip-level {
    padding: 6px 10px;
    color: var(--ktp-text-light);
    border-radius: 6px;
    background: var(--ktp-bg-light, #f8f9fa);
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.4;
}

.ktp-tooltip-level-current {
    background: var(--ktp-primary-light, #e8f5e9);
    color: var(--ktp-primary, #2e7d32);
    font-weight: 600;
}

/* ==========================================================================
   Badge Grid (Profile Page)
   ========================================================================== */

.ktp-badge-grid {
    margin-top: 24px;
}

.ktp-badge-category {
    margin-bottom: 24px;
}

.ktp-badge-category-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ktp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.ktp-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ktp-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100px;
    padding: 16px 12px;
    background: var(--ktp-bg-light);
    border-radius: var(--ktp-radius-lg);
    border: 2px solid transparent;
    cursor: default;
    transition: all 0.2s ease;
    position: relative;
}

.ktp-badge-item.ktp-badge-earned {
    background: #e8f5e9;
    border-color: #4caf50;
}

.ktp-badge-item.ktp-badge-locked {
    opacity: 0.7;
}

.ktp-badge-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--ktp-shadow);
}

.ktp-badge-item .ktp-badge-icon {
    font-size: 28px;
    line-height: 1;
}

.ktp-badge-item .ktp-badge-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ktp-text);
    text-align: center;
    line-height: 1.3;
}

.ktp-badge-progress {
    width: 100%;
    height: 4px;
    background: var(--ktp-border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.ktp-badge-progress-bar {
    height: 100%;
    background: var(--ktp-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.ktp-badge-count {
    font-size: 10px;
    color: var(--ktp-text-muted);
}

.ktp-badge-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    background: #4caf50;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
}

/* Earned Badges Compact (Cards) */
.ktp-earned-badges {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.ktp-mini-badge {
    font-size: 16px;
    cursor: help;
}

.ktp-badge-more {
    font-size: 11px;
    color: var(--ktp-text-muted);
    padding: 0 4px;
}

/* Badge Grid Mobile */
@media (max-width: 767px) {
    .ktp-badge-row {
        gap: 8px;
    }

    .ktp-badge-item {
        width: calc(33.33% - 6px);
        padding: 12px 8px;
    }

    .ktp-badge-item .ktp-badge-icon {
        font-size: 24px;
    }

    .ktp-badge-item .ktp-badge-label {
        font-size: 10px;
    }
}

/* ==========================================================================
   [ktpa_itineraries] Shortcode Styles
   ========================================================================== */

/* Shortcode wrapper */
.ktp-itinerary-shortcode {
    margin: 24px 0;
}

/* Column variants - override auto-fill for explicit columns */
.ktp-grid-cols-1 {
    grid-template-columns: 1fr !important;
    max-width: 500px;
}

.ktp-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.ktp-grid-cols-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.ktp-grid-cols-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

/* Responsive: 4 cols -> 3 -> 2 -> 1 */
@media (max-width: 1200px) {
    .ktp-grid-cols-4 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 1024px) {
    .ktp-grid-cols-3,
    .ktp-grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .ktp-grid-cols-2,
    .ktp-grid-cols-3,
    .ktp-grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    .ktp-grid-cols-1 {
        max-width: 100%;
    }
}

/* Carousel Layout - horizontal scroll on all screen sizes */
.ktp-itinerary-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 20px;
    padding-bottom: 8px;
}

.ktp-itinerary-carousel .ktp-itinerary-card {
    flex: 0 0 360px;
    scroll-snap-align: start;
}

/* Carousel card footer - stack author and CTA vertically for better fit */
.ktp-itinerary-carousel .ktp-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.ktp-itinerary-carousel .ktp-card-footer .ktp-card-cta {
    align-self: flex-end;
}

@media (max-width: 640px) {
    .ktp-itinerary-carousel .ktp-itinerary-card {
        flex: 0 0 300px;
    }
}

/* Shortcode empty state */
.ktp-shortcode-empty {
    text-align: center;
    padding: 40px 20px;
    background: var(--ktp-bg-light, #F9FAFB);
    border-radius: var(--ktp-radius-lg, 12px);
    color: var(--ktp-text-muted, #6B7280);
}

.ktp-shortcode-empty p {
    margin: 0;
    font-size: 15px;
}

/* ==========================================================================
   Shortcode Grid Card Footer - Two-row author layout
   Applies mobile-style stacked layout to grid cards at all viewports
   ========================================================================== */

.ktp-card-grid .ktp-card-footer {
    flex-wrap: wrap;
    gap: 8px;
}

.ktp-card-grid .ktp-card-author {
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
    gap: 4px 8px;
}

/* Author link row: Avatar + Name + Verified badge */
.ktp-card-grid .ktp-author-link {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
}

/* Truncate author name */
.ktp-card-grid .ktp-card-author-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

/* Force K-Rep badge to new line using flex break */
.ktp-card-grid .ktp-card-author::before {
    content: '';
    order: 2;
    flex-basis: 100%;
    height: 0;
}

/* K-Rep badge on second row */
.ktp-card-grid .ktp-card-author .ktp-krep-badge {
    order: 3;
    flex: 0 0 auto;
}

/* Keep verified badge inline with name */
.ktp-card-grid .ktp-card-author .ktp-verified-badge {
    order: 1;
}

/* View CTA stays on the right */
.ktp-card-grid .ktp-card-cta {
    flex-shrink: 0;
    align-self: flex-start;
}
