/* --- PÁGINAS GENERALES (TIENDA / BLOG) --- */
/* ========================================= */

.static-bg {
    position: absolute; /* Usamos absolute en vez de fixed para que acompañe a la página si crece, o fixed si es wallpaper */
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
    background-color: #080808;
}
.static-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8; /* Ligeramente oscurecido para resaltar el cristal */
}

.content-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 150px 20px 80px; /* Espacio para el navbar fijo */
    z-index: 5;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
    color: #fff;
}
.page-header h1 {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.page-header p {
    color: #9ca3af;
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ========================================= */
/* --- HEADER BLOG --- */
/* ========================================= */
.blog-header {
    text-align: left;
    width: 100%;
    max-width: 1300px;
    margin-bottom: 30px;
    padding: 0 15px;
}
.blog-header h1 {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
    margin-bottom: 5px;
    text-shadow: none;
    filter: none;
}
.text-gradient {
    background: linear-gradient(90deg, #00ffcc, #a855f7, #00ffcc);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShine 3s linear infinite;
    text-shadow: none;
    filter: none;
    display: inline-block;
}
@keyframes gradientShine {
    to { background-position: 200% center; }
}
.blog-header p {
    color: #000;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========================================= */
/* --- CONTROLES Y FILTROS DEL BLOG --- */
/* ========================================= */
.blog-controls-container {
    width: 100%;
    max-width: 1300px;
    margin-bottom: 35px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1), inset 0 0 15px rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

.blog-toolbar-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

.blog-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex-grow: 1;
    min-width: 260px;
    background: #ffffff;
    border-radius: 50px;
    border: 1.5px solid rgba(203, 213, 225, 0.8);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-search-wrapper:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 8px 24px rgba(15, 23, 42, 0.08);
}

.blog-search-wrapper .search-icon {
    position: absolute;
    left: 16px;
    font-size: 20px;
    color: #64748b;
    pointer-events: none;
    transition: color 0.25s ease;
}

.blog-search-wrapper:focus-within .search-icon {
    color: #2563eb;
}

.blog-search-wrapper input {
    width: 100%;
    padding: 12px 42px 12px 48px;
    border: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    outline: none;
}

.blog-search-wrapper input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-clear-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.search-clear-btn span {
    font-size: 18px;
}

.blog-utils-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.blog-sort-pill {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    border: 1.5px solid rgba(203, 213, 225, 0.8);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    transition: all 0.25s ease;
    cursor: pointer;
}

.blog-sort-pill:hover {
    border-color: #94a3b8;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.blog-sort-pill .sort-icon {
    position: absolute;
    left: 14px;
    font-size: 19px;
    color: #2563eb;
    pointer-events: none;
}

.blog-sort-pill .sort-chevron {
    position: absolute;
    right: 14px;
    font-size: 18px;
    color: #64748b;
    pointer-events: none;
}

.blog-sort-pill select {
    appearance: none;
    -webkit-appearance: none;
    padding: 11px 40px 11px 42px;
    background: transparent;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    outline: none;
}

.blog-results-counter {
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    background: rgba(241, 245, 249, 0.9);
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.blog-pills-bar {
    width: 100%;
    overflow: hidden;
}

.pills-scroll-container {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 6px 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.pills-scroll-container::-webkit-scrollbar {
    display: none;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    border: 1.5px solid rgba(203, 213, 225, 0.8);
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.category-pill .pill-icon {
    font-size: 17px;
    color: #64748b;
    transition: color 0.2s ease, transform 0.2s ease;
}

.category-pill:hover {
    color: #0f172a;
    border-color: #94a3b8;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.category-pill:hover .pill-icon {
    color: #2563eb;
    transform: scale(1.1);
}

.category-pill.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
    transform: translateY(-2px);
}

.category-pill.active .pill-icon {
    color: #60a5fa;
}

/* ========================================= */
/* --- GRID EDITORIAL Y TARJETAS VIP --- */
/* ========================================= */
.blog-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 28px;
    width: 100%;
    max-width: 1300px;
    margin-bottom: 60px;
}

.blog-card {
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1), inset 0 0 15px rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 16px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.42);
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 16px 40px 0 rgba(31, 38, 135, 0.18), inset 0 0 25px rgba(255, 255, 255, 0.6);
}

.blog-card-media {
    width: 100%;
    height: 220px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 18px;
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.25);
}

.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-card-media img {
    transform: scale(1.08);
}

.blog-media-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
    pointer-events: none;
}

