/* Modern Resources UI */
:root {
    --res-primary: #008060;
    --res-primary-dark: #006b52;
    --res-brand: #008060;
    --res-brand-dark: #006b52;
    --res-brand-light: #e8f7f0;
    --res-blue: #003a5b;
    --res-blue-dark: #0f172a;
    --res-accent: #2563eb;
    --res-link: #0056b3;
    --res-navy: #1a2b4b;
    --res-section-green: #22c55e;
    --res-bg-light: #f9fafb;
    --res-text: #1e293b;
    --res-text-muted: #6b7280;
    --res-border: #e5e7eb;
    --res-page-max: min(1380px, calc(100vw - 2.5rem));
    --res-page-pad: clamp(0.75rem, 1.25vw, 1.25rem);
    --res-sidebar-w: clamp(260px, 28vw, 320px);
    --res-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --res-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Page header */
.resources-page-header {
    margin-bottom: 40px;
}

.resources-page-title {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--res-blue-dark);
    margin: 0 0 12px;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.resources-page-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
    max-width: 640px;
    line-height: 1.5;
}

.section-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.section-header-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.section-icon-articles {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(46, 224, 143, 0.12) 100%);
    color: var(--res-accent);
}

.section-icon-modules {
    background: linear-gradient(135deg, rgba(46, 224, 143, 0.2) 0%, rgba(0, 58, 91, 0.1) 100%);
    color: var(--res-blue);
}

.section-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--res-blue-dark);
    margin: 0 0 4px;
    text-align: left;
    background: none;
    -webkit-text-fill-color: unset;
    padding-bottom: 0;
}

.section-heading::after {
    display: none;
}

.section-desc {
    margin: 0;
    font-size: 0.9rem;
    color: var(--res-text-muted);
}

.section-view-all {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--res-accent);
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
}

.section-view-all:hover {
    color: var(--res-blue);
}

.resources-view-back {
    margin: -20px 0 24px;
}

.resources-view-back a {
    color: var(--res-blue);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.resources-empty {
    color: var(--res-text-muted);
    padding: 24px 0;
}

.articles-grid-all {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    overflow: visible !important;
}

.modules-grid-all {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
}

.resources-value-props {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
    padding: 28px 0 8px;
    border-top: 1px solid var(--res-border);
}

.value-prop {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.value-prop-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(46, 224, 143, 0.15);
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.value-prop strong {
    display: block;
    font-size: 0.9rem;
    color: var(--res-text);
    margin-bottom: 2px;
}

.value-prop span {
    font-size: 0.8rem;
    color: var(--res-text-muted);
    line-height: 1.4;
}

.badge-best-value {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--res-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 5px 10px;
    border-radius: 6px;
    text-transform: uppercase;
}

.bundle-card.bundle-loading::after {
    display: none;
}

.resources-layout {
    background: #eef1f4;
    padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(2rem, 4vw, 3rem);
    overflow-x: clip;
    min-height: calc(100vh - 200px);
    width: 100%;
    box-sizing: border-box;
}

.resources-shell {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-sizing: border-box;
}

/* Page width shell — matches site content width */
.resources-page-width {
    width: 100%;
    max-width: var(--res-page-max);
    margin: 0 auto;
    padding: 0 var(--res-page-pad);
    box-sizing: border-box;
}

.resources-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: start;
    width: 100%;
}

.resources-content {
    min-width: 0;
    width: 100%;
}

.resources-sidebar {
    min-width: 0;
    width: 100%;
}

/* Legacy alias */
.resources-container-main {
    max-width: var(--res-page-max);
    margin: 0 auto;
    padding: 0 var(--res-page-pad);
    width: 100%;
    box-sizing: border-box;
}

.layout-divider {
    width: 2px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 58, 91, 0.1) 20%, rgba(0, 58, 91, 0.1) 80%, transparent 100%);
    margin: 0 50px;
    flex-shrink: 0;
    order: 1.5;
    /* Divider between content and sidebar */
    border-radius: 2px;
}

/* Removed duplicate - using the one above */

/* Standard Desktop (1025px - 1280px) */
@media (min-width: 1025px) and (max-width: 1280px) {
    .resources-container-main {
        padding: 0 32px;
    }

    .resources-sidebar {
        width: 340px;
        padding-left: 32px;
    }

    .layout-divider {
        margin: 0 32px;
    }

    .bundle-card {
        padding: 28px;
    }
}

/* Large Desktop (1281px - 1399px) */
@media (min-width: 1281px) and (max-width: 1399px) {
    .resources-container-main {
        padding: 0 36px;
    }

    .resources-sidebar {
        width: 360px;
        padding-left: 36px;
    }

    .layout-divider {
        margin: 0 36px;
    }
}

/* Very large screens — use a bit more width, not full bleed */
@media (min-width: 1600px) {
    .resources-layout {
        --res-page-max: min(1440px, calc(100vw - 3rem));
    }
}

/* Touch-friendly improvements for mobile and tablet */
@media (max-width: 800px),
(min-width: 801px) and (max-width: 1024px) and (orientation: portrait) {

    button,
    .btn-enroll,
    .btn-buy-single,
    .slider-arrow,
    .btn-read-more,
    .services-list li a {
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }

    .slider-arrow {
        min-height: 32px;
    }

    .btn-read-more {
        min-height: 36px;
    }
}

