/* ===== BLOG OPENING ANIME THEME ===== */

/* Fuentes temáticas */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700;900&family=Orbitron:wght@400;500;700;900&family=Kalam:wght@300;400;700&display=swap');

/* Variables de colores anime */
:root {
    --anime-primary: #ff6b6b;
    --anime-secondary: #4ecdc4;
    --anime-accent: #ffe66d;
    --anime-dark: #2c3e50;
    --anime-light: #ffffff;
    --anime-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --anime-glow: 0 0 20px currentColor;
    --anime-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    --anime-ink: radial-gradient(circle, rgba(255, 107, 107, 0.3) 0%, transparent 70%);
}

/* Animaciones keyframes */
@keyframes openingSlide {
    0% {
        transform: translateX(-100vw) rotate(-10deg);
        opacity: 0;
    }
    70% {
        transform: translateX(10px) rotate(2deg);
    }
    100% {
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }
}

@keyframes inkSplash {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

@keyframes glitchEffect {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes floatingParticles {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}

@keyframes titleReveal {
    0% {
        clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%);
        transform: translateX(-50px);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        transform: translateX(0);
    }
}

/* Estilos base del blog */
.blog-page {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.blog-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="sakura" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23ff6b6b" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23sakura)"/></svg>');
    animation: floatingParticles 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* Header del blog */
.blog-header {
    padding: 100px 0 80px;
    position: relative;
    z-index: 10;
    background: linear-gradient(45deg, rgba(255,107,107,0.1), rgba(78,205,196,0.1));
}

.blog-hero {
    text-align: center;
    animation: openingSlide 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.blog-hero h1 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(45deg, var(--anime-primary), var(--anime-secondary), var(--anime-accent));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleReveal 2s ease-out, glitchEffect 0.3s ease-in-out 2s;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
}

.blog-hero h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background: var(--anime-gradient);
    border-radius: 2px;
    animation: inkSplash 1s ease-out 1.5s both;
}

.blog-hero p {
    font-family: 'Kalam', cursive;
    font-size: 1.3rem;
    color: var(--anime-light);
    margin-top: 30px;
    animation: openingSlide 1.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s both;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Artículo destacado */
.featured-article {
    padding: 80px 0;
    position: relative;
    z-index: 10;
}

.featured-post {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--anime-shadow);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.featured-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.8s ease;
}

.featured-post:hover::before {
    left: 100%;
}

.featured-post:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.post-image {
    position: relative;
    overflow: hidden;
    height: 400px;
}

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

.featured-post:hover .post-image img {
    transform: scale(1.1) rotate(2deg);
}

.post-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--anime-primary);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    animation: inkSplash 0.6s ease-out;
    box-shadow: var(--anime-glow);
}

.post-content {
    padding: 40px;
}

.post-content h2 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--anime-dark);
    margin-bottom: 20px;
    position: relative;
}

.post-content h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--anime-gradient);
    border-radius: 2px;
}

.post-excerpt {
    font-family: 'Kalam', cursive;
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #888;
    font-family: 'Orbitron', monospace;
}

.post-meta i {
    color: var(--anime-primary);
}

/* Categorías del blog */
.blog-categories {
    padding: 60px 0;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
}

.blog-categories h2 {
    text-align: center;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 50px;
    animation: titleReveal 1s ease-out;
}

.categories-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.category-btn {
    background: rgba(255,255,255,0.2);
    border: 2px solid var(--anime-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--anime-primary);
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.category-btn:hover::before,
.category-btn.active::before {
    width: 300px;
    height: 300px;
}

.category-btn:hover,
.category-btn.active {
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--anime-glow);
}

/* Grid de posts */
.blog-posts {
    padding: 80px 0;
    position: relative;
    z-index: 10;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.blog-post {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.blog-post.animate-in {
    animation: openingSlide 0.8s ease-out forwards;
}

.blog-post:nth-child(2) { animation-delay: 0.1s; }
.blog-post:nth-child(3) { animation-delay: 0.2s; }
.blog-post:nth-child(4) { animation-delay: 0.3s; }
.blog-post:nth-child(5) { animation-delay: 0.4s; }
.blog-post:nth-child(6) { animation-delay: 0.5s; }

.blog-post:hover {
    transform: translateY(-15px) rotate(1deg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.post-thumbnail {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-post:hover .post-thumbnail img {
    transform: scale(1.15);
}

.post-category-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--anime-secondary);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    animation: inkSplash 0.5s ease-out;
}

.post-info {
    padding: 30px;
}

.post-info h3 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--anime-dark);
    margin-bottom: 15px;
    line-height: 1.4;
}

.post-info p {
    font-family: 'Kalam', cursive;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.post-meta-small {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #888;
}

.post-meta-small span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--anime-primary);
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--anime-secondary);
    transform: translateX(5px);
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Botón cargar más */
.load-more-section {
    text-align: center;
    margin-top: 60px;
}

#load-more-posts {
    background: var(--anime-gradient);
    border: none;
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

#load-more-posts::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
}

#load-more-posts:hover::before {
    width: 300px;
    height: 300px;
}

#load-more-posts:hover {
    transform: translateY(-3px);
    box-shadow: var(--anime-glow);
}

/* Newsletter */
.newsletter-section {
    padding: 80px 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(15px);
    position: relative;
    z-index: 10;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
}

