/* ==========================================================================
   MODULES PAGE STYLES — Catalog & Detail  —  Mobile-First
   ========================================================================== */

/* ── Hero Mini (shared with about) ─────────────────────── */
.hero-mini {
    position: relative;
    overflow: hidden;
    padding-top: calc(var(--nav-height, 72px) + var(--space-8));
    padding-bottom: var(--space-10);
}

.hero-mini--fullscreen {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
}

/* ── Scroll cue — minimal animated mouse at the bottom of the hero ── */
.hero-mini--fullscreen .scroll-cue {
    position: absolute;
    left: 50%;
    bottom: calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 3;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.55);
    transition: color var(--duration-fast) var(--ease-smooth),
                transform var(--duration-normal) var(--ease-spring);
    animation: scroll-cue-fade var(--duration-slower) var(--ease-smooth) 800ms both;
}

.hero-mini--fullscreen .scroll-cue:hover {
    color: rgba(255, 255, 255, 0.95);
    transform: translateX(-50%) translateY(-2px);
}

.scroll-cue__mouse {
    width: 18px;
    height: 28px;
    border: 1px solid currentColor;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    padding-top: 5px;
}

.scroll-cue__wheel {
    width: 2px;
    height: 5px;
    border-radius: 1px;
    background: currentColor;
    animation: scroll-cue-wheel 1.8s var(--ease-in-out) infinite;
}

.scroll-cue__label {
    font-size: 9px;
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: inherit;
}

.hero-mini--fullscreen .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-bottom: env(safe-area-inset-bottom, var(--space-6));
}

.hero-mini--fullscreen .breadcrumb {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-4);
}

/* Active breadcrumb chip en hero — fondo gradient-fill para accesibilidad */
.hero-mini--fullscreen .breadcrumb__chip--active {
    background: var(--gradient-fill);
    border-color: rgba(255, 255, 255, 0.2);
}

.hero-mini--fullscreen .breadcrumb__chip--active .breadcrumb__label,
.hero-mini--fullscreen .breadcrumb__chip--active i,
.hero-mini--fullscreen .breadcrumb__chip--active .breadcrumb__chevron {
    background-image: none;
    -webkit-text-fill-color: #fff;
    color: #fff;
}

.hero-mini__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.hero-mini__bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}


.hero-mini__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 75% 55% at 50% 50%,
            color-mix(in srgb, #000 70%, transparent) 0%,
            color-mix(in srgb, #000 20%, transparent) 60%,
            transparent 100%
        ),
        linear-gradient(to bottom,
            color-mix(in srgb, #000 35%, transparent) 0%,
            transparent 40%,
            color-mix(in srgb, #000 50%, transparent) 100%
        );
}

.hero-mini__content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: var(--container-narrow);
    margin-inline: auto;
    padding-inline: var(--space-5);
}

/* Base: smaller title for mobile */
.hero-mini__title {
    font-size: var(--text-3xl);
    font-weight: var(--fw-extrabold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    margin-bottom: var(--space-4);
}

/* Module detail: fluid title — clamp escala suave sin breakpoints */
.hero-mini__title--module {
    font-size: clamp(2.5rem, 8vw, 6.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-4);
}


.hero-mini__subtitle {
    font-size: clamp(var(--text-base), 2vw, var(--text-lg));
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
    max-width: 560px;
    margin-inline: auto;
    margin-bottom: var(--space-6);
}


/* ── Search Bar — Liquid Glass elevated ────────────────── */
.modules-search {
    max-width: 520px;
    margin-inline: auto;
}

.modules-search__field {
    position: relative;
    display: flex;
    align-items: center;
}

.modules-search__icon {
    position: absolute;
    left: var(--space-5);
    z-index: 1;
    color: var(--text-muted);
    font-size: var(--text-lg);
    pointer-events: none;
    transition: color var(--duration-fast) var(--ease-smooth),
                transform var(--duration-fast) var(--ease-spring);
}

.modules-search__input {
    width: 100%;
    padding: var(--space-4) var(--space-5) var(--space-4) calc(var(--space-5) + 28px);
    font-size: max(1rem, var(--text-base));
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--glass-bg);
    border: 1px solid color-mix(in srgb, var(--glass-light) 18%, transparent);
    border-radius: var(--radius-full);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    box-shadow: var(--glass-shadow);
    transition: border-color var(--duration-fast) var(--ease-smooth),
                box-shadow var(--duration-normal) var(--ease-spring),
                background-color var(--duration-fast) var(--ease-smooth);
}

.modules-search__input::placeholder {
    color: var(--text-muted);
}

.modules-search__input:hover {
    border-color: color-mix(in srgb, var(--glass-light) 30%, transparent);
    background-color: var(--glass-bg-hover);
    box-shadow: var(--glass-shadow),
                0 2px 12px color-mix(in srgb, var(--color-primary) 6%, transparent);
}

.modules-search__input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--color-primary) 35%, transparent);
    background-color: var(--glass-bg-hover);
    box-shadow: var(--glass-shadow),
                0 0 0 3px color-mix(in srgb, var(--color-primary) 12%, transparent),
                0 4px 20px color-mix(in srgb, var(--color-primary) 8%, transparent);
}

[data-theme="dark"] .modules-search__input {
    border-color: color-mix(in srgb, var(--glass-light) 8%, transparent);
}

[data-theme="dark"] .modules-search__input:hover {
    border-color: color-mix(in srgb, var(--color-secondary) 20%, transparent);
    box-shadow: var(--glass-shadow),
                0 2px 12px color-mix(in srgb, var(--color-secondary) 6%, transparent);
}

