:root {
    --primary: #006287;
    --primary-container: #5dbaeb;
    --on-primary: #e7f4ff;
    --on-primary-container: #00354a;
    --secondary: #705900;
    --secondary-container: #f9d461;
    --on-secondary-container: #5c4900;
    --secondary-fixed: #f9d461;
    --on-secondary-fixed: #463600;
    --tertiary: #923e69;
    --tertiary-container: #ff99c8;
    --on-tertiary-container: #641843;
    --background: #f1f7ff;
    --on-background: #05314c;
    --surface: #f1f7ff;
    --on-surface: #05314c;
    --surface-container-lowest: #ffffff;
    --surface-container-low: #e7f2ff;
    --surface-container: #d7eaff;
    --surface-container-high: #cce5ff;
    --surface-container-highest: #c1e0ff;
    --outline: #577a99;
    --outline-variant: #8db1d1;
    --on-surface-variant: #3b5f7c;

    --radius-default: 1rem;
    --radius-lg: 2rem;
    --radius-xl: 3rem;

    --font-headline: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Be Vietnam Pro', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-tap-highlight-color: transparent;
}

*::-webkit-scrollbar {
    display: none;
}

body {
    background-color: var(--background);
    font-family: var(--font-body);
    color: var(--on-background);
    line-height: 1.5;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

body.lectura-page {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    vertical-align: middle;
}

.fill-icon {
    font-variation-settings: 'FILL' 1;
}

/* ================== DETALLE ================== */
.top-app-bar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    background: rgba(241, 247, 255, 0.7);
    backdrop-filter: blur(12px);
    z-index: 50;
}

.back-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-container);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.back-button:active {
    transform: scale(0.95);
}

.app-title {
    font-family: var(--font-headline);
    font-weight: 800;
    color: var(--on-background);
    font-size: 1.25rem;
    letter-spacing: -0.025em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}


.main-canvas {
    padding: 100px 1rem 100px;
    max-width: 600px;
    margin: 0 auto;
}

.hero-section {
    position: relative;
    margin-bottom: 2.5rem;
}

.cover-container {
    aspect-ratio: 4/5;
    border-radius: var(--radius-default);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(5, 49, 76, 0.1);
    background-color: var(--surface-container);
}

.cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--secondary-fixed);
    color: var(--on-secondary-fixed);
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.overlap-card {
    position: absolute;
    bottom: -1.5rem;
    left: -0.5rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-default);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.star-icon-container {
    width: 32px;
    height: 32px;
    background-color: var(--secondary-container);
    color: var(--on-secondary-container);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlap-text-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--secondary);
    text-transform: uppercase;
}

.overlap-text-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--on-surface);
}

.story-header {
    margin-bottom: 1.5rem;
}

.story-title {
    font-family: var(--font-headline);
    color: var(--on-background);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

.meta-row {
    display: flex;
    gap: 1rem;
    color: var(--outline);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.summary-box {
    background-color: var(--surface-container-low);
    padding: 1.5rem;
    border-radius: var(--radius-default);
    margin-bottom: 1.5rem;
}

.summary-text {
    color: var(--on-surface);
    font-size: 1rem;
    line-height: 1.6;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: var(--surface-container-high);
    padding: 1rem;
    border-radius: var(--radius-default);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-icon-primary {
    color: var(--primary);
}

.stat-icon-tertiary {
    color: var(--tertiary);
}

.stat-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin: 0.5rem 0 0.25rem;
    text-transform: uppercase;
}

.stat-label-primary {
    color: var(--primary);
}

.stat-label-tertiary {
    color: var(--tertiary);
}

.stat-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--on-surface);
}

.cta-container {
    padding-top: 1rem;
}

.primary-button {
    width: 100%;
    background-color: var(--secondary-fixed);
    color: var(--on-secondary-fixed);
    height: 80px;
    border-radius: var(--radius-default);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-family: var(--font-headline);
    font-size: 1.25rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 0px #675200;
    transition: transform 0.1s, box-shadow 0.1s;
}

.primary-button:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0px #675200;
}

.primary-button:active {
    transform: translateY(4px);
    box-shadow: none;
}