/* Better focus states for accessibility */
@media (max-width: 1024px) {

    button:focus,
    .btn-enroll:focus,
    .btn-buy-single:focus,
    .slider-arrow:focus,
    .services-list li a:focus {
        outline: 2px solid var(--res-blue);
        outline-offset: 2px;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .resources-layout {
        padding: 16px 0;
    }

    .resources-section {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 24px;
    }
}

/* Print styles */
@media print {

    .resources-sidebar,
    .slider-arrow,
    .slider-dots,
    .btn-enroll,
    .btn-buy-single {
        display: none;
    }

    .resources-container-main {
        flex-direction: column;
    }

    .resources-content {
        width: 100%;
    }

    .article-card-new,
    .module-card-new {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}

.bundle-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbfc 100%);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid rgba(0, 58, 91, 0.08);
    margin-bottom: 40px;
    box-shadow: var(--res-shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Bundle placeholder shimmer while admin settings load */
.bundle-card.bundle-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg,
            transparent 15%,
            rgba(255, 255, 255, 0.5) 45%,
            transparent 75%);
    transform: translateX(-120%);
    animation: bundleShimmer 1.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bundleShimmer {
    to {
        transform: translateX(120%);
    }
}

.bundle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--res-primary) 0%, var(--res-accent) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bundle-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--res-shadow-lg);
    border-color: rgba(0, 58, 91, 0.12);
}

.bundle-card:hover::before {
    opacity: 1;
}

.bundle-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    color: var(--res-blue);
}

.bundle-header i {
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--res-primary) 0%, var(--res-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(46, 224, 143, 0.2));
}

.bundle-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--res-blue) 0%, #0056b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.bundle-subtitle {
    font-size: 0.85rem;
    color: var(--res-text-muted);
    margin-bottom: 25px;
    line-height: 1.4;
}

.bundle-pricing {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 15px;
}

.price-current {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--res-blue) 0%, var(--res-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

.price-old {
    font-size: 1.2rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 500;
}

.badge-limited {
    display: inline-block;
    background: linear-gradient(135deg, #ff7e5f 0%, #ff6b35 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(255, 126, 95, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(255, 126, 95, 0.3);
    }

    50% {
        box-shadow: 0 4px 12px rgba(255, 126, 95, 0.5);
    }
}

.bundle-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.bundle-features li {
    font-size: 0.9rem;
    color: #059669;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    font-weight: 500;
    padding: 8px 0;
    transition: transform 0.2s ease, padding-left 0.2s ease;
}

.bundle-features li:hover {
    transform: translateX(4px);
    padding-left: 4px;
}

.bundle-features li i {
    font-size: 1.1rem;
    color: var(--res-primary);
    flex-shrink: 0;
    margin-top: 2px;
    filter: drop-shadow(0 1px 2px rgba(46, 224, 143, 0.3));
}

.bundle-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-enroll {
    background: linear-gradient(135deg, var(--res-primary) 0%, var(--res-primary-dark) 100%);
    color: white;
    padding: 14px 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 44px;
    box-shadow: 0 4px 12px rgba(46, 224, 143, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-enroll::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 ease;
}

.btn-enroll:hover {
    background: linear-gradient(135deg, var(--res-primary-dark) 0%, #1fb86a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 224, 143, 0.4);
}

.btn-enroll:hover::before {
    left: 100%;
}

.btn-enroll i {
    transition: transform 0.3s ease;
}

.btn-enroll:hover i {
    transform: translateX(4px);
}

.btn-buy-single {
    background: #fff;
    color: var(--res-blue-dark);
    padding: 14px 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 44px;
    border: 2px solid var(--res-blue);
    box-shadow: none;
}

.btn-buy-single:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    border-color: var(--res-blue-dark);
}

.mod-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--res-accent);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.mod-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--res-text-muted);
    margin-top: 8px;
}

.mod-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mod-meta i {
    color: var(--res-primary);
    font-size: 0.8rem;
}

.mod-title a {
    color: inherit;
    text-decoration: none;
}

.mod-title a:hover {
    color: var(--res-accent);
}

.module-thumb-link {
    text-decoration: none;
    display: block;
}

/* On Call Services */
.on-call-services {
    margin-top: 40px;
    text-align: center;
}

.on-call-services[hidden] {
    display: none !important;
}

.services-header {
    background: linear-gradient(135deg, #0056b3 0%, #003a5b 100%);
    color: white;
    padding: 12px 28px;
    border-radius: 25px;
    display: inline-block;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.3);
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.services-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 86, 179, 0.4);
}

.services-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.services-list li {
    margin-bottom: 18px;
}

.services-list li {
    transition: transform 0.2s ease;
}

.services-list li:hover {
    transform: translateX(4px);
}

.services-list li a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

.services-list li a:hover {
    color: var(--res-primary);
    border-bottom-color: var(--res-primary);
    padding-left: 8px;
}

/* Layout Divider styling moved above */

/* Increase sidebar width and divider margin on larger screens */
@media (min-width: 1400px) {
    .resources-sidebar {
        width: 380px;
        padding-left: 60px;
    }

    .layout-divider {
        margin: 0 60px;
    }
}

/* Main Content styling moved above */

.resources-section {
    margin-bottom: 60px;
}

.section-title {
    text-align: center;
    font-size: 2.4rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    background: linear-gradient(135deg, var(--res-text) 0%, var(--res-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 48px;
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 16px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--res-primary) 0%, var(--res-accent) 100%);
    border-radius: 2px;
}

/* Article Slider */
.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.articles-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    scroll-behavior: smooth;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: #d1d5db transparent;
}

/* Custom scrollbar for articles slider */
.articles-slider::-webkit-scrollbar {
    height: 6px;
}

.articles-slider::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.articles-slider::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 10px;
}

.articles-slider::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Hide scrollbar on mobile for cleaner look */
@media (max-width: 768px) {
    .articles-slider {
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE and Edge */
    }

    .articles-slider::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari, Opera */
    }
}

