/* Subpage Specific Styles */

/* Move Your Body Green Theme */
.move-body-theme {
    background: linear-gradient(135deg, #27AE60 0%, #2ECC71 50%, #58D68D 100%);
    color: white;
    padding: 2rem 0;
}

/* Smoking & Alcohol Red Theme */
.smoking-alcohol-theme {
    background: linear-gradient(135deg, #C0392B 0%, #E74C3C 50%, #EC7063 100%);
    color: white;
    padding: 2rem 0;
}

/* Mentally Active Amber Theme */
.mentally-active-theme {
    background: linear-gradient(135deg, #F39C12 0%, #F1C40F 50%, #F8C471 100%);
    color: white;
    padding: 2rem 0;
}

/* Hearing & Vision Blue Theme */
.senses-theme {
    background: linear-gradient(135deg, #3498DB 0%, #5DADE2 50%, #85C1E9 100%);
    color: white;
    padding: 2rem 0;
}

/* Manage Conditions Red Theme */
.manage-conditions-theme {
    background: linear-gradient(135deg, #E74C3C 0%, #EC7063 50%, #F1948A 100%);
    color: white;
    padding: 2rem 0;
}

/* Protect Head Slate Theme */
.protect-head-theme {
    background: linear-gradient(135deg, #34495E 0%, #5D6D7E 50%, #85929E 100%);
    color: white;
    padding: 2rem 0;
}

/* Connect Teal Theme */
.connect-theme {
    background: linear-gradient(135deg, #1ABC9C 0%, #48C9B0 50%, #76D7C4 100%);
    color: white;
    padding: 2rem 0;
}

/* Sleep Purple Theme */
.sleep-theme {
    background: linear-gradient(135deg, #8E44AD 0%, #A569BD 50%, #C39BD3 100%);
    color: white;
    padding: 2rem 0;
}

/* Additional Resources Theme */
.additional-hero {
    background: linear-gradient(135deg, #4c2a77 0%, #6d3fa6 50%, #8e44ad 100%);
    color: white;
    padding: 3rem 0;
}

/* Reading Well for Dementia Purple Theme */
.reading-well-theme {
    background: linear-gradient(135deg, #5e35b1 0%, #7e57c2 50%, #9575cd 100%);
    color: white;
    padding: 2rem 0;
}

.additional-hero-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.additional-hero-header h1 {
    margin: 0;
    font-size: 2.5rem;
    line-height: 1.1;
}

.additional-hero-image {
    width: 170px;
    max-width: 100%;
    height: auto;
    flex-shrink: 0;
}

.additional-hero-copy {
    max-width: 900px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.92);
    margin: 0;
}

.additional-resources-section {
    padding: 3rem 0 4rem;
    background: #f8f5fb;
}

/* Eat for Your Brain Orange Theme */
.eat-brain-theme {
    background: linear-gradient(135deg, #E67E22 0%, #FF8C42 50%, #FFB07B 100%);
    color: white;
    padding: 2rem 0;
}

/* THEME: Stop Smoking & Alcohol (red palette) */
/* Scoped overrides to this subpage via body.theme-smoking-alcohol */
/* Make the entire tabs row a light red band */
.theme-smoking-alcohol .tabs-section {
    background: #fdecea;
    border-bottom: 1px solid #f5c2c7;
    padding: 1rem 0;
}

.theme-smoking-alcohol .tab-navigation {
    background: transparent;
    border-radius: 0;
    border: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.theme-smoking-alcohol .tab-btn {
    background: #fff;
    color: #7a1c1c;
    border: 1px solid #f1aeb5;
    border-bottom: none;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 8px rgba(192, 57, 43, 0.08);
    position: relative;
}

.theme-smoking-alcohol .tab-btn:not(.active) {
    animation: tabPulseRed 3s ease-in-out infinite;
}

.theme-smoking-alcohol .tab-btn:hover {
    background: #fff5f5;
    color: #6a1616;
    border-color: #e28b95;
    animation: none;
}

.theme-smoking-alcohol .tab-btn.active {
    background: linear-gradient(135deg, #C0392B, #E74C3C);
    color: #ffffff;
    border-color: #c0392b;
    box-shadow: 0 8px 20px rgba(192, 57, 43, 0.25);
    animation: none;
}

@keyframes tabPulseRed {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(192, 57, 43, 0.08);
    }
    50% {
        box-shadow: 0 4px 16px rgba(192, 57, 43, 0.2);
    }
}

.theme-smoking-alcohol .tab-btn i { color: inherit; }

.theme-smoking-alcohol .tab-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.35);
}

.theme-smoking-alcohol .tab-hint { color: #7a1c1c; }
.theme-smoking-alcohol .tab-hint i { color: #C0392B; }

.theme-smoking-alcohol .tab-btn:first-child,
.theme-smoking-alcohol .tab-btn:last-child {
    border-radius: 999px;
    border-right: none;
}

/* Cards: switch green accents to red; keep professional-card blue */
.theme-smoking-alcohol .content-card:not(.professional-card) {
    border: 1px solid rgba(192, 57, 43, 0.15);
}

.theme-smoking-alcohol .content-card:not(.professional-card)::before {
    background: linear-gradient(to bottom, #C0392B, #E74C3C);
}

.theme-smoking-alcohol .content-card:not(.professional-card):hover {
    box-shadow: 0 15px 40px rgba(192, 57, 43, 0.15);
}

.theme-smoking-alcohol .content-card:not(.professional-card) .card-icon {
    background: linear-gradient(135deg, #C0392B, #E74C3C);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.35);
}

.theme-smoking-alcohol .highlight-card {
    background: linear-gradient(135deg, rgba(192, 57, 43, 0.06), rgba(231, 76, 60, 0.06));
    border: 2px solid rgba(192, 57, 43, 0.25);
}

.theme-smoking-alcohol .highlight-card::before {
    background: linear-gradient(to bottom, #C0392B, #E74C3C, #EC7063);
}

/* List icon colors: use red, except professional list stays blue via existing rule */
.theme-smoking-alcohol .info-list i,
.theme-smoking-alcohol .support-list i {
    color: #C0392B;
}

.theme-smoking-alcohol .action-list i {
    color: #C0392B;
}

/* THEME: Move (green) - adds pill tabs for this page and ensures accents are green */
.theme-move .tab-navigation { display: flex; justify-content: center; gap: 0.75rem; }
.theme-move .tabs-section { background: #e8f5e9; border-bottom: 1px solid #c8e6c9; padding: 1rem 0; }
.theme-move .tab-btn { background: #fff; color: #1b5e20; border: 1px solid #a5d6a7; border-radius: 999px; padding: 0.75rem 1.5rem; box-shadow: 0 2px 8px rgba(39,174,96,0.08); position: relative; }
.theme-move .tab-btn:not(.active) { animation: tabPulseGreen 3s ease-in-out infinite; }
.theme-move .tab-btn:hover { background: #f3fff5; border-color: #81c784; color: #124d18; animation: none; }
.theme-move .tab-btn.active { background: linear-gradient(135deg, #27AE60, #2ECC71); color: #fff; border-color: #27AE60; box-shadow: 0 8px 20px rgba(39,174,96,0.25); animation: none; }

@keyframes tabPulseGreen {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(39,174,96,0.08);
    }
    50% {
        box-shadow: 0 4px 16px rgba(39,174,96,0.2);
    }
}
.theme-move .tab-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(46,204,113,0.35); }
.theme-move .tab-btn:first-child,
.theme-move .tab-btn:last-child { border-radius: 999px; border-right: none; }
.theme-move .content-card:not(.professional-card) { border: 1px solid rgba(39, 174, 96, 0.15); }
.theme-move .content-card:not(.professional-card)::before { background: linear-gradient(to bottom, #27AE60, #2ECC71); }
.theme-move .content-card:not(.professional-card):hover { box-shadow: 0 15px 40px rgba(39, 174, 96, 0.15); }
.theme-move .content-card:not(.professional-card) .card-icon { background: linear-gradient(135deg, #27AE60, #2ECC71); box-shadow: 0 4px 12px rgba(39, 174, 96, 0.35); }
.theme-move .info-list i, .theme-move .support-list i { color: #27AE60; }
.theme-move .action-list i { color: #27AE60; }
.theme-move .tab-hint { color: #1b5e20; }
.theme-move .tab-hint i { color: #27AE60; }

/* THEME: Mental (amber) */
.theme-mental .tabs-section { background: #fff8e1; border-bottom: 1px solid #ffecb3; padding: 1rem 0; }
.theme-mental .tab-navigation { display: flex; justify-content: center; gap: 0.75rem; }
.theme-mental .tab-btn { background: #fff; color: #7a4b00; border: 1px solid #ffd180; border-radius: 999px; padding: 0.75rem 1.5rem; box-shadow: 0 2px 8px rgba(243,156,18,0.08); position: relative; }
.theme-mental .tab-btn:not(.active) { animation: tabPulse 3s ease-in-out infinite; }
.theme-mental .tab-btn:hover { background: #fff9e6; border-color: #ffca6e; color: #6a4300; animation: none; }
.theme-mental .tab-btn.active { background: linear-gradient(135deg, #F39C12, #F1C40F); color: #fff; border-color: #F39C12; box-shadow: 0 8px 20px rgba(243,156,18,0.25); animation: none; }

@keyframes tabPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(243,156,18,0.08);
    }
    50% {
        box-shadow: 0 4px 16px rgba(243,156,18,0.2);
    }
}
.theme-mental .tab-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(241,196,15,0.35); }
.theme-mental .tab-btn:first-child,
.theme-mental .tab-btn:last-child { border-radius: 999px; border-right: none; }
.theme-mental .content-card:not(.professional-card) { border: 1px solid rgba(243, 156, 18, 0.2); }
.theme-mental .content-card:not(.professional-card)::before { background: linear-gradient(to bottom, #F39C12, #F1C40F); }
.theme-mental .content-card:not(.professional-card):hover { box-shadow: 0 15px 40px rgba(243, 156, 18, 0.15); }
.theme-mental .content-card:not(.professional-card) .card-icon { background: linear-gradient(135deg, #F39C12, #F1C40F); box-shadow: 0 4px 12px rgba(243,156,18,0.35); }
.theme-mental .info-list i, .theme-mental .support-list i { color: #F39C12; }
.theme-mental .action-list i { color: #F39C12; }
.theme-mental .tab-hint { color: #7a4b00; }
.theme-mental .tab-hint i { color: #F39C12; }

/* THEME: Senses (blue) */
.theme-senses .content-card:not(.professional-card) { border: 1px solid rgba(52, 152, 219, 0.2); }
.theme-senses .content-card:not(.professional-card)::before { background: linear-gradient(to bottom, #3498DB, #5DADE2); }
.theme-senses .content-card:not(.professional-card):hover { box-shadow: 0 15px 40px rgba(52, 152, 219, 0.15); }
.theme-senses .content-card:not(.professional-card) .card-icon { background: linear-gradient(135deg, #3498DB, #5DADE2); box-shadow: 0 4px 12px rgba(52,152,219,0.35); }
.theme-senses .info-list i, .theme-senses .support-list i, .theme-senses .action-list i { color: #3498DB; }

/* THEME: Health (red) */
.theme-health .content-card:not(.professional-card) { border: 1px solid rgba(231, 76, 60, 0.2); }
.theme-health .content-card:not(.professional-card)::before { background: linear-gradient(to bottom, #E74C3C, #EC7063); }
.theme-health .content-card:not(.professional-card):hover { box-shadow: 0 15px 40px rgba(231, 76, 60, 0.15); }
.theme-health .content-card:not(.professional-card) .card-icon { background: linear-gradient(135deg, #E74C3C, #EC7063); box-shadow: 0 4px 12px rgba(231,76,60,0.35); }
.theme-health .info-list i, .theme-health .support-list i, .theme-health .action-list i { color: #E74C3C; }

/* THEME: Protect (slate) */
.theme-protect .content-card:not(.professional-card) { border: 1px solid rgba(52, 73, 94, 0.2); }
.theme-protect .content-card:not(.professional-card)::before { background: linear-gradient(to bottom, #34495E, #5D6D7E); }
.theme-protect .content-card:not(.professional-card):hover { box-shadow: 0 15px 40px rgba(52, 73, 94, 0.15); }
.theme-protect .content-card:not(.professional-card) .card-icon { background: linear-gradient(135deg, #34495E, #5D6D7E); box-shadow: 0 4px 12px rgba(52,73,94,0.35); }
.theme-protect .info-list i, .theme-protect .support-list i, .theme-protect .action-list i { color: #34495E; }

/* THEME: Connect (teal) */
.theme-connect .content-card:not(.professional-card) { border: 1px solid rgba(26, 188, 156, 0.2); }
.theme-connect .content-card:not(.professional-card)::before { background: linear-gradient(to bottom, #1ABC9C, #48C9B0); }
.theme-connect .content-card:not(.professional-card):hover { box-shadow: 0 15px 40px rgba(26, 188, 156, 0.15); }
.theme-connect .content-card:not(.professional-card) .card-icon { background: linear-gradient(135deg, #1ABC9C, #48C9B0); box-shadow: 0 4px 12px rgba(26,188,156,0.35); }
.theme-connect .info-list i, .theme-connect .support-list i, .theme-connect .action-list i { color: #1ABC9C; }

/* THEME: Sleep (purple) */
.theme-sleep .content-card:not(.professional-card) { border: 1px solid rgba(142, 68, 173, 0.2); }
.theme-sleep .content-card:not(.professional-card)::before { background: linear-gradient(to bottom, #8E44AD, #A569BD); }
.theme-sleep .content-card:not(.professional-card):hover { box-shadow: 0 15px 40px rgba(142, 68, 173, 0.15); }
.theme-sleep .content-card:not(.professional-card) .card-icon { background: linear-gradient(135deg, #8E44AD, #A569BD); box-shadow: 0 4px 12px rgba(142,68,173,0.35); }
.theme-sleep .info-list i, .theme-sleep .support-list i, .theme-sleep .action-list i { color: #8E44AD; }

/* THEME: Eat (orange) */
.theme-eat .content-card:not(.professional-card) { border: 1px solid rgba(230, 126, 34, 0.2); }
.theme-eat .content-card:not(.professional-card)::before { background: linear-gradient(to bottom, #E67E22, #FF8C42); }
.theme-eat .content-card:not(.professional-card):hover { box-shadow: 0 15px 40px rgba(230, 126, 34, 0.15); }
.theme-eat .content-card:not(.professional-card) .card-icon { background: linear-gradient(135deg, #E67E22, #FF8C42); box-shadow: 0 4px 12px rgba(230,126,34,0.35); }
.theme-eat .info-list i, .theme-eat .support-list i, .theme-eat .action-list i { color: #E67E22; }

/* THEME: Eat (orange) — pill-style tabs to match other subpages */
.theme-eat .tabs-section { background: #fff3e0; border-bottom: 1px solid #ffe0b2; padding: 1rem 0; }
.theme-eat .tab-navigation { display: flex; justify-content: center; gap: 0.75rem; }
.theme-eat .tab-btn { background: #fff; color: #6e2c00; border: 1px solid #ffd2a6; border-radius: 999px; padding: 0.75rem 1.5rem; box-shadow: 0 2px 8px rgba(230,126,34,0.08); position: relative; }
.theme-eat .tab-btn:not(.active) { animation: tabPulseOrange 3s ease-in-out infinite; }
.theme-eat .tab-btn:hover { background: #fff7f0; border-color: #ffb36b; color: #5a2400; animation: none; }
.theme-eat .tab-btn.active { background: linear-gradient(135deg, #E67E22, #FF8C42); color: #fff; border-color: #E67E22; box-shadow: 0 8px 20px rgba(230,126,34,0.25); animation: none; }

@keyframes tabPulseOrange {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(230,126,34,0.08);
    }
    50% {
        box-shadow: 0 4px 16px rgba(230,126,34,0.2);
    }
}
.theme-eat .tab-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(230,126,34,0.35); }
.theme-eat .tab-btn:first-child,
.theme-eat .tab-btn:last-child { border-radius: 999px; border-right: none; }
.theme-eat .tab-hint { color: #6e2c00; }
.theme-eat .tab-hint i { color: #E67E22; }

.subpage-hero {
    margin-top: 4.375rem;
    padding: 2.5rem 0 2rem;
    display: flex;
    align-items: center;
}

.back-navigation {
    margin-bottom: 2rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.back-btn:visited {
    color: rgba(255, 255, 255, 0.9) !important;
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 3s infinite;
    animation-delay: 1s;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

.back-btn:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
    border-color: rgba(255, 255, 255, 0.6);
}

.back-btn:hover::before {
    animation: none;
}

.hero-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.subpage-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    opacity: 0.95;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.feature-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.2);
    border: 4px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
}

.feature-image:hover {
    transform: scale(1.05) rotate(2deg);
}

/* Tab Navigation */
.tabs-section {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 0;
}

/* Single-line intro bar for non-tab pages */
.sub-intro {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0; /* match tab band height */
}
.sub-intro-text {
    margin: 0;
    text-align: center;
    color: #495057;
    font-size: 1rem;
}

/* Themed sub-intro bands (lighter tints per page theme) */
.theme-move .sub-intro { background: #e8f5e9; border-bottom-color: #c8e6c9; }
.theme-mental .sub-intro { background: #fff8e1; border-bottom-color: #ffecb3; }
.theme-eat .sub-intro { background: #fff3e0; border-bottom-color: #ffe0b2; }
.theme-senses .sub-intro { background: #e8f3fc; border-bottom-color: #d6e9fb; }
.theme-health .sub-intro { background: #fdecea; border-bottom-color: #f5c2c7; }
.theme-protect .sub-intro { background: #f2f5f7; border-bottom-color: #d9e1e7; }
.theme-connect .sub-intro { background: #e8f8f5; border-bottom-color: #c6eee6; }
.theme-sleep .sub-intro { background: #f3e5f5; border-bottom-color: #e1bee7; }
.theme-smoking-alcohol .sub-intro { background: #fdecea; border-bottom-color: #f5c2c7; }

.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 0;
    max-width: 600px;
    margin: 0 auto;
}

.tab-hint {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    animation: fadeInPulse 2s ease-in-out infinite;
}

.tab-hint i {
    font-size: 1.1rem;
}

@keyframes fadeInPulse {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

.tab-btn {
    background: #f8f9fa;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 4px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Poppins', sans-serif;
    flex: 1;
    justify-content: center;
}

.tab-btn:first-child {
    border-radius: 0;
    border-right: 1px solid #e9ecef;
}

.tab-btn:last-child {
    border-radius: 0;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-btn.active {
    background: white;
    color: #2c5aa0;
    border-bottom-color: #2c5aa0;
}

.tab-btn i {
    font-size: 1.2rem;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Content Section */
.content-section {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #f8f9fa, white);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.content-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(39, 174, 96, 0.1);
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #27AE60, #2ECC71);
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(39, 174, 96, 0.15);
}

.highlight-card {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.05), rgba(46, 204, 113, 0.05));
    border: 2px solid rgba(39, 174, 96, 0.2);
}

.highlight-card::before {
    width: 6px;
    background: linear-gradient(to bottom, #27AE60, #2ECC71, #58D68D);
}

.professional-card {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(41, 128, 185, 0.05));
    border: 2px solid rgba(52, 152, 219, 0.2);
}

.professional-card::before {
    background: linear-gradient(to bottom, #3498DB, #2980B9);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #27AE60, #2ECC71);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.professional-card .card-icon {
    background: linear-gradient(135deg, #3498DB, #2980B9);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.card-header h2 {
    font-size: 1.5rem;
    color: #2c5aa0;
    margin: 0;
    font-weight: 600;
}

.card-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 1rem;
}

/* Card with image layout */
.card-content-with-image {
    display: block;
    position: relative;
}

.card-text-content {
    position: relative;
}

.card-text-content > p {
    margin-right: 220px;
}

.card-text-content > .action-list {
    margin-right: 0;
}

.card-image-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
}

.card-image {
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
}

@media (max-width: 768px) {
    .card-text-content > p {
        margin-right: 0;
    }

    .card-image-container {
        position: static;
        width: 100%;
        max-width: 300px;
        margin: 1rem auto 0;
    }

    .card-image {
        border-radius: 12px;
    }
}

.action-list, .support-list, .professional-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.action-list li, .support-list li, .professional-list li, .info-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #495057;
}

.list-text {
    flex: 1;
    min-width: 0;
}

.support-service {
    margin-bottom: 2rem;
}

.support-service:last-child {
    margin-bottom: 1rem;
}

.support-service h4 {
    color: #2c5aa0;
    margin-bottom: 1rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.info-list i {
    color: #2c5aa0;
    font-size: 1rem;
    margin-top: 0.3rem;
    flex-shrink: 0;
}

.action-list li:last-child, 
.support-list li:last-child, 
.professional-list li:last-child {
    margin-bottom: 0;
}

.action-list i {
    color: #27AE60;
    font-size: 1.2rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.support-list i, .professional-list i {
    color: #2c5aa0;
    font-size: 1rem;
    margin-top: 0.3rem;
    flex-shrink: 0;
}

/* Navigation Section */
.navigation-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 3rem 0;
}

.nav-cards {
    display: flex;
    justify-content: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.nav-card {
    background: white;
    padding: 1rem 2.5rem; /* half height, a bit wider */
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: #2c5aa0;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
    min-width: 420px;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(44, 90, 160, 0.15);
    border-color: rgba(44, 90, 160, 0.2);
    color: #2c5aa0;
    text-decoration: none;
}

.nav-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.nav-card span {
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-card small {
    color: #6c757d;
    font-size: 0.9rem;
}

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

.next-disabled:hover {
    transform: none;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .subpage-hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .feature-image {
        width: 250px;
        height: 250px;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .nav-cards {
        justify-content: center;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .additional-hero-header {
        justify-content: center;
        text-align: center;
    }

    .additional-hero-header h1 {
        font-size: 2.2rem;
    }

    .additional-hero-image {
        width: 110px;
    }

    .additional-hero-copy {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .nav-card { min-width: auto; width: 100%; }
}

@media (max-width: 480px) {
    .subpage-hero {
        padding: 2rem 0;
    }
    
    .subpage-hero h1 {
        font-size: 2rem;
    }
    
    .feature-image {
        width: 200px;
        height: 200px;
    }
    
    .content-card {
        padding: 1rem;
    }
}

/* Floating scroll progress pill (first applied on Move Your Body) */
.scroll-pill {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(6px);
    color: #333;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.scroll-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.scroll-pill .progress-percent {
    font-weight: 600;
    font-size: 0.95rem;
}

.scroll-pill .progress-track {
    width: 120px;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background: #eef3ef;
    border: 1px solid rgba(0,0,0,0.06);
}

.scroll-pill .progress-bar {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 999px;
}

/* Theme variants for the pill */
.theme-move .scroll-pill { border-color: #a5d6a7; color: #1b5e20; }
.theme-move .scroll-pill .progress-track { background: #e8f5e9; }
.theme-move .scroll-pill .progress-bar { background: linear-gradient(135deg, #27AE60, #2ECC71); }

/* Smoking & Alcohol (red) */
.theme-smoking-alcohol .scroll-pill { border-color: #f1aeb5; color: #7a1c1c; }
.theme-smoking-alcohol .scroll-pill .progress-track { background: #fdecea; }
.theme-smoking-alcohol .scroll-pill .progress-bar { background: linear-gradient(135deg, #C0392B, #E74C3C); }

/* Manage Conditions (red) */
.theme-health .scroll-pill { border-color: #f5b7b1; color: #7a1c1c; }
.theme-health .scroll-pill .progress-track { background: #fdecea; }
.theme-health .scroll-pill .progress-bar { background: linear-gradient(135deg, #E74C3C, #EC7063); }

/* Mentally Active (amber) */
.theme-mental .scroll-pill { border-color: #ffe082; color: #7a4b00; }
.theme-mental .scroll-pill .progress-track { background: #fff8e1; }
.theme-mental .scroll-pill .progress-bar { background: linear-gradient(135deg, #F39C12, #F1C40F); }

/* Hearing & Vision (blue) */
.theme-senses .scroll-pill { border-color: #a9d3f2; color: #0d3f66; }
.theme-senses .scroll-pill .progress-track { background: #e8f3fc; }
.theme-senses .scroll-pill .progress-bar { background: linear-gradient(135deg, #3498DB, #5DADE2); }

/* Protect Head (slate) */
.theme-protect .scroll-pill { border-color: #c0ccd6; color: #22303b; }
.theme-protect .scroll-pill .progress-track { background: #ecf1f4; }
.theme-protect .scroll-pill .progress-bar { background: linear-gradient(135deg, #34495E, #5D6D7E); }

/* Connect (teal) */
.theme-connect .scroll-pill { border-color: #b8ede5; color: #0b5345; }
.theme-connect .scroll-pill .progress-track { background: #e8f8f5; }
.theme-connect .scroll-pill .progress-bar { background: linear-gradient(135deg, #1ABC9C, #48C9B0); }

/* Sleep (purple) */
.theme-sleep .scroll-pill { border-color: #d6c1e3; color: #4a235a; }
.theme-sleep .scroll-pill .progress-track { background: #f3e5f5; }
.theme-sleep .scroll-pill .progress-bar { background: linear-gradient(135deg, #8E44AD, #A569BD); }

/* Eat (orange) */
.theme-eat .scroll-pill { border-color: #ffd2a6; color: #6e2c00; }
.theme-eat .scroll-pill .progress-track { background: #fff3e0; }
.theme-eat .scroll-pill .progress-bar { background: linear-gradient(135deg, #E67E22, #FF8C42); }

@media (max-width: 768px) {
    .scroll-pill { right: 12px; bottom: 14px; }
    .scroll-pill .progress-track { width: 90px; }
}

@media (max-width: 480px) {
    .scroll-pill .progress-percent { display: none; }
}

/* Support Links Cards Styling */
.support-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.support-link-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.support-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.support-link-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    border-radius: 12px 12px 0 0;
}

.support-link-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    line-height: 1.3;
}

.support-link-title i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.support-link-badge {
    background: linear-gradient(135deg, #F39C12, #F1C40F);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-derbyshire {
    background: #92278f;
}

.badge-derby {
    background: #007363;
}

.support-link-badges-stacked {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: flex-end;
}

.support-link-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 0.95rem;
}

.support-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    align-self: flex-start;
    font-size: 0.95rem;
}

.support-link-btn:visited {
    color: #fef9f3;
}

.support-link-btn:hover {
    transform: translateX(4px);
    color: white;
}

.support-link-btn:focus-visible {
    outline: 3px solid rgba(142, 68, 173, 0.35);
    outline-offset: 2px;
}

.support-link-btn i {
    transition: transform 0.3s ease;
}

.support-link-btn:hover i {
    transform: translateX(4px);
}

.additional-resource-card .support-link-header {
    background: linear-gradient(135deg, rgba(94, 53, 177, 0.92), rgba(126, 87, 194, 0.92));
    border-bottom: 1px solid rgba(126, 87, 194, 0.25);
}

.additional-resource-card .support-link-title {
    color: white;
}

.additional-resource-card .support-link-title i {
    color: white;
}

.additional-resource-card .support-link-btn {
    background: linear-gradient(135deg, #5e35b1, #4527a0);
    border: none;
    box-shadow: 0 4px 18px rgba(69, 39, 160, 0.25);
}

.additional-resource-card .support-link-btn:hover {
    background: linear-gradient(135deg, #4527a0, #311b92);
    box-shadow: 0 8px 24px rgba(69, 39, 160, 0.3);
}

.no-links-message,
.error-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.error-message {
    color: #E74C3C;
}

/* Theme-specific card styling */

/* Keep Mentally Active (Amber/Yellow) */
.theme-mental .support-link-header {
    background: #FFF8E1;
}

.theme-mental .support-link-card:hover {
    border-color: #F39C12;
}

.theme-mental .support-link-title i {
    color: #F39C12;
}

.theme-mental .support-link-btn {
    background: linear-gradient(135deg, #F39C12, #F1C40F);
}

.theme-mental .support-link-btn:hover {
    background: linear-gradient(135deg, #E67E22, #F39C12);
}

/* Move Your Body (Green) */
.theme-move .support-link-header {
    background: #E8F5E9;
}

.theme-move .support-link-card:hover {
    border-color: #27AE60;
}

.theme-move .support-link-title i {
    color: #27AE60;
}

.theme-move .support-link-btn {
    background: linear-gradient(135deg, #27AE60, #2ECC71);
}

.theme-move .support-link-btn:hover {
    background: linear-gradient(135deg, #1E8449, #27AE60);
}

/* Eat for Your Brain (Orange) */
.theme-eat .support-link-header {
    background: #FFF3E0;
}

.theme-eat .support-link-card:hover {
    border-color: #E67E22;
}

.theme-eat .support-link-title i {
    color: #E67E22;
}

.theme-eat .support-link-btn {
    background: linear-gradient(135deg, #E67E22, #FF8C42);
}

.theme-eat .support-link-btn:hover {
    background: linear-gradient(135deg, #CA6F1E, #E67E22);
}

/* Stay Connected (Teal) */
.theme-connect .support-link-header {
    background: #E8F8F5;
}

.theme-connect .support-link-card:hover {
    border-color: #1ABC9C;
}

.theme-connect .support-link-title i {
    color: #1ABC9C;
}

.theme-connect .support-link-btn {
    background: linear-gradient(135deg, #1ABC9C, #48C9B0);
}

.theme-connect .support-link-btn:hover {
    background: linear-gradient(135deg, #16A085, #1ABC9C);
}

/* Hearing & Vision (Blue) */
.theme-senses .support-link-header {
    background: #E8F3FC;
}

.theme-senses .support-link-card:hover {
    border-color: #3498DB;
}

.theme-senses .support-link-title i {
    color: #3498DB;
}

.theme-senses .support-link-btn {
    background: linear-gradient(135deg, #3498DB, #5DADE2);
}

.theme-senses .support-link-btn:hover {
    background: linear-gradient(135deg, #2E86C1, #3498DB);
}

/* Manage Conditions (Red) */
.theme-health .support-link-header {
    background: #FDECEA;
}

.theme-health .support-link-card:hover {
    border-color: #E74C3C;
}

.theme-health .support-link-title i {
    color: #E74C3C;
}

.theme-health .support-link-btn {
    background: linear-gradient(135deg, #E74C3C, #EC7063);
}

.theme-health .support-link-btn:hover {
    background: linear-gradient(135deg, #C0392B, #E74C3C);
}

/* Sleep Well (Purple) */
.theme-sleep .support-link-header {
    background: #F3E5F5;
}

.theme-sleep .support-link-card:hover {
    border-color: #8E44AD;
}

.theme-sleep .support-link-title i {
    color: #8E44AD;
}

.theme-sleep .support-link-btn {
    background: linear-gradient(135deg, #8E44AD, #A569BD);
}

.theme-sleep .support-link-btn:hover {
    background: linear-gradient(135deg, #7D3C98, #8E44AD);
}

/* Protect Your Head (Slate) */
.theme-protect .support-link-header {
    background: #ECF1F4;
}

.theme-protect .support-link-card:hover {
    border-color: #34495E;
}

.theme-protect .support-link-title i {
    color: #34495E;
}

.theme-protect .support-link-btn {
    background: linear-gradient(135deg, #34495E, #5D6D7E);
}

.theme-protect .support-link-btn:hover {
    background: linear-gradient(135deg, #2C3E50, #34495E);
}

/* Stop Smoking & Alcohol (Red/Orange) */
.theme-smoking-alcohol .support-link-header {
    background: #FDECEA;
}

.theme-smoking-alcohol .support-link-card:hover {
    border-color: #C0392B;
}

.theme-smoking-alcohol .support-link-title i {
    color: #C0392B;
}

.theme-smoking-alcohol .support-link-btn {
    background: linear-gradient(135deg, #C0392B, #E74C3C);
}

.theme-smoking-alcohol .support-link-btn:hover {
    background: linear-gradient(135deg, #A93226, #C0392B);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .support-links-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .support-link-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .support-link-badge {
        align-self: flex-start;
    }

    .support-link-title {
        font-size: 1.1rem;
    }

    .support-link-btn {
        width: 100%;
        justify-content: center;
    }
}

/* High Contrast Mode for Subpages */
body.high-contrast .subpage-hero,
body.high-contrast .tabs-section,
body.high-contrast .additional-hero,
body.high-contrast .additional-resources-section {
    background: var(--color-bg-base) !important;
    color: var(--color-text-base) !important;
}

body.high-contrast .back-btn {
    background: var(--color-bg-base) !important;
    color: var(--color-text-base) !important;
    border: 2px solid #000000 !important;
}

body.high-contrast .back-btn:hover {
    background: #ffeb3b !important;
    color: var(--color-text-base) !important;
}

body.high-contrast .tabs-section {
    border-bottom: 2px solid #000000;
}

body.high-contrast .tab-btn {
    background: var(--color-bg-base) !important;
    color: var(--color-text-base) !important;
    border: 2px solid #000000 !important;
    box-shadow: none !important;
}

body.high-contrast .tab-btn.active {
    background: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #000000 !important;
}

body.high-contrast .tab-btn:hover {
    background: #ffeb3b !important;
    color: var(--color-text-base) !important;
}

body.high-contrast .tab-hint {
    color: var(--color-text-base) !important;
}

body.high-contrast .content-card {
    background: var(--color-bg-base) !important;
    border: 2px solid #000000 !important;
    box-shadow: none !important;
}

body.high-contrast .content-card::before {
    display: none !important;
}

body.high-contrast .card-icon {
    background: var(--color-bg-base) !important;
    color: var(--color-text-base) !important;
    border: 2px solid #000000 !important;
    box-shadow: none !important;
}

body.high-contrast .action-list i,
body.high-contrast .info-list i,
body.high-contrast .support-list i,
body.high-contrast .professional-list i {
    color: var(--color-text-base) !important;
}

/* Reading Well for Dementia - Book Cards Styling */
.reading-well-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 0;
}

.book-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.book-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(94, 53, 177, 0.15);
    border-color: #9575cd;
}

.book-card-header {
    background: linear-gradient(135deg, #f8f5fb, #f3eff7);
    padding: 1.5rem;
    border-bottom: 1px solid #e9e2f0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.book-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #5e35b1, #7e57c2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(94, 53, 177, 0.25);
}

.book-header-content {
    flex: 1;
    min-width: 0;
}

.book-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.book-authors {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0;
    font-style: italic;
}

.book-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
    max-width: 100%;
}

.book-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

.book-badge i {
    font-size: 0.75rem;
}

.badge-general {
    background: linear-gradient(135deg, #3498DB, #5DADE2);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.25);
}

.badge-children {
    background: linear-gradient(135deg, #F39C12, #F1C40F);
    box-shadow: 0 2px 6px rgba(243, 156, 18, 0.25);
}

.badge-date {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    box-shadow: 0 2px 6px rgba(127, 140, 141, 0.2);
}

.book-description {
    padding: 1.5rem;
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
    margin: 0;
}

.book-footer {
    padding: 1.5rem;
    background: #fafafa;
    border-top: 1px solid #e9ecef;
    font-size: 0.85rem;
}

.book-footer p {
    margin: 0 0 0.75rem 0;
    color: #6c757d;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
}

.book-footer p:last-child {
    margin-bottom: 0;
}

.book-footer i {
    color: #9575cd;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.book-publisher {
    font-weight: 500;
    color: #495057 !important;
}

.book-formats {
    color: #7e57c2 !important;
    font-weight: 500;
}

.book-isbn {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.book-library-note {
    color: #5e35b1 !important;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(94, 53, 177, 0.08), rgba(126, 87, 194, 0.08));
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    margin: 0.75rem -0.75rem -0.75rem -0.75rem !important;
    border: 1px dashed rgba(94, 53, 177, 0.2);
}

/* THEME: Reading Well (purple) - pill-style tabs */
.theme-additional .tabs-section {
    background: #f8f5fb;
    border-bottom: 1px solid #e9e2f0;
    padding: 1rem 0;
}

.theme-additional .tab-navigation {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.theme-additional .tab-btn {
    background: #fff;
    color: #4a235a;
    border: 1px solid #d6c1e3;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 8px rgba(94, 53, 177, 0.08);
    position: relative;
}

.theme-additional .tab-btn:not(.active) {
    animation: tabPulsePurple 3s ease-in-out infinite;
}

.theme-additional .tab-btn:hover {
    background: #f9f7fc;
    border-color: #c39bd3;
    color: #3a1d4a;
    animation: none;
}

.theme-additional .tab-btn.active {
    background: linear-gradient(135deg, #5e35b1, #7e57c2);
    color: #fff;
    border-color: #5e35b1;
    box-shadow: 0 8px 20px rgba(94, 53, 177, 0.25);
    animation: none;
}

@keyframes tabPulsePurple {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(94, 53, 177, 0.08);
    }
    50% {
        box-shadow: 0 4px 16px rgba(94, 53, 177, 0.2);
    }
}

.theme-additional .tab-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(126, 87, 194, 0.35);
}

.theme-additional .tab-btn:first-child,
.theme-additional .tab-btn:last-child {
    border-radius: 999px;
    border-right: none;
}

.theme-additional .tab-hint {
    color: #4a235a;
}

.theme-additional .tab-hint i {
    color: #5e35b1;
}

/* Responsive adjustments for book cards */
@media (max-width: 768px) {
    .reading-well-books-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .book-card {
        margin: 0 auto;
        max-width: 500px;
    }
}

@media (max-width: 480px) {
    .book-card-header {
        padding: 1.25rem;
    }

    .book-description {
        padding: 1.25rem;
    }

    .book-footer {
        padding: 1.25rem;
    }

    .book-title {
        font-size: 1.15rem;
    }
}

/* High contrast mode for book cards */
body.high-contrast .book-card {
    background: var(--color-bg-base) !important;
    border: 2px solid #000000 !important;
}

body.high-contrast .book-card-header {
    background: var(--color-bg-base) !important;
    border-bottom: 2px solid #000000;
}

body.high-contrast .book-icon {
    background: var(--color-bg-base) !important;
    border: 2px solid #000000 !important;
    color: var(--color-text-base) !important;
}

body.high-contrast .book-badge {
    background: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #ffffff;
}

body.high-contrast .book-footer {
    background: var(--color-bg-base) !important;
    border-top: 2px solid #000000;
}

body.high-contrast .book-library-note {
    background: var(--color-bg-base) !important;
    border: 2px solid #000000 !important;
}
