/* === custom.css === */
/* Prevent scrollbar layout shifts */
html {
    scrollbar-gutter: stable;
    overflow-y: scroll;
    /* Ensure smooth scrolling */
    scroll-behavior: smooth;
}

/* Prevent content shift on mobile */
body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    position: relative;
    margin: 0;
    /* Add padding to account for fixed navbar */
    padding-top: 70px;
}

/* Hide scrollbar but keep functionality */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        display: none;
    }

    * {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* Fixed navbar styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding-top: 0;
    padding-bottom: 0;
    min-height: 70px;
    background-color: var(--bs-gray-900) !important;
    border-bottom: 1px solid var(--bs-gray-700);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color var(--theme-transition-duration) ease,
                border-color var(--theme-transition-duration) ease;
}

/* Theme transition styles */
:root {
    --theme-transition-duration: 0.3s;
}

* {
    transition: background-color var(--theme-transition-duration) ease,
                color var(--theme-transition-duration) ease,
                border-color var(--theme-transition-duration) ease,
                box-shadow var(--theme-transition-duration) ease !important;
}

/* Theme toggle button */
.theme-toggle {
    padding: 0.5rem;
    margin-right: 1rem;
    border: none;
    background: transparent;
    color: var(--bs-gray-200);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    color: var(--bs-info);
}

.theme-toggle i {
    font-size: 1.2rem;
    transition: transform var(--theme-transition-duration) ease;
}

/* Light theme overrides */
[data-bs-theme="light"] {
    --bs-body-bg: #ffffff;
    --bs-body-color: #212529;
    --bs-navbar-color: #212529;
    --bs-navbar-hover-color: var(--bs-primary);
    --bs-navbar-active-color: var(--bs-primary);
}

[data-bs-theme="light"] .navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #dee2e6;
}

[data-bs-theme="light"] .card {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
}

[data-bs-theme="light"] .footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Dark theme overrides */
[data-bs-theme="dark"] .navbar {
    background-color: var(--bs-gray-900) !important;
    border-bottom: 1px solid var(--bs-gray-700);
}

[data-bs-theme="dark"] .card {
    background-color: var(--bs-gray-900);
    border: 1px solid var(--bs-gray-800);
}

[data-bs-theme="dark"] .footer {
    background-color: var(--bs-gray-900);
    border-top: 1px solid var(--bs-gray-800);
}

/* Custom styles for Speakox platform */

/* Add tagline styling */
.tagline {
    color: var(--bs-info);
    font-weight: 700;
    font-size: 1.4rem; /* Further reduced size */
    text-align: center;
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid var(--bs-info);
    max-width: 90%; /* Limit width */
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Logo and brand styling */
.navbar-brand-container {
    display: flex;
    align-items: center;
}

.navbar-brand {
    padding: 0;
    margin: 0;
}

.brand-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: relative;
}

.logo-img {
    height: 40px;
    width: auto;
    margin-right: 1rem;
    object-fit: contain;
    display: block;
    background-color: transparent !important;
    border: none;
    box-shadow: none;
    /* Remove problematic filters and blend modes for seamless integration */
    filter: none;
    mix-blend-mode: normal;
    /* Ensure transparent background blends with header */
    background: transparent;
    transition: all 0.2s ease;
}

/* Clean hover effect that blends with header */
.logo-img:hover {
    transform: scale(1.05);
    opacity: 0.9;
    transition: all 0.2s ease;
}

.slogan {
    font-size: 0.9rem;
    color: var(--bs-gray-200);
    font-weight: 700;
    margin-top: -5px;
    font-style: italic;
    white-space: nowrap;
    letter-spacing: 0.5px;
    padding-left: 0; /* Reset padding for proper alignment */
    position: relative;
    left: 0; /* Align with the left edge of the logo */
}


/* Ensure navbar accommodates taller logo */
/*.navbar {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 70px;
    background-color: var(--bs-gray-900) !important; /* Force white background */
    border-bottom: 1px solid var(--bs-gray-700);
}*/

.navbar-brand {
    padding: 0;
    display: flex;
    align-items: flex-start; /* Align items to the start */
    flex-direction: column;
}

/* Navigation links - white text on dark background with blue hover */
.navbar-nav .nav-link {
    color: #ffffff !important; /* White text for dark background */
    font-weight: 500; /* Make text slightly bolder */
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--bs-info) !important; /* Blue hover color */
    background-color: var(--bs-gray-800);
    border-radius: 0.25rem;
}

/* Active navigation link */
.navbar-nav .nav-link.active {
    color: var(--bs-info) !important; /* Blue for active links */
}

/* Action buttons in navbar */
.navbar .btn-primary {
    margin-left: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    background: var(--bs-info);
    border: none;
    color: var(--bs-gray-900);
}

.navbar .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background: var(--bs-info-bg-subtle);
}

/* General spacing and layout adjustments */
.container {
    max-width: 1200px;
    padding: 20px;
}

/* Card enhancements */
.card {
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
    background: var(--bs-gray-900);
    color: var(--bs-gray-200);
}

.card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.card-header {
    background-color: var(--bs-gray-800);
    border-bottom: 1px solid var(--bs-gray-700);
    color: var(--bs-info);
}

.card-body {
    background-color: var(--bs-gray-900);
}

/* Story cards with Facebook-style layout */

.story-header {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--bs-gray-700);
    display: flex;
    background-color: var(--bs-gray-800);
    align-items: center;
}

.story-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.8rem;
    background: var(--bs-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-author-info {
    flex-grow: 1;
    color: var(--bs-gray-200);
}

.story-timestamp {
    color: var(--bs-gray-500);
    font-size: 0.9rem;
}

.story-content {
    padding: 1rem;
    color: var(--bs-gray-200);
}

.story-content .card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bs-gray-200);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.story-content .card-text {
    color: var(--bs-gray-700);
    line-height: 1.6;
}

.story-media {
    position: relative;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bs-gray-900);
}

.story-media::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.story-media-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Hover effects */
.story-media:hover .story-media-content {
    transform: scale(1.05);
}

/* Media type specific styles */
img.story-media-content {
    object-position: center;
}

video.story-media-content {
    object-fit: contain;
    background: var(--bs-gray-900);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .story-media::before {
        padding-top: 75%; /* 4:3 Aspect Ratio for mobile */
    }
}

/* Loading state */
.story-media.loading {
    background: linear-gradient(90deg, 
        var(--bs-gray-800) 0%, 
        var(--bs-gray-700) 50%, 
        var(--bs-gray-800) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.story-actions {
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--bs-gray-700);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    color: var(--bs-gray-700);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

/* Share button and dropdown */
.share-dropdown {
    position: relative;
    display: inline-block;
}

.share-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bs-gray-800);
    border: 1px solid var(--bs-gray-700);
    border-radius: 0.5rem;
    min-width: 200px;
    z-index: 1000;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.share-dropdown:hover .share-dropdown-content,
.share-dropdown.active .share-dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}

.share-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--bs-gray-200);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
    border: none;
    background: none;
    text-align: left;
}

.share-link:hover {
    background: var(--bs-gray-700);
    color: var(--bs-info);
}

.share-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Animation for dropdown */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Media preview container */
#media-preview {
    max-width: 100%;
    margin-top: 1rem;
}

#media-preview img,
#media-preview video,
#media-preview audio {
    max-height: 300px;
    width: auto;
    margin: 0 auto;
    display: block;
}

/* Story preview enhancements */
.story-preview {
    position: relative;
    overflow: hidden;
    border-radius: 0.25rem;
}

.story-preview img {
    transition: transform 0.3s ease;
}

.story-preview:hover img {
    transform: scale(1.05);
}

.story-preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1rem;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.story-preview:hover .story-preview-overlay {
    transform: translateY(0);
}

/* Loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Category Badge Styles */
.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: var(--bs-gray-800);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--bs-info);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.category-badge i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.category-badge:hover {
    transform: translateY(-2px);
    background: var(--bs-gray-700);
}

/* Enhanced Story Card Animations */
.story-card {
    transform: translateY(0);
    opacity: 1;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-card.animate-in {
    transform: translateY(0);
    opacity: 1;
}

/* Loading Animation Enhancements */
.loading-container {
    padding: 2rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-pulse {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--bs-info);
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(var(--bs-info-rgb), 0.3);
}

.loading-text {
    font-size: 1.2rem;
    color: var(--bs-info);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-shadow: 0 0 10px rgba(var(--bs-info-rgb), 0.3);
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(var(--bs-info-rgb), 0.7);
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
        box-shadow: 0 0 20px 10px rgba(var(--bs-info-rgb), 0.3);
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(var(--bs-info-rgb), 0.7);
    }
}

/* Story Grid Layout Enhancement */
.story-grid {
    max-width: 800px;
    margin: 0 auto;
    transition: opacity 0.5s ease;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.story-header {
    background-color: var(--bs-gray-800);
    border-bottom: 1px solid var(--bs-gray-700);
}

.story-author-info {
    color: var(--bs-gray-200);
}

.story-timestamp {
    color: var(--bs-gray-500);
}

.story-content {
    color: var(--bs-gray-200);
}

.story-container {
    max-width: 800px;
    margin: 0 auto;
}

.content-warning {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 0.5rem;
    background-color: var(--bs-warning-bg-subtle);
    border: 1px solid var(--bs-warning);
}

.content-warning .alert-heading {
    color: var(--bs-warning);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hidden-content {
    display: none;
}

.story-content-wrapper {
    animation: fadeIn 0.3s ease;
}

.formatted-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--bs-gray-200);
}

.reactions-section {
    padding: 1rem 0;
    border-top: 1px solid var(--bs-gray-700);
    border-bottom: 1px solid var(--bs-gray-700);
}

.comments-section {
    margin-top: 2rem;
    padding-top: 2rem;
}

.comment-card {
    background: var(--bs-gray-800);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: transform 0.2s ease;
}

.comment-card:hover {
    transform: translateX(5px);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.comment-author {
    color: var(--bs-info);
    font-weight: 500;
}

.comment-timestamp {
    color: var(--bs-gray-500);
}

.comment-content {
    color: var(--bs-gray-200);
    line-height: 1.5;
}

.related-stories .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-stories .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.story-tags .badge {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    background-color: var(--bs-gray-700);
    color: var(--bs-gray-200);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.story-tags .badge:hover {
    background-color: var(--bs-gray-600);
    transform: translateY(-1px);
}

.story-tags .badge i {
    font-size: 0.9rem;
}

[data-bs-theme="dark"] .story-tags .badge {
    background-color: var(--bs-gray-800);
}

[data-bs-theme="dark"] .story-tags .badge:hover {
    background-color: var(--bs-gray-700);
}

/* Loading Animation Styles */
.loading-container {
    padding: 2rem;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-pulse {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--bs-info);
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(var(--bs-info-rgb), 0.3);
}

.loading-text {
    font-size: 1.2rem;
    color: var(--bs-info);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-shadow: 0 0 10px rgba(var(--bs-info-rgb), 0.3);
}

/* Skeleton Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, var(--bs-gray-800) 4%, var(--bs-gray-700) 25%, var(--bs-gray-800) 36%);
    background-size: 1000px 100%;
    border-radius: 4px;
}

.skeleton-card {
    height: 400px;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.skeleton-header {
    height: 60px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bs-gray-800);
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-author {
    height: 20px;
    width: 150px;
}

.skeleton-content {
    padding: 1rem;
}

.skeleton-title {
    height: 28px;
    width: 80%;
    margin-bottom: 1rem;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 0.8rem;
}

.skeleton-text:last-child {
    width: 60%;
}

/* Story Grid Animations */
.story-grid {
    opacity: 1;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-grid.visible {
    opacity: 1;
}

.story-card {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade transitions */
.fade-out {
    opacity: 0;
    pointer-events: none;
}

.fade-in {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.opacity-0 {
    opacity: 0;
}

body {
    background-color: var(--bs-gray-900);
    color: var(--bs-gray-200);
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px,1fr));
    gap: 1.5rem;
}

.story-header {
    background-color: var(--bs-gray-800);
    border-bottom: 1px solid var(--bs-gray-700);
}

.story-author-info {
    color: var(--bs-gray-200);
}

.story-timestamp {
    color: var(--bs-gray-500);
}

.story-content {
    color: var(--bs-gray-200);
}

.story-container {
    max-width: 800px;
    margin: 0 auto;
}

.content-warning {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 0.5rem;
    background-color: var(--bs-warning-bg-subtle);
    border: 1px solid var(--bs-warning);
}

.content-warning .alert-heading {
    color: var(--bs-warning);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hidden-content {
    display: none;
}

.story-content-wrapper {
    animation: fadeIn 0.3s ease;
}

.formatted-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--bs-gray-200);
}

.reactions-section {
    padding: 1rem 0;
    border-top: 1px solid var(--bs-gray-700);
    border-bottom: 1px solid var(--bs-gray-700);
}

.comments-section {
    margin-top: 2rem;
    padding-top: 2rem;
}

.comment-card {
    background: var(--bs-gray-800);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: transform 0.2s ease;
}

.comment-card:hover {
    transform: translateX(5px);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.comment-author {
    color: var(--bs-info);
    font-weight: 500;
}

.comment-timestamp {
    color: var(--bs-gray-500);
}

.comment-content {
    color: var(--bs-gray-200);
    line-height: 1.5;
}

.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bs-dark);
    z-index: 9999;
    transform-origin: bottom;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.exit {
    transform: scaleY(0);
}

.story-grid {
    opacity: 1;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-grid.visible {
    opacity: 1;
}

.story-card {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.story-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.story-card {
    background: var(--bs-gray-900);
    border: 1px solid var(--bs-gray-800);
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.story-header {
    border-bottom: 1px solid var(--bs-gray-800);
    background: var(--bs-gray-800);
}

.story-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bs-gray-700);
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-name {
    font-weight: 500;
    color: var(--bs-gray-200);
}

.card-title {
    color: var(--bs-info);
    font-size: 1.5rem;
    transition: color 0.2s ease;
}

.card-title:hover {
    color: var(--bs-info-bg-subtle);
}

.formatted-content {
    color: var(--bs-bs-gray-200);
    line-height: 1.6;
    white-space: pre-line;
}

.read-more {
    color: var(--bs-info);
    text-decoration: none;
    font-weight: 500;
    margin-left: 0.5rem;
}

.content-warning {
    background: var(--bs-warning-bg-subtle);
    border: 1px solid var(--bs-warning);
    color: var(--bs-warning-text);
}

.engagement-section {
    padding-top: 1rem;
    border-top: 1px solid var(--bs-gray-800);
}

.reaction-btn {
    background: var(--bs-gray-800);
    border: 1px solid var(--bs-gray-700);
    color: var(--bs-gray-200);
    transition: all 0.2s ease;
}

.reaction-btn:hover {
    background: var(--bs-gray-700);
    transform: translateY(-2px);
}

.reaction-count {
    font-size: 0.9rem;
    margin-left: 0.25rem;
}

.modal-content {
    background: var(--bs-gray-900);
    border: 1px solid var(--bs-gray-800);
}

.modal-header {    border-bottom: 1px solid var(--bs-gray-800);
}

.modal-title {
    color: var(--bs-gray-200);
}
.modal-title {    color: var(--bs-gray-200);
}

.share-twitter:hover {
    background: #1DA1F2;
    border-color: #1DA1F2;
    color: white;
}

.share-facebook:hover {
    background: #4267B2;
    border-color: #4267B2;
    color: white;
}

/* Mood Indicator Styles */
.mood-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: var(--bs-gray-800);
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    border: 1px solid var(--bs-gray-700);
    position: relative;
    overflow: hidden;
}

/* Mood Emoji and Label */
.mood-indicator .mood-emoji {
    font-size: 1.2rem;
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.mood-indicator .mood-label {
    color: var(--bs-gray-200);
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* Hover Effects */
.mood-indicator:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.mood-indicator:hover .mood-emoji {
    transform: scale(1.2);
}

/* Mood-specific Gradients */
.mood-indicator[data-mood]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.2;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.mood-indicator:hover::before {
    opacity: 0.4;
}

/* Individual Mood Gradients */
.mood-indicator[data-mood="happy"]::before {
    background: linear-gradient(45deg, #FFD700, #FFA500);
}

.mood-indicator[data-mood="inspired"]::before {
    background: linear-gradient(45deg, #9B59B6, #8E44AD);
}

.mood-indicator[data-mood="thoughtful"]::before {
    background: linear-gradient(45deg, #3498DB, #2980B9);
}

.mood-indicator[data-mood="peaceful"]::before {
    background: linear-gradient(45deg, #2ECC71, #27AE60);
}

.mood-indicator[data-mood="excited"]::before {
    background: linear-gradient(45deg, #E74C3C, #C0392B);
}

.mood-indicator[data-mood="nostalgic"]::before {
    background: linear-gradient(45deg, #95A5A6, #7F8C8D);
}

.mood-indicator[data-mood="melancholic"]::before {
    background: linear-gradient(45deg, #34495E, #2C3E50);
}

/* Dark Theme Adjustments */
[data-bs-theme="dark"] .mood-indicator {
    background: var(--bs-gray-900);
    border-color: var(--bs-gray-800);
}

[data-bs-theme="dark"] .mood-indicator .mood-label {
    color: var(--bs-gray-200);
}

.mood-filter {
    background: var(--bs-gray-900);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--bs-gray-800);
}

.mood-buttons .btn {
    transition: all 0.3s ease;
    border-radius: 20px;
    padding: 0.5rem 1rem;
}

.mood-buttons .btn:hover {
    transform: translateY(-2px);
}

.loading-container {
    padding: 2rem;
    transition: opacity 0.3s ease;
}

.loading-pulse {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bs-info);
    margin: 0 auto;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-text {
    margin-top: 1rem;
    color: var(--bs-info);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

.loading-dots {
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0% { opacity: 0.2; }
    20% { opacity: 1; }
    100% { opacity: 0.2; }
}

.story-card {
    transform: translateY(0);
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-card.animate-in {
    transform: translateY(0);
    opacity: 1;
}

.story-grid {
    transition: opacity 0.5s ease;
}

/* Story Loading Animation Styles */
.story-skeleton {
    background: var(--bs-gray-800);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    position: relative;
}

.story-skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        var(--bs-gray-800) 0%,
        var(--bs-gray-700) 50%,
        var(--bs-gray-800) 100%
    );
    animation: shimmer 2s infinite linear;
    background-size: 200% 100%;
}

.story-skeleton-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.story-skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bs-gray-700);
    margin-right: 1rem;
}

.story-skeleton-info {
    flex: 1;
}

.story-skeleton-line {
    height: 12px;
    background: var(--bs-gray-700);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.story-skeleton-line.title {
    height: 24px;
    width: 80%;
    margin-bottom: 1rem;
}

.story-skeleton-line.short {
    width: 60%;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Story Card Animation */
.story-card {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.story-card.loaded {
    opacity: 1;
}

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

/* Loading State */
.loading-container {
    text-align: center;
    padding: 2rem;
}

.loading-pulse {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bs-info);
    margin: 0 auto;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

/* Advertisement Styles */
.ad-container {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 300px;
    max-width: 90vw;
    background: var(--bs-gray-900);
    border: 1px solid var(--bs-gray-700);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999 !important; /* Ensure it's above other elements */
    overflow: hidden;
    display: block !important; /* Force display */
    opacity: 1 !important; /* Force visibility */
    transform: none !important; /* Prevent transform animations */
}

.ad-media {
    width: 100%;
    position: relative;
    overflow: hidden;
    max-height: 200px;
}

.ad-video,
.ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-content {
    padding: 1rem;
}

.ad-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--bs-gray-200);
}

.ad-description {
    font-size: 0.9rem;
    color: var(--bs-gray-400);
    margin-bottom: 1rem;
}

.ad-action {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bs-info);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.ad-action:hover {
    background: var(--bs-info-bg-subtle);
    color: white;
    text-decoration: none;
}

/* About Page Styles */

/* Hero Section */
.hero-section {
    background: var(--bs-gray-900);
    border-radius: 1rem;
    padding: 3rem 1rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--bs-info) 0%, transparent 100%);
    opacity: 0.05;
    z-index: 1;
}

.hero-section * {
    position: relative;
    z-index: 2;
}

.feature-highlights {
    margin-top: 2rem;
}

.highlight-item {
    text-align: center;
    transition: transform 0.3s ease;
    padding: 1rem;
    border-radius: 0.5rem;
    background: var(--bs-gray-800);
    min-width: 120px;
}

.highlight-item:hover {
    transform: translateY(-5px);
}

/* Features Section */
.features-section {
    padding: 2rem 0;
}

.feature-card {
    background: var(--bs-gray-800);
    border-radius: 1rem;
    padding: 2rem;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--bs-gray-700);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--bs-info);
    margin-bottom: 1rem;
    display: block;
}

/* Timeline Section */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--bs-info);
    transform: translateX(-50%);
    opacity: 0.3;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    background: var(--bs-info);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--bs-dark);
    position: relative;
    z-index: 2;
    box-shadow: 0 0 0 8px var(--bs-gray-900);
}

.timeline-content {
    flex: 1;
    background: var(--bs-gray-800);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-left: 2rem;
    border: 1px solid var(--bs-gray-700);
}

.feature-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.feature-list li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--bs-info);
}

/* Benefits Section */
.benefit-card {
    background: var(--bs-gray-800);
    border-radius: 1rem;
    padding: 2rem;
    height: 100%;
    transition: transform 0.3s ease;
    border: 1px solid var(--bs-gray-700);
}

.benefit-card:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    font-size: 2rem;
    color: var(--bs-info);
    margin-bottom: 1rem;
    display: block;
}