[data-theme="dark"] .modules-search__input:focus {
    border-color: color-mix(in srgb, var(--color-secondary) 45%, transparent);
    box-shadow: var(--glass-shadow),
                0 0 0 3px color-mix(in srgb, var(--color-secondary) 15%, transparent),
                0 4px 20px color-mix(in srgb, var(--color-secondary) 8%, transparent);
}

.modules-search__field:focus-within .modules-search__icon {
    color: var(--color-primary);
    transform: scale(1.1);
}

[data-theme="dark"] .modules-search__field:focus-within .modules-search__icon {
    color: var(--color-secondary);
}

.modules-search__count {
    display: block;
    margin-top: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    text-align: center;
}

/* Taxonomy trigger button — gradient fill + liquid glass */
.taxonomy-trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-3);
    padding: 0.55em 1.2em;
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    font-family: var(--font-sans);
    color: #fff;
    background: var(--gradient-fill);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    backdrop-filter: blur(var(--glass-blur-soft));
    -webkit-backdrop-filter: blur(var(--glass-blur-soft));
    box-shadow: var(--glass-shadow),
                0 2px 10px rgba(30, 46, 122, 0.25);
    cursor: pointer;
    transition: opacity var(--duration-fast) var(--ease-smooth),
                transform var(--duration-fast) var(--ease-spring),
                box-shadow var(--duration-fast) var(--ease-smooth);
}

.taxonomy-trigger:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: var(--glass-shadow),
                0 4px 16px rgba(30, 46, 122, 0.35);
}

[data-theme="dark"] .taxonomy-trigger {
    box-shadow: var(--glass-shadow),
                0 2px 10px rgba(6, 182, 212, 0.25);
}

[data-theme="dark"] .taxonomy-trigger:hover {
    box-shadow: var(--glass-shadow),
                0 4px 16px rgba(6, 182, 212, 0.35);
}


/* ── Filter Bar — iOS Segmented Control ───────────────── */
.modules-filters {
    position: relative;
    padding-block: var(--space-6);
}

/* Bar: scroll container */
.modules-filters__bar {
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.modules-filters__bar::-webkit-scrollbar {
    display: none;
}

/* Chevron indicators use shared .scroll-chevron from components.css (JS-created) */

/* Track: glass container, positioning context for indicator */
.modules-filters__track {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1);
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid color-mix(in srgb, var(--glass-light) 18%, transparent);
    border-radius: var(--radius-full);
    box-shadow: none;
}

/* Indicator: sliding frosted pill behind active item */
.modules-filters__indicator {
    position: absolute;
    top: var(--space-1);
    left: 0;
    height: calc(100% - var(--space-1) * 2);
    width: 0;
    border-radius: var(--radius-full);
    background: var(--bg-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08),
                0 1px 1px rgba(0, 0, 0, 0.04);
    pointer-events: none;
    z-index: 0;
}

/* Pills: transparent, text-only, above indicator */
.modules-filters__pill {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
    font-family: var(--font-sans);
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition: color var(--duration-fast) var(--ease-smooth);
}

.modules-filters__pill i {
    font-size: 0.85em;
    opacity: 0.5;
    transition: opacity var(--duration-fast) var(--ease-smooth);
}

.modules-filters__pill:hover {
    color: var(--text-secondary);
}
.modules-filters__pill:hover i {
    opacity: 0.7;
}

/* Active: primary button gradient + liquid glass */
.modules-filters__pill.is-active {
    --glass-reflex-light: 0;
    --glass-reflex-dark: 1;
    color: #ffffff;
    font-weight: var(--fw-semibold);
    background: var(--gradient-fill);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--glass-shadow-light),
                0 2px 8px color-mix(in srgb, var(--color-primary) 18%, transparent);
}
.modules-filters__pill.is-active i {
    color: #ffffff;
    opacity: 1;
}

