/* Blog Styles - Wooden México */

/* Variables específicas del blog */
:root {
    --blog-primary: #2c3e50;
    --blog-accent: #d35400;
    --blog-light: #f8f9fa;
    --blog-dark: #2c3e50;
    --blog-gray: #6c757d;
    --blog-white: #ffffff;
    --blog-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --blog-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Header del Blog */
.blog-header {
    background: var(--blog-white);
    box-shadow: var(--blog-shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.blog-nav .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-text {
    font-family: var(--fuente-titulos);
    font-size: 1.9rem;
    font-weight: 700;
    color: #58595b;
    line-height: 1;
}

.logo svg {
    height: 70px;
    width: auto;
    display: block;
}

.logo svg path {
    fill: #58595b;
    transition: fill 0.3s ease;
}

.logo a:hover svg path {
    fill: var(--blog-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--blog-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--blog-accent);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--blog-accent);
}

.hamburger-button {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 4px;
    padding: 5px;
    cursor: pointer;
}

.hamburger-button span {
    width: 25px;
    height: 3px;
    background: var(--blog-dark);
    transition: all 0.3s ease;
}

/* Hero del Blog */
.blog-hero {
    background: linear-gradient(135deg, var(--blog-primary) 0%, var(--blog-dark) 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.blog-hero-content h1 {
    font-family: var(--fuente-titulos);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-whatsapp {
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--blog-accent);
    color: white;
}

.btn-primary:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

/* Contenido Principal */
.blog-main {
    padding: 80px 0;
    background: var(--blog-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.blog-intro h2 {
    font-family: var(--fuente-titulos);
    font-size: 2.8rem;
    color: var(--blog-dark);
    margin-bottom: 1rem;
}

.blog-intro p {
    font-size: 1.2rem;
    color: var(--blog-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid de Artículos */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 5rem;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--blog-shadow-hover);
}

.article-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--blog-accent);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.article-content {
    padding: 2rem;
}

.article-content h3 {
    margin-bottom: 1rem;
}

.article-content h3 a {
    color: var(--blog-dark);
    text-decoration: none;
    font-family: var(--fuente-titulos);
    font-size: 1.4rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.article-content h3 a:hover {
    color: var(--blog-accent);
}

.article-excerpt {
    color: var(--blog-gray);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--blog-gray);
}

.read-more {
    color: var(--blog-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--blog-dark);
}

/* CTA del Blog */
.blog-cta {
    background: var(--blog-primary);
    color: white;
    padding: 4rem 0;
    border-radius: 20px;
    text-align: center;
}

.cta-content h2 {
    font-family: var(--fuente-titulos);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.blog-footer {
    background: var(--blog-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    font-family: var(--fuente-titulos);
    margin-bottom: 1rem;
    color: white;
}

.footer-section p,
.footer-section li {
    color: #bbb;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--blog-accent);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 2rem;
    text-align: center;
    color: #bbb;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.8rem;
    box-shadow: var(--blog-shadow-hover);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-button:hover {
    background: #128C7E;
    transform: scale(1.1);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hamburger-button {
        display: flex;
    }
    
    .blog-hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-content {
        padding: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .blog-hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .article-content h3 a {
        font-size: 1.2rem;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-button {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* Botones táctiles optimizados para móvil */
    .btn-primary,
    .btn-whatsapp,
    .cta-button {
        min-height: 48px;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        border-radius: 12px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        transition: all 0.3s ease;
    }
    
    .btn-primary:active,
    .btn-whatsapp:active,
    .cta-button:active {
        transform: scale(0.95);
    }
}

/* --- Lazy Loading Images --- */
img[loading="lazy"],
img[data-src] {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

img[loading="lazy"]:not(.loaded),
img[data-src]:not(.loaded) {
    opacity: 0;
    transform: scale(0.95);
}

img.loaded {
    opacity: 1;
    transform: scale(1);
}

/* Responsive images para blog */
.article-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: var(--blog-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-image img,
.blog-preview-image img,
.related-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.blog-preview-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--blog-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-item {
    position: relative;
    height: 80px;
    overflow: hidden;
    background: var(--blog-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-image img:not(.loaded),
.blog-preview-image img:not(.loaded),
.related-item img:not(.loaded) {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: blogLoading 1.5s infinite;
}

@keyframes blogLoading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Mobile lazy loading optimizations */
@media (max-width: 768px) {
    img[loading="lazy"],
    img[data-src] {
        transition: opacity 0.2s ease; /* Más rápido en móvil */
    }
    
    .article-image img,
    .blog-preview-image img {
        border-radius: 12px;
    }
}