/* CTA Section */
.cta-section {
    background: var(--bs-gray-900);
    border-radius: 1rem;
    padding: 3rem 1rem;
    position: relative;
    overflow: hidden;
}

.cta-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, var(--bs-info) 0%, transparent 100%);
    opacity: 0.05;
    z-index: 1;
}

.cta-section * {
    position: relative;
    z-index: 2;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-content {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
    }

    .timeline-icon {
        margin-left: 30px;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .feature-highlights {
        gap: 1rem !important;
    }

    .highlight-item {
        min-width: 100px;
    }
}

/* Dark Theme Specific Adjustments */
[data-bs-theme="dark"] .feature-card,
[data-bs-theme="dark"] .benefit-card,
[data-bs-theme="dark"] .timeline-content {
    background: var(--bs-gray-900);
    border-color: var(--bs-gray-800);
}

[data-bs-theme="dark"] .hero-section,
[data-bs-theme="dark"] .cta-section {
    background: var(--bs-gray-800);
}

/* Share button styles */
.share-buttons .dropdown-menu {
    background: var(--bs-gray-900);
    border: 1px solid var(--bs-gray-800);
}

.share-buttons .dropdown-item {
    color: var(--bs-gray-200);
    transition: all 0.2s ease;
}

.share-buttons .dropdown-item:hover {
    background: var(--bs-gray-800);
    color: var(--bs-white);
}

.share-buttons .bi {
    margin-right: 0.5rem;
}

/* Social media brand colors on hover */
.share-twitter:hover {
    color: #1DA1F2 !important;
}

.share-facebook:hover {
    color: #4267B2 !important;
}

.share-linkedin:hover {
    color: #0077b5 !important;
}

.share-whatsapp:hover {
    color: #25D366 !important;
}

.share-telegram:hover {
    color: #0088cc !important;
}

.share-tiktok:hover {
    color: #000000 !important;
    background: linear-gradient(90deg, #00f2ea, #ff0050) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.share-snapchat:hover {
    color: #FFFC00 !important;
}

/* Dropdown divider */
.dropdown-divider {
    border-top: 1px solid var(--bs-gray-700);
    margin: 0.5rem 0;
}

/* Copy toast notification */
.copy-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bs-success);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    z-index: 1000;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* Story Palette Styles */
.story-palette {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: var(--bs-gray-900);
    border: 1px solid var(--bs-gray-800);
    border-radius: 8px;
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.story-palette.collapsed {
    transform: translate(calc(100% - 48px), -50%);
}

.palette-toggle {
    position: absolute;
    left: -48px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bs-gray-900);
    border: 1px solid var(--bs-gray-800);
    border-radius: 8px 0 0 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.palette-toggle:hover {
    background: var(--bs-gray-800);
}

.palette-panel {
    width: 250px;
}

.palette-title {
    color: var(--bs-gray-200);
    margin-bottom: 1rem;
    text-align: center;
}

.theme-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.theme-btn {
    padding: 0.5rem;
    border: 1px solid var(--bs-gray-700);
    border-radius: 4px;
    background: var(--theme-color);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.color-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.color-input {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.color-input label {
    color: var(--bs-gray-200);
    margin-bottom: 0;
}

.form-control-color {
    width: 50px;
    padding: 0;
    border: none;
    background: none;
}

/* Theme Variables */
:root {
    --story-primary: #212529;
    --story-secondary: #495057;
    --story-accent: #0d6efd;
}

/* Theme Classes */
.theme-classic {
    --story-primary: #212529;
    --story-secondary: #495057;
    --story-accent: #0d6efd;
}

.theme-ocean {
    --story-primary: #1e3d59;
    --story-secondary: #2d5a87;
    --story-accent: #17c3b2;
}

.theme-forest {
    --story-primary: #2d5a27;
    --story-secondary: #4a7856;
    --story-accent: #8fc93a;
}

.theme-sunset {
    --story-primary: #ff6b6b;
    --story-secondary: #ff8787;
    --story-accent: #ffd93d;
}

.theme-moonlight {
    --story-primary: #4a4e69;
    --story-secondary: #9a8c98;
    --story-accent: #c9ada7;
}

/* Ad Container Styles */

/* Ad Media Styles */
.ad-media {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.ad-video {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
}

.ad-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
}

/* Ad Content Styles */
.ad-content {
    padding: 1rem;
}

.ad-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--bs-gray-200);
}

.ad-description {
    font-size: 0.875rem;
    color: var(--bs-gray-400);
    margin-bottom: 0.5rem;
}

/* Ad Action Button */
.ad-action {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    color: var(--bs-info);
    border: 1px solid var(--bs-info);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ad-action:hover {
    background-color: var(--bs-info);
    color: var(--bs-gray-900);
}

.translation-container {
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--bs-info);
    background-color: rgba(var(--bs-info-rgb), 0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.translated-title {
    color: var(--bs-info);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.translated-content {
    color: var(--bs-gray-200);
    line-height: 1.6;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

/* Translation Button Styles */
.btn-outline-info {
    border-color: var(--bs-info);
    color: var(--bs-info);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-outline-info:hover {
    background-color: var(--bs-info);
    color: var(--bs-gray-900);
}

.btn-outline-info i {
    font-size: 1.1rem;
}

/* Translation Dropdown Menu */
.dropdown-menu {
    background: var(--bs-gray-800);
    border: 1px solid var(--bs-gray-700);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.dropdown-item {
    color: var(--bs-gray-200);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: var(--bs-gray-700);
    color: var(--bs-info);
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1.5rem;
    height: 1.5rem;
    border-width: 0.2em;
}

/* Close Button */
.translation-container .btn-close {
    background-color: transparent;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.translation-container .btn-close:hover {
    opacity: 1;
}

/* Translation Styles */
#translationResult {
    background-color: rgba(var(--bs-info-rgb), 0.1);
    border: 1px solid var(--bs-info);
    color: var(--bs-gray-200);
}

#translationResult .btn-close {
    filter: invert(1);
    opacity: 0.7;
}

#translationResult .btn-close:hover {
    opacity: 1;
}

#translatedTitle {
    color: var(--bs-info);
    font-size: 1.25rem;
}

#translatedContent {
    white-space: pre-wrap;
    line-height: 1.6;
}

.translate-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bs-gray-200);
    transition: all 0.2s ease;
}

.translate-btn:hover {
    background-color: var(--bs-gray-700);
    color: var(--bs-info);
}

.spinner-border-sm {
    margin-right: 0.5rem;
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Ad Container Styles */

/* Ad Media Styles */

/* Ad Content Styles */


/* About Page Styles */

/* Copy URL Toast Styles */
.share-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    z-index: 1000;
    animation: fadeInOut 2s ease;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.share-toast.success {
    background: var(--bs-success);
    color: white;
}

.share-toast.error {
    background: var(--bs-danger);
    color: white;
}

/* Share Visualization Styles */
.share-viz-icon {
    width: 48px;
    height: 48px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    font-size: 1.5rem;
    z-index: 1000;
    cursor: pointer;
}

.share-viz-icon.facebook {
    color: #1877F2;
}

.share-viz-icon.twitter {
    color: #1DA1F2;
}

.share-viz-icon.linkedin {
    color: #0A66C2;
}

.share-viz-icon.whatsapp {
    color: #25D366;
}

.share-viz-icon.telegram {
    color: #0088cc;
}

.share-preview-media {
    position: absolute;
    width: 24px;
    height: 24px;
    bottom: -5px;
    right: -5px;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Share button pulse animation */
.share-pulse {
    animation: pulse 1s cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* Quick Share Button Styles */
.quick-share {
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quick-share i {
    font-size: 1.1rem;
}

/* About Page - Platform Status Section Styles */
.platform-status .status-container {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

.platform-status .status-item {
    padding: 1rem;
    border-radius: 6px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    height: 100%;
    transition: transform 0.2s ease;
}

.platform-status .status-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.platform-status .status-item h4 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.platform-status .status-item p {
    margin-bottom: 0;
    color: #555;
    font-size: 0.95rem;
}

/* Dark theme adjustments for platform status */
[data-bs-theme="dark"] .platform-status .status-container {
    background-color: var(--bs-gray-800) !important;
    border-color: var(--bs-gray-700);
}

[data-bs-theme="dark"] .platform-status .status-item {
    background-color: var(--bs-gray-900);
}

[data-bs-theme="dark"] .platform-status .status-item p {
    color: var(--bs-gray-400);
}
/* Social media icons in footer */
.social-icons {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--bs-light);
    background-color: var(--bs-gray-700);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    color: #ffffff;
}

.social-icon .bi-facebook:hover,
.social-icon.bi-facebook:hover {
    background-color: #3b5998;
}

.social-icon .bi-twitter:hover,
.social-icon.bi-twitter:hover {
    background-color: #1da1f2;
}

.social-icon .bi-instagram:hover,
.social-icon.bi-instagram:hover {
    background-color: #c13584;
}

.social-icon .bi-youtube:hover,
.social-icon.bi-youtube:hover {
    background-color: #ff0000;
}

.social-icon .bi-linkedin:hover,
.social-icon.bi-linkedin:hover {
    background-color: #0077b5;
}

.social-icon .bi-github:hover,
.social-icon.bi-github:hover {
    background-color: #6e5494;
}

.social-icon .bi-discord:hover,
.social-icon.bi-discord:hover {
    background-color: #7289da;
}



/* === modern-story-cards.css === */
/* Modern Story Cards CSS */

/* Wide Layout Overrides */
.container-fluid {
    max-width: 98% !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

@media (min-width: 1400px) {
    .container-fluid {
        max-width: 95% !important;
    }
}

/* Reduce grid gaps */
.row {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
}

/* Modern Story Card Container */
.modern-story-card {
    background: linear-gradient(145deg, rgba(31, 41, 55, 0.95), rgba(17, 24, 39, 0.95));
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(75, 85, 99, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    opacity: 1 !important;
    visibility: visible !important;
}

.card-body {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Enhanced Animated Hover Effects */
.modern-story-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(59, 130, 246, 0.3),
        0 0 80px rgba(147, 51, 234, 0.1);
    border-color: rgba(59, 130, 246, 0.7);
    z-index: 10;
}

.modern-story-card:hover .story-media-content {
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.1);
}

.modern-story-card:hover .story-title {
    color: rgba(147, 197, 253, 1);
    text-shadow: 0 0 10px rgba(147, 197, 253, 0.5);
}

.modern-story-card:hover .gradient-background {
    animation: gradientShift 2s ease-in-out infinite;
}

@keyframes gradientShift {
    0% { filter: hue-rotate(0deg) brightness(1); }
    50% { filter: hue-rotate(15deg) brightness(1.2); }
    100% { filter: hue-rotate(0deg) brightness(1); }
}

/* Share Button Styling */
.share-story-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(147, 51, 234, 0.8)) !important;
    border: 1px solid rgba(59, 130, 246, 0.5) !important;
    transition: all 0.3s ease;
}

.share-story-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 1), rgba(147, 51, 234, 1)) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.share-story-btn .reaction-emoji i {
    font-size: 1rem;
    color: white;
}

.share-story-btn .reaction-count {
    color: white;
    font-weight: 500;
}

/* Story Link */
.story-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Story Excerpt Section */
.story-excerpt {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.4), rgba(17, 24, 39, 0.4));
}

.story-excerpt .story-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgb(243, 244, 246);
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-metadata-top {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
    color: rgb(147, 197, 253);
    padding: 0.4rem 0.8rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(5px);
}

.category-badge i {
    font-size: 0.9rem;
}

.mood-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(75, 85, 99, 0.4);
    border: 2px solid rgba(156, 163, 175, 0.3);
    margin-left: auto;
}

.mood-emoji {
    font-size: 1.2rem;
}

/* Remove old story title styles - now handled in .story-excerpt .story-title */

/* Modern Media Wrapper */
.media-wrapper {
    position: relative;
    width: 100%;
}

.story-media {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-media-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Content Warning Styles */
.content-warning-overlay {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 20;
}

.warning-badge {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(185, 28, 28, 0.9));
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border: 1px solid rgba(239, 68, 68, 0.3);
    backdrop-filter: blur(5px);
    cursor: help;
    transition: all 0.3s ease;
}

.warning-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.warning-badge.warning-low {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(217, 119, 6, 0.9));
    border-color: rgba(245, 158, 11, 0.3);
}

.warning-badge.warning-medium {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.9), rgba(234, 88, 12, 0.9));
    border-color: rgba(249, 115, 22, 0.3);
}

.warning-badge.warning-high {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(185, 28, 28, 0.9));
    border-color: rgba(239, 68, 68, 0.3);
}

.warning-badge.warning-critical {
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.95), rgba(127, 29, 29, 0.95));
    border-color: rgba(185, 28, 28, 0.5);
    animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
    0% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.7); }
    70% { box-shadow: 0 0 0 5px rgba(185, 28, 28, 0); }
    100% { box-shadow: 0 0 0 0 rgba(185, 28, 28, 0); }
}

/* Blur effect for sensitive content */
.content-blur {
    filter: blur(10px);
    transition: filter 0.3s ease;
}

.modern-story-card:hover .content-blur {
    filter: blur(0px);
}

.story-media {
    position: relative;
    width: 100%;
    height: 100%;
}

.story-media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.story-media:hover .story-media-img {
    transform: scale(1.1);
}

.story-media-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.video-overlay:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-icon {
    font-size: 2rem;
    color: white;
}

/* Media Placeholder */
.story-media-placeholder {
    width: 100%;
    height: 100%;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gradient-background {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.4), 
        rgba(147, 51, 234, 0.4),
        rgba(236, 72, 153, 0.4),
        rgba(245, 158, 11, 0.4)
    );
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
}

.gradient-background[data-category="achievement"] {
    background: linear-gradient(135deg, 
        rgba(34, 197, 94, 0.4), 
        rgba(59, 130, 246, 0.4)
    );
}

.gradient-background[data-category="challenge"] {
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.4), 
        rgba(245, 158, 11, 0.4)
    );
}

.gradient-background[data-category="reflection"] {
    background: linear-gradient(135deg, 
        rgba(147, 51, 234, 0.4), 
        rgba(168, 85, 247, 0.4)
    );
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.placeholder-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.6);
    opacity: 0.8;
}

/* Auto-Generated Image Styles */
.auto-image-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

.generating-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    animation: pulse 2s infinite;
}

.generating-text {
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.generated-story-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Auto-Generated Visual Styles */
.auto-generated-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 140px;
    width: 100%;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.content-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.content-theme {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    opacity: 0.9;
}

/* Story Media Placeholder */
.story-media-placeholder {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.generated-image-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Story Reactions */
.story-reactions {
    padding: 0.5rem 1rem 0.75rem;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.6), rgba(31, 41, 55, 0.6));
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.reaction-btn {
    background: rgba(75, 85, 99, 0.4);
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-radius: 20px;
    padding: 0.3rem 0.6rem;
    color: rgb(209, 213, 219);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.reaction-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.reaction-emoji {
    font-size: 0.9rem;
}

.reaction-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(156, 163, 175);
}

.story-summary {
    color: rgb(209, 213, 219);
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
    text-align: left;
}

/* Story Stats */
.story-stats {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(75, 85, 99, 0.3);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgb(156, 163, 175);
    font-size: 0.85rem;
    font-weight: 500;
}

.stat-item i {
    font-size: 1rem;
    color: rgb(59, 130, 246);
}

/* Interactive Footer */
.story-card-footer {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.6), rgba(31, 41, 55, 0.6));
    border-top: 1px solid rgba(75, 85, 99, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reaction-bar {
    display: flex;
    gap: 0.5rem;
}

.modern-reaction-btn {
    background: rgba(75, 85, 99, 0.4);
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    color: rgb(209, 213, 219);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modern-reaction-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.reaction-emoji {
    font-size: 1rem;
}

.reaction-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(156, 163, 175);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: rgba(75, 85, 99, 0.4);
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(156, 163, 175);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.action-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    color: rgb(147, 197, 253);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-story-card {
        border-radius: 16px;
    }
    
    .story-card-header {
        padding: 1.2rem 1.2rem 0.8rem;
    }
    
    .story-title {
        font-size: 1.2rem;
    }
    
    .story-content-preview {
        padding: 1.2rem;
    }
    
    .story-media-container {
        min-height: 180px;
    }
    
    .story-stats {
        gap: 1rem;
    }
    
    .reaction-bar {
        gap: 0.3rem;
    }
    
    .modern-reaction-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Loading Animation */
.modern-story-card.loading {
    animation: cardPulse 1.5s ease-in-out infinite;
}

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

/* Cards are always visible — no entry animation that starts at opacity:0 */

/* Share Modal Styles */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.share-modal {
    background: linear-gradient(145deg, rgba(31, 41, 55, 0.95), rgba(17, 24, 39, 0.95));
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    border: 1px solid rgba(75, 85, 99, 0.3);
    backdrop-filter: blur(10px);
    animation: slideUp 0.3s ease;
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.share-modal-header h4 {
    color: rgb(243, 244, 246);
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: rgb(156, 163, 175);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(75, 85, 99, 0.4);
    color: white;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: rgba(75, 85, 99, 0.4);
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-radius: 15px;
    padding: 1.5rem 1rem;
    color: rgb(209, 213, 219);
    transition: all 0.3s ease;
    cursor: pointer;
}

.share-option:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

.share-option i {
    font-size: 1.5rem;
}

/* Toast Message */
.toast-message {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(22, 163, 74, 0.9));
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 10001;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.toast-message.show {
    transform: translateX(0);
}

/* Bookmarked State */
.action-btn.bookmarked {
    background: rgba(245, 158, 11, 0.3) !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
    color: rgb(251, 191, 36) !important;
}

/* Active/Reacted State - for one reaction per story */
.reaction-btn.active,
.reaction-btn.reacted,
.modern-reaction-btn.active,
.modern-reaction-btn.reacted {
    background: rgba(59, 130, 246, 0.5) !important;
    border-color: rgba(59, 130, 246, 0.8) !important;
    color: rgb(147, 197, 253) !important;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.reaction-btn.active .reaction-count,
.reaction-btn.reacted .reaction-count,
.modern-reaction-btn.active .reaction-count,
.modern-reaction-btn.reacted .reaction-count {
    color: rgb(147, 197, 253) !important;
    font-weight: 700;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Light Theme Overrides */
[data-bs-theme="light"] .modern-story-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    border-color: rgba(203, 213, 225, 0.4);
}

[data-bs-theme="light"] .story-card-header {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.6), rgba(241, 245, 249, 0.6));
}

[data-bs-theme="light"] .story-title {
    color: rgb(31, 41, 55);
}

[data-bs-theme="light"] .story-excerpt {
    color: rgb(75, 85, 99);
}

[data-bs-theme="light"] .story-content-preview {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.6), rgba(255, 255, 255, 0.6));
}