/* Count badge */
.modules-filters__count {
    font-size: var(--text-2xs);
    font-weight: var(--fw-semibold);
    padding: 1px var(--space-2);
    min-width: 1.4em;
    text-align: center;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.05);
    color: inherit;
    opacity: 0.6;
    line-height: var(--leading-normal);
    transition: opacity var(--duration-fast) var(--ease-smooth),
                background var(--duration-fast) var(--ease-smooth);
}
.modules-filters__pill.is-active .modules-filters__count {
    opacity: 1;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

/* ── Dark mode ── */
[data-theme="dark"] .modules-filters__track {
    --glass-reflex-light: 0.3;
    --glass-reflex-dark: 1.2;
    border-color: color-mix(in srgb, var(--glass-light) 6%, transparent);
    box-shadow: none;
}
[data-theme="dark"] .modules-filters__indicator {
    background: var(--bg-elevated);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .modules-filters__pill.is-active {
    background: var(--gradient-fill);
    border-color: rgba(255, 255, 255, 0.14);
}
[data-theme="dark"] .modules-filters__pill.is-active i {
    color: #ffffff;
}
[data-theme="dark"] .modules-filters__count {
    background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .modules-filters__pill.is-active .modules-filters__count {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}


/* ── Module Catalog ────────────────────────────────────── */
.modules-catalog {
    padding-bottom: var(--space-4);
}

.modules-catalog__group {
    margin-bottom: var(--space-8);
}

.modules-catalog__group:last-child {
    margin-bottom: 0;
}

/* Group header — icon + title left, count text right */
.modules-catalog__group-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.modules-catalog__group-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.modules-catalog__group-icon svg {
    width: 100%;
    height: 100%;
}

[data-theme="dark"] .modules-catalog__group-icon {
    color: var(--color-secondary);
}

.modules-catalog__group-title {
    font-size: var(--text-base);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
    line-height: var(--leading-normal);
}

.modules-catalog__group-count {
    margin-left: auto;
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
    color: var(--color-primary);
    white-space: nowrap;
}

[data-theme="dark"] .modules-catalog__group-count {
    color: var(--color-secondary);
}

/* ── Ecosistema Glymdo — banda oscura; solo el fondo sale del container ── */
.modules-catalog__group--glymdo {
    position: relative;
    isolation: isolate;
    padding-block: var(--space-10) var(--space-8);
}

.modules-catalog__group--glymdo::before {
    content: '';
    position: absolute;
    inset: 0 calc(50% - 50vw);
    z-index: -1;
    background: var(--glymdo-panel-bg);
}

/* Dark: sin fondo propio — la banda se funde con la página */
[data-theme="dark"] .modules-catalog__group--glymdo::before {
    background: none;
}

.modules-catalog__group--glymdo .modules-catalog__group-title {
    color: var(--glymdo-panel-text);
}

.modules-catalog__group-mark {
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    object-fit: contain;
}

.modules-catalog__glymdo-note {
    margin-right: auto;
    font-size: var(--text-xs);
    color: var(--glymdo-panel-muted);
    line-height: var(--leading-normal);
}

a.modules-catalog__glymdo-cta,
[data-theme="dark"] a.modules-catalog__glymdo-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    margin-left: auto;
    color: var(--glymdo-panel-text);
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
    white-space: nowrap;
    transition: color var(--duration-fast) var(--ease-smooth),
                transform var(--duration-fast) var(--ease-spring);
}

a.modules-catalog__glymdo-cta:hover,
[data-theme="dark"] a.modules-catalog__glymdo-cta:hover {
    color: var(--glymdo-accent);
    transform: translateX(2px);
}

.modules-catalog__glymdo-cta svg {
    width: 12px;
    height: 12px;
    transition: transform var(--duration-fast) var(--ease-spring);
}

.modules-catalog__glymdo-cta:hover svg {
    transform: translateX(3px);
}

@media (min-width: 1024px) {
    .modules-catalog__group--glymdo {
        padding-block: var(--space-12) var(--space-10);
    }
}

/* ── Swiper — Apple-style transform-based (no scroll) ───── */

/* Breaks out of container to reach page edges */
.modules-catalog__swiper {
    position: relative;
    margin-inline: calc(-1 * var(--space-6));
}

/* ── Module card — Apple TV+ portrait poster (9:16) ──────── */
.card--module {
    aspect-ratio: 9 / 14;
    min-height: unset;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-4);
    background: #080814;
    border-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: #fff;
    cursor: pointer;
}

.card--module:hover {
    border-color: rgba(255, 255, 255, 0.24);
    transform: translateY(-4px) scale(1.01);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 8px 24px color-mix(in srgb, var(--color-primary) 15%, transparent),
        0 0 0 1px rgba(255, 255, 255, 0.12);
}

.card--module .card__bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 0;
    transition: transform var(--duration-slow) var(--ease-smooth);
}

.card--module:hover .card__bg-img {
    transform: scale(1.06);
}

/* Gradient bottom-heavy: imagen visible arriba, texto legible abajo */
.card--module .card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        color-mix(in srgb, #000 65%, transparent) 0%,
        color-mix(in srgb, #000 25%, transparent) 30%,
        transparent 55%
    );
}

/* Header flota en la parte superior */
.card--module .card__header {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    right: var(--space-4);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0;
    z-index: 2;
}

/* Body y footer en la parte inferior (flex-end del article) */
.card--module .card__body {
    position: relative;
    z-index: 2;
    margin-bottom: var(--space-2);
    flex: unset;
}

.card--module .card__title {
    font-size: var(--text-lg);
    font-weight: 800;
    line-height: var(--leading-tight);
    color: #fff;
    letter-spacing: -0.02em;
}

.card--module .card__text {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.65);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: var(--leading-snug);
}

.card__stretched-link {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
}

/* Module card icon — liquid glass sobre overlay oscuro */
.card--module .card__icon {
    width: 28px;
    height: 28px;
    margin-bottom: 0;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: color-mix(in srgb, var(--color-primary) 18%, transparent);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    color: #fff;
    background-image: none;
    transition: background-color var(--duration-fast) var(--ease-smooth),
                border-color var(--duration-fast) var(--ease-smooth),
                color var(--duration-fast) var(--ease-smooth);
}

.card--module .card__icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

[data-theme="dark"] .card--module .card__icon {
    background-color: color-mix(in srgb, var(--color-secondary) 18%, transparent);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Badges sobre imagen — clases propias sin conflicto de especificidad */
.badge--on-image {
    color: #fff;
    text-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.badge--on-image--standard {
    background: color-mix(in srgb, var(--color-primary) 35%, transparent);
    border-color: color-mix(in srgb, var(--color-primary) 55%, transparent);
}

.badge--on-image--premium {
    background: color-mix(in srgb, var(--color-secondary) 55%, transparent);
    border-color: color-mix(in srgb, var(--color-secondary) 70%, transparent);
}

.badge--on-image--included {
    background: color-mix(in srgb, var(--color-success) 35%, transparent);
    border-color: color-mix(in srgb, var(--color-success) 55%, transparent);
}

.badge--on-image--duo {
    background: color-mix(in srgb, var(--color-warning) 35%, transparent);
    border-color: color-mix(in srgb, var(--color-warning) 55%, transparent);
}

.badge--on-image--glymdo {
    background: color-mix(in srgb, var(--glymdo-accent) 45%, transparent);
    border-color: color-mix(in srgb, var(--glymdo-accent) 65%, transparent);
}

/* Eye: imagen apaisada del holograma — completa, sin recorte, sobre fondo negro */
.card--module-glymdo .card__bg-img[src*="eye-card"] {
    object-fit: contain;
    object-position: center;
    background-color: #000000;
}

/* Card sizing in glass-swiper track — portrait 9:16 */
.glass-swiper__track .card--module {
    flex: 0 0 clamp(220px, 64vw, 255px);
    height: auto;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

/* Empty state */
.modules-catalog__empty,
.modules-catalog__no-results {
    text-align: center;
    padding: var(--space-16) var(--space-6);
}

.modules-catalog__empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-6);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--gradient-card);
    color: var(--text-muted);
    font-size: var(--text-3xl);
}

