/* ============================================
   BLOG STYLES - INFLAPY v3.0
   Diseno profesional moderno
   ============================================ */

:root {
    --rosa-principal: #E91E8C;
    --rosa-claro: #FF6BB3;
    --rosa-hover: #C4177A;
    --rosa-light: #fff0f6;
    --texto-oscuro: #1a1a1a;
    --texto-gris: #555;
    --texto-light: #6c757d;
    --fondo-gris: #f8f9fa;
    --fondo-claro: #fafbfc;
    --borde-light: #e9ecef;
    --sombra-suave: 0 2px 15px rgba(0,0,0,0.08);
    --sombra-media: 0 8px 30px rgba(0,0,0,0.12);
    --sombra-rosa: 0 8px 30px rgba(233, 30, 140, 0.2);
    --transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BLOG HERO - Gradiente dramatico
   ============================================ */
.articles-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 80px 0 100px;
    text-align: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.articles-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(233, 30, 140, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.articles-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--fondo-gris) 0%, transparent 100%);
    pointer-events: none;
}

.articles-hero .container {
    position: relative;
    z-index: 2;
}

.articles-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(233, 30, 140, 0.2);
    border: 1px solid rgba(233, 30, 140, 0.3);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #FF6BB3;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.articles-hero__title {
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.articles-hero__subtitle {
    font-size: 1.15rem;
    opacity: 0.85;
    max-width: 650px;
    margin: 0 auto 35px;
    line-height: 1.7;
    font-weight: 400;
    color: rgba(255,255,255,0.85);
}

/* ============================================
   CATEGORY FILTERS - Pills modernos
   ============================================ */
.category-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0 20px;
    position: relative;
}

.category-filter {
    padding: 12px 24px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transicion);
    backdrop-filter: blur(10px);
}

.category-filter:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-2px);
}

.category-filter.active {
    background: var(--rosa-principal);
    border-color: var(--rosa-principal);
    color: #fff;
    box-shadow: 0 4px 20px rgba(233, 30, 140, 0.4);
}

/* Colores por categoria */
.category-filter[data-filter="guias"].active {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-color: #2196F3;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.4);
}
.category-filter[data-filter="tips"].active {
    background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
    border-color: #4CAF50;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
}
.category-filter[data-filter="ideas"].active {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    border-color: #FF9800;
    box-shadow: 0 4px 20px rgba(255, 152, 0, 0.4);
}
.category-filter[data-filter="cdmx"].active {
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    border-color: #9C27B0;
    box-shadow: 0 4px 20px rgba(156, 39, 176, 0.4);
}
.category-filter[data-filter="edomex"].active {
    background: linear-gradient(135deg, #00BCD4 0%, #0097A7 100%);
    border-color: #00BCD4;
    box-shadow: 0 4px 20px rgba(0, 188, 212, 0.4);
}
.category-filter[data-filter="servicios"].active {
    background: linear-gradient(135deg, #F44336 0%, #D32F2F 100%);
    border-color: #F44336;
    box-shadow: 0 4px 20px rgba(244, 67, 54, 0.4);
}

/* ============================================
   ARTICLES SECTION
   ============================================ */
.articles-section {
    padding: 60px 0 80px;
    background: var(--fondo-gris);
    min-height: 60vh;
}

.articles-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   ARTICLES COUNT
   ============================================ */
.articles-count {
    text-align: center;
    font-size: 1rem;
    color: var(--texto-gris);
    margin-bottom: 40px;
    padding: 15px 25px;
    background: #fff;
    border-radius: 50px;
    display: inline-block;
    box-shadow: var(--sombra-suave);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.articles-count strong {
    color: var(--rosa-principal);
    font-weight: 700;
}

/* ============================================
   ARTICLES GRID - Masonry style
   ============================================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

@media (max-width: 1100px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 700px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ============================================
   ARTICLE CARD - Diseno premium
   ============================================ */
.article-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--sombra-suave);
    display: flex;
    flex-direction: column;
    transition: var(--transicion);
    border: 1px solid rgba(0,0,0,0.04);
}

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

/* Card Image */
.article-card__image-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
    display: block;
}

.article-card__image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: var(--transicion);
}

.article-card:hover .article-card__image-wrapper::before {
    opacity: 1;
}

.article-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover .article-card__image {
    transform: scale(1.08);
}

/* Category Badge */
.article-card__category {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    color: white;
    background: var(--rosa-principal);
    box-shadow: 0 4px 15px rgba(233, 30, 140, 0.4);
}