[data-bs-theme="light"] .story-card-footer {
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.8), rgba(248, 250, 252, 0.8));
}

[data-bs-theme="light"] .modern-reaction-btn,
[data-bs-theme="light"] .action-btn {
    background: rgba(241, 245, 249, 0.6);
    border-color: rgba(203, 213, 225, 0.4);
    color: rgb(75, 85, 99);
}

[data-bs-theme="light"] .share-modal {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
    border-color: rgba(203, 213, 225, 0.4);
}

[data-bs-theme="light"] .share-modal-header h4 {
    color: rgb(31, 41, 55);
}

[data-bs-theme="light"] .share-option {
    background: rgba(241, 245, 249, 0.6);
    border-color: rgba(203, 213, 225, 0.4);
    color: rgb(75, 85, 99);
}

/* Enhanced Pagination Styles */
.pagination-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pagination-info p {
    margin: 0;
    font-size: 1.1rem;
    color: #e0e0e0;
}

.pagination-lg .page-link {
    padding: 12px 18px;
    font-size: 1.1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    margin: 0 2px;
    border-radius: 8px;
}

.pagination-lg .page-link:hover {
    background-color: rgba(108, 117, 125, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.pagination-lg .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    transform: scale(1.05);
}

.pagination-lg .page-item.disabled .page-link {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-lg {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination-lg .page-link {
        padding: 8px 12px;
        font-size: 0.9rem;
        margin: 1px;
    }
    
    .pagination-info {
        padding: 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .pagination-lg .page-link {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .pagination-info p {
        font-size: 0.9rem;
    }
}

/* === enhanced-story-cards.css === */
.enhanced-card {
    background: #212529;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.enhanced-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2, #667eea);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.enhanced-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(102, 126, 234, 0.2);
}

.enhanced-card:hover::before {
    opacity: 1;
}

.enhanced-card .card-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.85rem 1.15rem;
}

.enhanced-card .card-body {
    padding: 1.15rem;
    background: transparent;
}

.enhanced-card .card-title {
    color: #e9ecef;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.75rem;
    transition: color 0.2s ease;
}

.enhanced-card:hover .card-title {
    color: #fff;
}

.enhanced-card .card-text {
    color: rgba(233, 236, 239, 0.7);
    line-height: 1.65;
}

.enhanced-card .card-footer {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.75rem 1.15rem;
}

.enhanced-card .card-img-container {
    position: relative;
    overflow: hidden;
    background: #1a1d21;
}

.enhanced-card .card-img-container img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.enhanced-card:hover .card-img-container img {
    transform: scale(1.05);
}

.enhanced-card .card-img-container .img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(26, 29, 33, 0.8));
    pointer-events: none;
}

.story-card-enhanced {
    opacity: 1;
    transform: translateY(0);
}

.story-card-enhanced.scroll-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.story-card-enhanced.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

.story-card-enhanced:nth-child(2n) .scroll-animate {
    transition-delay: 0.1s;
}

.enhanced-card .story-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: rgba(233, 236, 239, 0.5);
}

.enhanced-card .story-meta i {
    font-size: 0.9rem;
}

.enhanced-card .story-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    background: rgba(102, 126, 234, 0.12);
    color: #667eea;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.enhanced-card .story-category-tag:hover {
    background: rgba(102, 126, 234, 0.2);
}

.enhanced-card .reaction-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.enhanced-card .reaction-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: rgba(233, 236, 239, 0.5);
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
}

.enhanced-card .reaction-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

@media (max-width: 768px) {
    .enhanced-card .card-img-container img {
        height: 160px;
    }

    .enhanced-card .card-body {
        padding: 1rem;
    }
}


/* === story_visualization.css === */
/**
 * SpeakOX Story Visualization CSS
 * Styling for interactive story network visualizations
 */

/* Container styling */
.story-visualization-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
    height: 400px;
}

/* Loading indicator styling */
.story-visualization-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 10;
}

/* Node hover tooltip */
.story-visualization-tooltip {
    position: absolute;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    max-width: 250px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.story-visualization-tooltip.active {
    opacity: 1;
}

.story-visualization-tooltip h5 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: bold;
}

.story-visualization-tooltip .tooltip-category {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
    margin: 2px 0;
}

.story-visualization-tooltip .tooltip-reactions {
    margin-top: 5px;
    display: flex;
    gap: 5px;
}

.story-visualization-tooltip .tooltip-reaction {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.8rem;
}

/* Visualization legend */
.story-visualization-legend {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    padding: 8px;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .story-visualization-container {
        height: 300px;
    }
    
    .story-visualization-legend {
        display: none;
    }
}