.modules-catalog__empty h3,
.modules-catalog__no-results h3 {
    font-size: var(--text-xl);
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-2);
}

.modules-catalog__empty p,
.modules-catalog__no-results p {
    color: var(--text-tertiary);
    margin-bottom: var(--space-6);
}


/* ── Stats adjacency ──────────────────────────────────── */
/* Reduce gap between catalog and stats */
.modules-catalog + .modules-stats {
    margin-top: calc(-1 * var(--space-4));
}



/* ══════════════════════════════════════════════════════════
   Module Detail Page
   Follows home showcase pattern — fluid sections, no cards
   ══════════════════════════════════════════════════════════ */

/* badge--glass-text en el hero siempre blanco — (0,3,0) gana sobre dark override (0,2,0) */
.hero-mini--fullscreen[data-theme="dark"] .badge--glass-text,
.hero-mini--fullscreen[data-theme="dark"] .badge--glass-text span,
.hero-mini--fullscreen[data-theme="dark"] .badge--glass-text i {
    background-image: none;
    -webkit-text-fill-color: #fff;
    color: #fff;
}

/* ── Hero additions (extends hero-mini base) ──────────── */
.module-detail__hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
    margin-bottom: var(--space-5);
}

/* Transparent glass badge — dark gradient on text (categoría, detail section) */
.badge--glass-text {
    background: color-mix(in srgb, var(--color-primary) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-primary) 20%, transparent);
    backdrop-filter: var(--glass-backdrop-soft);
}

