/* ===== BLOG STYLES - NORTH SOLAR ===== */

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: #1f2937;
    background-color: #ffffff;
}

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

/* ===== HEADER ===== */
.blog-header {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.sun-icon {
    width: 32px;
    height: 32px;
    color: #fbbf24;
    transition: all 0.3s ease;
}

.logo:hover .sun-icon {
    color: #f59e0b;
    transform: rotate(15deg);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.01em;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

/* Ocultar botón móvil en desktop */
.mobile-menu-btn,
.mobile-menu {
    display: none;
}

/* ===== HERO BLOG ===== */
.blog-hero {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
    color: white;
    padding: 4rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.blog-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.blog-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.hero-visual {
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    z-index: 1;
}

.solar-animation {
    font-size: 6rem;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ===== ARTÍCULOS ===== */
.featured-articles {
    padding: 4rem 0 6rem;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
}

.featured-articles h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #065f46;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}


.article-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    transform: translateY(30px);
}

.article-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.article-card:hover {
    transform: translateY(-2px) scale(1.012);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.13);
}

.article-card.featured {
    grid-column: span 2;
}

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

.article-card.featured .article-image {
    height: 250px;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-placeholder.ayudas {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.image-placeholder.irpf {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

.image-placeholder.ahorro {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
}

.article-card:hover .image-placeholder {
    transform: scale(1.01);
}

.image-placeholder span {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.image-placeholder h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.tag {
    background: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.article-content h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.article-content h3 a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-content h3 a:hover {
    color: #065f46;
}

.article-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: #065f46;
    font-weight: 600;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    background: #dcfce7;
    border-radius: 12px;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.read-more:hover {
    background: #065f46;
    color: white;
    transform: translateX(2px);
}

/* ===== CTA SECTION ===== */
.blog-cta {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.blog-cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.blog-cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #065f46;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* ===== FOOTER ===== */
.blog-footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #10b981;
}

.footer-section p,
.footer-section li {
    color: #d1d5db;
    margin-bottom: 0.5rem;
}

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

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

.footer-section ul li a:hover {
    color: #10b981;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 1.5rem 1.5rem 0;
    border-top: 1px solid #374151;
    text-align: center;
    color: #9ca3af;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Ocultar menú desktop en móvil */
    }

    /* Botón hamburguesa móvil */
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 24px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1000;
    }

    .mobile-menu-btn span {
        width: 100%;
        height: 3px;
        background: white;
        border-radius: 2px;
        transition: all 0.3s ease;
        transform-origin: center;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Menú móvil */
    .mobile-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, #065f46 0%, #10b981 100%);
        padding: 80px 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    }

    .mobile-menu.active {
        right: 0;
    }

    .mobile-menu a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        color: white;
        text-decoration: none;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .mobile-menu a:hover,
    .mobile-menu a.active {
        background: rgba(255, 255, 255, 0.1);
        padding-left: 1rem;
        border-radius: 8px;
    }

    .mobile-menu a svg {
        width: 16px;
        height: 16px;
    }

    .blog-hero h1 {
        font-size: 2.5rem;
    }

    .blog-hero p {
        font-size: 1.1rem;
    }

    .hero-visual {
        display: none;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .article-card.featured {
        grid-column: span 1;
    }

    .featured-articles h2 {
        font-size: 2rem;
    }

    .blog-cta h2 {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .blog-hero {
        padding: 3rem 0 4rem;
    }

    .featured-articles {
        padding: 3rem 0 4rem;
    }

    .article-content {
        padding: 1.25rem;
    }
}

/* ===== ANIMACIONES ADICIONALES ===== */
.article-card {
    animation-delay: var(--delay, 0s);
}

.article-card:nth-child(1) { --delay: 0.1s; }
.article-card:nth-child(2) { --delay: 0.2s; }
.article-card:nth-child(3) { --delay: 0.3s; }

/* Efecto hover suave en imágenes */
@media (hover: hover) {
    .image-placeholder::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.1);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .article-card:hover .image-placeholder::after {
        opacity: 1;
    }
}

/* ===== NAVEGACIÓN DE VUELTA ===== */
.blog-navigation {
    background: #f9fafb;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.nav-back {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #065f46;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #065f46;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.back-to-home:hover {
    background: #065f46;
    color: white;
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.2);
}

.back-to-home svg {
    transition: transform 0.3s ease;
}

.back-to-home:hover svg {
    transform: translateX(-2px);
}

.breadcrumb {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive para navegación */
@media (max-width: 768px) {
    .nav-back {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .back-to-home {
        align-self: center;
        font-size: 1rem;
        padding: 1rem 2rem;
    }

    .breadcrumb {
        align-self: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .blog-navigation {
        padding: 1rem 0;
    }

    .back-to-home {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
    }
}
