.container {
    padding: 5.5rem 0 3rem;
}

.marg-b0 {
    margin-bottom: 0;
}

button.splide__arrow {
    margin-top: 0;
}

/* .icon-sm {
    width: 1rem;
    height: 1rem;
} */
.stat-item .bi-eye-fill {
    margin-right: 0.25rem;
}
.star-rating-container {
    display: flex;
    align-items: center;
    margin-top: 0;
    gap: 7px;
}

.icon-sm.text-yellow-400 {
    color: rgb(250 204 21);
}

.icon-sm.text-gray-300 {
    color: rgb(209 213 219);
}

.stat-item {
    display: flex;
    align-items: center;
}

.stat-item> :not([hidden])~ :not([hidden]) {
    margin-left: 0.25rem;
}

.series-carousel {
    margin-bottom: 3rem;
}

.slide-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    aspect-ratio: 1 / 1;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.slide-date-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: rgb(0 0 0 / 0.5);
    color: rgb(255 255 255);
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.slide-content {
    position: absolute;
    bottom: 0;
    padding: 1.5rem;
    color: rgb(255 255 255);
    max-width: 56rem;
}

.slide-category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
}

.slide-category-badge.bg-red {
    background-color: rgb(220 38 38);
}

.slide-category-badge.bg-purple {
    background-color: rgb(147 51 234);
}