.badge--glass-text span,
.badge--glass-text {
    background-image: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge--glass-text i {
    display: inline-block;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .badge--glass-text {
    background: color-mix(in srgb, var(--color-secondary) 10%, transparent);
    border-color: color-mix(in srgb, var(--color-secondary) 20%, transparent);
}

[data-theme="dark"] .badge--glass-text,
[data-theme="dark"] .badge--glass-text span {
    background-image: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .badge--glass-text i {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Solid gradient badge — Dynbel azul (estándar) */
.badge--glass-gradient {
    background: var(--gradient-fill);
    border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
    color: #f0f4ff;
    backdrop-filter: var(--glass-backdrop-soft);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .badge--glass-gradient {
    border-color: color-mix(in srgb, var(--color-secondary) 35%, transparent);
    color: #eaf6ff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Premium badge — cyan Dynbel (especializado/personalizado) */
.badge--premium {
    background: linear-gradient(155deg, color-mix(in srgb, var(--color-secondary) 28%, black) 0%, color-mix(in srgb, var(--color-secondary) 60%, black) 40%, var(--color-secondary) 100%);
    border: 1px solid color-mix(in srgb, var(--color-secondary) 30%, transparent);
    color: #ecfeff;
    backdrop-filter: var(--glass-backdrop-soft);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .badge--premium {
    border-color: color-mix(in srgb, var(--color-secondary) 40%, transparent);
    color: #cffafe;
}


/* Included badge — verde success (base/free modules) */
.badge--included {
    background: linear-gradient(155deg, color-mix(in srgb, var(--color-success) 28%, black) 0%, color-mix(in srgb, var(--color-success) 60%, black) 40%, var(--color-success) 100%);
    border: 1px solid color-mix(in srgb, var(--color-success) 30%, transparent);
    color: #ecfdf5;
    backdrop-filter: var(--glass-backdrop-soft);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .badge--included {
    border-color: color-mix(in srgb, var(--color-success) 35%, transparent);
    color: #dcfce7;
}

/* Duo badge — ámbar warning (2 modalidades) */
.badge--duo {
    background: linear-gradient(155deg, color-mix(in srgb, var(--color-warning) 28%, black) 0%, color-mix(in srgb, var(--color-warning) 60%, black) 40%, var(--color-warning) 100%);
    border: 1px solid color-mix(in srgb, var(--color-warning) 30%, transparent);
    color: #fefce8;
    backdrop-filter: var(--glass-backdrop-soft);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .badge--duo {
    border-color: color-mix(in srgb, var(--color-warning) 35%, transparent);
    color: #fef9c3;
}

/* Glymdo badge — naranja de la marca aliada (hero del detalle, fondo oscuro) */
.badge--glymdo {
    background: linear-gradient(155deg, color-mix(in srgb, var(--glymdo-accent) 28%, black) 0%, color-mix(in srgb, var(--glymdo-accent) 60%, black) 40%, var(--glymdo-accent) 100%);
    border: 1px solid color-mix(in srgb, var(--glymdo-accent) 30%, transparent);
    color: #fff7ed;
    backdrop-filter: var(--glass-backdrop-soft);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}


/* Gradient CTA button — uses gradient-text colors as background */
.btn--gradient-cta {
    background: var(--gradient-text);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 12px color-mix(in srgb, var(--color-primary) 25%, transparent),
                0 4px 20px color-mix(in srgb, var(--color-secondary) 15%, transparent);
    transition: transform var(--duration-fast) var(--ease-spring),
                box-shadow var(--duration-normal) var(--ease-smooth);
}

.btn--gradient-cta:hover {
    transform: translateY(-2px) scale(1.03);
    color: #ffffff;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--color-primary) 35%, transparent),
                0 8px 32px color-mix(in srgb, var(--color-secondary) 20%, transparent);
}

.btn--gradient-cta:active {
    transform: translateY(0) scale(0.98);
    color: #ffffff;
}

[data-theme="dark"] .btn--gradient-cta {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    box-shadow: 0 2px 12px color-mix(in srgb, var(--color-secondary) 25%, transparent),
                0 4px 20px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

[data-theme="dark"] .btn--gradient-cta:hover {
    color: #ffffff;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--color-secondary) 35%, transparent),
                0 8px 32px color-mix(in srgb, var(--color-primary) 20%, transparent);
}

/* Botón Glymdo — gradiente naranja de la marca aliada (mismo en ambos temas) */
.btn--glymdo {
    background: var(--glymdo-gradient-fill);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 12px color-mix(in srgb, var(--glymdo-accent) 30%, transparent),
                0 4px 20px color-mix(in srgb, var(--glymdo-accent-2) 15%, transparent);
    transition: transform var(--duration-fast) var(--ease-spring),
                box-shadow var(--duration-normal) var(--ease-smooth);
}

.btn--glymdo:hover {
    transform: translateY(-2px) scale(1.03);
    color: #ffffff;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--glymdo-accent) 40%, transparent),
                0 8px 32px color-mix(in srgb, var(--glymdo-accent-2) 20%, transparent);
}

.btn--glymdo:active {
    transform: translateY(0) scale(0.98);
    color: #ffffff;
}

.hero-mini__actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: center;
}

.hero-mini__actions .btn {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-base);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Showcase — text + device side by side ────────────── */
.module-detail__block {
    display: flex;
    flex-direction: column;
    gap: var(--space-10);
    align-items: center;
}

.module-detail__text {
    text-align: center;
}

.module-detail__text .badge {
    margin-bottom: var(--space-5);
}

.module-detail__text h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.module-detail__text p {
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    text-align: justify;
    margin-bottom: var(--space-4);
}

.module-detail__visual {
    width: 100%;
}

/* ── Video Player — Liquid Glass controls ─────────────── */
.video-player {
    position: relative;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    background-color: #000;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.06),
        0 20px 48px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .video-player {
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.2),
        0 20px 48px rgba(0, 0, 0, 0.15);
}

.video-player__video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background-color: #000;
    cursor: pointer;
}

/* Controls — floating liquid glass bar over the video */
.video-player__controls {
    position: absolute;
    bottom: var(--space-3);
    left: var(--space-3);
    right: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.12),
        0 0 0 0.5px rgba(255, 255, 255, 0.1) inset;
    opacity: 1;
    transition: opacity var(--duration-normal) var(--ease-smooth);
    z-index: 2;
}

[data-theme="dark"] .video-player__controls {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.3),
        0 0 0 0.5px rgba(255, 255, 255, 0.06) inset;
}

/* Hide controls when playing, show on hover */
.video-player--playing .video-player__controls {
    opacity: 0;
}

.video-player--playing:hover .video-player__controls {
    opacity: 1;
}

.video-player__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background-color var(--duration-fast) var(--ease-smooth);
}

.video-player__btn:hover {
    background-color: rgba(255, 255, 255, 0.18);
}

.video-player__btn svg {
    width: 1em;
    height: 1em;
}

.video-player__btn--play svg {
    width: 1.25em;
    height: 1.25em;
}

.video-player__progress {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.video-player__progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background: #fff;
    transition: width 100ms linear;
}

.video-player__time {
    font-size: var(--text-2xs);
    font-weight: var(--fw-medium, 500);
    color: rgba(255, 255, 255, 0.8);
    min-width: 3ch;
    font-variant-numeric: tabular-nums;
    user-select: none;
}

/* iPhone video / card image inside screen */
.device-iphone__video,
.device-iphone__card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ══════════════════════════════════════════════════════════
   Module Features — Numbered list, fluid layout
   ══════════════════════════════════════════════════════════ */
.module-features {
    padding-block: var(--space-8);
}

.module-features__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-10);
}

.module-features__header h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.module-features__header p {
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    font-size: var(--text-base);
    text-align: center;
}

/* ── Features list — numbered, fluid, no cards ── */
.module-features__list {
    display: flex;
    flex-direction: column;
}

.module-features__item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-5) 0;
    border-bottom: 1px solid var(--border-default);
    transition: background-color var(--duration-fast) var(--ease-smooth);
}

.module-features__item:last-child {
    border-bottom: none;
}

.module-features__index {
    flex-shrink: 0;
    min-width: 2.5ch;
    font-size: var(--text-xl);
    font-weight: var(--fw-extrabold);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: var(--tracking-tight);
}

.module-features__content {
    flex: 1;
    min-width: 0;
}

.module-features__title {
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-1);
    line-height: var(--leading-snug);
}

.module-features__desc {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    text-align: justify;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════
   Module Benefits — Clean flow + iPhone + reused stats
   ══════════════════════════════════════════════════════════ */
.module-benefits__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-10);
}

.module-benefits__header .badge {
    margin-bottom: var(--space-5);
}

.module-benefits__header h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.module-benefits__header p {
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    text-align: center;
}

.module-benefits__grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    align-items: center;
    margin-bottom: var(--space-10);
}

.module-benefits__content {
    width: 100%;
}

.module-benefits__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.module-benefits__item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-primary);
    line-height: var(--leading-relaxed);
    text-align: justify;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--border-default);
}

.module-benefits__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.module-benefits__item-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    margin-top: 2px;
}