/* Animation effects */
.pulse-node {
    animation: pulse-animation 1.5s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* === social_share.css === */
/* SpeakOX Social Sharing Styles */

/* Toast container */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

/* Toast notification */
.toast {
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    opacity: 1;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    max-width: 300px;
    text-align: center;
}

/* Toast colors */
.toast-success {
    background-color: var(--bs-success, #198754);
}

.toast-error {
    background-color: var(--bs-danger, #dc3545);
}

.toast-warning {
    background-color: var(--bs-warning, #ffc107);
    color: #212529;
}

.toast-info {
    background-color: var(--bs-info, #0dcaf0);
}

/* Toast animation */
.toast.fade-out {
    opacity: 0;
    transform: translateY(-20px);
}

/* Enhanced Sharing Buttons */
.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    gap: 8px;
    background-color: var(--bs-gray-800, #343a40);
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.share-button i {
    font-size: 18px;
}

/* Platform-specific colors */
.share-button-twitter {
    background-color: #1DA1F2;
}

.share-button-facebook {
    background-color: #4267B2;
}

.share-button-linkedin {
    background-color: #0077b5;
}

.share-button-whatsapp {
    background-color: #25D366;
}

.share-button-telegram {
    background-color: #0088cc;
}

.share-button-copy {
    background-color: var(--bs-gray-700, #495057);
}

/* Story Block Preview */
.story-block-preview {
    border: 1px solid var(--bs-gray-700, #495057);
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    background-color: var(--bs-gray-900, #212529);
}

.story-block-header {
    padding: 15px;
    border-bottom: 1px solid var(--bs-gray-800, #343a40);
}

.story-block-content {
    padding: 15px;
}

.story-block-footer {
    padding: 15px;
    border-top: 1px solid var(--bs-gray-800, #343a40);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.story-block-title {
    margin: 0 0 10px 0;
    color: var(--bs-light, #f8f9fa);
    font-weight: 600;
}

.story-block-excerpt {
    color: var(--bs-gray-300, #dee2e6);
    margin-bottom: 10px;
}

.story-block-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--bs-gray-500, #adb5bd);
}

.story-block-actions {
    display: flex;
    gap: 10px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .share-buttons {
        justify-content: center;
    }
    
    .story-block-actions {
        flex-direction: column;
    }
    
    .story-block-meta {
        flex-direction: column;
        gap: 5px;
    }
}

/* === dynamic-animations.css === */
/* Dynamic Story Card Animations & Interactive Effects */

/* Story Card Hover Effects Only */
.story-card, .modern-story-card {
    position: relative;
    overflow: hidden;
}

/* No animations on page load - only on hover */
.story-card:hover, .modern-story-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.2);
    transition: all 0.2s ease;
}

/* Reaction Button Dynamic Effects */
.reaction-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.reaction-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.reaction-btn:active {
    transform: scale(0.95);
}

.reaction-btn.active, .reaction-btn.reacted {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    100% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
}

/* Reaction Count Animation */
.reaction-count {
    transition: all 0.3s ease;
    display: inline-block;
}

.reaction-count.updating {
    animation: countUp 0.6s ease-out;
}

@keyframes countUp {
    0% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.4) translateY(-5px); color: #ffc107; }
    100% { transform: scale(1) translateY(0); }
}

/* Story Content Reveal Animation */
.story-excerpt {
    overflow: hidden;
    position: relative;
}

.story-card:hover .story-excerpt::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #6610f2, #e83e8c);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Interactive Elements */
.story-media img, .story-media video {
    transition: all 0.3s ease;
}

.story-card:hover .story-media img,
.story-card:hover .story-media video {
    transform: scale(1.05);
    filter: brightness(1.1) saturate(1.2);
}

/* Engagement Analytics Overlay */
.engagement-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.story-card:hover .engagement-overlay {
    opacity: 1;
}

/* Reaction Trail Effect */
@keyframes reactionTrail {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px) scale(1.5);
    }
}

.reaction-trail {
    position: absolute;
    pointer-events: none;
    font-size: 1.5rem;
    animation: reactionTrail 1s ease-out forwards;
    z-index: 1000;
}

/* Community Engagement Indicators */
.engagement-indicator {
    position: absolute;
    bottom: 5px;
    left: 5px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.story-card:hover .engagement-indicator {
    opacity: 1;
}

.engagement-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.engagement-high { background: #28a745; }
.engagement-medium { background: #ffc107; }
.engagement-low { background: #6c757d; }

/* Trending Story Effects */
.story-card.trending {
    border: 2px solid #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.story-card.trending::before {
    content: "🔥 TRENDING";
    position: absolute;
    top: -10px;
    left: 10px;
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    color: white;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 10px;
    z-index: 10;
}

/* Interactive Story Timeline */
.story-timeline {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.timeline-progress {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #28a745);
    width: 0%;
    transition: width 0.3s ease;
}

.story-card:hover .timeline-progress {
    animation: progressFill 3s ease-in-out infinite;
}

@keyframes progressFill {
    0% { width: 0%; }
    50% { width: 100%; }
    100% { width: 0%; }
}

/* Responsive Animations */
@media (prefers-reduced-motion: reduce) {
    .story-card:hover,
    .reaction-btn:hover,
    .reaction-btn.active,
    .reaction-count.updating {
        animation: none;
        transition: none;
    }
}

/* Performance Optimizations */
.story-card,
.reaction-btn,
.reaction-count {
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* === animations.css === */
/* Story animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Loading placeholder animation */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.story-card {
  animation: slideUp 0.5s ease-out forwards;
  opacity: 0;
}

.story-loading {
  background: linear-gradient(
    90deg,
    var(--bs-dark) 0%,
    var(--bs-gray-800) 50%,
    var(--bs-dark) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.story-content-wrapper {
  animation: fadeIn 0.7s ease-out forwards;
}

/* Apply animation delay to story cards */
.story-card:nth-child(1) { animation-delay: 0.1s; }
.story-card:nth-child(2) { animation-delay: 0.2s; }
.story-card:nth-child(3) { animation-delay: 0.3s; }
.story-card:nth-child(4) { animation-delay: 0.4s; }
.story-card:nth-child(5) { animation-delay: 0.5s; }

/* Loading placeholder styles */
.loading-placeholder {
  height: 300px;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.loading-title {
  height: 2rem;
  width: 70%;
  margin-bottom: 1rem;
}

.loading-content {
  height: 100px;
  margin-bottom: 1rem;
}

.loading-footer {
  height: 1.5rem;
  width: 40%;
}

/* Skeleton loading animations */
.story-skeleton {
  padding: 1.5rem;
  background: var(--bs-dark);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.story-skeleton-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.story-skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bs-gray-700);
  margin-right: 1rem;
  animation: shimmer 1.5s infinite;
}

.story-skeleton-info {
  flex: 1;
}

.story-skeleton-line {
  height: 0.8rem;
  background: var(--bs-gray-700);
  margin-bottom: 0.8rem;
  border-radius: 0.25rem;
  animation: shimmer 1.5s infinite;
}

.story-skeleton-line.short {
  width: 60%;
}

.story-skeleton-line.title {
  height: 1.2rem;
  margin-bottom: 1.2rem;
}

/* Loading container styles */
.loading-container {
  padding: 2rem;
  text-align: center;
}

.loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 0.25rem solid var(--bs-gray-700);
  border-top-color: var(--bs-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* === micro-animations.css === */
/* Micro-Animations for Data State Changes */

/* Counter Animation */
@keyframes countUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes progressFill {
    from {
        width: 0%;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Data State Classes */
.data-animate {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.data-count {
    display: inline-block;
    transition: all 0.4s ease-out;
}

.data-count.updating {
    animation: countUp 0.6s ease-out;
    color: #28a745;
    font-weight: bold;
}

.data-count.new-value {
    animation: pulse 0.5s ease-in-out;
}

/* Status Badge Animations */
.status-badge {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.status-badge.updating::before {
    content: '';
    position: absolute;
    top: 0;
    left: -200px;
    width: 200px;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

/* Progress Bar Animations */
.progress-bar {
    transition: width 0.8s ease-out;
}

.progress-bar.animating {
    animation: progressFill 0.8s ease-out;
}

/* Log Entry Animations */
.log-entry {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInFromRight 0.4s ease-out forwards;
}

.log-entry:nth-child(2) {
    animation-delay: 0.1s;
}

.log-entry:nth-child(3) {
    animation-delay: 0.2s;
}

.log-entry:nth-child(4) {
    animation-delay: 0.3s;
}

.log-entry:nth-child(5) {
    animation-delay: 0.4s;
}

.log-entry.new {
    animation: fadeInScale 0.5s ease-out;
    border-left: 4px solid #28a745;
    background: linear-gradient(90deg, rgba(40, 167, 69, 0.1), transparent);
}

/* Card Update Animations */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card.updating {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card .card-body {
    position: relative;
}

.stat-card.loading .card-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0.8),
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
    pointer-events: none;
}

/* Button State Animations */
.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animated.loading {
    color: transparent;
}

.btn-animated.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Success State Animations */
.success-flash {
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        background-color: inherit;
    }
    50% {
        background-color: rgba(40, 167, 69, 0.2);
    }
    100% {
        background-color: inherit;
    }
}

/* Error State Animations */
.error-flash {
    animation: errorShake 0.5s ease-out;
}

@keyframes errorShake {
    0%, 20%, 40%, 60%, 80% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
}

/* Number Counter Animation */
.counter {
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

.counter.incrementing {
    color: #28a745;
    animation: countUp 0.5s ease-out;
}

/* Smooth Transitions for All Elements */
.smooth-transition * {
    transition: all 0.2s ease;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Real-time Data Updates */
.live-data {
    position: relative;
}

.live-data.has-update::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Micro-interaction Hover Effects */
.hover-lift {
    transition: transform 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* Responsive Animations */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === mobile-nav.css === */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(26, 29, 33, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.4rem 0 calc(0.4rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.mobile-bottom-nav .nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    text-align: center;
}

.mobile-bottom-nav .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.35rem 0.25rem;
    color: rgba(233, 236, 239, 0.5);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    border-radius: 8px;
    position: relative;
}

.mobile-bottom-nav .nav-link i {
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.mobile-bottom-nav .nav-link .nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.mobile-bottom-nav .nav-link:hover,
.mobile-bottom-nav .nav-link:focus {
    color: #e9ecef;
}

.mobile-bottom-nav .nav-link.active {
    color: #667eea;
}

.mobile-bottom-nav .nav-link.active i {
    transform: scale(1.1);
}

.mobile-bottom-nav .nav-link.active::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #667eea;
    border-radius: 0 0 3px 3px;
}

.mobile-bottom-nav .nav-link .badge {
    position: absolute;
    top: 0;
    right: 50%;
    transform: translateX(calc(50% + 10px));
    font-size: 0.6rem;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #dc3545;
    color: #fff;
}

.mobile-nav-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    margin: -10px auto 0;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-nav-cta:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.5);
}

.mobile-nav-cta i {
    font-size: 1.3rem !important;
}

@media (max-width: 991px) {
    .mobile-bottom-nav {
        display: block;
    }

    body {
        padding-bottom: 70px;
    }

    .luna-fab {
        bottom: 80px;
    }

    .ad-anchor-bottom {
        bottom: 60px;
    }
}

@media (min-width: 992px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}


/* === ads.css === */
.ad-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    margin: 1.5rem 0;
    min-height: 90px;
    position: relative;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.ad-container:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

.ad-container-label {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.35);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.ad-slot {
    display: block;
    width: 100%;
    overflow: hidden;
    text-align: center;
}

.ad-slot-leaderboard {
    max-width: 728px;
    min-height: 90px;
    margin: 1.5rem auto;
}

.ad-slot-banner {
    max-width: 468px;
    min-height: 60px;
    margin: 1rem auto;
}

.ad-slot-rectangle {
    max-width: 336px;
    min-height: 280px;
    margin: 1.5rem auto;
}

.ad-slot-skyscraper {
    max-width: 160px;
    min-height: 600px;
}

.ad-slot-sidebar {
    position: sticky;
    top: 80px;
    max-width: 300px;
    margin-bottom: 2rem;
}

.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.85rem;
    min-height: 90px;
}

.ad-infeed {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.ad-infeed + .story-card,
.story-card + .ad-infeed {
    margin-top: 1.5rem;
}

.ad-anchor-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(26, 29, 33, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem;
    text-align: center;
    min-height: 50px;
}

.ad-anchor-bottom .ad-close-btn {
    position: absolute;
    top: -12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #212529;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e9ecef;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}

.ad-spacer {
    margin: 2rem 0;
}

.ad-spacer-sm {
    margin: 1rem 0;
}

.ad-spacer-lg {
    margin: 3rem 0;
}

@media (max-width: 768px) {
    .ad-container {
        padding: 0.75rem;
        margin: 1rem 0;
        border-radius: 8px;
    }

    .ad-slot-leaderboard {
        max-width: 100%;
        min-height: 50px;
    }

    .ad-slot-sidebar,
    .ad-slot-skyscraper {
        display: none;
    }

    .ad-slot-rectangle {
        max-width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    .ad-slot-sidebar {
        display: none;
    }
}


/* === adsense-styling.css === */
/* Google AdSense Styling for Dark Theme */
/* Google Auto Ads enabled - Google decides ad placement */

/* Ad Container Base Styling */
.adsense-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    margin: 1.5rem 0;
    /* No min-height — JS controls visibility. Prevents ghost blank blocks. */
    display: block;
    transition: all 0.3s ease;
    position: relative;
}

/* Collapse container entirely when its only child ins slot has no ad */
.adsense-container:empty,
.adsense-container:has(ins.adsbygoogle[data-ad-status="unfilled"]),
.adsense-container:has(ins.adsbygoogle:not([data-ad-status])) {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

.adsense-container:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Ad Label */
.ad-label {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* In-Feed Ad Styling */
.adsense-infeed {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
}

/* Sidebar Ad Styling (Desktop) */
.adsense-sidebar {
    position: sticky;
    top: 80px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    margin-bottom: 2rem;
}

/* Banner Ad Styling */
.adsense-banner {
    width: 100%;
    max-width: 100%;
    margin: 2rem auto;
    text-align: center;
}

/* In-Article Ad Styling */
.adsense-article {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid rgba(13, 110, 253, 0.3);
    border-radius: 8px;
}


/* AdSense iframe styling */
.adsense-container ins {
    background: transparent;
}

.adsense-container iframe {
    max-width: 100%;
}

/* Loading State */
.adsense-container.loading::before {
    content: "";
    display: block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(13, 110, 253, 0.6);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Ad Containers */
@media (max-width: 768px) {
    .adsense-container {
        padding: 0.75rem;
        margin: 1rem 0;
    }
    
    .adsense-sidebar {
        display: none;
    }
    
    .adsense-banner {
        margin: 1rem auto;
    }
}

/* Overlay/Anchor Ad Customization */
.adsbygoogle[data-ad-format="auto"][data-full-width-responsive="true"] {
    display: block;
}

/* Ensure ads blend with dark theme */
.adsbygoogle {
    background: transparent !important;
}

/* Hide unfilled ad slots — prevents white blocks when no ad is served */
ins.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

/* Collapse the wrapper div around an unfilled slot */
ins.adsbygoogle[data-ad-status="unfilled"] ~ *,
:has(> ins.adsbygoogle[data-ad-status="unfilled"]) {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    border: none !important;
}

/* Ad Spacing in Story Grid */
.col-12.my-3 .adsense-container {
    width: 100%;
}

/* Story Page Ad Styling */
.story-content + .adsense-container,
.adsense-container + .story-content {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Match Story Card Styling */
.adsense-infeed,
.adsense-article {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.adsense-infeed:hover,
.adsense-article:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* Ad Container Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Placeholder - hidden until ad loads */
.adsense-placeholder {
    display: none;
}



/* === grammar_correction.css === */
/* 
 * Grammar correction overlay styles
 * Provides styling for the real-time grammar and spelling correction feature
 */

/* Container for the grammar check component */
.grammar-check-container {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Style for textarea with grammar checking */
textarea.grammar-check {
    width: 100%;
    min-height: 150px;
    padding: 0.75rem;
    border: 1px solid var(--bs-gray-600);
    border-radius: 4px;
    background-color: var(--bs-gray-900);
    color: var(--bs-light);
    font-family: system-ui, -apple-system, sans-serif;
    resize: vertical;
    transition: border-color 0.2s ease-in-out;
}

textarea.grammar-check:focus {
    outline: none;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Status indicator for grammar checking */
.grammar-status-indicator {
    position: absolute;
    top: -24px;
    right: 0;
    padding: 4px 10px;
    font-size: 0.85rem;
    background-color: var(--bs-gray-800);
    border: 1px solid var(--bs-gray-700);
    border-radius: 15px;
    color: var(--bs-light);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}

.grammar-status-indicator:hover {
    background-color: var(--bs-gray-700);
}

.grammar-status-indicator i {
    font-size: 1rem;
}

/* Status indicator states */
.grammar-status-indicator.has-errors {
    color: var(--bs-danger);
    border-color: var(--bs-danger);
}

.grammar-status-indicator.has-suggestions {
    color: var(--bs-warning);
    border-color: var(--bs-warning);
}

.grammar-status-indicator.is-good {
    color: var(--bs-success);
    border-color: var(--bs-success);
}

/* Suggestions panel */
.grammar-suggestions-panel {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: 100%;
    max-width: 400px;
    max-height: 400px;
    overflow-y: auto;
    background-color: var(--bs-gray-800);
    border: 1px solid var(--bs-gray-700);
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 12px;
    z-index: 1000;
}

/* Sections within the suggestions panel */
.grammar-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--bs-gray-700);
}

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

.grammar-section h5 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1rem;
    color: var(--bs-light);
}

.grammar-section h6 {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--bs-gray-200);
}

.grammar-stats {
    font-size: 0.85rem;
    color: var(--bs-gray-400);
}

/* Suggestion categories */
.suggestion-category {
    margin-top: 10px;
}

.suggestion-category ul {
    margin: 0;
    padding: 0 0 0 20px;
    font-size: 0.9rem;
}

.suggestion-category li {
    margin-bottom: 5px;
    color: var(--bs-gray-300);
}

/* Button for accepting changes */
.accept-corrections {
    display: block;
    margin-top: 10px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .grammar-suggestions-panel {
        max-width: 100%;
    }
}

/* === accessibility-improvements.css === */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #667eea;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    z-index: 9999;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.skip-link:focus {
    top: 0;
    outline: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only-focusable:focus,
.sr-only-focusable:active {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

*:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 2px;
}

.btn:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.25);
}

.nav-link:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: -2px;
    border-radius: 4px;
    background: rgba(102, 126, 234, 0.1);
}

.card:focus-within {
    outline: 2px solid rgba(102, 126, 234, 0.3);
    outline-offset: 2px;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-check-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

[role="button"]:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .enhanced-card:hover {
        transform: none;
    }

    .story-card-enhanced.scroll-animate {
        opacity: 1;
        transform: none;
    }

    .luna-fab:hover {
        transform: none;
    }

    .luna-fab-pulse {
        animation: none;
    }
}

html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

@media (prefers-contrast: high) {
    .enhanced-card {
        border: 2px solid #fff;
    }

    a {
        text-decoration: underline;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

[aria-disabled="true"],
[disabled] {
    cursor: not-allowed;
    opacity: 0.6;
}

img:not([alt]) {
    outline: 3px solid #dc3545;
}


/* === accessibility-fixes.css === */
/**
 * Accessibility and Text Readability Fixes
 * 
 * This CSS file fixes all text readability issues across the application
 * by ensuring proper contrast between text and background colors.
 * Replaces light text on light backgrounds with high-contrast alternatives.
 */

/* Global text contrast improvements */
.text-white-50 {
    color: #f8f9fa !important; /* Use lighter white instead of 50% opacity */
}

.text-muted {
    color: #6c757d !important; /* Ensure text-muted has proper contrast */
}

/* Program detail page fixes */
.program-header .text-white-50 {
    color: #ffffff !important; /* Full white for dark backgrounds */
}

.quick-info-item {
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #212529 !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Card text improvements */
.card {
    color: #212529 !important; /* Dark text for light card backgrounds */
}

.card .text-muted {
    color: #495057 !important; /* Darker muted text for better contrast */
}

.card-body {
    color: #212529 !important; /* Ensure all card body text is dark */
}

.card-body .text-muted {
    color: #495057 !important;
}

.card-body p {
    color: #212529 !important;
}

.card-body div {
    color: #212529 !important;
}

.card-title {
    color: #212529 !important;
}

.card-text {
    color: #212529 !important;
}

/* List group improvements */
.list-group-item .text-muted {
    color: #495057 !important;
}

.list-group-item .small {
    color: #495057 !important;
}

/* Badge contrast improvements */
.badge.bg-secondary {
    background-color: #495057 !important;
    color: #ffffff !important;
}

.badge.bg-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

/* Alert text improvements */
.alert .text-muted {
    color: #495057 !important;
}

.alert-light {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border-color: #dee2e6 !important;
}

/* University detail page improvements */
.university-header .text-muted {
    color: #e9ecef !important;
}

/* Search results improvements */
.search-result-item .text-muted {
    color: #495057 !important;
}

/* Program card improvements */
.program-card .text-muted {
    color: #495057 !important;
}

.program-card .small {
    color: #495057 !important;
}

/* University card improvements */
.university-card .text-muted {
    color: #495057 !important;
}

.university-card .small {
    color: #495057 !important;
}

/* Table text improvements */
.table .text-muted {
    color: #495057 !important;
}

/* Modal text improvements */
.modal .text-muted {
    color: #495057 !important;
}

/* Dropdown text improvements */
.dropdown-menu .text-muted {
    color: #495057 !important;
}

/* Navbar text improvements */
.navbar .text-muted {
    color: #6c757d !important;
}

/* Footer text improvements */
.footer .text-muted {
    color: #6c757d !important;
}

/* Form text improvements */
.form-text {
    color: #6c757d !important;
}

/* Small text improvements */
small.text-muted {
    color: #495057 !important;
}

/* Dark background specific fixes */
.bg-dark .text-white-50,
.bg-primary .text-white-50,
.bg-secondary .text-white-50,
.bg-success .text-white-50,
.bg-danger .text-white-50,
.bg-warning .text-white-50,
.bg-info .text-white-50 {
    color: #f8f9fa !important;
}

/* Light background specific fixes */
.bg-light .text-muted,
.bg-white .text-muted {
    color: #495057 !important;
}

/* Special case: Program information cards */
.program-info-card .text-white-50 {
    color: #ffffff !important;
}

.program-info-card small {
    color: #f8f9fa !important;
}

/* Program detail page content fixes */
.program-description,
.program-curriculum,
.program-career-outcomes {
    color: #212529 !important;
}

.program-description p,
.program-curriculum p,
.program-career-outcomes p {
    color: #212529 !important;
}

.program-description div,
.program-curriculum div,
.program-career-outcomes div {
    color: #212529 !important;
}

/* Tab content text fixes */
.tab-content {
    color: #212529 !important;
}

.tab-pane {
    color: #212529 !important;
}

.tab-pane p {
    color: #212529 !important;
}

.tab-pane div {
    color: #212529 !important;
}

/* University information cards */
.university-info-card .text-muted {
    color: #495057 !important;
}

/* Search filters */
.filter-section .text-muted {
    color: #495057 !important;
}

/* Pagination text */
.pagination .text-muted {
    color: #495057 !important;
}

/* Breadcrumb text */
.breadcrumb .text-muted {
    color: #495057 !important;
}

/* Stats cards */
.stats-card .text-muted {
    color: #495057 !important;
}

/* Dashboard cards */
.dashboard-card .text-muted {
    color: #495057 !important;
}

/* Feature cards */
.feature-card .text-muted {
    color: #495057 !important;
}

/* Testimonial cards */
.testimonial-card .text-muted {
    color: #495057 !important;
}

/* Hero section text */
.hero-section .text-muted {
    color: #e9ecef !important;
}

/* Call-to-action sections */
.cta-section .text-muted {
    color: #e9ecef !important;
}

/* Specific fixes for program detail quick info */
.program-header .quick-info-item {
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #212529 !important;
    font-weight: 500 !important;
}

.program-header .quick-info-item i {
    color: #495057 !important;
}

/* Hover states */
.list-group-item:hover .text-muted {
    color: #343a40 !important;
}

.card:hover .text-muted {
    color: #343a40 !important;
}

/* Focus states for accessibility */
.list-group-item:focus .text-muted,
.card:focus .text-muted {
    color: #212529 !important;
}

/* Media queries for responsive text */
@media (max-width: 768px) {
    .text-muted {
        color: #495057 !important;
    }
    
    .text-white-50 {
        color: #f8f9fa !important;
    }
}

/* Targeted readability fixes for specific problem areas */

/* Fix curriculum and content tabs specifically */
#curriculum .card-body,
#overview .card-body,
#requirements .card-body,
#tuition .card-body {
    background-color: #ffffff !important;
    color: #000000 !important;
}

#curriculum .card-body *,
#overview .card-body *,
#requirements .card-body *,
#tuition .card-body * {
    color: #000000 !important;
}

/* Program content areas */
.program-description,
.program-curriculum,
.program-career-outcomes,
.program-requirements {
    background-color: #ffffff !important;
    color: #000000 !important;
    padding: 15px !important;
    border-radius: 5px !important;
}

.program-description *,
.program-curriculum *,
.program-career-outcomes *,
.program-requirements * {
    color: #000000 !important;
}

/* All tab content should have high contrast */
.tab-pane .card {
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
}

.tab-pane .card-body {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.tab-pane .card-body *,
.tab-pane .card-title,
.tab-pane .card-text,
.tab-pane p,
.tab-pane div,
.tab-pane span,
.tab-pane li {
    color: #000000 !important;
}

/* Alert boxes in content */
.tab-pane .alert-light {
    background-color: #f8f9fa !important;
    color: #000000 !important;
    border: 1px solid #dee2e6 !important;
}

.tab-pane .alert-light * {
    color: #000000 !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-muted {
        color: #212529 !important;
    }
    
    .text-white-50 {
        color: #ffffff !important;
    }
    
    .quick-info-item {
        background-color: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000 !important;
    }
}

/* Print styles */
@media print {
    .text-muted {
        color: #000000 !important;
    }
    
    .text-white-50 {
        color: #000000 !important;
    }
}

/* === content-presentation.css === */
/*
 * content-presentation.css
 * Core typography & color system for programs/universities presentation.
 * Adapts to both light and dark mode via CSS custom properties.
 * Uses Inter as the preferred reading font with a system-ui fallback stack.
 */

/* ─── Google Fonts: Inter ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ─── CSS Custom Properties ──────────────────────────────────────── */
:root {
    --cp-font-sans:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                          system-ui, 'Helvetica Neue', Arial, sans-serif;

    /* Surface & Background */
    --cp-bg:              #f8fafc;
    --cp-surface:         #ffffff;
    --cp-surface-alt:     #f1f5f9;
    --cp-border:          #e2e8f0;
    --cp-border-soft:     rgba(0,0,0,.06);

    /* Text */
    --cp-text-primary:    #0f172a;
    --cp-text-body:       #1e293b;
    --cp-text-muted:      #64748b;
    --cp-text-soft:       #94a3b8;

    /* Accent */
    --cp-accent:          #1d4ed8;
    --cp-accent-hover:    #1e40af;
    --cp-accent-subtle:   #dbeafe;
    --cp-accent-text:     #1e40af;

    /* Semantic */
    --cp-success:         #059669;
    --cp-success-subtle:  #d1fae5;
    --cp-success-text:    #065f46;
    --cp-warning:         #d97706;
    --cp-warning-subtle:  #fef3c7;
    --cp-warning-text:    #92400e;
    --cp-purple:          #7c3aed;
    --cp-purple-subtle:   #ede9fe;
    --cp-purple-text:     #4c1d95;
    --cp-rose:            #e11d48;
    --cp-rose-subtle:     #ffe4e6;
    --cp-rose-text:       #9f1239;

    /* Chip / badge defaults */
    --cp-chip-bg:         #f1f5f9;
    --cp-chip-text:       #475569;
    --cp-chip-border:     #e2e8f0;

    /* Card */
    --cp-card-bg:         #ffffff;
    --cp-card-shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --cp-card-shadow-hover: 0 10px 25px rgba(0,0,0,.12), 0 4px 10px rgba(0,0,0,.08);
    --cp-card-radius:     14px;
    --cp-card-radius-sm:  10px;

    /* Hero gradient */
    --cp-hero-programs:   linear-gradient(135deg, #0d47a1 0%, #1565c0 55%, #1976d2 100%);
    --cp-hero-universities: linear-gradient(135deg, #312e81 0%, #4338ca 55%, #6366f1 100%);
}

[data-bs-theme="dark"] {
    --cp-bg:              #0c111d;
    --cp-surface:         #131929;
    --cp-surface-alt:     #1e2a3e;
    --cp-border:          #243044;
    --cp-border-soft:     rgba(255,255,255,.06);

    --cp-text-primary:    #f8fafc;
    --cp-text-body:       #e2e8f0;
    --cp-text-muted:      #94a3b8;
    --cp-text-soft:       #64748b;

    --cp-accent:          #60a5fa;
    --cp-accent-hover:    #93c5fd;
    --cp-accent-subtle:   #1e3a5f;
    --cp-accent-text:     #93c5fd;

    --cp-success:         #34d399;
    --cp-success-subtle:  #064e3b;
    --cp-success-text:    #6ee7b7;
    --cp-warning:         #fbbf24;
    --cp-warning-subtle:  #451a03;
    --cp-warning-text:    #fde68a;
    --cp-purple:          #a78bfa;
    --cp-purple-subtle:   #2e1065;
    --cp-purple-text:     #c4b5fd;
    --cp-rose:            #fb7185;
    --cp-rose-subtle:     #4c0519;
    --cp-rose-text:       #fda4af;

    --cp-chip-bg:         #1e2a3e;
    --cp-chip-text:       #94a3b8;
    --cp-chip-border:     #2d3f57;

    --cp-card-bg:         #131929;
    --cp-card-shadow:     0 1px 4px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.25);
    --cp-card-shadow-hover: 0 12px 30px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.3);
}

/* ─── Base Typography ─────────────────────────────────────────────── */
.cp-page {
    font-family: var(--cp-font-sans);
    font-size: 1rem;
    line-height: 1.625;
    color: var(--cp-text-body);
    background: var(--cp-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ─── Hero Section ────────────────────────────────────────────────── */
.cp-hero {
    color: #fff;
    padding: 3rem 0 2.25rem;
    position: relative;
    overflow: hidden;
}
.cp-hero--programs   { background: var(--cp-hero-programs); }
.cp-hero--universities { background: var(--cp-hero-universities); }

.cp-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.cp-hero__title {
    font-family: var(--cp-font-sans);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: .5rem;
}
.cp-hero__subtitle {
    font-size: 1.05rem;
    opacity: .88;
    font-weight: 400;
    line-height: 1.5;
}
.cp-hero__stat {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 20px;
    padding: .35em .85em;
    font-size: .875rem;
    font-weight: 600;
    color: #fff;
}

/* ─── Filter Bar ──────────────────────────────────────────────────── */
.cp-filter-bar {
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-top: 1.75rem;
    position: relative;
    z-index: 1;
}
.cp-filter-bar .form-control,
.cp-filter-bar .form-select {
    background: rgba(255,255,255,.95) !important;
    color: #1e293b !important;
    border: 1.5px solid rgba(255,255,255,.4) !important;
    border-radius: 8px !important;
    font-size: .9rem !important;
    font-family: var(--cp-font-sans) !important;
}
.cp-filter-bar .form-control::placeholder {
    color: #64748b !important;
}

/* ─── Program / University Cards ──────────────────────────────────── */
.cp-card {
    background: var(--cp-card-bg);
    border: 1px solid var(--cp-border);
    border-radius: var(--cp-card-radius);
    box-shadow: var(--cp-card-shadow);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    font-family: var(--cp-font-sans);
}
.cp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cp-card-shadow-hover);
    border-color: var(--cp-accent-subtle);
}

/* Card Header — logo + badges row */
.cp-card__head {
    padding: 1rem 1.25rem .8rem;
    display: flex;
    align-items: flex-start;
    gap: .875rem;
    border-bottom: 1px solid var(--cp-border-soft);
}
.cp-card__logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 10px;
    background: var(--cp-surface-alt);
    border: 1px solid var(--cp-border);
    padding: 5px;
    flex-shrink: 0;
}
.cp-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    flex: 1;
}

/* Card Body */
.cp-card__body {
    padding: 1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.cp-card__name {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--cp-text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: .3rem;
}
.cp-card__sub {
    font-size: .8125rem;
    color: var(--cp-text-muted);
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: .65rem;
    flex-wrap: wrap;
}
.cp-card__desc {
    font-size: .8125rem;
    color: var(--cp-text-muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: .75rem;
    flex-shrink: 0;
}
.cp-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .7rem;
}
.cp-card__price {
    font-size: .875rem;
    font-weight: 600;
    color: var(--cp-success);
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-top: auto;
    padding-top: .5rem;
}
.cp-card__price--na {
    color: var(--cp-text-soft);
    font-weight: 400;
}

/* University-specific stat row */
.cp-card__stats {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--cp-border-soft);
    border-bottom: 1px solid var(--cp-border-soft);
    margin: .5rem 0;
}
.cp-card__stat {
    flex: 1;
    text-align: center;
    padding: .6rem .25rem;
    font-size: .75rem;
}
.cp-card__stat + .cp-card__stat {
    border-left: 1px solid var(--cp-border-soft);
}
.cp-card__stat-value {
    display: block;
    font-weight: 700;
    font-size: .9rem;
    color: var(--cp-text-primary);
    line-height: 1.2;
}
.cp-card__stat-label {
    color: var(--cp-text-soft);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: .1rem;
}

/* Card Footer — action buttons */
.cp-card__foot {
    padding: .75rem 1.25rem 1rem;
    border-top: 1px solid var(--cp-border-soft);
    display: flex;
    gap: .5rem;
    margin-top: auto;
}

/* ─── Degree / Type Badges ────────────────────────────────────────── */
.cp-badge {
    display: inline-flex;
    align-items: center;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .22em .65em;
    border-radius: 20px;
    line-height: 1.3;
    white-space: nowrap;
}
.cp-badge--bachelor  { background: var(--cp-success-subtle);  color: var(--cp-success-text); }
.cp-badge--master    { background: var(--cp-accent-subtle);   color: var(--cp-accent-text); }
.cp-badge--phd       { background: var(--cp-purple-subtle);   color: var(--cp-purple-text); }
.cp-badge--cert      { background: var(--cp-warning-subtle);  color: var(--cp-warning-text); }
.cp-badge--neutral   { background: var(--cp-chip-bg);         color: var(--cp-chip-text); }
.cp-badge--rank      { background: var(--cp-warning-subtle);  color: var(--cp-warning-text); }

/* ─── Meta Chips ──────────────────────────────────────────────────── */
.cp-chip {
    display: inline-flex;
    align-items: center;
    gap: .3em;
    font-size: .74rem;
    font-family: var(--cp-font-sans);
    font-weight: 500;
    background: var(--cp-chip-bg);
    border: 1px solid var(--cp-chip-border);
    color: var(--cp-chip-text);
    border-radius: 6px;
    padding: .2em .55em;
    white-space: nowrap;
}
.cp-chip i { opacity: .65; font-size: .7rem; }

/* ─── Buttons ─────────────────────────────────────────────────────── */
.cp-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .35em;
    background: var(--cp-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .4rem .85rem;
    font-size: .8125rem;
    font-weight: 600;
    font-family: var(--cp-font-sans);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
    white-space: nowrap;
}
.cp-btn-primary:hover {
    background: var(--cp-accent-hover);
    color: #fff;
    transform: translateY(-1px);
}
.cp-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: .35em;
    background: transparent;
    color: var(--cp-accent);
    border: 1.5px solid var(--cp-accent);
    border-radius: 8px;
    padding: .35rem .8rem;
    font-size: .8125rem;
    font-weight: 600;
    font-family: var(--cp-font-sans);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
}
.cp-btn-outline:hover {
    background: var(--cp-accent-subtle);
    color: var(--cp-accent-text);
}

/* ─── Rich Text Content (from DB) ────────────────────────────────── */
/*
 * Apply .cp-richtext to any container rendering HTML content from the database.
 * Provides consistent typography for p, ul, ol, headings, tables etc.
 */
.cp-richtext {
    font-family: var(--cp-font-sans);
    font-size: .9375rem;
    line-height: 1.7;
    color: var(--cp-text-body);
    word-break: break-word;
    overflow-wrap: break-word;
}
.cp-richtext p {
    margin-bottom: 1em;
    color: var(--cp-text-body);
}
.cp-richtext h1, .cp-richtext h2, .cp-richtext h3,
.cp-richtext h4, .cp-richtext h5, .cp-richtext h6 {
    font-family: var(--cp-font-sans);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--cp-text-primary);
    margin-top: 1.5em;
    margin-bottom: .5em;
    line-height: 1.3;
}
.cp-richtext h2 { font-size: 1.3rem; }
.cp-richtext h3 { font-size: 1.15rem; }
.cp-richtext h4 { font-size: 1rem; }
.cp-richtext ul, .cp-richtext ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}
.cp-richtext li {
    margin-bottom: .35em;
    color: var(--cp-text-body);
}
.cp-richtext strong, .cp-richtext b {
    font-weight: 700;
    color: var(--cp-text-primary);
}
.cp-richtext a {
    color: var(--cp-accent);
    text-decoration: underline;
    text-decoration-color: var(--cp-accent-subtle);
    text-underline-offset: 2px;
}
.cp-richtext a:hover {
    color: var(--cp-accent-hover);
}
.cp-richtext blockquote {
    border-left: 3px solid var(--cp-accent);
    padding-left: 1em;
    margin-left: 0;
    color: var(--cp-text-muted);
    font-style: italic;
}
.cp-richtext table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
    font-size: .875rem;
}
.cp-richtext th, .cp-richtext td {
    border: 1px solid var(--cp-border);
    padding: .5em .75em;
    text-align: left;
    color: var(--cp-text-body);
}
.cp-richtext th {
    background: var(--cp-surface-alt);
    font-weight: 600;
    color: var(--cp-text-primary);
}
.cp-richtext tr:nth-child(even) td {
    background: var(--cp-surface-alt);
}
.cp-richtext img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ─── Section Heading (detail pages) ─────────────────────────────── */
.cp-section-heading {
    font-family: var(--cp-font-sans);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--cp-text-primary);
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--cp-accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ─── Empty State ─────────────────────────────────────────────────── */
.cp-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--cp-text-muted);
}
.cp-empty__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: .4;
}
.cp-empty__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cp-text-primary);
    margin-bottom: .5rem;
}
.cp-empty__text {
    font-size: .9rem;
    color: var(--cp-text-muted);
    margin-bottom: 1.5rem;
}

/* ─── Pagination ──────────────────────────────────────────────────── */
.cp-pagination {
    display: flex;
    justify-content: center;
    gap: .35rem;
    flex-wrap: wrap;
    padding: 1.5rem 0;
    font-family: var(--cp-font-sans);
}
.cp-pagination a, .cp-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 .6rem;
    border: 1.5px solid var(--cp-border);
    border-radius: 8px;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--cp-text-muted);
    text-decoration: none;
    background: var(--cp-surface);
    transition: all .15s ease;
}
.cp-pagination a:hover {
    border-color: var(--cp-accent);
    color: var(--cp-accent);
    background: var(--cp-accent-subtle);
}
.cp-pagination .active {
    background: var(--cp-accent);
    border-color: var(--cp-accent);
    color: #fff;
}

/* ─── Filter Panel (sidebar / bar) ───────────────────────────────── */
.cp-filter-panel {
    background: var(--cp-surface);
    border: 1px solid var(--cp-border);
    border-radius: var(--cp-card-radius-sm);
    padding: 1rem 1.25rem;
    font-family: var(--cp-font-sans);
}
.cp-filter-panel label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--cp-text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .35rem;
    display: block;
}
.cp-filter-panel .form-control,
.cp-filter-panel .form-select {
    font-family: var(--cp-font-sans) !important;
    font-size: .875rem !important;
    background: var(--cp-surface-alt) !important;
    color: var(--cp-text-body) !important;
    border: 1.5px solid var(--cp-border) !important;
    border-radius: 8px !important;
}
.cp-filter-panel .form-control:focus,
.cp-filter-panel .form-select:focus {
    border-color: var(--cp-accent) !important;
    box-shadow: 0 0 0 3px var(--cp-accent-subtle) !important;
}

/* ─── University Logo Wrapper ────────────────────────────────────── */
.cp-uni-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 10px;
    background: var(--cp-surface-alt);
    border: 1px solid var(--cp-border);
    padding: 5px;
    flex-shrink: 0;
}

/* ─── Responsive Tweaks ──────────────────────────────────────────── */
@media (max-width: 576px) {
    .cp-hero { padding: 2rem 0 1.75rem; }
    .cp-hero__title { font-size: 1.6rem; }
    .cp-card__head { gap: .65rem; }
    .cp-card__logo, .cp-uni-logo { width: 44px; height: 44px; }
}


/* === article-dark-mode.css === */
/* Article Page Dark Mode - Unified Styling */

/* LIGHT MODE (Default) - No !important so dark mode can override */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #000000;
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 10px;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6,
.article-content p,
.article-content li,
.article-content span,
.article-content div,
.article-content strong,
.article-content em,
.article-content b,
.article-content i {
    color: #000000;
}

.main-container,
.article-main-container {
    background-color: #ffffff;
}

.article-meta,
.reaction-toolbar,
.comments-section,
.comment-form,
.comment-item,
.mobile-reactions,
.story-reactions-bar,
.universal-comments-section {
    background-color: #ffffff;
}

.article-meta *,
.comments-section *,
.comment-form *,
.comment-item *,
.mobile-reactions *,
.story-reactions-bar *,
.universal-comments-section * {
    color: #000000;
}

.form-control,
.form-select,
input,
textarea {
    background-color: #ffffff;
    color: #000000;
    border-color: #dee2e6;
}

.card {
    background-color: #ffffff;
}

.card *,
.card h3,
.card h4,
.card h5,
.card p,
.card label {
    color: #000000;
}

/* DARK MODE - System preference */
@media (prefers-color-scheme: dark) {
    .main-container,
    .article-main-container {
        background-color: #000000 !important;
    }
    
    .article-content {
        color: #ffffff !important;
        background-color: #000000 !important;
    }
    
    .article-content h1,
    .article-content h2,
    .article-content h3,
    .article-content h4,
    .article-content h5,
    .article-content h6,
    .article-content p,
    .article-content li,
    .article-content span,
    .article-content div,
    .article-content strong,
    .article-content em,
    .article-content b,
    .article-content i {
        color: #ffffff !important;
    }
    
    .article-meta,
    .reaction-toolbar,
    .comments-section,
    .sidebar-widget,
    .story-reactions-bar,
    .universal-comments-section {
        background-color: #1a1a1a !important;
    }
    
    .article-meta *,
    .comments-section *,
    .comments-section input,
    .comments-section textarea,
    .comments-section label,
    .comments-section h3,
    .comments-section h4,
    .comments-section h5,
    .sidebar-widget *,
    .sidebar-widget h5,
    .sidebar-widget p,
    .sidebar-widget label,
    .story-reactions-bar *,
    .universal-comments-section *,
    .universal-comments-section h4,
    .universal-comments-section h6,
    .universal-comments-section label {
        color: #ffffff !important;
    }
    
    .comment-form,
    .comment-item,
    #insightsCommentForm,
    #universalCommentForm,
    #newsletter-form {
        background-color: #2a2a2a !important;
    }
    
    .comment-form *,
    .comment-form input,
    .comment-form textarea,
    .comment-form label,
    .comment-form h4,
    .comment-item *,
    #insightsCommentForm *,
    #insightsCommentForm input,
    #insightsCommentForm textarea,
    #insightsCommentForm label,
    #universalCommentForm *,
    #universalCommentForm input,
    #universalCommentForm textarea,
    #universalCommentForm label {
        color: #ffffff !important;
    }
    
    .mobile-reactions {
        background-color: #1a1a1a !important;
    }
    
    .mobile-reactions * {
        color: #ffffff !important;
    }
    
    .card {
        background-color: #1a1a1a !important;
    }
    
    .card *,
    .card h3,
    .card h4,
    .card h5,
    .card p,
    .card label {
        color: #ffffff !important;
    }
    
    .form-control,
    .form-select,
    input[type="text"],
    input[type="email"],
    textarea {
        background-color: #2a2a2a !important;
        color: #ffffff !important;
        border-color: #444 !important;
    }
    
    input::placeholder,
    textarea::placeholder {
        color: #888 !important;
    }
    
    /* Bootstrap utility classes override for dark mode */
    .text-muted {
        color: #adb5bd !important;
    }
    
    .text-primary {
        color: #6ea8fe !important;
    }
    
    /* Breadcrumb override */
    .breadcrumb-item,
    .breadcrumb-item a {
        color: #ffffff !important;
    }
    
    .breadcrumb-item.active {
        color: #adb5bd !important;
    }
}

/* Bootstrap dark theme specific */
[data-bs-theme="dark"] .main-container,
[data-bs-theme="dark"] .article-main-container {
    background-color: #000000 !important;
}

[data-bs-theme="dark"] .article-content {
    color: #ffffff !important;
    background-color: #000000 !important;
}

[data-bs-theme="dark"] .article-content h1,
[data-bs-theme="dark"] .article-content h2,
[data-bs-theme="dark"] .article-content h3,
[data-bs-theme="dark"] .article-content h4,
[data-bs-theme="dark"] .article-content h5,
[data-bs-theme="dark"] .article-content h6,
[data-bs-theme="dark"] .article-content p,
[data-bs-theme="dark"] .article-content li,
[data-bs-theme="dark"] .article-content span,
[data-bs-theme="dark"] .article-content div,
[data-bs-theme="dark"] .article-content strong,
[data-bs-theme="dark"] .article-content em,
[data-bs-theme="dark"] .article-content b,
[data-bs-theme="dark"] .article-content i {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .article-meta,
[data-bs-theme="dark"] .reaction-toolbar,
[data-bs-theme="dark"] .comments-section,
[data-bs-theme="dark"] .sidebar-widget,
[data-bs-theme="dark"] .story-reactions-bar,
[data-bs-theme="dark"] .universal-comments-section {
    background-color: #1a1a1a !important;
}

[data-bs-theme="dark"] .article-meta *,
[data-bs-theme="dark"] .comments-section *,
[data-bs-theme="dark"] .comments-section input,
[data-bs-theme="dark"] .comments-section textarea,
[data-bs-theme="dark"] .comments-section label,
[data-bs-theme="dark"] .comments-section h3,
[data-bs-theme="dark"] .comments-section h4,
[data-bs-theme="dark"] .comments-section h5,
[data-bs-theme="dark"] .sidebar-widget *,
[data-bs-theme="dark"] .sidebar-widget h5,
[data-bs-theme="dark"] .sidebar-widget p,
[data-bs-theme="dark"] .sidebar-widget label,
[data-bs-theme="dark"] .story-reactions-bar *,
[data-bs-theme="dark"] .universal-comments-section *,
[data-bs-theme="dark"] .universal-comments-section h4,
[data-bs-theme="dark"] .universal-comments-section h6,
[data-bs-theme="dark"] .universal-comments-section label {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .comment-form,
[data-bs-theme="dark"] .comment-item,
[data-bs-theme="dark"] #insightsCommentForm,
[data-bs-theme="dark"] #universalCommentForm,
[data-bs-theme="dark"] #newsletter-form {
    background-color: #2a2a2a !important;
}

[data-bs-theme="dark"] .comment-form *,
[data-bs-theme="dark"] .comment-form input,
[data-bs-theme="dark"] .comment-form textarea,
[data-bs-theme="dark"] .comment-form label,
[data-bs-theme="dark"] .comment-form h4,
[data-bs-theme="dark"] .comment-item *,
[data-bs-theme="dark"] #insightsCommentForm *,
[data-bs-theme="dark"] #insightsCommentForm input,
[data-bs-theme="dark"] #insightsCommentForm textarea,
[data-bs-theme="dark"] #insightsCommentForm label,
[data-bs-theme="dark"] #universalCommentForm *,
[data-bs-theme="dark"] #universalCommentForm input,
[data-bs-theme="dark"] #universalCommentForm textarea,
[data-bs-theme="dark"] #universalCommentForm label {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .mobile-reactions {
    background-color: #1a1a1a !important;
}

[data-bs-theme="dark"] .mobile-reactions * {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .card {
    background-color: #1a1a1a !important;
}

[data-bs-theme="dark"] .card *,
[data-bs-theme="dark"] .card h3,
[data-bs-theme="dark"] .card h4,
[data-bs-theme="dark"] .card h5,
[data-bs-theme="dark"] .card p,
[data-bs-theme="dark"] .card label {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] input[type="text"],
[data-bs-theme="dark"] input[type="email"],
[data-bs-theme="dark"] textarea {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
    border-color: #444 !important;
}

[data-bs-theme="dark"] input::placeholder,
[data-bs-theme="dark"] textarea::placeholder {
    color: #888 !important;
}

/* Bootstrap utility classes override for dark mode */
[data-bs-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] .text-primary {
    color: #6ea8fe !important;
}

/* Breadcrumb override */
[data-bs-theme="dark"] .breadcrumb-item,
[data-bs-theme="dark"] .breadcrumb-item a {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .breadcrumb-item.active {
    color: #adb5bd !important;
}


/* === media-components.css === */
/* Enhanced Media Components Styles for Aruksworld */

/* Media Upload Component Base */
.media-upload-component {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.media-upload-component:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Drop Zone Styling */
.media-drop-zone {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.media-drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(0,123,255,0.1) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.media-drop-zone:hover::before,
.media-drop-zone.drag-over::before {
    transform: translateX(100%);
}

.media-drop-zone:hover,
.media-drop-zone.drag-over {
    border-color: #007bff;
    background: linear-gradient(135deg, #e7f3ff 0%, #f0f8ff 100%);
    transform: translateY(-2px);
}

.media-drop-zone.drag-over {
    border-color: #28a745;
    background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
}

/* Upload Button Styling */
.btn-upload-media {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

.btn-upload-media:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,123,255,0.4);
}

/* Media Gallery Grid */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.media-preview-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #ffffff;
    position: relative;
}

.media-preview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.media-preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(0,123,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.media-preview-card:hover::before {
    opacity: 1;
}

/* Image and Video Thumbnails */
.media-thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
}

.media-thumbnail:hover {
    transform: scale(1.05);
}

/* Video Overlay for Thumbnails */
.video-thumbnail::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 2;
}

/* Upload Progress Styling */
.upload-progress {
    animation: slideInUp 0.3s ease;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 1rem;
    border-left: 4px solid #007bff;
}

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

.progress {
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #007bff, #0056b3, #007bff);
    background-size: 200% 100%;
    animation: progressShine 2s infinite linear;
}

@keyframes progressShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Featured Media Styling */
.featured-media {
    border: 2px solid #ffc107;
    position: relative;
}

.featured-media::after {
    content: '★';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #ffc107;
    color: #212529;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 3;
}

/* Testimonial Media Component Specific */
.testimonial-media-component {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.testimonial-media-component h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.testimonial-media-component h6 i {
    color: #007bff;
}

/* University Media Component Specific */
.university-media-component {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 2rem;
}

.university-media-component .media-category-section {
    border-left: 4px solid #28a745;
    padding-left: 1rem;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, rgba(40,167,69,0.1) 0%, transparent 100%);
    border-radius: 0 8px 8px 0;
    padding: 1rem;
}

/* Gallery Lightbox Enhancements */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    animation: scaleIn 0.3s ease forwards;
    border-radius: 8px;
    overflow: hidden;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

/* Upload Results Styling */
.upload-results .alert {
    border: none;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    animation: slideInRight 0.3s ease;
}

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

/* Media Statistics */
.media-stats {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #dee2e6;
}

.media-stats div {
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.media-stats div:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .media-upload-component {
        padding: 1rem;
    }
    
    .media-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .media-thumbnail {
        height: 120px;
    }
    
    .btn-upload-media {
        padding: 0.5rem 1.5rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .media-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .upload-progress {
        padding: 0.75rem;
    }
}

/* Animation Classes */
.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slideUp {
    animation: slideInUp 0.5s ease forwards;
}

.animate-bounce {
    animation: bounce 0.6s ease forwards;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0,-30px,0);
    }
    70% {
        transform: translate3d(0,-15px,0);
    }
    90% {
        transform: translate3d(0,-4px,0);
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .media-upload-component,
    .media-preview-card,
    .testimonial-media-component,
    .university-media-component {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .media-drop-zone {
        background: linear-gradient(135deg, #2d3748 0%, #374151 100%);
        border-color: #4a5568;
    }
    
    .media-drop-zone:hover,
    .media-drop-zone.drag-over {
        background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
        border-color: #3182ce;
    }
}

/* Print Styles */
@media print {
    .media-upload-component,
    .upload-progress,
    .btn-upload-media {
        display: none !important;
    }
    
    .media-gallery {
        display: block;
    }
    
    .media-preview-card {
        display: inline-block;
        width: 200px;
        margin: 0.5rem;
        break-inside: avoid;
    }
}

/* === rich-text-display.css === */
/*
 * rich-text-display.css
 * Typography for HTML content stored in the database (program descriptions,
 * curriculum, career outcomes, university details, blog articles, etc.).
 * 
 * Principles applied:
 *  - System-first sans-serif stack for screen legibility (Georgia/serif removed)
 *  - Optimal line-height 1.7 and font-size for sustained reading
 *  - No text-align: justify (causes uneven spacing on narrow viewports)
 *  - WCAG AA minimum contrast ratios in both light and dark mode
 *  - Professional tones in dark mode (no neon / eye-strain colours)
 *  - CSS custom properties for maintainability
 */

/* ── Base container ──────────────────────────────────────────────── */
.rich-text-content,
.formatted-text,
.article-content,
.content-display,
.rich-content,
.cp-richtext {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 system-ui, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.72;
    color: #1e293b;
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ── Headings ────────────────────────────────────────────────────── */
.rich-text-content h1, .formatted-text h1, .article-content h1,
.content-display h1, .rich-content h1, .cp-richtext h1 {
    color: #0f172a;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.25;
    margin: 1.6em 0 .65em;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: .45em;
}

.rich-text-content h2, .formatted-text h2, .article-content h2,
.content-display h2, .rich-content h2, .cp-richtext h2 {
    color: #0f172a;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 1.5em 0 .6em;
}

.rich-text-content h3, .formatted-text h3, .article-content h3,
.content-display h3, .rich-content h3, .cp-richtext h3 {
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.35;
    margin: 1.4em 0 .55em;
}

.rich-text-content h4, .formatted-text h4, .article-content h4,
.content-display h4, .rich-content h4, .cp-richtext h4 {
    color: #1e293b;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 1.2em 0 .5em;
}

.rich-text-content h5, .formatted-text h5, .article-content h5,
.content-display h5, .rich-content h5, .cp-richtext h5 {
    color: #334155;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 1.1em 0 .45em;
}

.rich-text-content h6, .formatted-text h6, .article-content h6,
.content-display h6, .rich-content h6, .cp-richtext h6 {
    color: #475569;
    font-size: .875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 1em 0 .4em;
}

/* ── Paragraphs ──────────────────────────────────────────────────── */
.rich-text-content p, .formatted-text p, .article-content p,
.content-display p, .rich-content p, .cp-richtext p {
    margin-bottom: 1.1em;
    color: #1e293b;
    line-height: 1.72;
    /* no text-align: justify — avoids rivers of whitespace */
}

/* ── Inline text formatting ──────────────────────────────────────── */
.rich-text-content strong, .formatted-text strong, .article-content strong,
.content-display strong, .rich-content strong, .cp-richtext strong,
.rich-text-content b, .formatted-text b, .article-content b,
.content-display b, .rich-content b, .cp-richtext b {
    font-weight: 700;
    color: #0f172a;
}

.rich-text-content em, .formatted-text em, .article-content em,
.content-display em, .rich-content em, .cp-richtext em {
    font-style: italic;
    color: #1e293b;
}

/* ── Lists ───────────────────────────────────────────────────────── */
.rich-text-content ul, .rich-text-content ol,
.formatted-text ul, .formatted-text ol,
.article-content ul, .article-content ol,
.content-display ul, .content-display ol,
.rich-content ul, .rich-content ol,
.cp-richtext ul, .cp-richtext ol {
    margin: .75em 0 1.25em;
    padding-left: 1.6em;
}

.rich-text-content li, .formatted-text li, .article-content li,
.content-display li, .rich-content li, .cp-richtext li {
    margin-bottom: .4em;
    color: #1e293b;
    line-height: 1.65;
}

.rich-text-content ul li, .formatted-text ul li, .article-content ul li,
.content-display ul li, .rich-content ul li, .cp-richtext ul li {
    list-style-type: disc;
}

.rich-text-content ol li, .formatted-text ol li, .article-content ol li,
.content-display ol li, .rich-content ol li, .cp-richtext ol li {
    list-style-type: decimal;
}

/* ── Links ───────────────────────────────────────────────────────── */
.rich-text-content a, .formatted-text a, .article-content a,
.content-display a, .rich-content a, .cp-richtext a {
    color: #1d4ed8;
    text-decoration: underline;
    text-decoration-color: rgba(29,78,216,.3);
    text-underline-offset: 2px;
    transition: color .15s ease, text-decoration-color .15s ease;
}

.rich-text-content a:hover, .formatted-text a:hover, .article-content a:hover,
.content-display a:hover, .rich-content a:hover, .cp-richtext a:hover {
    color: #1e40af;
    text-decoration-color: rgba(30,64,175,.7);
}

/* ── Blockquote ──────────────────────────────────────────────────── */
.rich-text-content blockquote, .formatted-text blockquote,
.article-content blockquote, .content-display blockquote,
.rich-content blockquote, .cp-richtext blockquote {
    background: #f8fafc;
    border-left: 3px solid #3b82f6;
    margin: 1.4em 0;
    padding: .85em 1.25em;
    font-style: italic;
    border-radius: 0 8px 8px 0;
    color: #334155;
}

/* ── Code ────────────────────────────────────────────────────────── */
.rich-text-content code, .formatted-text code, .article-content code,
.content-display code, .rich-content code, .cp-richtext code {
    background: #f1f5f9;
    color: #b91c1c;
    padding: .15em .4em;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: .875em;
}

.rich-text-content pre, .formatted-text pre, .article-content pre,
.content-display pre, .rich-content pre, .cp-richtext pre {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1em 1.2em;
    margin: 1.25em 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Menlo', monospace;
    font-size: .875em;
    line-height: 1.5;
    color: #1e293b;
}

/* ── Tables ──────────────────────────────────────────────────────── */
.rich-text-content table, .formatted-text table, .article-content table,
.content-display table, .rich-content table, .cp-richtext table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: .9rem;
    overflow-x: auto;
    display: block;
}

.rich-text-content th, .rich-text-content td,
.formatted-text th, .formatted-text td,
.article-content th, .article-content td,
.content-display th, .content-display td,
.rich-content th, .rich-content td,
.cp-richtext th, .cp-richtext td {
    border: 1px solid #e2e8f0;
    padding: .6em .9em;
    text-align: left;
    color: #1e293b;
    vertical-align: top;
}

.rich-text-content th, .formatted-text th, .article-content th,
.content-display th, .rich-content th, .cp-richtext th {
    background: #f1f5f9;
    font-weight: 700;
    color: #0f172a;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.rich-text-content tr:nth-child(even) td,
.formatted-text tr:nth-child(even) td,
.article-content tr:nth-child(even) td,
.content-display tr:nth-child(even) td,
.rich-content tr:nth-child(even) td,
.cp-richtext tr:nth-child(even) td {
    background: #f8fafc;
}

/* ── Images ──────────────────────────────────────────────────────── */
.rich-text-content img, .formatted-text img, .article-content img,
.content-display img, .rich-content img, .cp-richtext img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: .75em 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* ── Horizontal rule ─────────────────────────────────────────────── */
.rich-text-content hr, .formatted-text hr, .article-content hr,
.content-display hr, .rich-content hr, .cp-richtext hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1.75em 0;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .rich-text-content, .formatted-text, .article-content,
    .content-display, .rich-content, .cp-richtext {
        font-size: .9375rem;
        line-height: 1.65;
    }

    .rich-text-content h1, .formatted-text h1, .article-content h1,
    .content-display h1, .rich-content h1, .cp-richtext h1 { font-size: 1.5rem; }

    .rich-text-content h2, .formatted-text h2, .article-content h2,
    .content-display h2, .rich-content h2, .cp-richtext h2 { font-size: 1.25rem; }

    .rich-text-content h3, .formatted-text h3, .article-content h3,
    .content-display h3, .rich-content h3, .cp-richtext h3 { font-size: 1.1rem; }

    .rich-text-content table, .formatted-text table, .article-content table,
    .content-display table, .rich-content table, .cp-richtext table {
        font-size: .8rem;
    }
}

/* ── Dark Mode (Bootstrap data-bs-theme) ─────────────────────────── */
/*
 * Uses WCAG AA-compliant contrast on dark surfaces.
 * Professional palette — no neon/fluorescent colours.
 * Dark surface: ~#131929, text reads at ≥4.5:1 contrast ratio.
 */
[data-bs-theme="dark"] .rich-text-content,
[data-bs-theme="dark"] .formatted-text,
[data-bs-theme="dark"] .article-content,
[data-bs-theme="dark"] .content-display,
[data-bs-theme="dark"] .rich-content,
[data-bs-theme="dark"] .cp-richtext {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .rich-text-content h1,
[data-bs-theme="dark"] .formatted-text h1,
[data-bs-theme="dark"] .article-content h1,
[data-bs-theme="dark"] .content-display h1,
[data-bs-theme="dark"] .rich-content h1,
[data-bs-theme="dark"] .cp-richtext h1 {
    color: #f1f5f9;
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .rich-text-content h2,
[data-bs-theme="dark"] .formatted-text h2,
[data-bs-theme="dark"] .article-content h2,
[data-bs-theme="dark"] .content-display h2,
[data-bs-theme="dark"] .rich-content h2,
[data-bs-theme="dark"] .cp-richtext h2 { color: #e2e8f0; }

[data-bs-theme="dark"] .rich-text-content h3,
[data-bs-theme="dark"] .formatted-text h3,
[data-bs-theme="dark"] .article-content h3,
[data-bs-theme="dark"] .content-display h3,
[data-bs-theme="dark"] .rich-content h3,
[data-bs-theme="dark"] .cp-richtext h3 { color: #e2e8f0; }

[data-bs-theme="dark"] .rich-text-content h4,
[data-bs-theme="dark"] .formatted-text h4,
[data-bs-theme="dark"] .article-content h4,
[data-bs-theme="dark"] .content-display h4,
[data-bs-theme="dark"] .rich-content h4,
[data-bs-theme="dark"] .cp-richtext h4 { color: #cbd5e1; }

[data-bs-theme="dark"] .rich-text-content h5,
[data-bs-theme="dark"] .formatted-text h5,
[data-bs-theme="dark"] .article-content h5,
[data-bs-theme="dark"] .content-display h5,
[data-bs-theme="dark"] .rich-content h5,
[data-bs-theme="dark"] .cp-richtext h5 { color: #94a3b8; }

[data-bs-theme="dark"] .rich-text-content h6,
[data-bs-theme="dark"] .formatted-text h6,
[data-bs-theme="dark"] .article-content h6,
[data-bs-theme="dark"] .content-display h6,
[data-bs-theme="dark"] .rich-content h6,
[data-bs-theme="dark"] .cp-richtext h6 { color: #94a3b8; }

[data-bs-theme="dark"] .rich-text-content p,
[data-bs-theme="dark"] .formatted-text p,
[data-bs-theme="dark"] .article-content p,
[data-bs-theme="dark"] .content-display p,
[data-bs-theme="dark"] .rich-content p,
[data-bs-theme="dark"] .cp-richtext p { color: #cbd5e1; }

[data-bs-theme="dark"] .rich-text-content strong,
[data-bs-theme="dark"] .rich-text-content b,
[data-bs-theme="dark"] .formatted-text strong,
[data-bs-theme="dark"] .formatted-text b,
[data-bs-theme="dark"] .article-content strong,
[data-bs-theme="dark"] .content-display strong,
[data-bs-theme="dark"] .rich-content strong,
[data-bs-theme="dark"] .cp-richtext strong,
[data-bs-theme="dark"] .cp-richtext b { color: #f1f5f9; }

[data-bs-theme="dark"] .rich-text-content em,
[data-bs-theme="dark"] .formatted-text em,
[data-bs-theme="dark"] .article-content em,
[data-bs-theme="dark"] .content-display em,
[data-bs-theme="dark"] .rich-content em,
[data-bs-theme="dark"] .cp-richtext em { color: #94a3b8; }

[data-bs-theme="dark"] .rich-text-content li,
[data-bs-theme="dark"] .formatted-text li,
[data-bs-theme="dark"] .article-content li,
[data-bs-theme="dark"] .content-display li,
[data-bs-theme="dark"] .rich-content li,
[data-bs-theme="dark"] .cp-richtext li { color: #cbd5e1; }

[data-bs-theme="dark"] .rich-text-content a,
[data-bs-theme="dark"] .formatted-text a,
[data-bs-theme="dark"] .article-content a,
[data-bs-theme="dark"] .content-display a,
[data-bs-theme="dark"] .rich-content a,
[data-bs-theme="dark"] .cp-richtext a {
    color: #60a5fa;
    text-decoration-color: rgba(96,165,250,.3);
}

[data-bs-theme="dark"] .rich-text-content a:hover,
[data-bs-theme="dark"] .formatted-text a:hover,
[data-bs-theme="dark"] .article-content a:hover,
[data-bs-theme="dark"] .content-display a:hover,
[data-bs-theme="dark"] .rich-content a:hover,
[data-bs-theme="dark"] .cp-richtext a:hover {
    color: #93c5fd;
    text-decoration-color: rgba(147,197,253,.6);
}

[data-bs-theme="dark"] .rich-text-content blockquote,
[data-bs-theme="dark"] .formatted-text blockquote,
[data-bs-theme="dark"] .article-content blockquote,
[data-bs-theme="dark"] .content-display blockquote,
[data-bs-theme="dark"] .rich-content blockquote,
[data-bs-theme="dark"] .cp-richtext blockquote {
    background: #1e2a3e;
    border-left-color: #3b82f6;
    color: #94a3b8;
}

[data-bs-theme="dark"] .rich-text-content code,
[data-bs-theme="dark"] .formatted-text code,
[data-bs-theme="dark"] .article-content code,
[data-bs-theme="dark"] .content-display code,
[data-bs-theme="dark"] .rich-content code,
[data-bs-theme="dark"] .cp-richtext code {
    background: #1e293b;
    color: #f87171;
}

[data-bs-theme="dark"] .rich-text-content pre,
[data-bs-theme="dark"] .formatted-text pre,
[data-bs-theme="dark"] .article-content pre,
[data-bs-theme="dark"] .content-display pre,
[data-bs-theme="dark"] .rich-content pre,
[data-bs-theme="dark"] .cp-richtext pre {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

[data-bs-theme="dark"] .rich-text-content table,
[data-bs-theme="dark"] .formatted-text table,
[data-bs-theme="dark"] .article-content table,
[data-bs-theme="dark"] .content-display table,
[data-bs-theme="dark"] .rich-content table,
[data-bs-theme="dark"] .cp-richtext table { background: transparent; }

[data-bs-theme="dark"] .rich-text-content th,
[data-bs-theme="dark"] .rich-text-content td,
[data-bs-theme="dark"] .formatted-text th,
[data-bs-theme="dark"] .formatted-text td,
[data-bs-theme="dark"] .article-content th,
[data-bs-theme="dark"] .article-content td,
[data-bs-theme="dark"] .content-display th,
[data-bs-theme="dark"] .content-display td,
[data-bs-theme="dark"] .rich-content th,
[data-bs-theme="dark"] .rich-content td,
[data-bs-theme="dark"] .cp-richtext th,
[data-bs-theme="dark"] .cp-richtext td {
    border-color: #334155;
    color: #cbd5e1;
}

[data-bs-theme="dark"] .rich-text-content th,
[data-bs-theme="dark"] .formatted-text th,
[data-bs-theme="dark"] .article-content th,
[data-bs-theme="dark"] .content-display th,
[data-bs-theme="dark"] .rich-content th,
[data-bs-theme="dark"] .cp-richtext th {
    background: #1e2a3e;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .rich-text-content tr:nth-child(even) td,
[data-bs-theme="dark"] .formatted-text tr:nth-child(even) td,
[data-bs-theme="dark"] .article-content tr:nth-child(even) td,
[data-bs-theme="dark"] .content-display tr:nth-child(even) td,
[data-bs-theme="dark"] .rich-content tr:nth-child(even) td,
[data-bs-theme="dark"] .cp-richtext tr:nth-child(even) td {
    background: #1a2436;
}

[data-bs-theme="dark"] .rich-text-content hr,
[data-bs-theme="dark"] .formatted-text hr,
[data-bs-theme="dark"] .article-content hr,
[data-bs-theme="dark"] .content-display hr,
[data-bs-theme="dark"] .rich-content hr,
[data-bs-theme="dark"] .cp-richtext hr { border-top-color: #334155; }

/* ── Print ───────────────────────────────────────────────────────── */
@media print {
    .rich-text-content, .formatted-text, .article-content,
    .content-display, .rich-content, .cp-richtext {
        font-size: 11pt;
        line-height: 1.55;
        color: #000;
    }

    .rich-text-content a, .formatted-text a, .article-content a,
    .content-display a, .rich-content a, .cp-richtext a {
        color: #000;
        text-decoration: underline;
    }
}


/* === translation.css === */
#google_translate_element {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 300px;
    height: 40px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-te-ftab-frame {
    display: none !important;
    visibility: hidden !important;
}

body {
    top: 0 !important;
}

body > .skiptranslate {
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    top: -9999px !important;
}

.goog-te-gadget {
    font-size: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.translate-dropdown-menu {
    max-height: 450px;
    overflow-y: auto;
    min-width: 280px;
    scrollbar-width: thin;
}

.translate-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.translate-dropdown-menu::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.translate-lang-item {
    display: flex !important;
    align-items: center;
    padding: 6px 16px !important;
    font-size: 0.9rem;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.translate-lang-item:hover {
    background-color: rgba(13, 110, 253, 0.08) !important;
}

.translate-lang-item.active {
    background-color: rgba(13, 110, 253, 0.12) !important;
    font-weight: 600;
}

.translate-lang-item.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: auto;
    padding-left: 8px;
    color: #0d6efd;
    font-size: 0.75rem;
}

.translate-region-header {
    font-size: 0.7rem !important;
    letter-spacing: 0.05em;
    color: #6c757d !important;
    padding: 8px 16px 4px !important;
}

.translate-lang-english {
    font-size: 0.75rem;
}

.translate-search-wrapper {
    position: sticky;
    top: 0;
    background: var(--bs-dropdown-bg, #fff);
    z-index: 1;
}

.translate-lang-search {
    border-radius: 20px !important;
    font-size: 0.85rem;
}

.translate-lang-search:focus {
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.25) !important;
}

#translate-active-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 10px;
    line-height: 1;
    display: none;
}

.current-language-label {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.rtl-layout .navbar-nav {
    direction: rtl;
}

.rtl-layout .dropdown-menu {
    text-align: right;
}

.rtl-layout .me-1, .rtl-layout .me-2, .rtl-layout .me-3 {
    margin-right: 0 !important;
    margin-left: 0.25rem;
}

.rtl-layout .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

.rtl-layout main,
.rtl-layout .container,
.rtl-layout .page-content {
    direction: rtl;
    text-align: right;
}

.rtl-layout .card-body {
    direction: rtl;
    text-align: right;
}

.rtl-layout .text-start {
    text-align: right !important;
}

.rtl-layout .text-end {
    text-align: left !important;
}

.rtl-layout .navbar,
.rtl-layout footer {
    direction: ltr;
}

@media (max-width: 991.98px) {
    .translate-dropdown-menu {
        max-height: 350px;
        min-width: 250px;
    }

    .current-language-label {
        max-width: 80px;
    }
}

@media (max-width: 575.98px) {
    .translate-dropdown-menu {
        min-width: 220px;
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-height: 60vh;
    }

    .translate-lang-english {
        display: none;
    }
}

[data-bs-theme="dark"] .translate-dropdown-menu {
    background-color: var(--bs-dark);
    border-color: rgba(255,255,255,0.1);
}

[data-bs-theme="dark"] .translate-lang-item:hover {
    background-color: rgba(255,255,255,0.08) !important;
}

[data-bs-theme="dark"] .translate-lang-item.active {
    background-color: rgba(13, 110, 253, 0.2) !important;
}

[data-bs-theme="dark"] .translate-search-wrapper {
    background: var(--bs-dark);
}

[data-bs-theme="dark"] .translate-region-header {
    color: #adb5bd !important;
}


/* === chat-widget.css === */
.chat-widget-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.5);
}

.chat-toggle-btn svg {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease;
}

.chat-toggle-btn.active svg {
    transform: rotate(180deg);
}

.chat-unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 550px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chat-window.open {
    display: flex;
}

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

.chat-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-avatar svg {
    width: 24px;
    height: 24px;
}

.chat-header-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header-text span {
    font-size: 12px;
    opacity: 0.9;
}

.chat-status-dot {
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.chat-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fa;
}

.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    animation: messageIn 0.3s ease;
}

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

.chat-message.user {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.ai {
    background: white;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chat-message.ai .message-content {
    white-space: pre-wrap;
}

.chat-message.ai .chat-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.chat-message.ai .chat-link:hover {
    text-decoration: underline;
}

[data-theme="dark"] .chat-message.ai .chat-link {
    color: #60a5fa;
}

.chat-message-feedback {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.feedback-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.feedback-btn:hover {
    background: #f0f0f0;
}

.feedback-btn.helpful:hover {
    border-color: #28a745;
    color: #28a745;
}

.feedback-btn.not-helpful:hover {
    border-color: #dc3545;
    color: #dc3545;
}

.feedback-btn.selected {
    background: #e9ecef;
}

.chat-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 16px;
    align-self: flex-start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #007bff;
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-6px);
    }
}

.chat-suggestions {
    padding: 8px 16px;
    background: white;
    border-top: 1px solid #eee;
}

.chat-suggestions-title {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.chat-suggestion-btn {
    background: #f0f7ff;
    border: 1px solid #d0e3ff;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    color: #0056b3;
    cursor: pointer;
    margin: 4px 4px 4px 0;
    transition: all 0.2s;
}

.chat-suggestion-btn:hover {
    background: #d0e3ff;
}

.chat-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #eee;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
    transition: border-color 0.2s;
}

.chat-input-wrapper:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 14px;
    outline: none;
    resize: none;
    max-height: 100px;
    line-height: 1.4;
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.chat-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
}

.chat-welcome {
    text-align: center;
    padding: 30px 20px;
}

.chat-welcome-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
}

.chat-welcome-icon svg {
    width: 32px;
    height: 32px;
}

.chat-welcome h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #333;
}

.chat-welcome p {
    margin: 0 0 20px;
    font-size: 14px;
    color: #666;
}

.chat-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-action-btn {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-action-btn:hover {
    border-color: #007bff;
    background: #f0f7ff;
}

.quick-action-btn svg {
    width: 20px;
    height: 20px;
    color: #007bff;
}

.quick-action-btn span {
    font-size: 13px;
    color: #333;
}

.chat-end-session {
    padding: 16px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.chat-end-session p {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.chat-rating {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.rating-star {
    font-size: 28px;
    cursor: pointer;
    color: #ddd;
    transition: all 0.2s;
}

.rating-star:hover,
.rating-star.active {
    color: #ffc107;
    transform: scale(1.1);
}

.chat-end-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-end-btn:hover {
    background: #c82333;
}

@media (max-width: 480px) {
    .chat-widget-container {
        bottom: 80px;
    }
    
    .chat-window {
        width: 100%;
        height: calc(100vh - 160px);
        max-height: none;
        bottom: 70px;
        right: 0;
        border-radius: 16px 16px 0 0;
    }
    
    .chat-toggle-btn {
        width: 54px;
        height: 54px;
    }
}

[data-theme="dark"] .chat-window {
    background: #1a1a2e;
}

[data-theme="dark"] .chat-messages {
    background: #16213e;
}

[data-theme="dark"] .chat-message.ai {
    background: #1a1a2e;
    color: #e0e0e0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .chat-input-container {
    background: #1a1a2e;
    border-top-color: #333;
}

[data-theme="dark"] .chat-input-wrapper {
    background: #16213e;
    border-color: #333;
}

[data-theme="dark"] .chat-input {
    color: #e0e0e0;
}

[data-theme="dark"] .chat-suggestions {
    background: #1a1a2e;
    border-top-color: #333;
}

[data-theme="dark"] .chat-suggestion-btn {
    background: #16213e;
    border-color: #333;
    color: #60a5fa;
}

[data-theme="dark"] .chat-welcome h3 {
    color: #e0e0e0;
}

[data-theme="dark"] .chat-welcome p {
    color: #a0a0a0;
}

[data-theme="dark"] .quick-action-btn {
    background: #16213e;
    border-color: #333;
}

[data-theme="dark"] .quick-action-btn span {
    color: #e0e0e0;
}


/* === luna-widget.css === */
.luna-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 1050;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.luna-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
    text-decoration: none;
}

.luna-fab:active {
    transform: scale(0.95);
}

.luna-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.luna-fab-pulse {
    animation: lunaFabPulse 2.5s ease-in-out infinite;
}

@keyframes lunaFabPulse {
    0% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(102, 126, 234, 0.6), 0 0 0 10px rgba(102, 126, 234, 0.1);
    }
    100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
}

.luna-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 370px;
    max-height: 500px;
    background: #1a1d21;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1049;
    display: none;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.luna-chat-window.open {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.luna-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.luna-chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.luna-chat-header-info .luna-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.luna-chat-header-info .luna-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.luna-chat-header-info .luna-status {
    font-size: 0.75rem;
    opacity: 0.8;
}

.luna-chat-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.luna-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.luna-chat-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #1a1d21;
    color: #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 200px;
}

.luna-chat-body::-webkit-scrollbar {
    width: 4px;
}

.luna-chat-body::-webkit-scrollbar-track {
    background: transparent;
}

.luna-chat-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.luna-chat-welcome {
    text-align: center;
    padding: 1.5rem 1rem;
    color: rgba(233, 236, 239, 0.7);
}

.luna-chat-welcome .welcome-emoji {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.luna-chat-welcome p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.luna-chat-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: #212529;
}

.luna-chat-cta {
    display: block;
    width: 100%;
    padding: 0.65rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.luna-chat-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

@media (max-width: 480px) {
    .luna-chat-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
    }

    .luna-fab {
        bottom: 16px;
        right: 16px;
        width: 54px;
        height: 54px;
    }

    .luna-icon {
        font-size: 1.5rem;
    }
}

@media (max-width: 991px) {
    .luna-fab {
        bottom: 80px;
    }

    .luna-chat-window {
        bottom: 150px;
    }
}


/* === insights.css === */
/* Insights & Updates Professional Styling */

/* Base Layout */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Text colors removed - handled by theme-specific CSS in templates */

/* Header Section */
.insights-header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    padding: 6rem 0 4rem 0;
    margin-top: 2rem;
    margin-bottom: 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.insights-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.insights-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

.insights-header p {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    max-width: 800px;
    margin: 1rem auto 0;
    position: relative;
    z-index: 2;
}

/* Main Container */
.main-container {
    background-color: #ffffff;
    min-height: 100vh;
    padding: 3rem 0;
    position: relative;
}

/* Cards */
.card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

/* Compact card body spacing - OVERRIDDEN BY ARTICLE-SPECIFIC RULES BELOW */
.card-body {
    padding: 0.75rem 1.25rem 1rem 1.25rem;
}

/* ABSOLUTE NUCLEAR OPTION - ELIMINATE ALL SPACING */
.card-img-top {
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: none !important;
    display: block !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    vertical-align: bottom !important;
}

/* Completely eliminate any gap - target every possible element */
.card .card-img-top + * {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
}

.card-body {
    margin: 0 !important;
    padding: 0 !important;
}

/* Article cards get special ultra-compact treatment */
.article-item.card {
    padding: 0 !important;
    margin-bottom: 1.5rem !important;
}

.article-item.card .card-body {
    padding: 0.25rem 1rem 1rem 1rem !important;
    margin: 0 !important;
}

.article-item .card-img-top {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

/* Title flush against image */
.article-item .article-title {
    margin: 0 !important;
    padding: 0.25rem 0 0.5rem 0 !important;
    line-height: 1.2 !important;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.card-title {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-text {
    color: #495057;
    font-size: 1rem;
    line-height: 1.6;
}

/* Featured Articles */
.featured-article {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    border: none;
}

.featured-article .card-body {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.featured-article .card-title,
.featured-article .card-text {
    color: white;
}

.featured-article .badge {
    background-color: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Category Badges */
.category-badge {
    background-color: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    margin: 0.25rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-badge:hover {
    background-color: #2980b9;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

/* Popular Tags */
.popular-tags .badge {
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #dee2e6;
    margin: 0.25rem;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

.popular-tags .badge:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* Statistics Cards */
.stats-card {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    border: none;
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.stats-card p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 0;
    font-size: 1rem;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.newsletter-section h3 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1rem;
}

.newsletter-section p {
    color: #495057;
    margin-bottom: 1.5rem;
}

.newsletter-form .form-control {
    border-radius: 25px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
}

.newsletter-form .form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.newsletter-form .btn {
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    background-color: #3498db;
    border-color: #3498db;
}

.newsletter-form .btn:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    transform: translateY(-2px);
}

/* Article List */
.article-item {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.article-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.article-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.article-title {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.article-title:hover {
    color: #3498db;
    text-decoration: none;
}

.article-summary {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background-color: #2980b9;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .insights-header h1 {
        font-size: 2rem;
    }
    
    .insights-header p {
        font-size: 1.1rem;
    }
    
    .main-container {
        padding: 1.5rem 0;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .stats-card h3 {
        font-size: 2rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e9ecef;
    }
    
    .main-container {
        background-color: #212529;
    }
    
    .card {
        background-color: #2c3e50;
        border-color: #495057;
        color: #e9ecef;
    }
    
    .card-title {
        color: #e9ecef;
    }
    
    .card-text {
        color: #ced4da;
    }
    
    .article-item {
        background-color: #2c3e50;
        border-color: #495057;
    }
    
    .newsletter-section {
        background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    }
    
    .newsletter-section h3 {
        color: #e9ecef;
    }
    
    .newsletter-section p {
        color: #ced4da;
    }
}

/* === sponsored-content.css === */
/**
 * Sponsored Content Styling
 * Visual differentiation for sponsored listings in search results
 */

/* Sponsored Card Styling */
.sponsored-card {
    position: relative;
    border: 2px solid #FFD700 !important;
    background: linear-gradient(135deg, #FFFEF0 0%, #FFFFF8 100%);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2) !important;
    transition: all 0.3s ease;
}

.sponsored-card:hover {
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4) !important;
    transform: translateY(-2px);
}

/* Sponsored Badge */
.sponsored-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 0 12px 0 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.sponsored-badge i {
    margin-right: 4px;
}

/* Sponsored Logo */
.sponsored-logo {
    max-height: 50px;
    object-fit: contain;
}

/* Light Mode Styling */
body:not(.dark-mode) .sponsored-card {
    border-color: #FFD700 !important;
    background: linear-gradient(135deg, #FFFEF0 0%, #FFFFF8 100%);
}

body:not(.dark-mode) .sponsored-card .card-body {
    background: transparent;
}

body:not(.dark-mode) .sponsored-card .card-title,
body:not(.dark-mode) .sponsored-card .card-title a {
    color: #1a1a1a !important;
}

body:not(.dark-mode) .sponsored-card .card-text,
body:not(.dark-mode) .sponsored-card p,
body:not(.dark-mode) .sponsored-card span:not(.sponsored-badge) {
    color: #333333 !important;
}

body:not(.dark-mode) .sponsored-card .text-muted {
    color: #555555 !important;
}

body:not(.dark-mode) .sponsored-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
}

/* Dark Mode Styling - Support both body.dark-mode and Bootstrap data-bs-theme */
body.dark-mode .sponsored-card,
[data-bs-theme="dark"] .sponsored-card {
    border-color: #FFD700 !important;
    background: linear-gradient(135deg, #1a1a0a 0%, #2a2a1a 100%);
}

body.dark-mode .sponsored-card .card-body,
[data-bs-theme="dark"] .sponsored-card .card-body {
    background: transparent;
}

body.dark-mode .sponsored-badge,
[data-bs-theme="dark"] .sponsored-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000 !important;
}

body.dark-mode .sponsored-card .card-title,
body.dark-mode .sponsored-card .card-title a,
[data-bs-theme="dark"] .sponsored-card .card-title,
[data-bs-theme="dark"] .sponsored-card .card-title a {
    color: #FFD700 !important;
}

body.dark-mode .sponsored-card .card-text,
body.dark-mode .sponsored-card p,
body.dark-mode .sponsored-card span:not(.sponsored-badge),
[data-bs-theme="dark"] .sponsored-card .card-text,
[data-bs-theme="dark"] .sponsored-card p,
[data-bs-theme="dark"] .sponsored-card span:not(.sponsored-badge) {
    color: #e0e0e0 !important;
}

body.dark-mode .sponsored-card .text-muted,
[data-bs-theme="dark"] .sponsored-card .text-muted {
    color: #b0b0b0 !important;
}

body.dark-mode .sponsored-card .col-md-4,
[data-bs-theme="dark"] .sponsored-card .col-md-4 {
    background: rgba(0, 0, 0, 0.3) !important;
}

/* Button Styling for Sponsored Content */
.sponsored-card .btn-primary {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border: none;
    color: #000;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sponsored-card .btn-primary:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
}

/* Accessibility - High Contrast Focus States */
.sponsored-card:focus-within {
    outline: 3px solid #FFD700;
    outline-offset: 2px;
}

.sponsored-badge:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Animation for Sponsored Badge */
@keyframes pulse-gold {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 16px rgba(255, 215, 0, 0.6);
    }
}

.sponsored-badge {
    animation: pulse-gold 2s ease-in-out infinite;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sponsored-badge {
        font-size: 0.65rem;
        padding: 4px 12px;
    }
    
    .sponsored-logo {
        max-height: 40px;
    }
}

/* Print Styling - Clearly Mark Sponsored Content */
@media print {
    .sponsored-card {
        border: 3px solid #000 !important;
        background: #f9f9f9 !important;
    }
    
    .sponsored-badge {
        background: #000 !important;
        color: #fff !important;
    }
    
    .sponsored-badge::after {
        content: " - Paid Advertisement";
        font-weight: normal;
    }
}


/* === search-performance.css === */
/**
 * Search Performance CSS
 * Optimized styles for enhanced search functionality and loading states
 */

/* Search Loading States */
.search-loader {
    display: none;
    text-align: center;
    padding: 20px;
}

.search-loader.loading {
    display: block;
}

.search-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Search Results Performance Improvements */
.search-results {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.search-results.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Program Cards with Performance Optimizations */
.program-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
}

.program-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Image Loading States */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* Search Input Enhancements */
.search-input-enhanced {
    position: relative;
}

.search-input-enhanced::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23999"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>') no-repeat center;
    opacity: 0.5;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.search-suggestion {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.search-suggestion:hover {
    background-color: #f8f9fa;
}

.search-suggestion:last-child {
    border-bottom: none;
}

/* Results Count Display */
.results-count {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Empty State */
.empty-search-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-search-results i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 20px;
}

/* Performance Monitoring (for debugging) */
.performance-debug {
    position: fixed;
    top: 70px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 2000;
    display: none;
}

.performance-debug.show {
    display: block;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .search-results {
        padding: 10px;
    }
    
    .program-card {
        margin-bottom: 15px;
    }
    
    .search-suggestions {
        font-size: 14px;
    }
}

/* Accessibility Improvements */
.search-input:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.search-suggestion[aria-selected="true"] {
    background-color: #007bff;
    color: white;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .search-suggestions {
        background: #333;
        border-color: #555;
        color: white;
    }
    
    .search-suggestion {
        border-color: #555;
    }
    
    .search-suggestion:hover {
        background-color: #444;
    }
}

/* Animation Optimizations */
@media (prefers-reduced-motion: reduce) {
    .search-results,
    .program-card,
    img[data-src] {
        transition: none;
    }
    
    .search-spinner {
        animation: none;
    }
}

/* === readability-enhancer.css === */
/* Readability Enhancer Styles */

/* Enhancement Button Styles */
.readability-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.readability-enhance-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.readability-enhance-btn:hover:not(:disabled) {
    background-color: var(--bs-info);
    border-color: var(--bs-info);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.readability-enhance-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Enhancement Modal Styles */
.enhancement-comparison {
    background-color: rgba(33, 37, 41, 0.6);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(108, 117, 125, 0.3);
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    white-space: pre-wrap;
}

.enhancement-comparison.original-text {
    border-left: 3px solid var(--bs-warning);
}

.enhancement-comparison.enhanced-text {
    border-left: 3px solid var(--bs-success);
    background-color: rgba(25, 135, 84, 0.1);
}

/* Enhancement Stats */
.enhancement-stats {
    background-color: rgba(13, 202, 240, 0.1);
    border-radius: 6px;
    padding: 0.75rem;
    border: 1px solid rgba(13, 202, 240, 0.2);
}

/* Modal Improvements */
#readabilityModal .modal-content {
    border: 1px solid rgba(108, 117, 125, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#readabilityModal .modal-header {
    border-bottom: 1px solid rgba(108, 117, 125, 0.2);
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.1), rgba(108, 117, 125, 0.05));
}

#readabilityModal .modal-footer {
    border-top: 1px solid rgba(108, 117, 125, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .enhancement-comparison {
        font-size: 0.9rem;
        padding: 0.75rem;
        max-height: 200px;
    }
    
    .readability-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .readability-enhance-btn {
        width: 100%;
    }
    
    #readabilityModal .modal-dialog {
        margin: 0.5rem;
    }
    
    #readabilityModal .row {
        margin: 0;
    }
    
    #readabilityModal .col-md-6 {
        padding: 0.5rem;
    }
}

/* Loading Animation */
@keyframes enhancement-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 202, 240, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(13, 202, 240, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 202, 240, 0);
    }
}

.readability-enhance-btn:disabled {
    animation: enhancement-pulse 2s infinite;
}

/* Text Highlighting for Comparisons */
.text-highlight {
    background-color: rgba(255, 193, 7, 0.3);
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    border: 1px solid rgba(255, 193, 7, 0.5);
}

.text-improvement {
    background-color: rgba(25, 135, 84, 0.3);
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    border: 1px solid rgba(25, 135, 84, 0.5);
}

/* Scrollbar Styling for Enhancement Comparison */
.enhancement-comparison::-webkit-scrollbar {
    width: 6px;
}

.enhancement-comparison::-webkit-scrollbar-track {
    background: rgba(108, 117, 125, 0.1);
    border-radius: 3px;
}

.enhancement-comparison::-webkit-scrollbar-thumb {
    background: rgba(108, 117, 125, 0.3);
    border-radius: 3px;
}

.enhancement-comparison::-webkit-scrollbar-thumb:hover {
    background: rgba(108, 117, 125, 0.5);
}

/* Success Animation */
@keyframes success-check {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.enhancement-success {
    animation: success-check 0.5s ease;
}

/* === prefetch-enhancements.css === */
/* Content Prefetching Visual Enhancements */

/* Smooth transitions for cached content */
.cached-content {
    transition: all 0.2s ease;
}

.cached-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* Loading states for lazy images */
.lazy-load {
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.lazy-load:not(.loaded) {
    opacity: 0.7;
    filter: blur(2px);
}

.lazy-load.loaded {
    opacity: 1;
    filter: none;
}

/* Prefetch indicators (subtle) */
.prefetched-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    border-radius: 50%;
    opacity: 0.7;
    animation: prefetch-pulse 2s infinite;
    z-index: 10;
}

@keyframes prefetch-pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Fast loading animation */
.fast-load {
    animation: fast-load 0.4s ease-out;
}

@keyframes fast-load {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Skeleton loading for cards */
.skeleton-card {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Hover effects for better UX */
.article-card {
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.article-card:hover::before {
    left: 100%;
}

/* Performance indicator badge */
.perf-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 1000;
    display: none;
}

.perf-badge.show {
    display: block;
    animation: slide-up 0.3s ease;
}

@keyframes slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive optimizations */
@media (max-width: 768px) {
    .prefetched-indicator {
        width: 6px;
        height: 6px;
        top: 6px;
        right: 6px;
    }
    
    .cached-content:hover {
        transform: none;
        box-shadow: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .lazy-load:not(.loaded) {
        filter: none;
        opacity: 0.9;
    }
    
    .skeleton-card {
        background: #ccc;
        animation: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .lazy-load,
    .cached-content,
    .article-card,
    .prefetched-indicator {
        transition: none !important;
        animation: none !important;
    }
}

/* Print styles - hide prefetch indicators */
@media print {
    .prefetched-indicator,
    .perf-badge {
        display: none !important;
    }
}

/* === auto-refresh-enhancements.css === */
/* Auto-refresh system runs completely invisible - no visual elements */
/* This file intentionally left with minimal content to prevent any visible UI elements */

/* Hide any auto-refresh indicators that might be created dynamically */
.auto-refresh-indicator,
.nav-enhancement-controls,
.network-status,
.state-preservation-indicator,
.shortcuts-help,
.page-refresh-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Ensure no refresh buttons or controls are visible */
.nav-btn,
.refresh-pause-btn,
.refresh-close-btn {
    display: none !important;
}

/* Auto-refresh system operates silently in background */

/* === dropdown-fixes.css === */
/* Global Dropdown Styling Fixes */

/* Ensure all select elements have consistent dark styling */
select,
.form-select,
.form-control select,
select.form-control {
    background-color: #212529 !important;
    color: #ffffff !important;
    border: 1px solid #495057 !important;
    border-radius: 0.375rem;
}

/* Select option styling */
select option,
.form-select option {
    background-color: #212529 !important;
    color: #ffffff !important;
}

/* Focus states for selects */
select:focus,
.form-select:focus {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #00bf63 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 191, 99, 0.25) !important;
}

/* Bootstrap dropdown menu styling */
.dropdown-menu {
    background-color: #212529 !important;
    border: 1px solid #495057 !important;
}

.dropdown-item {
    color: #ffffff !important;
    background-color: transparent !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #00bf63 !important;
    color: #ffffff !important;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: #00bf63 !important;
    color: #ffffff !important;
}

/* Select2 plugin styling (if used) */
.select2-container--default .select2-selection--single {
    background-color: #212529 !important;
    border: 1px solid #495057 !important;
    color: #ffffff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
}

.select2-dropdown {
    background-color: #212529 !important;
    border: 1px solid #495057 !important;
}

.select2-results__option {
    background-color: #212529 !important;
    color: #ffffff !important;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: #00bf63 !important;
    color: #ffffff !important;
}

/* Chosen plugin styling (if used) */
.chosen-container-single .chosen-single {
    background-color: #212529 !important;
    border: 1px solid #495057 !important;
    color: #ffffff !important;
}

.chosen-container .chosen-drop {
    background-color: #212529 !important;
    border: 1px solid #495057 !important;
}

.chosen-container .chosen-results li {
    color: #ffffff !important;
}

.chosen-container .chosen-results li.highlighted {
    background-color: #00bf63 !important;
    color: #ffffff !important;
}

/* Input group addon styling */
.input-group-text {
    background-color: #495057 !important;
    border-color: #495057 !important;
    color: #ffffff !important;
}

/* Specific fixes for search forms */
.search-form select,
.filter-form select,
.program-filters select,
.university-filters select {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
}

/* Portal specific dropdown fixes */
.portal-filters .form-select,
.portal-search .form-select {
    background-color: #212529 !important;
    color: #ffffff !important;
}

/* Geography dropdown fixes */
.geography-select,
#country-select,
#region-select,
#city-select {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
}

/* Advanced search dropdown fixes */
.advanced-search select,
.search-filters select {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
}

/* Program portal specific fixes */
.degree-filter,
.country-filter,
.continent-filter,
.city-filter {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
}

/* Ensure text inputs also follow dark theme */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
.form-control {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #495057 !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
.form-control:focus {
    background-color: #212529 !important;
    color: #ffffff !important;
    border-color: #00bf63 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 191, 99, 0.25) !important;
}

/* Placeholder text styling */
::placeholder {
    color: #adb5bd !important;
    opacity: 1;
}

:-ms-input-placeholder {
    color: #adb5bd !important;
}

::-ms-input-placeholder {
    color: #adb5bd !important;
}

/* Datalist styling */
datalist {
    background-color: #212529 !important;
}

datalist option {
    background-color: #212529 !important;
    color: #ffffff !important;
}

/* Custom select arrow for better visibility */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important;
}

/* Multiple select styling */
select[multiple] {
    height: auto !important;
    min-height: 120px;
}

select[multiple] option:checked {
    background-color: #00bf63 !important;
    color: #ffffff !important;
}

/* Range input styling */
input[type="range"] {
    background-color: #495057 !important;
}

input[type="range"]::-webkit-slider-thumb {
    background-color: #00bf63 !important;
}

input[type="range"]::-moz-range-thumb {
    background-color: #00bf63 !important;
    border: none;
}

/* Checkbox and radio styling */
.form-check-input {
    background-color: #212529 !important;
    border-color: #495057 !important;
}

.form-check-input:checked {
    background-color: #00bf63 !important;
    border-color: #00bf63 !important;
}

.form-check-input:focus {
    border-color: #00bf63 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 191, 99, 0.25) !important;
}

/* === program-card-animations.css === */
/* Program Card Hover Animations */

/* Base card styling with transition */
.program-card,
.card.program-card,
.program-item,
.card.program-item {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.125);
    position: relative;
    overflow: hidden;
}

/* Hover effects for program cards */
.program-card:hover,
.card.program-card:hover,
.program-item:hover,
.card.program-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 123, 255, 0.3);
}

/* Dark mode hover effects */
[data-bs-theme="dark"] .program-card:hover,
[data-bs-theme="dark"] .card.program-card:hover,
[data-bs-theme="dark"] .program-item:hover,
[data-bs-theme="dark"] .card.program-item:hover {
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.1);
    border-color: rgba(66, 165, 245, 0.4);
}

/* Card title hover animation */
.program-card .card-title,
.program-item .card-title {
    transition: color 0.3s ease;
}

.program-card:hover .card-title,
.program-item:hover .card-title {
    color: #007bff;
}

[data-bs-theme="dark"] .program-card:hover .card-title,
[data-bs-theme="dark"] .program-item:hover .card-title {
    color: #42a5f5;
}

/* University name hover effect */
.program-card .university-name,
.program-item .university-name {
    transition: color 0.3s ease;
}

.program-card:hover .university-name,
.program-item:hover .university-name {
    color: #6c757d;
}

/* Badge animations */
.program-card .badge,
.program-item .badge {
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.program-card:hover .badge,
.program-item:hover .badge {
    transform: scale(1.05);
}

/* Button hover enhancements */
.program-card .btn,
.program-item .btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.program-card:hover .btn,
.program-item:hover .btn {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Image hover effects */
.program-card img,
.program-item img {
    transition: transform 0.4s ease;
}

.program-card:hover img,
.program-item:hover img {
    transform: scale(1.05);
}

/* Shimmer effect overlay */
.program-card::before,
.program-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.6s;
    z-index: 1;
    pointer-events: none;
}

[data-bs-theme="dark"] .program-card::before,
[data-bs-theme="dark"] .program-item::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
}

.program-card:hover::before,
.program-item:hover::before {
    left: 100%;
}

/* Card content z-index */
.program-card .card-body,
.program-item .card-body {
    position: relative;
    z-index: 2;
}

/* Featured program cards enhanced animation */
.featured-program {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.3s ease;
}

.featured-program:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    filter: brightness(1.05);
}

[data-bs-theme="dark"] .featured-program:hover {
    box-shadow: 0 20px 40px rgba(255, 255, 255, 0.15);
}

/* Search result cards */
.search-result-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.search-result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 123, 255, 0.25);
}

/* List view program items */
.program-list-item {
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.program-list-item:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .program-list-item:hover {
    background-color: rgba(66, 165, 245, 0.1);
}

/* Comparison slider cards */
.comparison-slider .program-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.comparison-slider .program-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Mobile responsiveness - reduced animations */
@media (max-width: 768px) {
    .program-card:hover,
    .card.program-card:hover,
    .program-item:hover,
    .card.program-item:hover {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    }
    
    .featured-program:hover {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
    }
    
    /* Disable shimmer effect on mobile for performance */
    .program-card::before,
    .program-item::before {
        display: none;
    }
}

/* Accessibility - reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .program-card,
    .card.program-card,
    .program-item,
    .card.program-item,
    .featured-program,
    .search-result-card,
    .program-list-item {
        transition: none;
    }
    
    .program-card:hover,
    .card.program-card:hover,
    .program-item:hover,
    .card.program-item:hover,
    .featured-program:hover,
    .search-result-card:hover,
    .program-list-item:hover {
        transform: none;
    }
    
    .program-card::before,
    .program-item::before {
        display: none;
    }
}

/* Focus states for accessibility */
.program-card:focus-within,
.program-item:focus-within {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.2);
}

[data-bs-theme="dark"] .program-card:focus-within,
[data-bs-theme="dark"] .program-item:focus-within {
    outline-color: #42a5f5;
    box-shadow: 0 8px 20px rgba(66, 165, 245, 0.2);
}

/* Loading state animation */
.program-card.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Stagger animation for multiple cards */
.program-grid .program-card:nth-child(1) { animation-delay: 0.1s; }
.program-grid .program-card:nth-child(2) { animation-delay: 0.2s; }
.program-grid .program-card:nth-child(3) { animation-delay: 0.3s; }
.program-grid .program-card:nth-child(4) { animation-delay: 0.4s; }
.program-grid .program-card:nth-child(5) { animation-delay: 0.5s; }
.program-grid .program-card:nth-child(6) { animation-delay: 0.6s; }

/* Entrance animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.program-card.animate-in,
.program-item.animate-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* === snippet_generator.css === */
/* Styles for Story Snippet Generator */

.snippet-generator-container {
    background: var(--bs-gray-900);
    border-radius: 12px;
    border: 1px solid var(--bs-gray-800);
    overflow: hidden;
    margin-bottom: 2rem;
}

.snippet-generator-header {
    background: var(--bs-gray-800);
    padding: 1rem;
    border-bottom: 1px solid var(--bs-gray-700);
}

.snippet-generator-header h4 {
    margin: 0;
    color: var(--bs-light);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.snippet-generator-body {
    padding: 1.5rem;
}

.snippet-canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem 0;
    min-height: 300px;
    background: var(--bs-gray-800);
    border-radius: 8px;
    padding: 1rem;
}

.snippet-canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.template-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.template-option {
    background: var(--bs-gray-800);
    border: 2px solid var(--bs-gray-700);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--bs-gray-300);
    font-size: 0.9rem;
    text-align: center;
}

.template-option:hover {
    border-color: var(--bs-primary);
    color: var(--bs-light);
}

.template-option.selected {
    border-color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    font-weight: 600;
}

.template-option .template-icon {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.snippet-action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.snippet-action-buttons button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.snippet-action-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.3);
}

.download-snippet-btn {
    background: var(--bs-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
}

.share-snippet-btn {
    border: 1px solid var(--bs-primary);
    background: transparent;
    color: var(--bs-primary);
    border-radius: 8px;
    font-weight: 600;
}

.snippet-tips {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bs-gray-800);
    border-radius: 8px;
    color: var(--bs-gray-400);
    font-size: 0.9rem;
}

.snippet-tips h5 {
    color: var(--bs-light);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.snippet-tips ul {
    padding-left: 1.5rem;
    margin-bottom: 0;
}

.snippet-tips li {
    margin-bottom: 0.5rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .snippet-generator-body {
        padding: 1rem;
    }
    
    .template-selector {
        gap: 0.5rem;
    }
    
    .template-option {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .snippet-action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .snippet-action-buttons button {
        width: 100%;
        justify-content: center;
    }
}

/* Animation for canvas update */
@keyframes canvasUpdate {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.canvas-update-animation {
    animation: canvasUpdate 0.3s ease-out forwards;
}

/* Loading animation */
.snippet-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
}

.snippet-loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(var(--bs-primary-rgb), 0.2);
    border-radius: 50%;
    border-top: 5px solid var(--bs-primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === share_visualization.css === */
/* Styles for the Share Visualization Feature */

.share-visualization-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.share-viz-icon {
    position: absolute;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.share-viz-icon i {
    font-size: 24px;
}

/* Social platform colors */
.share-viz-icon.facebook {
    background: #1877F2;
}

.share-viz-icon.twitter {
    background: #1DA1F2;
}

.share-viz-icon.linkedin {
    background: #0077B5;
}

.share-viz-icon.whatsapp {
    background: #25D366;
}

.share-viz-icon.telegram {
    background: #0088cc;
}

.share-viz-icon.tiktok {
    background: #000000;
}

.share-viz-icon.snapchat {
    background: #FFFC00;
    color: #000;
}

/* Media preview thumbnail that appears in share icons */
.share-preview-media {
    position: absolute;
    width: 30px;
    height: 30px;
    bottom: -10px;
    right: -10px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

/* Toast message styles */
.share-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeInOut 2.5s ease forwards;
}

.share-toast.success {
    background-color: #198754;
    color: white;
}

.share-toast.error {
    background-color: #dc3545;
    color: white;
}

/* Animations */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Copy URL button animation */
.quick-share.share-pulse {
    animation: sharePulse 1s ease;
}

@keyframes sharePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); box-shadow: 0 0 15px rgba(0, 123, 255, 0.6); }
    100% { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .share-viz-icon {
        width: 50px;
        height: 50px;
    }
    
    .share-viz-icon i {
        font-size: 20px;
    }
    
    .share-preview-media {
        width: 24px;
        height: 24px;
    }
}

/* === admin.css === */
/* Admin Dashboard Styles */

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, .75);
    padding: .5rem 1rem;
}

.sidebar .nav-link:hover {
    color: #fff;
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, .1);
    border-left: 3px solid #007bff;
}

.sidebar .nav-link .feather {
    margin-right: 4px;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.nav-header {
    color: rgba(255, 255, 255, .5);
}

/* Dashboard content */
.card {
    border-radius: 4px;
    border: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24);
    margin-bottom: 1rem;
}

.card-header {
    border-bottom: 0;
    font-weight: 500;
}

.hover-shadow {
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}

.hover-shadow:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, .25), 0 4px 10px rgba(0, 0, 0, .22);
}

/* Statistics cards */
.stat-card {
    border-radius: 4px;
    padding: 1rem;
    display: flex;
    align-items: center;
}

.stat-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

/* Table styles */
.table-responsive {
    border-radius: 4px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 500;
    border-top: 0;
}

/* Form styles */
.form-label {
    font-weight: 500;
}

/* Modal customizations */
.modal-header {
    border-bottom: 0;
}

.modal-footer {
    border-top: 0;
}

/* Progress indicator */
.progress {
    height: 8px;
    border-radius: 4px;
}

/* Icon colors */
.icon-success {
    color: #28a745;
}

.icon-warning {
    color: #ffc107;
}

.icon-danger {
    color: #dc3545;
}

.icon-info {
    color: #17a2b8;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        top: 5rem;
        padding-top: 0;
    }
}

/* === extreme-contrast.css === */
/**
 * Extreme Contrast CSS - Maximum Readability with Bootstrap Dark Mode
 * 
 * This CSS enhances Bootstrap's native dark mode with extreme contrast
 * while RESPECTING Bootstrap's theme-aware utility classes.
 * 
 * LIGHT MODE: Black text on white backgrounds
 * DARK MODE: White text on dark backgrounds
 */

/* ============================================
   LIGHT MODE (Default) - Minimal overrides
   ============================================ */

/* Let Bootstrap handle light mode defaults */

/* ============================================
   DARK MODE - Bootstrap theme-aware
   ============================================ */

[data-bs-theme="dark"] {
    --bs-body-bg: #0a0a0a;
    --bs-body-color: #ffffff;
    --bs-emphasis-color: #ffffff;
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] html {
    background-color: #0a0a0a;
    color: #ffffff;
}

/* Cards and containers - dark backgrounds but allow overrides */
[data-bs-theme="dark"] .card:not(.bg-transparent) {
    background-color: #1a1a1a;
    color: #ffffff;
    border-color: #333;
}

[data-bs-theme="dark"] .card-body:not(.bg-transparent) {
    background-color: #1a1a1a;
    color: #ffffff;
}

[data-bs-theme="dark"] .card-header:not(.bg-primary):not(.bg-secondary):not(.bg-success):not(.bg-danger):not(.bg-warning):not(.bg-info) {
    background-color: #2a2a2a;
    color: #ffffff;
    border-color: #333;
}

/* List group items - allow bg-transparent to work */
[data-bs-theme="dark"] .list-group-item:not(.bg-transparent) {
    background-color: #1a1a1a;
    color: #ffffff;
    border-color: #333;
}

/* Modals and tabs */
[data-bs-theme="dark"] .modal-content {
    background-color: #1a1a1a;
    color: #ffffff;
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    background-color: #2a2a2a;
    border-color: #333;
}

[data-bs-theme="dark"] .tab-pane {
    background-color: transparent;
    color: #ffffff;
}

/* Forms - dark with good contrast */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] input[type="text"],
[data-bs-theme="dark"] input[type="email"],
[data-bs-theme="dark"] input[type="password"],
[data-bs-theme="dark"] input[type="search"],
[data-bs-theme="dark"] input[type="number"] {
    background-color: #2a2a2a;
    color: #ffffff;
    border-color: #444;
}

[data-bs-theme="dark"] .form-control::placeholder,
[data-bs-theme="dark"] .form-select::placeholder,
[data-bs-theme="dark"] input::placeholder,
[data-bs-theme="dark"] textarea::placeholder {
    color: #888;
}

[data-bs-theme="dark"] .input-group-text {
    background-color: #2a2a2a;
    color: #ffffff;
    border-color: #444;
}

/* Tables */
[data-bs-theme="dark"] .table {
    --bs-table-bg: #1a1a1a;
    --bs-table-color: #ffffff;
    --bs-table-border-color: #333;
}

[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table th {
    color: #ffffff;
    border-color: #333;
}

/* Dropdowns */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #1a1a1a;
    border-color: #333;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #ffffff;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: #2a2a2a;
    color: #ffffff;
}

/* Accordion */
[data-bs-theme="dark"] .accordion-item {
    background-color: #1a1a1a;
    border-color: #333;
}

[data-bs-theme="dark"] .accordion-button {
    background-color: #2a2a2a;
    color: #ffffff;
}

[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: #333;
    color: #ffffff;
}

[data-bs-theme="dark"] .accordion-body {
    background-color: #1a1a1a;
    color: #ffffff;
}

/* Alerts - maintain Bootstrap's contextual colors but ensure readability */
[data-bs-theme="dark"] .alert-info {
    background-color: #004085;
    color: #d1ecf1;
    border-color: #0c5460;
}

[data-bs-theme="dark"] .alert-success {
    background-color: #155724;
    color: #d4edda;
    border-color: #28a745;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: #856404;
    color: #fff3cd;
    border-color: #ffc107;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: #721c24;
    color: #f8d7da;
    border-color: #dc3545;
}

/* Badges - keep visible */
[data-bs-theme="dark"] .badge.bg-primary {
    background-color: #0d6efd !important;
    color: #ffffff;
}

[data-bs-theme="dark"] .badge.bg-secondary {
    background-color: #6c757d !important;
    color: #ffffff;
}

[data-bs-theme="dark"] .badge.bg-success {
    background-color: #198754 !important;
    color: #ffffff;
}

[data-bs-theme="dark"] .badge.bg-danger {
    background-color: #dc3545 !important;
    color: #ffffff;
}

[data-bs-theme="dark"] .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000000;
}

[data-bs-theme="dark"] .badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #000000;
}

/* Links - bright and visible */
[data-bs-theme="dark"] a:not(.btn):not(.badge):not(.nav-link) {
    color: #58a6ff;
}

[data-bs-theme="dark"] a:not(.btn):not(.badge):not(.nav-link):hover {
    color: #79c0ff;
}

/* Navigation — navbar is always dark blue regardless of page theme.
   Bootstrap 5.3 light-mode variables can resolve navbar backgrounds/text
   to light colors. These overrides keep the navbar consistently dark. */

/* Background: always dark blue */
header nav.navbar {
    background-color: #1a237e !important;
}
header nav.navbar.py-1 {
    background-color: #0f1941 !important;
}

/* Text: always white */
header nav.navbar .navbar-brand,
header nav.navbar .nav-link,
header nav.navbar .nav-link.dropdown-toggle,
header nav.navbar span.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

header nav.navbar .nav-link:hover,
header nav.navbar .nav-link:focus,
header nav.navbar .navbar-brand:hover {
    color: #ffffff !important;
}

/* Ensure borders are visible */
[data-bs-theme="dark"] .border {
    border-color: #333 !important;
}

/* Text utilities remain theme-aware */
[data-bs-theme="dark"] .text-body {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

/* Background utilities */
[data-bs-theme="dark"] .bg-transparent {
    background-color: transparent !important;
}

/* IMPORTANT: Do NOT override these Bootstrap theme-aware utilities */
/* .text-body, .text-muted, .bg-transparent, etc. should work as expected */
