/* ═══════════════════════════════════════════
   GUIDED JOURNEYS — STYLES
   ═══════════════════════════════════════════ */

:root {
    --j-bg: var(--bg-primary);
    --j-surface: var(--bg-secondary);
    --j-card: var(--bg-card);
    --j-border: var(--border-primary);
    --j-text: var(--text-primary);
    --j-text-muted: var(--text-secondary);
    --j-accent: var(--accent);
    --j-accent-glow: var(--accent-glow);
    --j-gold: var(--accent-gold);
    --j-green: #10B981;
    --j-radius: var(--radius-xl);
    --j-radius-sm: var(--radius-md);
}

/* ── Global Reset for Journey Pages ── */
.journeys-page,
.journey-detail-page {
    font-family: var(--font-sans);
    background: var(--j-bg);
    color: var(--j-text);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

/* ── Header: uses shared styles from styles.css ── */

/* ── Hero & Search ── */
.dense-hero {
    text-align: center;
    padding: 60px 20px 30px;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.dense-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal !important;
    max-width: 100%;
}
@media (max-width: 768px) {
    .dense-hero h1 { font-size: 1.8rem; }
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--j-text-muted);
    margin: 0 0 24px;
    line-height: 1.5;
}

.hero-subtitle strong {
    color: var(--j-text);
}

.dense-filters {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 auto;
    max-width: 600px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.journey-search-wrap {
    position: relative;
    width: 100%;
}

.journey-search-wrap input {
    width: 100%;
    padding: 14px 20px 14px 44px;
    background: var(--j-card);
    border: 1px solid var(--j-border);
    border-radius: 12px;
    color: var(--j-text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.journey-search-wrap input:focus {
    border-color: var(--j-accent);
    box-shadow: 0 4px 16px var(--j-accent-glow);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    opacity: 0.5;
    pointer-events: none;
}

.category-filters-dense {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 10px 0 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .category-filters-dense {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 24px;
        -webkit-overflow-scrolling: touch;
    }
}

.category-filters-dense::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 8px 18px;
    background: var(--j-card);
    border: 1px solid var(--j-border);
    border-radius: 50px;
    color: var(--j-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cat-btn:hover {
    border-color: var(--j-accent);
    color: var(--j-text);
    transform: translateY(-1px);
}

.cat-btn.active {
    background: var(--j-accent);
    color: var(--bg-card);
    border-color: var(--j-accent);
}

/* ── Section Titles ── */
.popular-section,
.all-journeys {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.popular-section h3,
.all-journeys h3 {
    font-size: 1.3rem;
    margin: 30px 0 20px;
    font-weight: 700;
}

/* ── Journey Grid ── */
.journey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 16px;
}

/* ── Journey Card ── */
.journey-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--j-card);
    border: 1px solid var(--j-border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    cursor: pointer;
}

.journey-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: var(--j-accent);
    box-shadow: 0 6px 20px var(--j-accent-glow);
}

.journey-card *,
.journey-card *:hover {
    text-decoration: none;
}

.journey-card.filtered-out {
    display: none;
}

.card-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: 10px;
}

.card-body h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 600;
}

.card-body p {
    margin: 0 0 6px;
    font-size: 0.85rem;
    color: var(--j-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    font-size: 0.75rem;
    color: var(--j-accent);
    font-weight: 500;
}

/* ── Load More Button ── */
.load-more-container {
    text-align: center;
    margin: 40px 0 60px;
}

.load-more-btn {
    padding: 16px 40px;
    background: var(--text-primary);
    border: none;
    border-radius: 8px;
    color: var(--bg-primary);
    font-family: inherit;
    font-weight: 700;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--j-accent-glow);
}

.load-more-btn.hidden {
    display: none !important;
}

/* ── No Results ── */
.no-results {
    text-align: center;
    padding: 40px;
    color: var(--j-text-muted);
    font-size: 1.1rem;
}