.module-benefits__item-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
}

[data-theme="dark"] .module-benefits__item-icon {
    color: var(--color-secondary);
}

/* Stats row — reuses modules-stats component from components.css */
.module-benefits__stats {
    width: 100%;
}

.module-benefits__stats .modules-stats__scroll-wrap {
    margin-inline: calc(-1 * var(--space-6));
}

/* Device column */
.module-benefits__device {
    width: 100%;
    max-width: 280px;
}

/* ── Pricing section — gradient fill + dot grid ───────── */
.module-pricing {
    position: relative;
    overflow: hidden;
    background: var(--gradient-fill);
    color: #fafafa;
    text-align: center;
}

.module-pricing::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        rgba(255, 255, 255, 0.08) 1px,
        transparent 1px
    );
    background-size: 24px 24px;
    pointer-events: none;
}

.module-pricing__header {
    text-align: center;
    margin-bottom: var(--space-8);
    position: relative;
}

.module-pricing__title {
    font-size: var(--text-3xl);
    font-weight: var(--fw-extrabold);
    color: #fafafa;
    margin-bottom: var(--space-2);
}

.module-pricing__gradient {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.module-pricing__subtitle {
    font-size: var(--text-base);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.module-pricing__cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    max-width: 480px;
    margin-inline: auto;
    position: relative;
}

.module-pricing__cards--single {
    max-width: 480px;
}

/* ── Split layout — narrative + pricing card (single-price modules) ──
   The .module-pricing section is always on a dark gradient fill, so all
   text is white-on-dark regardless of theme. Pills use liquid glass. */
.module-pricing__split {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-10);
    max-width: 480px;
    margin-inline: auto;
    align-items: center;
}

.module-pricing__narrative {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    max-width: 560px;
}

.module-pricing__narrative .module-pricing__note {
    align-self: center;
}

/* Eyebrow — liquid glass pill, canonical tokens (same as btn--plan-pro) */
.module-pricing__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    margin-bottom: var(--space-5);
    font-size: var(--text-2xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #ffffff;
    background: var(--glass-bg);
    border: 1px solid color-mix(in srgb, var(--glass-light) 15%, transparent);
    border-radius: var(--radius-full);
    backdrop-filter: var(--glass-backdrop-soft);
    -webkit-backdrop-filter: var(--glass-backdrop-soft);
    box-shadow: var(--glass-shadow);
}

.module-pricing__eyebrow svg {
    color: #ffffff;
}

/* Title — matches hero typography, white with gradient accent on module name */
.module-pricing__narrative .module-pricing__title {
    text-align: left;
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: var(--fw-extrabold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: #ffffff;
    margin-bottom: var(--space-5);
}

.module-pricing__narrative .module-pricing__title .text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.module-pricing__lead {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: var(--space-8);
}

/* Benefits — icons in liquid glass pills, full contrast text */
.module-pricing__benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-8) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.module-pricing__benefits li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.module-pricing__benefit-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: #ffffff;
    background: var(--glass-bg);
    border: 1px solid color-mix(in srgb, var(--glass-light) 15%, transparent);
    backdrop-filter: var(--glass-backdrop-soft);
    -webkit-backdrop-filter: var(--glass-backdrop-soft);
    box-shadow: var(--glass-shadow);
}

.module-pricing__benefits li > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.module-pricing__benefits strong {
    font-size: var(--text-base);
    font-weight: var(--fw-semibold);
    color: #ffffff;
    line-height: var(--leading-snug);
}

.module-pricing__benefits span {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.7);
    line-height: var(--leading-relaxed);
}

/* Note — liquid glass pill, same canonical tokens as eyebrow */
.module-pricing__note {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
    font-weight: var(--fw-medium);
    color: color-mix(in srgb, #ffffff 85%, transparent);
    background: var(--glass-bg);
    border: 1px solid color-mix(in srgb, var(--glass-light) 15%, transparent);
    border-radius: var(--radius-full);
    backdrop-filter: var(--glass-backdrop-soft);
    -webkit-backdrop-filter: var(--glass-backdrop-soft);
    box-shadow: var(--glass-shadow);
}

.module-pricing__note svg {
    color: color-mix(in srgb, #ffffff 70%, transparent);
    flex-shrink: 0;
}

.module-pricing__split .module-pricing__cards {
    margin-inline: 0;
}

/* Match plans page card behavior — flex layout so footer sticks to bottom */
.module-pricing__cards .card--plan {
    display: flex;
    flex-direction: column;
}

.module-pricing__cards .card--plan .card__body {
    flex: 1;
}

/* Base (mobile): no scale on highlighted — same as plans */
.module-pricing__cards .card--highlighted {
    transform: none;
    z-index: 1;
}

/* Lift flame video up to fully cover the card on module pricing */
.module-pricing__cards .card--plan__flame {
    transform: rotate(-45deg) scale(1.8) translateY(0%);
}

/* Stronger watermark acronym — section is always light-mode blue gradient,
   white stroke pops against both the bg and the blue flame video. */
.module-pricing[data-theme="light"] .card--plan.card--highlighted::before {
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.42);
    text-shadow:
        0 0 40px rgba(255, 255, 255, 0.18),
        0 0 80px color-mix(in srgb, var(--color-primary) 25%, transparent);
}

.module-pricing__included {
    text-align: center;
    max-width: 600px;
    margin-inline: auto;
    position: relative;
}

/* Check mark — clean icon cue, fully visible on the brand gradient. No frame. */
.module-pricing__seal {
    display: inline-flex;
    color: #ffffff;
    margin-bottom: var(--space-4);
}

.module-pricing__seal svg {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.18));
}

