/*
 * DENTCOMM - ESTILOS BLOG PREMIUM (GLASSMORPHISM)
 * Versión: 2.0 - Cards Verticales & Lectura Optimizada
 */

:root {
    /* Variables Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --card-bg-hover: rgba(255, 255, 255, 0.9);
    --hero-glow: radial-gradient(circle at center, rgba(22, 254, 237, 0.15) 0%, rgba(0,0,0,0) 70%);
}

[data-theme="dark"] {
    --glass-bg: rgba(24, 24, 27, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --card-bg-hover: rgba(39, 39, 42, 0.8);
}

/* --- HERO SECTION --- */
.blog-hero {
    position: relative;
    padding: calc(var(--header-height) + 4rem) 0 4rem;
    text-align: center;
    background: var(--bg-body);
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 120%; height: 120%;
    background: var(--hero-glow);
    z-index: 0; pointer-events: none;
}

.blog-hero__content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }

.blog-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 1rem;
    background: var(--gradient-primary); /* Usa el gradiente global */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

/* --- FILTROS --- */
.blog-filters-bar { margin-bottom: 3rem; position: relative; z-index: 2; }
.blog-filters__container {
    display: flex; justify-content: space-between; align-items: center; gap: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
}

.blog-categories { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.category-link {
    font-weight: 600; color: var(--primary-gray); transition: 0.3s;
    font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px;
    cursor: pointer;
}
.category-link:hover, .category-link.active { color: var(--primary-cyan-text); }

.blog-search input {
    background: transparent; border: none; border-bottom: 1px solid var(--glass-border);
    padding: 0.5rem; color: var(--text-body); width: 200px; transition: 0.3s;
}
.blog-search input:focus { outline: none; border-bottom-color: var(--primary-cyan); width: 250px; }

/* --- GRID & CARDS --- */
.blog-main__container {
    display: grid;
    grid-template-columns: 3fr 1fr; /* Grid asimétrico para Sidebar */
    gap: 3rem;
    position: relative; z-index: 1;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -5px rgba(0,0,0,0.15);
    border-color: var(--primary-cyan);
    background: var(--card-bg-hover);
}

/* AJUSTE PARA IMÁGENES VERTICALES (POSTS) */
.blog-card-image {
    width: 100%;
    aspect-ratio: 4/5; /* Formato vertical estilo Instagram */
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
}
.blog-card-image img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s ease;
}
.blog-card:hover .blog-card-image img { transform: scale(1.08); }

.blog-card-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }

.blog-category-tag {
    font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    color: var(--primary-cyan-text); margin-bottom: 0.5rem; display: block;
}

.blog-card-title {
    font-family: var(--font-display); font-size: 1.35rem; margin-bottom: 0.8rem;
    line-height: 1.3; color: var(--primary-dark);
}

.blog-card-excerpt {
    font-size: 0.9rem; color: var(--text-body); opacity: 0.8;
    margin-bottom: 1.5rem; flex-grow: 1; line-height: 1.6;
}

.read-more {
    font-weight: 700; color: var(--primary-dark); display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.9rem; transition: 0.3s; margin-top: auto;
}
.blog-card:hover .read-more { color: var(--primary-cyan-text); gap: 0.8rem; }

/* --- SIDEBAR --- */
.blog-sidebar { display: flex; flex-direction: column; gap: 2rem; }
.sidebar-widget {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg); padding: 2rem;
    box-shadow: var(--shadow-sm);
}
.sidebar-widget.sticky { position: sticky; top: calc(var(--header-height) + 2rem); }

/* CTA Widget Premium */
.sidebar-cta {
    background: linear-gradient(135deg, #121212 0%, #2d2d2d 100%);
    color: #fff; border: 1px solid rgba(255,255,255,0.1); text-align: center;
}
[data-theme="light"] .sidebar-cta {
    background: linear-gradient(135deg, #16FEED 0%, #00D4AA 100%);
    color: #000; border: none;
}
.sidebar-cta h4 { color: inherit; font-size: 1.5rem; margin-bottom: 1rem; }
.sidebar-cta p { opacity: 0.9; margin-bottom: 1.5rem; font-size: 0.95rem; }

/* --- PÁGINA INTERNA DE ARTÍCULO --- */
.post-header { text-align: center; padding: calc(var(--header-height) + 3rem) 0 3rem; }
.post-meta {
    display: flex; justify-content: center; gap: 2rem;
    color: var(--primary-gray); font-size: 0.9rem; margin: 1.5rem 0;
    font-weight: 500;
}
.post-featured-full {
    margin: 3rem 0; border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.post-featured-full img { width: 100%; height: auto; display: block; }

.post-content-body {
    font-size: 1.15rem; line-height: 1.9; color: var(--text-body);
    max-width: 100%; 
}
.post-content-body h2 { margin-top: 3rem; font-size: 2rem; color: var(--primary-dark); }
.post-content-body p { margin-bottom: 1.5rem; }
.post-content-body .lead { font-size: 1.35rem; font-weight: 400; color: var(--primary-dark); margin-bottom: 2.5rem; }
.highlight-box {
    background: rgba(22, 254, 237, 0.08); border-left: 4px solid var(--primary-cyan);
    padding: 2rem; margin: 2.5rem 0; border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-style: italic; font-size: 1.2rem; color: var(--primary-dark);
}
[data-theme="dark"] .highlight-box { background: rgba(255,255,255,0.05); color: #e4e4e7; }

/* RESPONSIVO */
@media (max-width: 1024px) {
    .blog-main__container { grid-template-columns: 1fr; }
    .blog-sidebar { order: -1; margin-bottom: 3rem; }
    .sidebar-widget.sticky { position: static; }
}
@media (max-width: 768px) {
    .blog-filters__container { flex-direction: column; align-items: stretch; border-radius: var(--radius-lg); }
    .blog-categories { flex-wrap: wrap; justify-content: center; }
    .blog-search input { width: 100%; }
    .blog-card-image { aspect-ratio: 16/9; /* En móvil landscape para ahorrar altura */ }
}