/* blog.css - Adaptado para usar variables del sistema */

.blog-hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: white;
    padding: 8rem 0 4rem;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(30, 58, 138, 0.9) 0%, rgba(30, 64, 175, 0.95) 100%);
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.blog-hero-text .hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero-text .hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.blog-hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-hero-visual {
    position: relative;
    height: 300px;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-element {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gold-color);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    animation: float 6s ease-in-out infinite;
}

.element-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.element-2 {
    top: 50%;
    left: 60%;
    animation-delay: 2s;
}

.element-3 {
    top: 70%;
    left: 30%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Búsqueda y Filtros */
.blog-search-section {
    padding: 3rem 0;
    background: var(--gray-light);
}

.search-filter-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: end;
}

.search-box {
    position: relative;
    max-width: 500px;
}

.search-box input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: 2px solid var(--gray-border);
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: var(--dark-blue);
}

.filter-options {
    display: flex;
    gap: 1rem;
}

.filter-select {
    padding: 1rem 1.5rem;
    border: 2px solid var(--gray-border);
    border-radius: 10px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* Artículos Destacados */
.featured-posts-section {
    padding: 4rem 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: var(--primary-blue);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.featured-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.featured-post-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-border);
}

.featured-post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.post-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-ley-silla {
    background: var(--primary-blue);
    color: white;
}

.category-ergonomia {
    background: var(--gold-color);
    color: var(--text-dark);
}

.category-normativas {
    background: #10b981;
    color: white;
}

.category-multas {
    background: #ef4444;
    color: white;
}

.category-implementacion {
    background: #8b5cf6;
    color: white;
}