/* Magnetic ribbon — outlined (stroke-only) word + Dynbel mark, marquee.
   Full-bleed across the section; reuses @keyframes marquee (animations.css). */
.module-pricing__band {
    position: relative;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    margin-top: var(--space-10);
    display: flex;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.module-pricing__band-track {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: var(--space-6);
    padding-right: var(--space-6);
    white-space: nowrap;
    animation: marquee 40s linear infinite;
    will-change: transform;
}

.module-pricing__band-word {
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: 900;
    letter-spacing: var(--tracking-tight);
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.34);
}

.module-pricing__band-mark {
    height: clamp(1.8rem, 5vw, 3.2rem);
    width: auto;
    flex-shrink: 0;
    opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
    .module-pricing__band-track {
        animation: none;
    }
}

/* ── Pricing — variante Ecosistema Glymdo (incluido con el producto) ── */
.module-pricing--glymdo {
    background: var(--glymdo-gradient-fill);
}

.module-pricing__included--glymdo .btn--glymdo {
    margin-top: var(--space-6);
    background: #ffffff;
    color: var(--glymdo-accent);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.module-pricing__included--glymdo .btn--glymdo:hover {
    color: var(--glymdo-accent);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
}

/* Marcas Glymdo niveladas a la altura de mayúsculas del texto de la cinta */
.module-pricing__band-mark--glymdo,
.module-pricing__band-mark--glymdo-logo {
    height: clamp(1.85rem, 5.2vw, 3.9rem);
    width: auto;
}

/* ── CTA Final: back link on separate line ────────────── */
.cta-final__back {
    display: flex;
    justify-content: center;
    margin-top: var(--space-4);
}

/* Back link behaves like a text link, not a button: hover only tints the
   text to the primary color (no glass background, border or lift). */
.cta-final__back .btn--ghost:hover {
    transform: none;
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-color: transparent;
    box-shadow: none;
    color: var(--color-primary);
}

/* ── Landing CTA: shimmer effect ──────────────────────── */
.btn--shimmer {
    position: relative;
    overflow: hidden;
}

.btn--shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transition: left var(--duration-slow) var(--ease-smooth);
}

.btn--shimmer:hover::after {
    left: 120%;
}


/* ═══════════════════════════════════════════════════════
   RESPONSIVE  —  min-width only
   ═══════════════════════════════════════════════════════ */