.hint-text {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--outline);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .top-app-bar {
        padding: 0 1.5rem;
    }

    .back-button {
        width: 48px;
        height: 48px;
    }

    .back-button span {
        font-size: 30px;
    }

    .app-title {
        font-size: 1.5rem;
    }

    .main-canvas {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .category-badge {
        font-size: 10px;
        padding: 0.5rem 1rem;
        top: 1.5rem;
        right: 1.5rem;
    }

    .overlap-card {
        padding: 1rem;
    }

    .star-icon-container {
        width: 40px;
        height: 40px;
    }

    .star-icon-container span {
        font-size: 24px;
    }

    .overlap-text-label {
        font-size: 10px;
    }

    .overlap-text-value {
        font-size: 14px;
    }

    .story-title {
        font-size: 2.5rem;
    }

    .summary-box {
        padding: 2rem;
    }

    .summary-text {
        font-size: 1.125rem;
    }

    .stats-grid {
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-icon-primary,
    .stat-icon-tertiary {
        font-size: 32px;
    }

    .stat-label {
        font-size: 12px;
    }

    .stat-value {
        font-size: 1rem;
    }

    .primary-button {
        height: 96px;
        font-size: 1.5rem;
        gap: 1rem;
    }

    .primary-button span {
        font-size: 40px;
    }
}

/* ================== Inicio ================== */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    /* cambiado de space-between a center */
    align-items: center;
    padding: 0 24px;
    background-color: rgba(241, 247, 255, 0.7);
    backdrop-filter: blur(12px);
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-btn {
    background: none;
    border: none;
    color: var(--on-surface);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

.menu-btn:active {
    scale: 0.95;
}

.logo {
    font-family: var(--font-headline);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    color: var(--on-surface);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-container);
    border: 2px solid var(--surface-container-lowest);
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-content {
    padding: 96px 24px 128px;
    max-width: 1280px;
    margin: 0 auto;
}

.welcome-section {
    margin-bottom: 40px;
}

.welcome-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.welcome-greeting {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 8px;
}

.welcome-title {
    font-family: var(--font-headline);
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--on-background);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 448px;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--outline);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 16px 24px 16px 56px;
    background-color: var(--surface-container-lowest);
    border: 1px solid var(--outline-variant);
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(5, 49, 76, 0.08);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--on-surface);
    transition: all 0.2s ease;
}


.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--surface-container-high), 0 8px 32px rgba(5, 49, 76, 0.12);
}


.search-input::placeholder {
    color: var(--outline-variant);
}

.categories-section {
    margin-bottom: 48px;
    overflow-x: auto;
    margin-left: -24px;
    margin-right: -24px;
    padding: 0 24px;
    cursor: grab;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.categories-section::-webkit-scrollbar {
    display: none;
}

.categories-wrapper {
    display: flex;
    gap: 16px;
    padding-bottom: 8px;
    white-space: nowrap;
}

.category-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 9999px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.category-chip.active {
    background-color: var(--primary);
    color: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 1024px) {
    .categories-section {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .categories-wrapper {
        justify-content: center;
    }
}

.category-chip.variant-brown {
    background-color: #CBC3BE;
    color: #282320;
    border: 1px solid #6F6F62;
}

.category-chip.variant-rojo {
    background-color: #ED9B9B;
    color: #3D0B0B;
    border: 1px solid #BA4545;
}

.category-chip.variant-violeta {
    background-color: #F1C6F1;
    color: #5E175E;
    border: 1px solid #D74CE1;
}

.category-chip.variant-celeste {
    background-color: var(--surface-container-highest);
    color: #3b5f7c;
    border: 1px solid #4CA5E1;
}

.category-chip.variant-verde {
    background-color: #ccebd9;
    color: #1f5f3b;
    border: 1px solid #8bc7a5;
}

.category-chip.variant-azul {
    background-color: #A4C1E5;
    color: #102237;
    border: 1px solid #185D8C;
}

.category-chip.variant-naranja {
    background-color: #FFC68A;
    color: #472500;
    border: 1px solid #C48321;
}

.category-chip.variant-amarillo {
    background-color: #F3E996;
    color: #403A07;
    border: 1px solid #BBAB16;
}

.category-chip:hover {
    opacity: 0.8;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 64px;
}

.card-featured {
    position: relative;
    min-height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 32px;
    box-shadow: 0 4px 40px rgba(5, 49, 76, 0.06);
    background-color: var(--primary-container);
}

.card-featured-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.card-featured-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-featured:hover .card-featured-bg img {
    transform: scale(1.05);
}

.card-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 98, 135, 0.8), transparent, transparent);
}

.card-featured-content {
    position: relative;
    z-index: 10;
    color: white;
}