.blog-cat-badge {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.blog-time-badge {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.blog-time-badge span {
    font-size: 13px;
    color: #38bdf8;
}

.blog-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 0 4px;
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-card-date span.material-symbols-outlined {
    font-size: 14px;
    color: #2563eb;
}

.blog-card-title {
    color: #0f172a;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 10px 0;
    letter-spacing: -0.3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s ease;
}

.blog-card:hover .blog-card-title {
    color: #2563eb;
}

.blog-card-excerpt {
    color: #475569;
    font-size: 13.5px;
    line-height: 1.55;
    margin: 0 0 14px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.blog-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.blog-tag-pill {
    background: rgba(255, 255, 255, 0.55);
    color: #334155;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.85);
    letter-spacing: 0.3px;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    margin-top: auto;
}

.btn-read-article {
    width: 100%;
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 11px 20px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}

.btn-read-article:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-read-article .btn-arrow {
    font-size: 18px;
    transition: transform 0.25s ease;
}

.btn-read-article:hover .btn-arrow {
    transform: translateX(4px);
}

/* ========================================= */
/* --- ESTADO VACÍO --- */
/* ========================================= */
.blog-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    margin: 20px 0;
}

.blog-empty-state .empty-icon {
    font-size: 54px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.blog-empty-state h3 {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.blog-empty-state p {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 20px 0;
    max-width: 400px;
}

.btn-reset-filters {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: #0f172a;
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
    transition: all 0.2s ease;
}

.btn-reset-filters:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

/* ========================================= */
/* --- RESPONSIVE MEDIA QUERIES --- */
/* ========================================= */
@media (max-width: 768px) {
    .content-page {
        padding: 95px 12px 60px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .blog-header {
        padding: 0 !important;
        margin-bottom: 20px !important;
        text-align: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .blog-header h1 {
        font-size: 32px !important;
        line-height: 1.1 !important;
    }
    .blog-header p {
        font-size: 13px !important;
        letter-spacing: 1px !important;
    }
    .blog-controls-container {
        padding: 12px !important;
        margin-bottom: 20px !important;
        border-radius: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .blog-toolbar-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
    }
    .blog-search-wrapper {
        min-width: 0 !important;
        width: 100% !important;
    }
    .blog-search-wrapper input {
        font-size: 13px !important;
        padding: 10px 36px 10px 42px !important;
    }
    .blog-utils-group {
        justify-content: space-between !important;
        width: 100% !important;
        gap: 8px !important;
    }
    .blog-sort-pill {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    .blog-sort-pill select {
        font-size: 12px !important;
        padding: 9px 28px 9px 34px !important;
        width: 100% !important;
    }
    .blog-results-counter {
        padding: 8px 12px !important;
        font-size: 11px !important;
        flex-shrink: 0 !important;
    }
    .blog-pills-bar {
        width: 100% !important;
        overflow: hidden !important;
    }
    .pills-scroll-container,
    .blog-categories-pills {
        overflow-x: auto !important;
        padding-bottom: 6px !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .category-pill,
    .blog-category-pill {
        flex-shrink: 0 !important;
        padding: 6px 14px !important;
        font-size: 12px !important;
    }
    .blog-grid-container {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .blog-card {
        padding: 14px !important;
        border-radius: 18px !important;
        width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    .blog-card-media {
        height: 190px !important;
        border-radius: 14px !important;
    }
    .modal-lectura-wrapper {
        padding: 10px !important;
    }
    .modal-lectura-card {
        width: 100% !important;
        max-width: 100% !important;
        height: 94vh !important;
        border-radius: 18px !important;
        box-sizing: border-box !important;
    }
    .vip-image-container {
        height: 200px !important;
    }
    .vip-modal-container {
        padding: 16px 14px !important;
    }
}

/* ========================================= */
/* --- MASTERPIECE MODAL VIP --- */
/* ========================================= */
.modal-lectura-wrapper {
    display: none; 
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: rgba(2, 6, 23, 0.7); 
    backdrop-filter: blur(15px); 
    z-index: 3000; 
    justify-content: center; 
    align-items: center; 
    opacity: 0; 
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
}

.modal-lectura-card {
    --bg-color: rgba(15, 23, 42, 0.65);
    --bg-gradient: linear-gradient(180deg, rgba(30,41,59,0.7) 0%, rgba(15,23,42,0.8) 100%);
    --title-color: #ffffff;
    --text-color: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: rgba(255,255,255,0.1);
    --tag-bg: rgba(56,189,248,0.1);
    --tag-color: #38bdf8;
    --tag-border: rgba(56,189,248,0.2);
    --icon-bg: rgba(255,255,255,0.05);
    --icon-color: #cbd5e1;
    --shadow-color: rgba(0,0,0,0.5);
    
    background: var(--bg-gradient);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border-color);
    box-shadow: 0 40px 100px var(--shadow-color), inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 24px; 
    width: 900px; 
    max-width: 100%; 
    height: 90vh;
    position: relative; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column;
}

.modal-lectura-card.day-mode {
    --bg-color: rgba(255, 255, 255, 0.6);
    --bg-gradient: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(241,245,249,0.9) 100%);
    --title-color: #0f172a;
    --text-color: #334155;
    --text-muted: #64748b;
    --border-color: rgba(255,255,255,0.6);
    --tag-bg: rgba(2,132,199,0.08);
    --tag-color: #0284c7;
    --tag-border: rgba(2,132,199,0.15);
    --icon-bg: rgba(0,0,0,0.03);
    --icon-color: #475569;
    --shadow-color: rgba(0,0,0,0.15);
    box-shadow: 0 40px 100px var(--shadow-color), inset 0 1px 0 rgba(255,255,255,0.8);
}

.modal-btn-action {
    background: var(--icon-bg);
    color: var(--icon-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: 44px; height: 44px; 
    border-radius: 50%; 
    display: flex; justify-content: center; align-items: center; 
    cursor: pointer;
}
.modal-btn-action:hover {
    transform: translateY(-2px) scale(1.05);
    background: var(--title-color);
    color: var(--bg-color);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Diseño del cover image premium */
.vip-image-container {
    width: 100%; 
    height: 320px; 
    position: relative; 
    overflow: hidden; 
    border-radius: 16px; 
    margin: 20px 0 24px 0;
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
    border: 1px solid var(--border-color);
    display: none;
}
.vip-image-blur-bg {
    position: absolute; 
    top: -10%; left: -10%; 
    width: 120%; height: 120%; 
    background-size: cover; 
    background-position: center; 
    filter: blur(25px) brightness(0.6); 
    z-index: 1;
}
.vip-image-front {
    position: relative; 
    width: 100%; height: 100%; 
    object-fit: contain; 
    z-index: 2;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.4));
}
.day-mode .vip-image-blur-bg {
    filter: blur(25px) brightness(0.9);
}

/* Scrollbar VIP */
.vip-scrollbar::-webkit-scrollbar {
    width: 8px;
}
.vip-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.vip-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 10px;
}
.vip-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}
.vip-scrollbar::-webkit-scrollbar-button,
.vip-scrollbar::-webkit-scrollbar-corner {
    display: none !important;
    background: transparent !important;
}

/* --- OPTIMIZACIÓN RESPONSIVE MÓVIL Y TABLETAS (BLOG) --- */
@media (max-width: 900px) and (min-width: 769px) {
    .blog-controls-container {
        padding: 16px;
    }
    .blog-toolbar-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .blog-utils-group {
        justify-content: space-between;
        width: 100%;
    }
    .blog-sort-pill {
        flex-grow: 1;
    }
    .blog-grid-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }
}