.slide-title {
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.slide-description {
    font-size: 1rem;
    line-height: 1.5rem;
    color: rgb(229 231 235);
    margin-bottom: 1.5rem;
    display: none;
}

.slide-stats {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: rgb(229 231 235);
    margin-bottom: 1.5rem;
}

.slide-stats> :not([hidden])~ :not([hidden]) {
    margin-left: 0.75rem;
}

.slide-cta-button {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(255 255 255);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    text-decoration: none;
}

.slide-cta-button.bg-red {
    background-color: rgb(185 28 28);
}

.slide-cta-button.bg-red:hover {
    background-color: rgb(153 27 27);
}

.slide-cta-button.bg-purple {
    background-color: rgb(126 34 206);
}

.slide-cta-button.bg-purple:hover {
    background-color: rgb(107 33 168);
}

.slide-share-button {
    /* position: absolute; */
    bottom: 1.5rem;
    right: 1.5rem;
    color: rgb(255 255 255 / 0.7);
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    background: none;
    border: none;
    cursor: pointer;
}

.slide-share-button:hover {
    color: rgb(255 255 255);
}

.slide-share-button svg {
    width: 1.5rem;
    height: 1.5rem;
}

.filter-bar-container {
    display: flex;
    margin-bottom: 2rem;
}

.filter-bar {
    display: flex;
    align-items: center;
    background-color: #f3f4f6;
    overflow-x: auto;
    border-radius: 1rem;
    padding: 0.25rem;
}

.filter-bar> :not([hidden])~ :not([hidden]) {
    margin-left: 0.5rem;
}

.filter-button {
    flex-shrink: 0;
    padding: 0.5rem 1.25rem;
    border-radius: 0.8rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 600;
    font-weight: 600;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
}

.filter-button.filter-button-active {
    background-color: #ffffff;
    color: #1f2937;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.filter-button.filter-button-inactive {
    color: #6b7280;
}

.filter-button.filter-button-inactive:hover {
    color: #111827;
}

[data-theme="dark"] .filter-bar {
    background-color: #252E36;
    border: 1px solid #34404B;
}

[data-theme="dark"] .filter-button.filter-button-active {
    background-color: #f3f4f6;
    color: #1e293b;
}

[data-theme="dark"] .filter-button.filter-button-inactive {
    color: #94a3b8;
}

[data-theme="dark"] .filter-button.filter-button-inactive:hover {
    color: #f8fafc;
}

.filter-button svg {
    width: 1rem;
    height: 1rem;
}

.filter-button> :not([hidden])~ :not([hidden]) {
    margin-left: 0.5rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}

.series-card {
    background-color: rgb(255 255 255);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.series-card:hover {
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.card-image-container {
    position: relative;
}

.card-image-container>a {
    display: block;
}

.card-image {
    width: 100%;
    height: 13rem;
    object-fit: cover;
}

.card-category-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    color: rgb(255 255 255);
    background-color: #D66D75;
    /* Default to Article color */
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Moved to bases.css */

.card-content {
    padding: 1.25rem;
    flex-grow: 1;
}

.card-title {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 700;
    color: rgb(17 24 39);
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.card-title a {
    color: inherit;
    text-decoration: none;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card-title a:hover {
    color: #3B82F6;
}

[data-theme="dark"] .card-title a:hover {
    color: #93C5FD;
}

.card-description {
    color: rgb(75 85 99);
    font-size: 0.875rem;
    line-height: 1.25rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 5;
    text-overflow: ellipsis;

}

.card-footer {
    padding: 1.25rem;
    padding-top: 0;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-stats {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: rgb(107 114 128);
}

.card-stats> :not([hidden])~ :not([hidden]) {
    margin-left: 0.5rem;
}

.card-share-button {
    color: rgb(156 163 175);
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    background: none;
    border: none;
    cursor: pointer;
}

.card-share-button:hover {
    color: #e09f7d;
}

.card-share-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.load-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 3rem;
}

.load-more-button {
    padding: 0.75rem 1.5rem;
    background-color: rgb(255 255 255);
    color: rgb(55 65 81);
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgb(229 231 235);
    cursor: pointer;
}

.load-more-button:hover {
    transform: translateY(-2px);
}

.main-layout-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar {
    display: contents;
}

/* Hide generic sidebar widgets on mobile to keep only specific ones like search filter if desired */
.sidebar .sidebar-widget {
    display: block;
    order: 10;
}

/* Ensure Search Filter Box is visible and styled correctly in mobile sidebar */
.search-filter-box {
    order: -1;
    display: block;
}

.sidebar-widget {
    background-color: rgb(255 255 255);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.sidebar>.sidebar-widget:last-child {
    margin-bottom: 0;
}

.search-filter-box {
    background-color: rgb(255 255 255);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    padding: 1.5rem 1.5rem 0.5rem;
    margin-bottom: 2rem;
    display: block;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr;
}

/* Removed previous responsive grid columns for filter-grid to maintain vertical stack style */

.widget-title {
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 700;
    color: rgb(17 24 39);
    border-bottom: 1px solid var(--gen-border);
    padding-bottom: 10px;
    margin-bottom: 1.5rem;
}

.widget-decorator {
    display: block;
    width: 3rem;
    height: 2px;
    background-color: rgb(239 68 68);
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: rgb(55 65 81);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    border-radius: 0.375rem;
    border: 1px solid rgb(209 213 219);
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
}

.form-input:focus {
    border-color: rgb(59 130 246);
    --tw-ring-color: rgb(191 219 254);
    --tw-ring-opacity: 0.5;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tw-ring-color) calc(100% * var(--tw-ring-opacity)), transparent);
    outline: none;
}

.submit-button {
    width: 100%;
    background-color: rgb(30 41 59);
    color: rgb(255 255 255);
    padding: 0.625rem 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.submit-button:hover {
    background-color: rgb(51 65 85);
}


.popular-posts-list> :not([hidden])~ :not([hidden]) {
    margin-top: 1.75rem;
}

.popular-post-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
}

.popular-card-image-container {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 0.5rem;
    aspect-ratio: 1 / 1;
}

.popular-card-image-container a {
    display: block;
    width: 100%;
    height: 100%;
}

.popular-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.popular-post-card:hover .popular-card-image {
    transform: scale(1.05);
}

.popular-card-category-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: rgb(255 255 255 / 0.9);
    color: rgb(17 24 39);
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.popular-card-read-time-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: none;
    align-items: center;
    gap: 0.25rem;
    background-color: rgb(0 0 0 / 0.5);
    color: rgb(255 255 255);
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.popular-card-read-time-badge .icon-sm {
    width: 0.875rem;
    height: 0.875rem;
}

.popular-card-meta {
    font-size: 0.75rem;
    line-height: 1rem;
    color: rgb(107 114 128);
    font-weight: 600;
    margin-bottom: 0.375rem;
    letter-spacing: 0.05em;
}

.popular-card-meta .meta-divider {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

.popular-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: rgb(17 24 39);
    line-height: 1.4;
    margin-bottom: 0.375rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 3;
    text-align: left;
}

.popular-card-title a {
    color: inherit;
    text-decoration: none;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.popular-card-title a:hover {
    color: rgb(37 99 235);
}

.popular-card-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgb(75 85 99);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.custom-date-range-container {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgb(229 231 235);
    margin-top: 1rem;
}


@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .slide-title {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }

    .slide-description {
        display: block;
    }

    .custom-date-range-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .main-content {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .series-carousel {
        margin-bottom: 4rem;
    }

    .slide-item {
        aspect-ratio: 16 / 6;
    }

    .slide-content {
        padding: 3rem;
    }

    .slide-title {
        font-size: 3rem;
        line-height: 1;
    }

    .slide-description {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    .slide-share-button {
        bottom: 3rem;
        right: 3rem;
    }

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

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .slide-content {
        padding: 4rem;
    }

    .main-layout-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem;
    }

    .main-column {
        grid-column: span 2 / span 2;
    }

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

    .sidebar {
        display: block;
        grid-column: span 1 / span 1;
        order: unset;
        margin-top: 4.25rem;
    }

    .sidebar .sidebar-widget {
        display: block;
    }
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}


.slide-item {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .slide-item {
        height: 450px;
    }
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;

    filter: contrast(1.05) brightness(1.02) saturate(1.05);

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.slide-item:hover .slide-image {
    transform: scale(1.05);
}

.slide-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 40%,
            rgba(0, 0, 0, 0.6) 70%,
            rgba(0, 0, 0, 0.9) 100%);
    z-index: 1;
}

.hero-slide-top-tags {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 2;
}

.hero-slide-category-tag {
    display: inline-block;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Old .article-tag removed */
/* Specific override for Series Card badges */
.card-category-badge.bg-article {
    background-color: #D66D75 !important;
}

.card-category-badge.bg-video {
    background-color: #6D94D6 !important;
}

.card-category-badge.bg-podcast {
    background-color: #A16DD6 !important;
}

.postcard-tag {
    background: #777c6d;
}

.hero-slide-category-tag--purple,
.hero-slide-category-tag--violet {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

/* --- View Switcher & List View Styles --- */

/* View Switcher Controls */
.view-switcher {
    display: flex;
    background: #f3f4f6;
    padding: 0.25rem;
    border-radius: 1rem;
    margin-left: 1rem;
    gap: 0.25rem;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.7rem;
    background: transparent;
    border: none;
    color: #9ca3af;
    /* Gray-400 */
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    color: #1f2937;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.view-btn.view-btn-active {
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .view-switcher {
    background-color: #252E36;
    border: 1px solid #34404B;
}

[data-theme="dark"] .view-btn.view-btn-active {
    background-color: #f3f4f6;
    color: #1e293b;
}

[data-theme="dark"] .view-btn:not(.view-btn-active) {
    color: #94a3b8;
}

[data-theme="dark"] .view-btn:not(.view-btn-active):hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Card Body Wrapper (for default Grid View) */
.card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* --- List View Mode --- */
.card-grid.view-list {
    grid-template-columns: 1fr !important;
    /* Force single column */
    gap: 1.5rem;
}

.card-grid.view-list .series-card {
    flex-direction: row;
    /* Horizontal layout */
    align-items: stretch;
    height: auto;
    min-height: 200px;
}

.card-grid.view-list .card-image-container {
    width: 280px;
    /* Fixed width for image */
    flex-shrink: 0;
    height: auto;
    border-right: 1px solid #f3f4f6;
}

.card-grid.view-list .card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    /* Align perfectly with left side */
}

/* Adjust category badge position in List View */
.card-grid.view-list .card-category-badge {
    top: 0.75rem;
    left: 0.75rem;
}

.card-grid.view-list .card-title {
    font-size: 1.5rem;
    /* Larger title in list mode */
    margin-bottom: 0.75rem;
}

.card-grid.view-list .card-description {
    font-size: 1rem;
    -webkit-line-clamp: 3;
    /* Show more lines */
    line-clamp: 3;
    margin-bottom: 1.5rem;
}

.card-grid.view-list .card-body {
    padding: 1.5rem;
    justify-content: space-between;
}

.card-grid.view-list .card-content {
    padding: 0;
    /* Remove default padding as parent controls it */
    flex-grow: unset;
    /* Let content take natural height */
}

.card-grid.view-list .card-footer {
    padding: 0;
    margin-top: 1rem;
    border-top: none;
    /* remove potential borders if added later */
}

/* Mobile Responsive for List View */
@media (max-width: 768px) {
    .card-grid.view-list {
        gap: 0.75rem;
    }

    .card-grid.view-list .series-card {
        flex-direction: row;
        /* Horizontal layout */
        align-items: stretch;
        /* Stretch to fill height */
        padding: 0;
        /* Remove padding so image touches edges */
        min-height: 90px;
        /* Ensure a minimum height */
        gap: 0;
    }

    .card-grid.view-list .card-image-container {
        width: 110px;
        /* Fixed strip width */
        height: auto;
        /* Stretch with parent */
        border-right: 1px solid #f3f4f6;
        border-radius: 0;
        /* Flush edges */
        margin: 0;
        flex-shrink: 0;
    }

    /* Hide badges */
    .card-grid.view-list .card-category-badge,
    .card-grid.view-list .slide-date-badge {
        display: none;
    }

    .card-grid.view-list .card-body {
        padding: 0.75rem;
        /* Inner padding for content */
        justify-content: center;
        gap: 0.25rem;
    }

    .card-grid.view-list .card-title {
        font-size: 0.9375rem;
        /* ~15px */
        margin-bottom: 0;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .card-grid.view-list .card-description {
        display: none;
    }

    .card-grid.view-list .card-footer {
        margin-top: 0;
        padding: 0;
    }

    .card-grid.view-list .card-stats {
        font-size: 0.75rem;
        white-space: nowrap;
        display: flex;
        flex-direction: column;
        /* Stack stats vertically */
        align-items: flex-start;
        gap: 0.25rem;
    }

    .card-grid.view-list .card-stats> :not([hidden])~ :not([hidden]) {
        margin-left: 0;
        /* Reset horizontal margin */
    }

    /* .card-grid.view-list .stat-item {
        color: #6b7280;
    } */

    .card-grid.view-list .share-wrapper {
        margin-left: auto;
    }

    .card-grid.view-list .card-share-button {
        color: #9ca3af;
    }
}

.hero-slide-date-tag {
    color: #e5e7eb;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.hero-slide-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;

    padding: 1.5rem 1.5rem 2rem 1.5rem;
    /* Increased bottom padding slightly */

    color: white;
    text-align: left;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Align content to bottom */
    gap: 4px;
    /* Reduced gap for tighter layout */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    /* Extra readability gradient */
}

.hero-slide-stats {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    font-size: 0.875rem;
    color: #e5e7eb;
    margin-bottom: 4px;
    width: auto;
    max-width: 100%;
}

/* Align the eye icon wrapper */
.hero-slide-stats>span:first-child {
    display: flex;
    align-items: center;
}

/* Text alignment */
.hero-slide-views {
    display: flex;
    align-items: center;
    line-height: 1;
}

.hero-slide-separator {
    display: flex;
    align-items: center;
    line-height: 1;
    margin-bottom: 2px;
    /* Slight optical adjustment */
}

.hero-slide-rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Ensure stars match eye icon size for consistency and alignment */


.hero-slide-title {
    font-size: 1.5rem;
    /* Adjusted for Mobile first */
    font-weight: 800;
    line-height: 1.2;
    margin: 0;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);

    padding-right: 50px;
    /* Space for share button on mobile */
}

.hero-slide-description {
    font-size: 0.9rem;
    color: #d1d5db;
    margin: 0;
    margin-top: 4px;

    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    opacity: 0.9;
    padding-right: 60px;
}

@media (min-width: 768px) {
    .hero-slide-top-tags {
        top: 1.5rem;
        left: 2rem;
        right: 2rem;
    }

    .hero-slide-body {
        padding: 2rem;
        padding-right: 80px;
    }

    .hero-slide-title {
        font-size: 2rem;
        margin-bottom: 8px;
        padding-right: 0;
    }

    .hero-slide-description {
        -webkit-line-clamp: 2;
        line-clamp: 2;
        font-size: 1rem;
        max-width: 85%;
        padding-right: 0;
    }
}

/* Increased specificity to override .share-wrapper position:relative */
.share-wrapper {
    position: relative;
}

.slide-item .slide-share-wrapper {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 3;
}

.slide-share-button {
    /* Position handled by wrapper */
    position: relative;
    bottom: 0;
    right: 0;
    z-index: 30;
    /* Above menu */

    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.3s;
}

.slide-share-button:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Ensure button is clickable above the menu */
.card-share-button {
    position: relative;
    z-index: 30;
}

@media (min-width: 768px) {
    .slide-item .slide-share-wrapper {
        bottom: 2rem;
        right: 2rem;
    }
}



/* --- Dark Mode Overrides for Cards & Widgets --- */
[data-theme="dark"] .series-card {
    background-color: #252E36;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .card-title {
    color: #f3f4f6;
    /* Gray-100 */
}

[data-theme="dark"] .card-description {
    color: #9ca3af;
    /* Gray-400 */
}

[data-theme="dark"] .card-stats {
    color: #9ca3af;
}

[data-theme="dark"] .sidebar-widget,
[data-theme="dark"] .search-filter-box {
    background-color: #252E36;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .widget-title {
    color: #f3f4f6;
}

[data-theme="dark"] .form-label {
    color: #d1d5db;
    /* Gray-300 */
}

[data-theme="dark"] .form-input {
    background-color: #1e293b;
    /* Slate-800 */
    border-color: #4b5563;
    /* Gray-600 */
    color: #f3f4f6;
}

[data-theme="dark"] .form-input:focus {
    border-color: #60a5fa;
    /* Blue-400 */
    background-color: #1e293b;
}

[data-theme="dark"] .popular-card-title {
    color: #f3f4f6;
}

[data-theme="dark"] .popular-card-meta {
    color: #9ca3af;
}

[data-theme="dark"] .popular-card-description {
    color: #9ca3af;
}

[data-theme="dark"] .load-more-button {
    background-color: #252E36;
    color: #f3f4f6;
    border-color: #34404B;
}

[data-theme="dark"] .load-more-button:hover {

    background-color: #334155;

    /* Slate-700 */

}