/* Category colors */
.article-card__category--guias { background: linear-gradient(135deg, #2196F3, #1976D2); box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4); }
.article-card__category--tips { background: linear-gradient(135deg, #4CAF50, #388E3C); box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4); }
.article-card__category--ideas { background: linear-gradient(135deg, #FF9800, #F57C00); box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4); }
.article-card__category--cdmx { background: linear-gradient(135deg, #9C27B0, #7B1FA2); box-shadow: 0 4px 15px rgba(156, 39, 176, 0.4); }
.article-card__category--edomex { background: linear-gradient(135deg, #00BCD4, #0097A7); box-shadow: 0 4px 15px rgba(0, 188, 212, 0.4); }
.article-card__category--servicios { background: linear-gradient(135deg, #F44336, #D32F2F); box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4); }

/* Card Content */
.article-card__content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card__title {
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--texto-oscuro);
    margin-bottom: 12px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-card__title a:hover {
    color: var(--rosa-principal);
}

.article-card__description {
    font-size: 0.95rem;
    color: var(--texto-light);
    line-height: 1.7;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Card Meta */
.article-card__meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--texto-light);
    padding-top: 20px;
    border-top: 1px solid var(--borde-light);
    margin-bottom: 20px;
}

.article-card__meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-card__meta-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

/* Card Button */
.article-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--rosa-principal) 0%, var(--rosa-claro) 100%);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transicion);
    box-shadow: 0 4px 20px rgba(233, 30, 140, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-card__button::after {
    content: '\2192';
    transition: transform 0.3s ease;
}

.article-card__button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(233, 30, 140, 0.45);
}

.article-card__button:hover::after {
    transform: translateX(5px);
}

/* ============================================
   NO RESULTS
   ============================================ */
.no-results {
    text-align: center;
    padding: 100px 20px;
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--sombra-suave);
}

.no-results-icon {
    font-size: 5rem;
    margin-bottom: 25px;
    opacity: 0.5;
}

.no-results-title {
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: 1.8rem;
    color: var(--texto-oscuro);
    margin-bottom: 15px;
    font-weight: 700;
}

.no-results p {
    font-size: 1.1rem;
    color: var(--texto-light);
}

/* ============================================
   PAGINATION - Moderna y elegante
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 60px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.pagination__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    height: 50px;
    padding: 0 25px;
    border: none;
    border-radius: 50px;
    background: #fff;
    color: var(--texto-oscuro);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion);
    box-shadow: var(--sombra-suave);
}

.pagination__btn:hover:not(:disabled) {
    background: var(--rosa-principal);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--sombra-rosa);
}

.pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination__numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination__number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 50px;
    padding: 0 16px;
    border: none;
    border-radius: 12px;
    background: #fff;
    color: var(--texto-oscuro);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion);
    box-shadow: var(--sombra-suave);
}

.pagination__number:hover {
    background: var(--rosa-light);
    color: var(--rosa-principal);
}

.pagination__number--active {
    background: var(--rosa-principal);
    color: #ffffff;
    box-shadow: var(--sombra-rosa);
}

.pagination__ellipsis {
    color: var(--texto-light);
    padding: 0 8px;
    font-weight: 600;
}

/* ============================================
   BLOG CTA SECTION
   ============================================ */
.blog-cta-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 30%, rgba(233, 30, 140, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.blog-cta-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.blog-cta-content h2 {
    color: #ffffff;
    font-family: 'Poppins', 'Fredoka', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.blog-cta-content p {
    color: rgba(255,255,255,0.8);
    font-size: 1.2rem;
    margin-bottom: 40px;
    line-height: 1.7;
}

.blog-cta-content .btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--rosa-principal) 0%, var(--rosa-claro) 100%);
    color: #ffffff;
    padding: 18px 45px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--transicion);
    box-shadow: 0 6px 30px rgba(233, 30, 140, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blog-cta-content .btn-whatsapp:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 40px rgba(233, 30, 140, 0.5);
}

/* ============================================
   LOADING STATE - Skeleton
   ============================================ */
.article-card--skeleton {
    pointer-events: none;
}

.article-card--skeleton .article-card__image-wrapper,
.article-card--skeleton .article-card__title,
.article-card--skeleton .article-card__description,
.article-card--skeleton .article-card__button {
    background: linear-gradient(90deg,
        #f0f0f0 25%,
        #e8e8e8 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
}

.article-card--skeleton .article-card__image-wrapper {
    height: 240px;
}

.article-card--skeleton .article-card__title {
    height: 2rem;
    width: 85%;
    margin-bottom: 12px;
}

.article-card--skeleton .article-card__description {
    height: 5rem;
    width: 100%;
    margin-bottom: 20px;
}

.article-card--skeleton .article-card__button {
    height: 50px;
    width: 70%;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .articles-hero {
        padding: 60px 0 80px;
    }

    .articles-hero__title {
        font-size: 2rem;
    }

    .articles-hero__subtitle {
        font-size: 1rem;
        padding: 0 15px;
        margin-bottom: 30px;
    }

    .category-filters {
        gap: 8px;
    }

    .category-filter {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .articles-section {
        padding: 50px 0 60px;
    }

    .article-card__image-wrapper {
        height: 200px;
    }

    .article-card__content {
        padding: 22px;
    }

    .article-card__title {
        font-size: 1.15rem;
    }

    .article-card__description {
        -webkit-line-clamp: 2;
        font-size: 0.9rem;
    }

    .pagination {
        gap: 8px;
    }

    .pagination__btn {
        min-width: 110px;
        height: 46px;
        font-size: 0.9rem;
    }

    .pagination__number {
        min-width: 44px;
        height: 44px;
    }

    .blog-cta-section {
        padding: 70px 0;
    }

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

    .blog-cta-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .articles-hero__title {
        font-size: 1.75rem;
    }

    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 15px;
        margin: 0 -20px;
        padding-left: 20px;
        padding-right: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .category-filters::-webkit-scrollbar {
        display: none;
    }

    .category-filter {
        flex-shrink: 0;
    }

    .articles-count {
        font-size: 0.9rem;
        padding: 12px 20px;
    }

    .article-card__title {
        font-size: 1.05rem;
    }

    .article-card__button {
        padding: 12px 24px;
        font-size: 0.85rem;
    }
}