.hidden {
    display: none !important;
}

/* ═══════════════════════════════════════════
   JOURNEY DETAIL PAGE
   ═══════════════════════════════════════════ */

.back-link {
    display: inline-block;
    color: var(--j-accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #a78bfa;
}

.journey-header {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 20px;
}

.journey-title-block {
    margin-bottom: 32px;
}

.journey-title-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.journey-icon-large {
    font-size: 2.2rem;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.journey-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.1); 
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--j-green);
    font-weight: 600;
}

.journey-main-title {
    font-family: var(--font-serif), serif;
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.journey-desc {
    color: var(--j-text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0 0 16px;
}

.journey-meta-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.meta-pill {
    font-size: 0.8rem;
    color: var(--j-text-muted);
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 500;
}

/* ── Progress Bar ── */
.progress-bar-container {
    background: var(--j-card);
    border-radius: 50px;
    height: 32px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--j-border);
}

.progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 50px;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--j-text);
    white-space: nowrap;
}

/* ── Day Cards ── */
.journey-days {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

.day-card {
    background: var(--j-card);
    border: 1px solid var(--j-border);
    border-radius: var(--j-radius);
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.day-card.completed {
    border-color: var(--j-green);
}

.day-card.completed .day-number {
    background: var(--j-green);
    color: #000;
}

.day-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    cursor: pointer;
    user-select: none;
}

.day-number {
    background: var(--j-accent);
    color: var(--bg-card);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}

.day-title {
    flex-grow: 1;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.day-toggle {
    background: none;
    border: none;
    color: var(--j-text-muted);
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s;
    padding: 4px;
}

.day-card.open .day-toggle {
    transform: rotate(180deg);
}

/* Day content – collapsed by default */
.day-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 22px;
}

.day-card.open .day-content {
    max-height: 1200px;
    padding: 0 22px 24px;
}

.verse-reference {
    display: inline-block;
    padding: 4px 14px;
    background: var(--accent-glow);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--j-accent);
    margin-bottom: 16px;
}

.verse-block {
    margin-bottom: 18px;
}

.verse-block label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--j-text-muted);
    margin-bottom: 6px;
}

.verse-block blockquote {
    margin: 0;
    padding: 14px 18px;
    background: var(--bg-kjv);
    border-left: 3px solid var(--j-accent);
    border-radius: 0 var(--j-radius-sm) var(--j-radius-sm) 0;
    font-size: 1rem;
    line-height: 1.7;
    font-style: italic;
    color: var(--j-text);
}

.verse-block.simplified blockquote {
    border-left-color: var(--j-gold);
}

.verse-block.reflection p {
    padding: 14px 18px;
    background: var(--accent-glow);
    border-radius: var(--j-radius-sm);
    font-size: 1rem;
    margin: 0;
    line-height: 1.7;
}

.verse-block.bottom-line p {
    padding: 14px 18px;
    background: rgba(74, 222, 128, 0.06);
    border-left: 3px solid var(--j-green);
    border-radius: 0 var(--j-radius-sm) var(--j-radius-sm) 0;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

/* ── Complete Button ── */
.mark-complete-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 2px solid var(--j-accent);
    border-radius: 50px;
    color: var(--j-accent);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.mark-complete-btn:hover {
    background: var(--j-accent);
    color: #fff;
}

.mark-complete-btn.completed {
    background: var(--j-green);
    border-color: var(--j-green);
    color: #000;
}

.mark-complete-btn .check {
    font-size: 1.1rem;
}

/* ── Footer ── */
.journeys-footer {
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--j-border);
    color: var(--j-text-muted);
    font-size: 0.85rem;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .journeys-hero h2 {
        font-size: 2rem;
    }

    .journey-grid {
        grid-template-columns: 1fr;
    }

    .journey-header {
        padding: 24px 20px 20px;
    }

    .journey-main-title {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }
    
    .journey-title-top-row {
        margin-bottom: 16px;
    }

    .category-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }

    .cat-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .header-inner {
        flex-direction: row;
        gap: 8px;
    }

    .site-title {
        font-size: 1.1rem;
    }
}