/* ── Tablet  (>= 640px) ──────────────────────────────── */
@media (min-width: 640px) {
    .hero-mini__title:not(.hero-mini__title--module) {
        font-size: var(--text-4xl);
    }


    .hero-mini__actions {
        gap: var(--space-3);
    }

    .hero-mini__actions .btn {
        padding: var(--space-4) var(--space-8);
        font-size: var(--text-md);
    }

    /* ── Filters: individual pills with wrap on tablet+ ── */
    .modules-filters__bar {
        justify-content: center;
        /* Wrap layout, no horizontal scroll here → let pill glass shadows /
           lift breathe instead of being clipped by the scroll container. */
        overflow: visible;
    }

    .modules-filters > .scroll-chevron {
        display: none;
    }

    .modules-filters__track {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-2);
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .modules-filters__indicator {
        display: none;
    }

    .modules-filters__pill {
        --glass-reflex-light: 1;
        --glass-reflex-dark: 0.4;
        color: var(--text-secondary);
        background-color: var(--glass-bg);
        backdrop-filter: var(--glass-backdrop);
        -webkit-backdrop-filter: var(--glass-backdrop);
        border: 1px solid color-mix(in srgb, var(--glass-light) 22%, transparent);
        box-shadow: none;
        transition: color var(--duration-fast) var(--ease-smooth),
                    background-color var(--duration-fast) var(--ease-smooth),
                    border-color var(--duration-fast) var(--ease-smooth),
                    box-shadow var(--duration-fast) var(--ease-smooth),
                    transform var(--duration-fast) var(--ease-spring);
    }

    .modules-filters__pill i {
        font-size: 0.9em;
        opacity: 0.6;
    }

    .modules-filters__pill:hover {
        --glass-reflex-light: 1.3;
        color: var(--color-primary);
        background-color: var(--glass-bg-hover);
        border-color: color-mix(in srgb, var(--color-primary) 25%, transparent);
        box-shadow: none;
        transform: translateY(-1px);
    }

    .modules-filters__pill:hover i {
        opacity: 1;
    }

    .modules-filters__pill:active {
        transform: translateY(0);
        --glass-reflex-light: 0.8;
    }

    /* Active pill — primary button gradient + liquid glass */
    .modules-filters__pill.is-active {
        --glass-reflex-light: 0;
        --glass-reflex-dark: 1;
        color: #ffffff;
        background: var(--gradient-fill);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: var(--glass-shadow-light),
                    0 2px 8px color-mix(in srgb, var(--color-primary) 18%, transparent);
    }

    .modules-filters__pill.is-active i {
        color: #ffffff;
        opacity: 1;
    }

    .modules-filters__pill.is-active .modules-filters__count {
        opacity: 1;
        background: rgba(255, 255, 255, 0.22);
        color: #ffffff;
    }

    /* Hover keeps the liquid glass — only lifts and brightens */
    .modules-filters__pill.is-active:hover {
        --glass-reflex-dark: 1.4;
        filter: brightness(1.08);
        border-color: rgba(255, 255, 255, 0.2);
        box-shadow: var(--glass-shadow-light),
                    0 4px 14px color-mix(in srgb, var(--color-primary) 28%, transparent);
        transform: translateY(-1px);
    }

    .modules-filters__count {
        opacity: 0.8;
        background: rgba(0, 0, 0, 0.06);
    }

    /* Dark mode — tablet+ */
    [data-theme="dark"] .modules-filters__pill {
        --glass-reflex-light: 0.3;
        --glass-reflex-dark: 1.2;
        border-color: color-mix(in srgb, var(--glass-light) 8%, transparent);
    }

    [data-theme="dark"] .modules-filters__pill:hover {
        --glass-reflex-light: 0.4;
        color: var(--color-secondary);
        border-color: color-mix(in srgb, var(--color-secondary) 25%, transparent);
        background-color: color-mix(in srgb, var(--color-secondary) 6%, transparent);
        box-shadow: none;
    }

    [data-theme="dark"] .modules-filters__pill.is-active {
        background: var(--gradient-fill);
        border-color: rgba(255, 255, 255, 0.14);
        box-shadow: var(--glass-shadow-light),
                    0 2px 10px color-mix(in srgb, var(--color-primary) 22%, transparent);
    }

    [data-theme="dark"] .modules-filters__pill.is-active i {
        color: #ffffff;
    }

    [data-theme="dark"] .modules-filters__pill.is-active .modules-filters__count {
        background: rgba(255, 255, 255, 0.22);
        color: #ffffff;
    }

    [data-theme="dark"] .modules-filters__pill.is-active:hover {
        filter: brightness(1.1);
        border-color: rgba(255, 255, 255, 0.24);
        box-shadow: var(--glass-shadow-light),
                    0 4px 14px color-mix(in srgb, var(--color-primary) 30%, transparent);
    }

    [data-theme="dark"] .modules-filters__count {
        background: rgba(255, 255, 255, 0.08);
    }

    .modules-catalog {
        padding-bottom: var(--space-6);
    }

    .modules-catalog__group {
        margin-bottom: var(--space-10);
    }

    .modules-catalog__group-title {
        font-size: var(--text-lg);
    }

    .modules-catalog__swiper {
        margin-inline: calc(-1 * var(--space-8));
    }

    .glass-swiper__track {
        padding-inline: var(--space-8);
    }

    .glass-swiper__track .card--module {
        flex: 0 0 clamp(255px, 36vw, 295px);
    }

    .glass-swiper__nav {
        padding-inline: var(--space-8);
    }

    /* Module features — tablet: 2-column flow */
    .module-features__list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        column-gap: var(--space-8);
    }

    .module-features__item {
        border-bottom: none;
        padding: var(--space-4) 0;
        border-left: 2px solid var(--border-default);
        padding-left: var(--space-4);
    }

    .module-features__title {
        font-size: var(--text-base);
    }

    .module-features__desc {
        font-size: var(--text-sm);
    }

    /* Module benefits — tablet: content + device side by side */
    .module-benefits__grid {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: var(--space-6);
        align-items: center;
    }

    .module-benefits__device {
        width: 220px;
        align-self: center;
    }

    .module-benefits__stats .modules-stats__scroll-wrap {
        margin-inline: 0;
    }

    /* Module detail — tablet: dual cards side by side, matches plans page */
    .module-pricing__cards:not(.module-pricing__cards--single) {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
    }

    .module-pricing__cards .card--highlighted {
        transform: scale(1.03);
    }

    /* Split layout: narrative (left) + pricing card (right) */
    .module-pricing__split {
        grid-template-columns: 1.1fr 1fr;
        max-width: 1100px;
        gap: var(--space-16);
    }

    .module-pricing__split .module-pricing__cards--single {
        margin-inline: 0;
        margin-left: auto;
    }

}

/* ── Desktop  (>= 1024px) ────────────────────────────── */
@media (min-width: 1024px) {
    .hero-mini {
        padding-top: calc(var(--nav-height, 72px) + var(--space-12));
        padding-bottom: var(--space-16);
    }

    .modules-catalog {
        padding-bottom: var(--space-8);
    }

    .modules-catalog__group {
        margin-bottom: var(--space-12);
    }

    .modules-catalog__swiper {
        margin-inline: calc(-1 * var(--space-12));
    }

    .glass-swiper__track {
        padding-inline: var(--space-12);
    }

    .glass-swiper__track .card--module {
        flex: 0 0 275px;
    }

    .glass-swiper__nav {
        padding-inline: var(--space-12);
    }

    /* Module detail — desktop: showcase grid, device bigger */
    .module-detail__block {
        display: grid;
        grid-template-columns: 5fr 7fr;
        gap: var(--space-12);
        align-items: start;
    }

    .module-detail__text {
        text-align: left;
    }

    .module-detail__text h2 {
        font-size: var(--text-2xl);
        margin-bottom: var(--space-4);
    }

    .module-detail__text p {
        margin-bottom: var(--space-5);
    }

    /* Module features — desktop */
    .module-features {
        padding-block: var(--space-16);
    }

    .module-features__header h2 {
        font-size: var(--text-3xl);
    }

    .module-features__index {
        font-size: var(--text-2xl);
    }

    .module-features__title {
        font-size: var(--text-md);
    }

    /* Module benefits — desktop */
    .module-benefits__header h2 {
        font-size: var(--text-2xl);
    }

    .module-benefits__grid {
        gap: var(--space-8);
    }

    .module-benefits__device {
        width: 280px;
    }

    .module-pricing__title {
        font-size: var(--text-4xl);
    }
}

/* ── Wide  (>= 1440px) ───────────────────────────────── */
@media (min-width: 1440px) {
    .modules-catalog__swiper {
        margin-inline: calc(-1 * var(--space-16));
    }

    .glass-swiper__track {
        padding-inline: var(--space-16);
    }

    .glass-swiper__nav {
        padding-inline: var(--space-16);
    }
}