.badge {
    display: inline-block;
    background-color: var(--secondary-fixed);
    color: var(--on-secondary-fixed);
    padding: 4px 16px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.card-featured-title {
    font-family: var(--font-headline);
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.card-featured-desc {
    color: rgba(231, 244, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 24px;
    max-width: 32rem;
    line-height: 1.6;
}

@media (max-width: 767px) {
    .card-featured-desc {
        display: none;
    }
}

.btn-play {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--secondary-fixed);
    color: var(--on-secondary-fixed);
    padding: 12px 32px;
    border-radius: 0.75rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.btn-play:active {
    transform: scale(0.95);
}

.card-secondary {
    background-color: var(--surface-container-lowest);
    border-radius: 1rem;
    padding: 0px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 40px rgba(5, 49, 76, 0.06);
}

.card-secondary-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 16px;
}

.card-secondary-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-secondary-title {
    font-family: var(--font-headline);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--on-background);
    margin-bottom: 4px;
}

.card-secondary-desc {
    color: var(--on-surface-variant);
    font-size: 0.875rem;
    flex-grow: 1;
    margin-bottom: 20px;
}

.card-secondary-footer {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 767px) {
    .card-secondary {
		padding: 0px 16px 24px 16px;
    }
}

@media (max-width: 767px) {
    .featured-grid {
        margin-bottom: 48px;
    }
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 0.875rem;
}

.rating span.star {
    color: var(--secondary-fixed);
    font-size: 0.875rem;
}

.read-time {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--outline);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-family: var(--font-headline);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--on-background);
}