.article-card-new {
    flex: 0 0 calc(33.333% - 14px);
    background: white;
    border: 1px solid rgba(0, 58, 91, 0.08);
    border-radius: 20px;
    padding: 0;
    box-shadow: var(--res-shadow-sm);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-width: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    word-wrap: break-word;
    overflow-wrap: break-word;
    position: relative;
    overflow: hidden;
}

.article-card-new::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--res-primary) 0%, var(--res-accent) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.article-card-new:hover {
    box-shadow: var(--res-shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(0, 58, 91, 0.12);
}

.article-card-new:hover::before {
    transform: scaleX(1);
}

.article-card-body {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.article-card-icon {
    width: 88px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f0f9ff 0%, #e8f4fc 100%);
    border-left: 1px solid var(--res-border);
    color: var(--res-accent);
    font-size: 2rem;
}

.article-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.art-category {
    font-size: 0.7rem;
    color: #fff;
    margin-bottom: 12px;
    display: inline-block;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    background: var(--res-accent);
    border-radius: 6px;
    width: fit-content;
}

.art-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    line-height: 1.4;
    height: 3.2em;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.art-excerpt {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 20px;
    height: 4.8em;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive text heights */
@media (max-width: 768px) {
    .art-title {
        height: auto;
        min-height: 2.4em;
    }

    .art-excerpt {
        height: auto;
        min-height: 3.6em;
    }
}

.btn-read-more {
    color: var(--res-accent);
    padding: 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    align-self: flex-start;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    box-shadow: none;
}

.btn-read-more:hover {
    color: var(--res-blue);
    transform: translateX(4px);
}

.slider-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(0, 58, 91, 0.1);
    background: white;
    color: var(--res-blue);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    min-width: 44px;
    box-shadow: var(--res-shadow-sm);
}

.slider-arrow:hover {
    background: linear-gradient(135deg, var(--res-primary) 0%, var(--res-accent) 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: var(--res-shadow-md);
    border-color: transparent;
}

.slider-arrow:active {
    transform: scale(0.95);
}

/* Hide arrows on very small screens if needed */
@media (max-width: 480px) {
    .slider-arrow {
        min-width: 28px;
    }
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.dot {
    width: 12px;
    height: 12px;
    background: #d1d5db;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dot:hover {
    background: #94a3b8;
    transform: scale(1.2);
}

.dot.active {
    background: var(--res-primary);
    width: 32px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(46, 224, 143, 0.4);
}

/* Modules Grid */
.modules-grid-new {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
}

/* Ensure grid items don't overflow */
.module-card-new {
    text-align: center;
    width: 100%;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* On larger screens, show more columns */
@media (min-width: 1400px) {
    .modules-grid-new {
        grid-template-columns: repeat(4, 1fr);
    }

    .article-card-new {
        flex: 0 0 calc(25% - 15px);
    }
}

@media (min-width: 1200px) and (max-width: 1399px) {
    .modules-grid-new {
        grid-template-columns: repeat(3, 1fr);
    }

    .article-card-new {
        flex: 0 0 calc(33.333% - 14px);
    }
}

.module-card-new {
    text-align: center;
}

.module-thumb-container {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
    box-shadow: var(--res-shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.module-thumb-container:hover {
    transform: translateY(-4px);
    box-shadow: var(--res-shadow-xl);
    border-color: var(--res-primary);
}

.module-thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--res-blue);
    font-size: 1.6rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.5);
}

.module-thumb-container:hover .play-btn {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--res-primary) 0%, var(--res-accent) 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(46, 224, 143, 0.4);
}

.mod-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b 0%, var(--res-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
}

.module-card-new:hover .mod-title {
    background: linear-gradient(135deg, var(--res-primary) 0%, var(--res-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mod-desc {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure images are responsive */
.module-thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: 100%;
}

/* Responsive module card text */
@media (max-width: 768px) {
    .mod-title {
        font-size: 1.2rem;
    }

    .mod-desc {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .mod-title {
        font-size: 1.1rem;
    }

    .mod-desc {
        font-size: 0.85rem;
    }
}

@media (max-width: 1200px) {
    .resources-value-props {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .resources-page-title {
        font-size: 1.85rem;
    }

    .resources-value-props {
        grid-template-columns: 1fr;
    }

    .article-card-new {
        flex-direction: column;
    }

    .article-card-icon {
        width: 100%;
        height: 72px;
        border-left: none;
        border-top: 1px solid var(--res-border);
    }
}

/* Tablet Portrait and Below (≤1024px) */
@media (max-width: 1024px) {
    .resources-container-main {
        flex-direction: column;
        padding: 0 20px;
    }

    .resources-content {
        order: 1;
        /* Content first on mobile/tablet */
    }

    .resources-sidebar {
        width: 100%;
        padding-left: 0;
        /* Reset padding on mobile */
        padding-right: 0;
        margin-bottom: 40px;
        order: 2;
        /* Sidebar second on mobile/tablet */
    }

    .layout-divider {
        order: 1.5;
    }

    .bundle-card {
        padding: 24px;
        margin-bottom: 24px;
    }

    .layout-divider {
        display: none;
    }

    .modules-grid-new {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .article-card-new {
        flex: 0 0 calc(50% - 12px);
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .slider-wrapper {
        gap: 12px;
    }

    .slider-arrow {
        width: 36px;
        height: 36px;
    }
}

/* Tablets Portrait (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .resources-layout {
        padding: 30px 0;
    }

    .resources-container-main {
        padding: 0 24px;
    }

    .bundle-card {
        padding: 28px;
    }

    .section-title {
        font-size: 2rem;
    }

    .modules-grid-new {
        gap: 28px;
    }
}

/* Galaxy Tab 10 Specific (800x1280) */
@media (width: 800px) and (height: 1280px) {
    .resources-container-main {
        padding: 0 20px;
    }

    .bundle-card {
        padding: 24px;
    }

    .section-title {
        font-size: 1.9rem;
    }

    .modules-grid-new {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .article-card-new {
        flex: 0 0 calc(50% - 12px);
    }
}

/* Medium Devices (641px - 768px) */
@media (min-width: 641px) and (max-width: 768px) {
    .resources-layout {
        padding: 24px 0;
    }

    .resources-container-main {
        padding: 0 20px;
    }

    .bundle-card {
        padding: 22px;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .modules-grid-new {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .article-card-new {
        flex: 0 0 calc(50% - 10px);
    }

    .slider-wrapper {
        gap: 10px;
    }

    .slider-arrow {
        width: 34px;
        height: 34px;
    }
}

/* Small Devices (≤768px) */
@media (max-width: 768px) {
    .resources-layout {
        padding: 20px 0;
    }

    .resources-container-main {
        padding: 0 16px;
    }

    .price-current {
        font-size: 1.8rem;
    }

    .price-old {
        font-size: 1rem;
    }

    .modules-grid-new {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .article-card-new {
        flex: 0 0 100%;
    }

    .slider-wrapper {
        gap: 8px;
    }

    .slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    .articles-slider {
        gap: 16px;
    }

    .on-call-services {
        margin-top: 24px;
    }

    .services-header {
        font-size: 1rem;
        padding: 8px 20px;
    }

    .bundle-header h3 {
        font-size: 1.2rem;
    }

    .bundle-subtitle {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 24px;
    }
}

/* Extra Small Devices (≤480px) */
@media (max-width: 480px) {
    .resources-layout {
        padding: 16px 0;
    }

    .resources-container-main {
        padding: 0 12px;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .bundle-card {
        padding: 18px;
        margin-bottom: 20px;
    }

    .bundle-header {
        gap: 10px;
        margin-bottom: 10px;
    }

    .bundle-header i {
        font-size: 1rem;
    }

    .bundle-header h3 {
        font-size: 1rem;
    }

    .bundle-subtitle {
        font-size: 0.75rem;
        margin-bottom: 20px;
    }

    .price-current {
        font-size: 1.6rem;
    }

    .price-old {
        font-size: 0.9rem;
    }

    .badge-limited {
        font-size: 0.7rem;
        padding: 3px 10px;
        margin-bottom: 20px;
    }

    .bundle-features {
        margin-bottom: 24px;
    }

    .bundle-features li {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    .bundle-features li i {
        font-size: 0.9rem;
    }

    .btn-enroll,
    .btn-buy-single {
        padding: 12px;
        font-size: 0.85rem;
        min-height: 44px;
        /* Touch-friendly */
    }

    .bundle-actions {
        gap: 10px;
    }

    .article-card-new {
        padding: 16px;
    }

    .art-category {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }

    .art-title {
        font-size: 0.95rem;
        margin-bottom: 12px;
        height: auto;
        min-height: 2.4em;
    }

    .art-excerpt {
        font-size: 0.8rem;
        margin-bottom: 16px;
        height: auto;
        min-height: 3.6em;
    }

    .btn-read-more {
        padding: 6px 14px;
        font-size: 0.75rem;
    }

    .slider-wrapper {
        gap: 6px;
    }

    .slider-arrow {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .articles-slider {
        gap: 12px;
        padding: 8px 0;
    }

    .slider-dots {
        margin-top: 20px;
        gap: 8px;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

    .on-call-services {
        margin-top: 20px;
    }

    .services-header {
        font-size: 0.9rem;
        padding: 6px 16px;
        margin-bottom: 16px;
    }

    .services-list li {
        margin-bottom: 14px;
    }

    .services-list li a {
        font-size: 0.9rem;
    }

    .modules-grid-new {
        gap: 16px;
    }

    .mod-title {
        font-size: 1.2rem;
    }

    .mod-desc {
        font-size: 0.85rem;
    }

    .play-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Small Landscape Phones (481px - 640px) */
@media (min-width: 481px) and (max-width: 640px) {
    .resources-container-main {
        padding: 0 16px;
    }

    .bundle-card {
        padding: 20px;
    }

    .section-title {
        font-size: 1.55rem;
    }

    .modules-grid-new {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .article-card-new {
        padding: 18px;
    }

    .slider-arrow {
        width: 30px;
        height: 30px;
    }
}

/* ==========================================================================
   AFTER mockup — exact styling overrides (v3)
   ========================================================================== */
.resources-layout {
    background: #eef1f4;
    font-family: 'Inter', 'Rethink Sans', system-ui, sans-serif;
}

.resources-layout .resources-page-width {
    max-width: var(--res-page-max);
    padding-left: var(--res-page-pad);
    padding-right: var(--res-page-pad);
}

.resources-layout .resources-shell {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.07), 0 2px 8px rgba(15, 23, 42, 0.04);
    padding: clamp(1.75rem, 3.5vw, 2.75rem);
}

.resources-layout .resources-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.25rem, 3vw, 2rem);
}

.resources-layout .resources-content,
.resources-layout .resources-sidebar {
    width: 100%;
    padding: 0;
}

.resources-layout .layout-divider {
    display: none;
}

@media (min-width: 992px) {
    .resources-layout .resources-sidebar {
        position: sticky;
        top: clamp(5rem, 12vh, 7rem);
    }
}

/* Page header — centered like mockup */
.resources-layout .resources-page-header {
    margin-bottom: 40px;
    text-align: center;
}

.resources-layout .resources-page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.resources-layout .resources-page-subtitle {
    font-size: 1.0625rem;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.55;
    max-width: 560px;
    margin: 0 auto;
}

.resources-layout .subtitle-ai {
    color: var(--res-brand);
    font-weight: 600;
}

/* Section headers — mockup: green circle + white icon */
.resources-layout .section-header-row {
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.resources-layout .section-header-left {
    align-items: flex-start;
    gap: 14px;
}

.resources-layout .section-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--res-section-green);
    color: #ffffff;
    font-size: 1rem;
    box-shadow: none;
}

.resources-layout .section-icon-articles,
.resources-layout .section-icon-modules {
    background: var(--res-section-green);
    color: #ffffff;
}

.resources-layout .section-heading {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--res-navy);
    margin: 0 0 4px;
    line-height: 1.25;
}

.resources-layout .section-desc {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.45;
}

.resources-layout .section-view-all {
    color: var(--res-link);
    font-weight: 600;
    font-size: 0.875rem;
    padding-top: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.resources-layout .section-view-all:hover {
    color: #004494;
    text-decoration: underline;
}

.resources-layout .resources-section {
    margin-bottom: 56px;
}

.resources-layout #free-modules.resources-section {
    margin-bottom: 0;
}

/* Article carousel */
.resources-layout #free-articles .slider-wrapper {
    gap: 10px;
    align-items: center;
}

.resources-layout #free-articles .slider-dots {
    display: none;
}

.resources-layout .slider-arrow {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    color: #4b5563;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    align-self: center;
    flex-shrink: 0;
    z-index: 2;
}

.resources-layout .slider-arrow:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: none;
    border-color: #d1d5db;
}

.resources-layout .articles-slider {
    gap: 16px;
    padding: 2px 0;
    scroll-snap-type: x proximity;
}

.resources-layout .article-card-new {
    flex: 0 0 calc((100% - 32px) / 3);
    min-width: 240px;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    align-items: center;
    scroll-snap-align: start;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.resources-layout .article-card-new::before {
    display: none;
}

.resources-layout .article-card-new:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    border-color: #d1d5db;
}

.resources-layout .article-card-body {
    padding: 18px 12px 18px 20px;
    min-height: 0;
}

.resources-layout .art-category {
    background: #003a5b;
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.resources-layout .art-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--res-navy);
    margin-bottom: 8px;
    height: auto;
    max-height: 2.8em;
    line-height: 1.35;
    hyphens: none;
    word-break: normal;
}

.resources-layout .art-excerpt {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 12px;
    height: auto;
    max-height: 4.5em;
    flex-grow: 1;
}

.resources-layout .btn-read-more {
    color: var(--res-link);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-top: auto;
}

.resources-layout .btn-read-more:hover {
    color: #004494;
    transform: none;
}

.resources-layout .article-card-icon {
    width: 110px;
    min-height: 0;
    align-self: stretch;
    background: linear-gradient(165deg, #f0f9ff 0%, #e8f4fc 100%);
    border-left: 1px solid #e8eaed;
    color: var(--res-link);
    font-size: 2.5rem;
    padding: 12px 14px 12px 8px;
    flex-shrink: 0;
    border-radius: 0 12px 12px 0;
}

.resources-layout .article-card-icon img {
    width: 100%;
    height: auto;
    max-height: 88px;
    object-fit: contain;
    padding: 0;
}

.resources-layout .articles-grid-all {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.resources-layout .articles-grid-all .article-card-new {
    flex: none;
    min-width: 0;
}

/* Module cards — 2-column grid like mockup */
.resources-layout .modules-grid-new:not(.modules-grid-all) {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    overflow: visible;
}

.resources-layout .modules-grid-new:not(.modules-grid-all) .module-card-new {
    min-width: 0;
    max-width: none;
    text-align: left;
}

.resources-layout .modules-grid-all {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.resources-layout .modules-grid-all .module-card-new {
    flex: none;
    min-width: 0;
    max-width: none;
}

.resources-layout .module-card-new {
    text-align: left;
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
}

.resources-layout .module-card-new:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
    border-color: #d1d5db;
}

.resources-layout .module-thumb-container {
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
    border: none;
    aspect-ratio: 16 / 9;
}

.resources-layout .module-thumb-container:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

.resources-layout .play-overlay {
    background: rgba(15, 23, 42, 0.2);
}

.resources-layout .play-btn {
    width: 64px;
    height: 64px;
    font-size: 1.35rem;
    background: rgba(30, 41, 59, 0.72);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.resources-layout .play-btn i {
    margin-left: 3px;
}

.resources-layout .module-thumb-container:hover .play-btn {
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    transform: scale(1.06);
}

.resources-layout .module-card-content {
    padding: 14px 16px 16px;
}

.resources-layout .mod-tag {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.resources-layout .mod-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--res-navy);
    margin: 0 0 12px;
    background: none;
    -webkit-text-fill-color: unset;
    text-align: left;
    line-height: 1.4;
}

.resources-layout .mod-title a {
    color: inherit;
    text-decoration: none;
}

.resources-layout .mod-title a:hover {
    color: var(--res-link);
}

.resources-layout .module-card-new:hover .mod-title {
    color: var(--res-navy);
    background: none;
    -webkit-text-fill-color: unset;
}

.resources-layout .module-card-new:hover .mod-title a {
    color: var(--res-link);
}

.resources-layout .mod-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 0;
}

.resources-layout .mod-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.resources-layout .mod-meta-sep {
    margin: 0 10px;
    color: #9ca3af;
    font-weight: 700;
    line-height: 1;
    user-select: none;
}

.resources-layout .mod-meta i {
    color: #9ca3af;
    font-size: 0.8rem;
}

/* Value props — bottom of left column, 4 columns */
.resources-layout .resources-content .resources-value-props {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1rem, 2.5vw, 1.5rem);
    margin-top: clamp(2rem, 4vw, 2.75rem);
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    border: none;
    border-radius: 0;
}

.resources-layout .value-prop {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.resources-layout .value-prop-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--res-brand);
    color: var(--res-brand);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.resources-layout .value-prop strong {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    display: block;
}

.resources-layout .value-prop > span:last-child {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.45;
    max-width: 200px;
}

/* Bundle sidebar — uses course-detail-page.css (.cd-bundle-card) */
.resources-layout .cd-bundle-card.bundle-card {
    margin-bottom: 0;
    overflow: visible;
}

.resources-layout .cd-bundle-card.bundle-card::before {
    display: none !important;
}

.resources-layout .cd-bundle-card.bundle-card:hover {
    transform: none;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    border-color: #e2e8f0;
}

.resources-layout .cd-bundle-card.bundle-card:hover::before {
    opacity: 0;
}

/* ==========================================================================
   Responsive — full page width breakpoints
   ========================================================================== */

/* Large tablet: sidebar stacks below main content */
@media (max-width: 991px) {
    .resources-layout {
        --res-sidebar-w: 100%;
    }

    .resources-layout .resources-body {
        grid-template-columns: 1fr;
    }

    .resources-layout .resources-sidebar {
        position: static;
        max-width: 480px;
        margin: 0 auto;
        width: 100%;
    }

    .resources-layout .modules-grid-new:not(.modules-grid-all) {
        grid-template-columns: repeat(2, 1fr);
    }

    .resources-layout .article-card-new {
        flex: 0 0 calc(50% - 8px);
        min-width: 0;
    }
}

/* Tablet */
@media (max-width: 767px) {
    .resources-layout {
        padding: 1rem 0 2rem;
    }

    .resources-layout .resources-shell {
        padding: 1.25rem 1rem;
        border-radius: 12px;
    }

    .resources-layout .resources-page-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .resources-layout .resources-page-subtitle {
        font-size: 0.9375rem;
        padding: 0 0.5rem;
    }

    .resources-layout .section-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .resources-layout .section-header-left {
        width: 100%;
    }

    .resources-layout .section-view-all {
        margin-left: 0;
        align-self: flex-start;
        padding-top: 0;
    }

    /* Full-width carousel — arrows below so cards are not squeezed */
    .resources-layout #free-articles .slider-wrapper {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .resources-layout #free-articles .articles-slider {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
        order: 0;
    }

    .resources-layout #free-articles .slider-arrow.prev,
    .resources-layout #free-articles .slider-arrow.next {
        order: 1;
    }

    .resources-layout .slider-arrow {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .resources-layout .article-card-new {
        flex: 0 0 100%;
        min-width: 0;
        max-width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .resources-layout .article-card-body {
        padding: 18px 16px 14px;
    }

    .resources-layout .article-card-icon {
        width: 100%;
        height: auto;
        min-height: 80px;
        border-left: none;
        border-top: 1px solid #e8eaed;
        padding: 16px;
        align-self: stretch;
        border-radius: 0 0 12px 12px;
    }

    .resources-layout .article-card-icon img {
        max-height: 96px;
        width: auto;
        max-width: 100%;
        margin: 0 auto;
    }

    .resources-layout .art-title {
        max-height: none;
        hyphens: none;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .resources-layout .art-excerpt {
        max-height: none;
    }

    .resources-layout .modules-grid-new:not(.modules-grid-all),
    .resources-layout .modules-grid-all {
        grid-template-columns: 1fr;
    }

    .resources-layout .resources-content .resources-value-props {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .resources-layout .resources-sidebar {
        max-width: none;
    }
}

/* Mobile */
@media (max-width: 479px) {
    .resources-layout {
        --res-page-pad: 1rem;
        padding: 20px 0 32px;
    }

    .resources-layout .resources-page-header {
        margin-bottom: 28px;
    }

    .resources-layout .resources-page-title {
        font-size: 1.5rem;
    }

    .resources-layout .section-heading {
        font-size: 1.15rem;
    }

    .resources-layout .section-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .resources-layout .slider-arrow {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 0.75rem;
    }

    .resources-layout .article-card-body {
        padding: 16px;
    }

    .resources-layout .module-card-content {
        padding: 12px 14px 14px;
    }

    .resources-layout .cd-bundle-card.bundle-card {
        padding: 20px 16px;
    }

    .resources-layout .cd-bundle-card .big-price {
        font-size: 1.75rem;
    }

    .resources-layout .resources-content .resources-value-props {
        grid-template-columns: 1fr;
    }

    .resources-layout .value-prop > span:last-child {
        max-width: none;
    }
}

/* Wide screens — use full container width up to max */
@media (min-width: 1280px) {
    .resources-layout .article-card-new {
        flex: 0 0 calc((100% - 32px) / 3);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .resources-layout .articles-slider,
    .resources-layout .article-card-new {
        scroll-behavior: auto;
        transition: none;
    }
}

/* ==========================================================================
   Free Resources -- Articles / Videos tabbed hub (redesign, matches the
   "Free Resources Landing" mockup structure; site's own colors kept --
   var(--res-primary) etc. rather than the mockup's own forest-green/navy)
   ========================================================================== */

.resources-tabs {
    display: flex;
    gap: 8px;
    margin: 28px 0 -1px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.resources-tab-btn {
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--res-border);
    border-bottom: none;
    background: var(--res-bg-light);
    color: var(--res-text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px 10px 0 0;
    transition: color .15s ease, background .15s ease;
}

.resources-tab-btn .resources-tab-count {
    font-weight: 700;
    color: var(--res-primary);
    margin-left: 4px;
}

.resources-tab-btn.active {
    background: #fff;
    color: var(--res-blue-dark);
    box-shadow: 0 -1px 0 #fff inset;
}

.resources-tab-btn:not(.active):hover {
    color: var(--res-blue);
}

.resources-tab-panels {
    background: #fff;
    border: 1px solid var(--res-border);
    border-radius: 0 12px 12px 12px;
    padding: clamp(20px, 3vw, 32px);
}

.resources-tab-panel[hidden] {
    display: none;
}

/* Articles tab -- flat stacked card list (replaces the old slider) */
.article-card-flat {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    background: #fff;
    border: 1px solid var(--res-border);
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: var(--res-shadow-sm);
    margin-bottom: 16px;
    transition: box-shadow .2s ease, border-color .2s ease;
}

.article-card-flat:last-child {
    margin-bottom: 0;
}

.article-card-flat:hover {
    box-shadow: var(--res-shadow-md);
    border-color: rgba(0, 128, 96, 0.25);
}

.article-card-flat-body {
    min-width: 0;
    flex: 1;
}

.article-card-flat .art-title {
    margin: 0 0 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--res-blue-dark);
    line-height: 1.4;
}

.article-card-flat .art-excerpt {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #1f2937;
}

.article-card-flat-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--res-border);
}

.article-card-flat .btn-read-more {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    background: #5f6673;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 999px;
    transition: background .2s ease;
}

.article-card-flat .btn-read-more:hover {
    background: var(--res-blue-dark);
    color: #fff;
}

@media (max-width: 640px) {
    .article-card-flat .article-card-flat-footer {
        justify-content: stretch;
    }
    .article-card-flat .btn-read-more {
        width: 100%;
    }
}

/* Videos tab -- inline lesson player, ported from the retired free-module.html
   (same DOM ids/classes, so js/free-module.js works unchanged). */
.rf-page h1, .rf-page h2, .rf-page h3 { margin: 0; }

.rf-main-layout {
    display: grid;
    grid-template-columns: 260px 1fr 320px;
    gap: 28px;
    align-items: start;
}

.sidebar-left h2 {
    background: var(--res-blue);
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 1.05rem;
    margin-bottom: 18px;
    display: inline-block;
}

.lessons-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lesson-card {
    background: #fff;
    border: 1px solid var(--res-border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.lesson-header {
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    user-select: none;
    color: var(--res-text);
}

.lesson-header i {
    transition: transform 0.3s;
    color: var(--res-accent);
}

.lesson-card.active .lesson-header i {
    transform: rotate(180deg);
}

.lesson-card.active {
    border-color: var(--res-primary);
}

.lesson-content {
    padding: 0 18px 14px;
    display: none;
    font-size: 0.87rem;
    color: var(--res-text-muted);
    line-height: 1.5;
}

.lesson-card.active .lesson-content {
    display: block;
}

.lesson-meta-info {
    font-weight: normal;
    font-size: 0.78rem;
    color: var(--res-text-muted);
    margin-left: 10px;
}

.content-center .value-first-box {
    background: var(--res-bg-light);
    border: 1px solid var(--res-border);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 24px;
}

.content-center .value-first-content {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.content-center .value-first-content i {
    color: var(--res-primary);
    font-size: 1.4rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.content-center .value-first-content strong {
    display: block;
    font-size: 1.02rem;
    color: var(--res-text);
    margin-bottom: 6px;
}

.content-center .value-first-content p,
.content-center .value-first-content #shortDesc {
    margin: 0;
    font-size: 0.9rem;
    color: var(--res-text-muted);
    line-height: 1.6;
}

.video-wrapper {
    background: #000;
    border-radius: 12px;
    aspect-ratio: 16/9;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
    position: relative;
}

.video-wrapper iframe,
.video-wrapper video {
    width: 100%;
    height: 100%;
    border: none;
}

/* Click-to-load poster shown in place of the real player (see playVideo() in js/free-module.js). */
#mainVideoPlayer {
    width: 100%;
    height: 100%;
}

.video-facade {
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: linear-gradient(135deg, #0f2742 0%, #134e4a 100%);
    color: #fff;
    font-family: inherit;
}

.video-facade-play {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--res-primary, #0f7c6c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    padding-left: 5px;
    transition: transform 0.2s ease;
}

.video-facade:hover .video-facade-play,
.video-facade:focus-visible .video-facade-play {
    transform: scale(1.08);
}

.video-facade-title {
    font-size: 1rem;
    font-weight: 600;
    max-width: 90%;
    text-align: center;
    padding: 0 12px;
}

@media (max-width: 480px) {
    .video-facade-play {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
}

.user-manual-content {
    margin-top: 28px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--res-border);
    padding: 18px;
}

.user-manual-content h3 {
    margin-bottom: 14px;
    font-size: 1.1rem;
    color: var(--res-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-manual-toggle {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font: inherit;
    font-size: 1.1rem;
    color: var(--res-text);
    cursor: pointer;
    text-align: left;
}

.user-manual-chevron {
    font-size: 0.85rem;
    color: var(--res-primary);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.user-manual-toggle[aria-expanded="true"] .user-manual-chevron {
    transform: rotate(90deg);
}

.fullscreen-btn {
    background: var(--res-primary);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background: var(--res-primary-dark);
    transform: translateY(-1px);
}

.user-manual-content.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2147483000;
    border-radius: 0;
    padding: 0;
    overflow-y: auto;
    background: #323639;
}

.user-manual-content.fullscreen h3 {
    position: fixed;
    top: 20px;
    right: 30px;
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    z-index: 10;
}

.user-manual-content.fullscreen h3 > span {
    display: none;
}

.user-manual-content.fullscreen .pdf-iframe-container {
    height: 100vh !important;
    max-height: none !important;
}

.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.info-card,
.feedback-card {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--res-border);
}

.info-card h3,
.feedback-card h3 {
    margin-top: 0;
    font-size: 1.05rem;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--res-border);
    padding-bottom: 10px;
    color: var(--res-text);
}

.stats-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    font-size: 0.83rem;
    flex-wrap: wrap;
}

.rating-stars {
    color: #f59e0b;
}

.course-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--res-text-muted);
}

/* Payment card (voluntary "pay if it helped" -- unchanged behavior, still
   toggled by js/free-module.js based on the module's price / is_free). */
.payment-card {
    background: #fff;
    border: 1px solid var(--res-border);
    border-radius: 16px;
    padding: 22px;
    text-align: center;
    box-shadow: var(--res-shadow-sm);
    position: relative;
}

.payment-card .tag {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--res-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
    display: block;
}

.payment-card h4 {
    margin: 10px 0 14px;
    font-size: 1.15rem;
    color: var(--res-text);
}

.amount-input-wrapper {
    margin: 18px 0;
}

.amount-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--res-bg-light);
    border: 2px solid var(--res-primary);
    border-radius: 12px;
    padding: 12px 20px;
    max-width: 200px;
    margin: 0 auto;
}

.currency-symbol {
    font-weight: 700;
    color: var(--res-text);
    font-size: 1rem;
}

.amount-input {
    border: none;
    background: transparent;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--res-primary);
    width: 100%;
    text-align: center;
    outline: none;
    padding: 0;
}

.amount-input::-webkit-inner-spin-button,
.amount-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.amount-input[type=number] {
    -moz-appearance: textfield;
}

.payment-card p {
    font-size: 0.83rem;
    color: var(--res-text-muted);
    margin-bottom: 14px;
    line-height: 1.5;
}

.pay-now-btn {
    background: var(--res-primary);
    color: #fff;
    display: block;
    padding: 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 14px;
    transition: 0.3s;
}

.pay-now-btn:hover {
    background: var(--res-primary-dark);
    transform: translateY(-2px);
}

.decide-later-link {
    color: var(--res-text-muted);
    text-decoration: underline;
    font-size: 0.83rem;
    cursor: pointer;
}

.payment-card.collapsed {
    padding: 14px 22px;
}

.payment-card.collapsed .payment-card-content {
    display: none;
}

.payment-card-collapsed-summary {
    display: none;
    text-align: center;
    padding: 10px 0;
    color: var(--res-text-muted);
    font-size: 0.88rem;
    cursor: pointer;
    border-top: 1px solid var(--res-border);
    margin-top: 14px;
}

.payment-card.collapsed .payment-card-collapsed-summary {
    display: block;
}

.payment-card-collapsed-summary:hover {
    color: var(--res-primary);
}

/* Student Feedback card -- new, mockup's "Rate this module / Submit feedback" */
.feedback-stars-input {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 4px 0 14px;
}

.feedback-stars-input i {
    font-size: 1.4rem;
    color: #d1d5db;
    cursor: pointer;
    transition: color .15s ease, transform .1s ease;
}

.feedback-stars-input i.filled {
    color: #f59e0b;
}

.feedback-stars-input i:hover {
    transform: scale(1.15);
}

.feedback-card textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--res-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.85rem;
    resize: vertical;
    min-height: 64px;
    margin-bottom: 12px;
}

.feedback-submit-btn {
    width: 100%;
    background: var(--res-primary);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background .2s ease;
}

.feedback-submit-btn:hover {
    background: var(--res-primary-dark);
}

.feedback-submit-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.feedback-thanks {
    text-align: center;
    color: var(--res-primary);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 8px 0;
}

/* Student Feedback card -- list of other visitors' visible comments, admin-moderated
   via admin-free-module-feedback.php. Populated by js/free-module.js. */
.feedback-comments-list {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--res-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
}

.feedback-comment-item {
    font-size: 0.83rem;
}

.feedback-comment-item .fc-stars {
    color: #f59e0b;
    font-size: 0.75rem;
    margin-bottom: 3px;
}

.feedback-comment-item .fc-text {
    color: var(--res-text);
    line-height: 1.5;
}

.feedback-comment-item .fc-date {
    color: var(--res-text-muted);
    font-size: 0.72rem;
    margin-top: 2px;
}

/* Below 1400px, the two fixed-width sidebars (260px + 320px + 56px of gap = 636px)
   leave the video/description column too narrow to be usable (as little as ~305px wide
   at 1100px, still only ~417px at 1280px) — so this whole range stacks to one column
   instead of a cramped three-way split. Only genuinely spacious screens (>=1400px) get
   the side-by-side layout. Video first, then the module switcher, then overview/feedback. */
@media (max-width: 1399px) {
    .rf-main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .sidebar-left,
    .sidebar-right {
        order: 2;
    }
    .content-center {
        order: 1;
    }
}

@media (max-width: 768px) {
    .resources-tab-btn {
        padding: 9px 14px;
        font-size: 0.88rem;
    }
    .sidebar-left h2 {
        font-size: 0.95rem;
        padding: 10px 14px;
    }
    .lesson-header {
        padding: 12px 14px;
    }
    .info-card,
    .payment-card,
    .feedback-card {
        padding: 14px;
    }
    .article-card-flat {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .amount-input {
        font-size: 1.15rem;
    }
    .amount-input-container {
        padding: 10px 15px;
        max-width: 180px;
    }
    .fullscreen-btn span {
        display: none;
    }
    .fullscreen-btn {
        padding: 8px 10px;
    }
    .user-manual-content.fullscreen {
        padding: 20px 15px;
    }
    /* .resources-tab-panels' own clamp() bottoms out at a flat 20px/side below ~667px
       viewport width, which — stacked on top of .resources-page-width and .resources-shell's
       own padding — was leaving barely over 60% of a phone's width for the video/sidebar
       content. Tighten it specifically at phone widths. */
    .resources-tab-panels {
        padding: 14px;
    }
}