/* ── Animations ── */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.journey-card {
    animation: fadeIn 0.3s ease both;
}

.journey-grid .journey-card:nth-child(2) {
    animation-delay: 0.05s;
}

.journey-grid .journey-card:nth-child(3) {
    animation-delay: 0.1s;
}

.journey-grid .journey-card:nth-child(4) {
    animation-delay: 0.15s;
}

.journey-grid .journey-card:nth-child(5) {
    animation-delay: 0.2s;
}

.journey-grid .journey-card:nth-child(6) {
    animation-delay: 0.25s;
}

/* ═══════════════════════════════════════════
   Emotion Pages — Dedicated Styles
   ═══════════════════════════════════════════ */

/* ── Emotion Hub Layout (Grid View) ── */
.emotion-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

@media (max-width: 600px) {
    .emotion-hub-grid {
        grid-template-columns: 1fr;
    }
}

.emotion-hub-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    text-decoration: none !important;
    color: var(--text-primary);
    transition: all 0.2s ease;
    height: 100%;
    box-sizing: border-box;
}

.emotion-hub-header-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.emotion-hub-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(167, 139, 250, 0.1);
    text-decoration: none !important;
}

.emotion-hub-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border-radius: 50%;
}

.emotion-hub-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.emotion-hub-header-wrap h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
}

.emotion-hub-info p {
    margin: 0 0 16px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.emotion-hub-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(167, 139, 250, 0.1);
    padding: 4px 12px;
    border-radius: 50px;
    display: inline-block;
    margin-top: auto;
    align-self: flex-start;
}

/* ── Emotion Hero ── */
.emotion-hero {
    text-align: center;
    padding: 60px 24px 40px;
    max-width: 700px;
    margin: 0 auto;
}

.emotion-hero-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
}

.emotion-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--j-text);
    margin: 0 0 16px;
    line-height: 1.2;
}

.emotion-hero-desc {
    color: var(--j-text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

.emotion-hero-desc strong {
    color: var(--j-text);
}

/* ── Emotion Verse Card Grid ── */
.emotion-verses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

.emotion-verse-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid rgba(120, 120, 150, 0.12);
    border-radius: 12px;
    text-decoration: none !important;
    color: inherit;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.emotion-verse-card *,
.emotion-verse-card *:hover {
    text-decoration: none !important;
}

.emotion-verse-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(167, 139, 250, 0.4);
    box-shadow: 0 12px 32px rgba(167, 139, 250, 0.15), 0 24px 64px rgba(99, 102, 241, 0.1);
    text-decoration: none !important;
}

.emotion-verse-card:hover .evc-cta {
    opacity: 1;
    transform: translateY(0);
}

.evc-ref {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.015em;
}

.evc-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    flex: 1;
}

.evc-bottom-line {
    margin: 8px 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1.45;
    background: rgba(167, 139, 250, 0.1);
    padding: 10px 12px;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.evc-cta {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 12px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(167, 139, 250, 0.1);
    border-radius: 20px;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ── Emotion CTA Section ── */
.emotion-cta-section {
    text-align: center;
    padding: 0 24px 64px;
    max-width: 500px;
    margin: 0 auto;
}

.emotion-cta-section p {
    color: var(--j-text-muted);
    font-size: 0.95rem;
    margin: 0 0 16px;
}

.emotion-cta-btn {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--j-accent), #a78bfa);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.emotion-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

/* ── Emotion Page Responsive ── */
@media (max-width: 900px) {
    .emotion-verses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .emotion-hero {
        padding: 40px 20px 28px;
    }

    .emotion-hero h1 {
        font-size: 1.6rem;
    }

    .emotion-verses-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 0 16px 40px;
    }

    .evc-cta {
        opacity: 1;
    }
}