.view-all {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-all:hover {
    text-decoration: underline;
}

.novedades-slider {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    margin-left: -24px;
    margin-right: -24px;
    padding: 0 24px 16px 24px;
    cursor: grab;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.novedades-slider::-webkit-scrollbar {
    display: none;
}

.novedades-slider .story-card {
    flex: 0 0 160px;
}

.draggable-slider {
    user-select: none;
}

.draggable-slider img,
.draggable-slider a {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -ms-user-select: none;
    user-select: none;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.story-card {
    background-color: var(--surface-container-lowest);
    border-radius: 1rem;
    padding: 12px;
    box-shadow: 0 4px 40px rgba(5, 49, 76, 0.06);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.story-card:hover {
    transform: translateY(-4px);
}

.story-card-thumb {
    position: relative;
    aspect-ratio: 3/4;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 16px;
}

.story-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-favorite {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: var(--tertiary);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.btn-favorite:active {
    transform: scale(0.9);
}

.btn-favorite .material-symbols-outlined {
    font-size: 18px !important;
}

.story-card-title {
    font-family: var(--font-headline);
    font-weight: 700;
    color: var(--on-background);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.story-card-meta {
    color: var(--outline);
    margin-top: auto;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: -0.025em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.story-badge {
    background-color: var(--secondary-fixed);
    color: var(--on-secondary-fixed);
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 800;
}

.story-time {
    font-weight: 700;
    font-size: 0.7rem;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 8px 24px;
    background-color: rgba(241, 247, 255, 0.7);
    backdrop-filter: blur(12px);
    border-top-left-radius: 3rem;
    border-top-right-radius: 3rem;
    z-index: 100;
    box-shadow: 0 -4px 40px rgba(5, 49, 76, 0.06);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--outline-variant);
    transition: background-color 0.2s;
    border-radius: 2rem;
}

.nav-item.active {
    background-color: var(--primary-container);
    color: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: scale(0.9);
}

.nav-item:not(.active):hover {
    background-color: rgba(215, 234, 255, 0.5);
}

.nav-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

@media (min-width: 768px) {
    .welcome-container {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }

    .welcome-title {
        font-size: 2.25rem;
    }

    .featured-grid {
        grid-template-columns: repeat(12, 1fr);
    }

    .card-featured {
        grid-column: span 8;
    }

    .card-secondary {
        grid-column: span 4;
    }

    .story-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 24px;
    }

    .novedades-slider {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .novedades-slider .story-card {
        flex: 0 0 calc(25% - 12px);
    }
}

@media (min-width: 1024px) {
    .story-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .novedades-slider .story-card {
        flex: 0 0 calc(20% - 12.8px);
    }

    .story-card.lg-only {
        display: block;
    }
}

.story-card.lg-only {
    display: none;
}

@media (min-width: 1024px) {
    .story-card.lg-only {
        display: block;
    }
}

/* ================== LECTURA.PHP ================== */
.main-container {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.top-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 50;
    pointer-events: none;
}

@media (min-width: 768px) {
    .top-controls {
        padding: 1.5rem;
    }
}

.exit-button {
    pointer-events: auto;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(241, 247, 255, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 9999px;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.exit-button:active {
    transform: scale(0.95);
}

.page-indicator {
    pointer-events: auto;
    padding: 0.375rem 0.75rem;
    background: rgba(241, 247, 255, 0.7);
    backdrop-filter: blur(12px);
    border-radius: 9999px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .exit-button {
        width: 3rem;
        height: 3rem;
    }

    .page-indicator {
        padding: 0.5rem 1rem;
        font-size: 10px;
    }
}

.indicator-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--primary-container);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

.hero-canvas {
    flex: 1 1 auto;
    width: 100%;
    position: relative;
    max-height: 45vh;
}

body.is-fullscreen .hero-canvas {
    min-height: 100vh !important;
    max-height: 100vh !important;
    flex: 1 1 100%;
}

body.is-fullscreen .content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 8, 20, 0.8), transparent) !important;
    padding-top: 60px;
}

body.is-fullscreen .lectura-card {
    display: none;
}

body.is-fullscreen .prev-label,
body.is-fullscreen .next-label,
body.is-fullscreen .page-indicator-bottom {
    color: white !important;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, var(--primary-container), var(--surface-container-highest));
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--background), transparent 40%);
    opacity: 0.4;
    pointer-events: none;
}

.content-overlay {
    position: relative;
    width: 100%;
    padding: 1rem 1rem 1.5rem;
    background: var(--background);
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    z-index: 10;
}

@media (min-width: 768px) {
    .content-overlay {
        padding: 1.5rem 1.5rem 2rem;
    }
}

.lectura-card {
    max-width: 48rem;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 40px rgba(5, 49, 76, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
    .lectura-card {
        padding: 2rem;
        margin-bottom: 1.5rem;
    }
}

.story-text {
    color: var(--on-surface);
    font-size: 1.125rem;
    line-height: 1.625;
    text-align: center;
    font-weight: 500;
}

@media (min-width: 768px) {
    .story-text {
        font-size: 1.5rem;
    }
}

.nav-layer {
    width: 100%;
    max-width: 64rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 768px) {
    .nav-layer {
        gap: 1.5rem;
    }
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.nav-btn:active {
    transform: scale(0.9);
}

.btn-circle {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

@media (min-width: 768px) {
    .btn-circle {
        width: 6rem;
        height: 6rem;
    }
}

.prev-circle {
    background-color: var(--surface-container-high);
    color: var(--primary);
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.nav-btn:hover .prev-circle {
    background-color: var(--primary-container);
    color: white;
}

.next-circle {
    background-color: var(--secondary-container);
    color: var(--on-secondary-container);
    box-shadow: 0 6px 0 0 #eac655;
}

@media (min-width: 768px) {
    .next-circle {
        box-shadow: 0 8px 0 0 #eac655;
    }
}

.nav-btn:hover .next-circle {
    box-shadow: 0 4px 0 0 #eac655;
    transform: translateY(4px);
}

.nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    .nav-label {
        font-size: 12px;
    }
}

.prev-label {
    color: var(--outline);
}

.next-label {
    color: #705900;
}

.progress-bar-wrapper {
    flex-grow: 1;
    max-width: 20rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 0 1rem;
}

.progress-bar-container {
    width: 100%;
    height: 1rem;
    background-color: var(--surface-container-highest);
    border-radius: 9999px;
    overflow: hidden;
}

.page-indicator-bottom {
    font-size: 10px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (min-width: 768px) {
    .progress-bar-wrapper {
        margin: 0 2rem;
    }
}

.progress-fill {
    height: 100%;
    border-radius: 9999px;
    box-shadow: 0 0 15px rgba(93, 186, 235, 0.4);
    background: linear-gradient(to right, var(--primary), var(--primary-container));
}

.side-actions {
    position: fixed;
    right: 1rem;
    top: 22vh;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 60;
}

@media (min-width: 768px) {
    .side-actions {
        right: 1.5rem;
        gap: 1rem;
    }
}

.action-btn {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--on-surface);
    border: none;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.2s;
}

.action-btn:hover,
.action-btn.active {
    background-color: var(--primary) !important;
    color: white !important;
}

.action-btn.active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1 !important;
}

@media (min-width: 768px) {
    .action-btn {
        width: 3rem;
        height: 3rem;
    }
}

.deco-blob-1 {
    position: absolute;
    top: 25%;
    right: -2rem;
    width: 6rem;
    height: 6rem;
    background-color: rgba(255, 153, 200, 0.3);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.deco-blob-2 {
    position: absolute;
    bottom: 50%;
    left: -3rem;
    width: 10rem;
    height: 10rem;
    background-color: rgba(93, 186, 235, 0.2);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.btn-circle .material-symbols-outlined {
    font-size: 30px;
}

@media (min-width: 768px) {
    .btn-circle .material-symbols-outlined {
        font-size: 40px;
    }
}

/* --- SECCIÓN DE FAVORITOS --- */
.btn-favorite.active {
    background-color: #fff1f2 !important;
    color: #ff4757 !important;
}

.btn-favorite.active .material-symbols-outlined {
    font-variation-settings: 'FILL' 1 !important;
}

/* --- REFUERZO DE SLIDER DE CATEGORÍAS --- */
.categories-section {
    width: 100%;
    overflow-x: auto;
    cursor: grab;
    user-select: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.categories-section::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge */
}

.categories-section.active-drag {
    cursor: grabbing;
}

.category-chip {
    flex-shrink: 0;
}

.mt-48{
	margin-top: 48px;
}