.post-content {
    padding: 2rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.post-date {
    color: var(--primary-blue);
    font-weight: 600;
}

.post-title {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    background: var(--light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.author-role {
    font-size: 0.8rem;
    color: var(--text-light);
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.read-more-btn:hover {
    background: var(--light-blue);
    transform: translateX(5px);
}

/* Lista de Artículos */
.blog-posts-section {
    padding: 4rem 0;
    background: var(--gray-light);
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-post-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-border);
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-post-card .post-image {
    height: 200px;
}

.blog-post-card .post-content {
    padding: 1.5rem;
}

.blog-post-card .post-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.blog-post-card .post-excerpt {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.post-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

.post-views, .post-likes {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Paginación */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-btn {
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-border);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.pagination-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.pagination-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.pagination-next {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Newsletter */
.newsletter-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: white;
}

.newsletter-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.newsletter-content h2 {
    color: white;
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.newsletter-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.subscribe-form .form-group {
    position: relative;
    margin-bottom: 1rem;
}

.subscribe-form input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255,255,255,0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.subscribe-form input::placeholder {
    color: rgba(255,255,255,0.7);
}

.subscribe-form input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
}

.subscribe-form .btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.75rem 1.5rem;
}

.subscribe-form .checkbox-label {
    color: rgba(255,255,255,0.9);
}

/* Hero Blog con imagen de fondo - Similar al catálogo */
.blog-hero {
    position: relative;
    color: var(--white);
    padding: 10rem 0 8rem;
    margin-top: 70px;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background-image: url('https://images.unsplash.com/photo-1486312338219-ce68d2c6f44d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2072&q=80') !important;
    background-position: center !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Overlay más oscuro para mejor contraste */
    z-index: 2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(30, 58, 138, 0.8) 0%, 
        rgba(1, 13, 38, 0.7) 50%, 
        rgba(59, 130, 246, 0.6) 100%);
    z-index: 3;
    backdrop-filter: blur(2px); /* Efecto blur sutil */
}

.blog-hero-content {
    position: relative;
    z-index: 4;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.blog-hero-text {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    text-align: center;
}

.blog-hero-text .hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--white);
    line-height: 1.1;
    text-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.7),
        0 8px 30px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 30%, #bae6fd 70%, #7dd3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: titleReveal 1.5s ease-out;
}

.blog-hero-text .hero-subtitle {
    font-size: 1.4rem;
    opacity: 0.95;
    margin-bottom: 3rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
    font-weight: 500;
    animation: subtitleReveal 1.8s ease-out 0.3s both;
}

/* Animaciones para el texto */
@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtitleReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mantener los elementos flotantes pero ajustar su posición */
.blog-hero-visual {
    position: relative;
    height: 300px;
    margin-top: 3rem;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-element {
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gold-color);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    animation: float 6s ease-in-out infinite;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.element-1 {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.element-2 {
    top: 40%;
    left: 70%;
    animation-delay: 2s;
}

.element-3 {
    top: 70%;
    left: 30%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
    33% { transform: translateY(-15px) rotate(3deg) scale(1.05); }
    66% { transform: translateY(10px) rotate(-2deg) scale(0.95); }
}

/* Responsive para el hero de blog */
@media (max-width: 768px) {
    .blog-hero {
        padding: 8rem 0 4rem;
        min-height: 60vh;
    }
    
    .blog-hero-text .hero-title {
        font-size: 2.5rem;
    }
    
    .blog-hero-text .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .blog-hero-visual {
        height: 200px;
        margin-top: 2rem;
    }
    
    .floating-element {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 6rem 0 3rem;
    }
    
    .blog-hero-text .hero-title {
        font-size: 2rem;
    }
    
    .blog-hero-text .hero-subtitle {
        font-size: 1rem;
    }
    
    .floating-element {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Responsive General */
@media (max-width: 768px) {
    .blog-hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .blog-hero-text .hero-title {
        font-size: 2.5rem;
    }
    
    .blog-hero-stats {
        justify-content: center;
    }
    
    .search-filter-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-options {
        flex-direction: column;
    }
    
    .featured-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 6rem 0 3rem;
    }
    
    .blog-hero-text .hero-title {
        font-size: 2rem;
    }
    
    .featured-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .floating-element {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .post-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== MODO OSCURO PARA BLOG ===== */
body.dark-mode .blog-hero {
    background-image: url('https://images.unsplash.com/photo-1516321318423-f06f85e504b3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') !important;
}

body.dark-mode .hero-overlay {
    background: linear-gradient(45deg, 
        rgba(15, 23, 42, 0.9) 0%, 
        rgba(30, 41, 59, 0.8) 50%, 
        rgba(51, 65, 85, 0.7) 100%);
    backdrop-filter: blur(3px);
}

body.dark-mode .blog-search-section {
    background: #1e293b;
}

body.dark-mode .search-box input {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

body.dark-mode .search-box input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

body.dark-mode .filter-select {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

body.dark-mode .featured-posts-section {
    background: #1e293b;
}

body.dark-mode .featured-post-card {
    background: #334155;
    border-color: #475569;
}

body.dark-mode .post-title {
    color: #e2e8f0;
}

body.dark-mode .post-excerpt {
    color: #cbd5e1;
}

body.dark-mode .author-name {
    color: #e2e8f0;
}

body.dark-mode .author-role {
    color: #94a3b8;
}

body.dark-mode .blog-posts-section {
    background: #1e293b;
}

body.dark-mode .blog-post-card {
    background: #334155;
    border-color: #475569;
}

body.dark-mode .post-stats {
    color: #94a3b8;
}

body.dark-mode .pagination-btn {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

body.dark-mode .pagination-btn:hover {
    border-color: #60a5fa;
    color: #60a5fa;
}

body.dark-mode .pagination-btn.active {
    background: #60a5fa;
    color: #1e293b;
    border-color: #60a5fa;
}

body.dark-mode .newsletter-section {
    background: linear-gradient(135deg, #1e40af, #3730a3);
}

body.dark-mode .subscribe-form input {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: white;
}

body.dark-mode .subscribe-form input::placeholder {
    color: rgba(255,255,255,0.7);
}

body.dark-mode .subscribe-form .checkbox-label {
    color: rgba(255,255,255,0.9);
}

/* Efectos hover en modo oscuro */
body.dark-mode .featured-post-card:hover,
body.dark-mode .blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    border-color: #60a5fa;
}

body.dark-mode .read-more-btn:hover {
    background: rgba(96, 165, 250, 0.2);
}

/* Asegurar que los textos en modo oscuro sean legibles */
body.dark-mode .es-lang,
body.dark-mode .en-lang {
    color: inherit;
}

/* Section headers en modo oscuro */
body.dark-mode .section-header h2 {
    color: #60a5fa;
}

body.dark-mode .section-header p {
    color: #cbd5e1;
}

/* Post meta en modo oscuro */
body.dark-mode .post-meta {
    color: #94a3b8;
}

body.dark-mode .post-date {
    color: #60a5fa;
}

/* Author avatar en modo oscuro */
body.dark-mode .author-avatar {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