.newsletter-content p {
    font-family: 'Kalam', cursive;
    color: var(--anime-light);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.newsletter-form .form-group {
    display: flex;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--anime-primary);
    border-radius: 25px;
    background: rgba(255,255,255,0.9);
    font-family: 'Kalam', cursive;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.newsletter-form input:focus {
    border-color: var(--anime-secondary);
    box-shadow: var(--anime-glow);
}

.newsletter-form button {
    background: var(--anime-primary);
    border: none;
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--anime-secondary);
    transform: scale(1.05);
}

.newsletter-privacy {
    font-size: 0.9rem;
    color: #ccc;
    margin-top: 15px;
}

/* Tags populares */
.popular-tags {
    padding: 60px 0;
    position: relative;
    z-index: 10;
}

.popular-tags h2 {
    text-align: center;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 40px;
}

.tags-cloud {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.tag {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid var(--anime-primary);
}

.tag:hover {
    background: var(--anime-primary);
    transform: translateY(-3px);
    box-shadow: var(--anime-glow);
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .categories-filter {
        gap: 10px;
    }
    
    .category-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
    }
    
    .tags-cloud {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .post-content {
        padding: 25px;
    }
    
    .post-content h2 {
        font-size: 1.8rem;
    }
    
    .featured-post {
        margin: 0 15px;
    }
}

/* ===== HEADER TEMA ANIME ===== */
.blog-page .header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    backdrop-filter: blur(15px);
    border-bottom: 2px solid var(--anime-primary);
    box-shadow: var(--anime-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.blog-page .header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--anime-ink);
    animation: inkSplash 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.blog-page .header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: openingSlide 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

.blog-page .header-content {
    position: relative;
    z-index: 1;
}

.blog-page .logo a {
    color: var(--anime-light) !important;
    text-shadow: var(--anime-glow);
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 700;
    transition: all 0.3s ease;
}

.blog-page .logo a:hover {
    color: var(--anime-accent) !important;
    transform: scale(1.05);
    animation: glitchEffect 0.5s ease-in-out;
}

.blog-page .logo img {
    filter: drop-shadow(0 0 10px rgba(255, 230, 109, 0.5));
    transition: all 0.3s ease;
}

.blog-page .logo a:hover img {
    filter: drop-shadow(0 0 15px rgba(255, 230, 109, 0.8));
    transform: rotate(5deg);
}

.blog-page .nav-menu a {
    color: var(--anime-light) !important;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.blog-page .nav-menu a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--anime-accent), var(--anime-primary));
    transition: width 0.3s ease;
}

.blog-page .nav-menu a:hover {
    color: var(--anime-accent) !important;
    transform: translateY(-2px);
    text-shadow: var(--anime-glow);
}

.blog-page .nav-menu a:hover::before {
    width: 100%;
}

.blog-page .nav-menu a.active {
    color: var(--anime-accent) !important;
    font-weight: 700;
    text-shadow: var(--anime-glow);
    animation: hologramFlicker 2s ease-in-out infinite;
}

.blog-page .nav-menu a.active::before {
    width: 100%;
    animation: particleFloat 2s ease-in-out infinite;
}

.blog-page .dropdown-menu {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    border: 2px solid var(--anime-primary);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    box-shadow: var(--anime-shadow);
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1001;
}

.blog-page .dropdown-menu a {
    color: var(--anime-light) !important;
    transition: all 0.3s ease;
}

.blog-page .dropdown-menu a:hover {
    background: rgba(255, 107, 107, 0.2);
    color: var(--anime-accent) !important;
    transform: translateX(5px);
}

.blog-page .header-actions button,
.blog-page .header-actions a {
    color: var(--anime-light) !important;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--anime-accent);
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.blog-page .header-actions button::before,
.blog-page .header-actions a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--anime-accent) 0%, transparent 70%);
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.blog-page .header-actions button:hover,
.blog-page .header-actions a:hover {
    background: var(--anime-accent);
    color: var(--anime-dark) !important;
    transform: scale(1.1);
    box-shadow: var(--anime-glow);
}

.blog-page .header-actions button:hover::before,
.blog-page .header-actions a:hover::before {
    width: 100%;
    height: 100%;
}

.blog-page .cart-count {
    background: var(--anime-primary) !important;
    color: var(--anime-light) !important;
    border: 2px solid var(--anime-accent);
    animation: particleFloat 2s ease-in-out infinite;
}

.blog-page .menu-toggle span {
    background: var(--anime-light) !important;
    transition: all 0.3s ease;
}

.blog-page .menu-toggle:hover span {
    background: var(--anime-accent) !important;
    box-shadow: 0 0 5px var(--anime-accent);
}

/* Breadcrumb tema anime */
.blog-page .breadcrumb {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1), rgba(255, 107, 107, 0.1));
    border-bottom: 1px solid var(--anime-primary);
}

.blog-page .breadcrumb a {
    color: var(--anime-primary) !important;
    font-family: 'Noto Sans JP', sans-serif;
    transition: all 0.3s ease;
}

.blog-page .breadcrumb a:hover {
    color: var(--anime-accent) !important;
    text-shadow: 0 0 5px currentColor;
}

/* Animaciones específicas del header */
@keyframes openingSlide {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: -100%; }
}

@keyframes inkSplash {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes glitchEffect {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-2px); }
    40% { transform: translateX(2px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(1px); }
}

@keyframes hologramFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

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