/*
 * Estilos del Blog - VivaElMundial Theme
 * Basado en la estructura real de Astra:
 *
 * Astra's native grid system uses:
 *   .ast-row { display:flex; flex-wrap:wrap; }
 *   .ast-article-post { width:33.33%; padding:0 1em; }
 *   .ast-row { margin-left:-1em; margin-right:-1em; }
 *
 * We work WITH this system, not against it.
 */

/* === CONTENEDOR PRINCIPAL === */
#primary.content-area {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
    box-sizing: border-box !important;
}

/* ============================================
   HERO SECTION - Blog Archive Header
   ============================================ */
.ast-archive-description,
.blog-hero-section {
    background: linear-gradient(135deg, #0a101f 0%, #121a2e 50%, #1a243d 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    padding: 50px 40px !important;
    margin-bottom: 40px !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Decorative gold accent line at top */
.ast-archive-description::before,
.blog-hero-section::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 120px !important;
    height: 4px !important;
    background: linear-gradient(90deg, transparent, #fca311, transparent) !important;
    border-radius: 2px !important;
}

/* Subtle soccer ball pattern */
.ast-archive-description::after,
.blog-hero-section::after {
    content: '⚽' !important;
    position: absolute !important;
    top: 50% !important;
    right: 40px !important;
    transform: translateY(-50%) !important;
    font-size: 6rem !important;
    opacity: 0.04 !important;
    pointer-events: none !important;
}

/* Hero Title */
.ast-archive-description .page-title,
.blog-hero-title {
    font-size: 2.5rem !important;
    font-weight: 900 !important;
    background: linear-gradient(135deg, #ffffff 0%, #fca311 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    margin-bottom: 12px !important;
    line-height: 1.2 !important;
}

/* Hero Description */
.ast-archive-description p,
.blog-hero-description {
    color: #a0a0a0 !important;
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}

/* ============================================
   GRID LAYOUT
   ============================================ */

/* Fix Astra's width:100% override */
.ast-separate-container .ast-blog-layout-4-grid .ast-article-post {
    width: 33.33% !important;
    padding: 0 14px !important;
    margin-bottom: 28px !important;
    box-sizing: border-box !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Row negative margins to compensate card padding */
.ast-separate-container .ast-blog-layout-4-grid .ast-row {
    margin-left: -14px !important;
    margin-right: -14px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
}

/* ============================================
   CARD STYLING
   ============================================ */
.ast-separate-container .ast-blog-layout-4-grid .ast-article-inner {
    background: #121a2e !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Enhanced hover - gold glow effect */
.ast-separate-container .ast-blog-layout-4-grid .ast-article-post:hover .ast-article-inner {
    transform: translateY(-8px) !important;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(252, 163, 17, 0.08) !important;
    border-color: rgba(252, 163, 17, 0.4) !important;
}

/* Inner content padding */
.ast-separate-container .ast-blog-layout-4-grid .blog-layout-4 .post-content {
    padding: 24px !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

/* ============================================
   FEATURED IMAGE
   ============================================ */
.ast-article-post .post-thumb-img-content {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #0a101f;
}

.ast-article-post .post-thumb-img-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ast-article-post:hover .post-thumb-img-content img {
    transform: scale(1.08);
}

/* Featured image placeholder (for posts without images) */
.ast-article-post .blog-featured-placeholder {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #121a2e 0%, #1a243d 50%, #0a101f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.ast-article-post .blog-featured-placeholder::before {
    content: '⚽';
    font-size: 3rem;
    opacity: 0.15;
    transition: all 0.4s ease;
}

.ast-article-post:hover .blog-featured-placeholder::before {
    opacity: 0.3;
    transform: scale(1.2) rotate(15deg);
}

/* Decorative lines on placeholder */
.ast-article-post .blog-featured-placeholder::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #fca311, transparent);
    opacity: 0.4;
}

/* ============================================
   CATEGORIES
   ============================================ */
.ast-article-post .ast-taxonomy-container.cat-links a {
    display: inline-block !important;
    background: rgba(252, 163, 17, 0.12) !important;
    color: #fca311 !important;
    padding: 5px 14px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    border: 1px solid rgba(252, 163, 17, 0.25) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    margin-bottom: 12px !important;
}

.ast-article-post .ast-taxonomy-container.cat-links a:hover {
    background: #fca311 !important;
    color: #0a101f !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(252, 163, 17, 0.3) !important;
}

/* ============================================
   TITLE
   ============================================ */
.ast-article-post .entry-title {
    margin-bottom: 12px !important;
    line-height: 1.3 !important;
}

.ast-article-post .entry-title a {
    color: #ffffff !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    display: block !important;
}

.ast-article-post .entry-title a:hover {
    color: #fca311 !important;
}

/* ============================================
   META INFO
   ============================================ */
.ast-article-post .entry-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-bottom: 14px !important;
    font-size: 0.82rem !important;
    color: #888 !important;
    align-items: center !important;
}

.ast-article-post .entry-meta a,
.ast-article-post .entry-meta .published {
    color: #888 !important;
    text-decoration: none !important;
    font-size: 0.82rem !important;
}

.ast-article-post .entry-meta a:hover {
    color: #fca311 !important;
}

/* ============================================
   EXCERPT
   ============================================ */
.ast-article-post .ast-excerpt-container {
    color: #c0c0c0 !important;
    margin-bottom: 16px !important;
    line-height: 1.7 !important;
    font-size: 0.92rem !important;
    flex-grow: 1 !important;
}

.ast-article-post .ast-excerpt-container p {
    color: #c0c0c0 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* ============================================
   READ MORE BUTTON
   ============================================ */
.ast-read-more-container {
    margin-top: auto !important;
    padding-top: 8px !important;
}

.ast-read-more-container .ast-read-more {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: transparent !important;
    color: #fca311 !important;
    padding: 10px 24px !important;
    border: 2px solid rgba(252, 163, 17, 0.5) !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Background fill effect on hover */
.ast-read-more-container .ast-read-more::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: #fca311 !important;
    transition: left 0.3s ease !important;
    z-index: -1 !important;
    border-radius: 25px !important;
}

.ast-read-more-container .ast-read-more:hover {
    color: #0a101f !important;
    border-color: #fca311 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(252, 163, 17, 0.3) !important;
}

.ast-read-more-container .ast-read-more:hover::before {
    left: 0 !important;
}

/* ============================================
   PAGINATION
   ============================================ */
.ast-pagination,
.ast-blog-layout-4-grid~.ast-pagination {
    text-align: center !important;
    margin-top: 20px !important;
    padding-top: 40px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.ast-pagination .page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 14px !important;
    margin: 0 4px !important;
    background: #121a2e !important;
    color: #a0a0a0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.ast-pagination .page-numbers:hover {
    background: #1a243d !important;
    color: #ffffff !important;
    border-color: rgba(252, 163, 17, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* Active page */
.ast-pagination .page-numbers.current {
    background: linear-gradient(135deg, #fca311, #e39310) !important;
    color: #0a101f !important;
    border-color: #fca311 !important;
    box-shadow: 0 4px 15px rgba(252, 163, 17, 0.3) !important;
    font-weight: 700 !important;
}

/* Prev/Next arrows */
.ast-pagination .prev,
.ast-pagination .next {
    background: transparent !important;
    border: 2px solid rgba(252, 163, 17, 0.3) !important;
    color: #fca311 !important;
    font-size: 1.1rem !important;
}

.ast-pagination .prev:hover,
.ast-pagination .next:hover {
    background: rgba(252, 163, 17, 0.1) !important;
    border-color: #fca311 !important;
}

/* Dots */
.ast-pagination .dots {
    border: none !important;
    background: transparent !important;
    color: #555 !important;
    min-width: auto !important;
    padding: 0 8px !important;
}

/* ============================================
   NO RESULTS
   ============================================ */
.no-results {
    text-align: center;
    padding: 60px 30px;
    background: #121a2e;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.no-results .page-title {
    color: #ffffff;
    font-size: 2rem;
    margin-bottom: 16px;
}

.no-results .page-content {
    color: #a0a0a0;
    font-size: 1.1rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablets: 2 columns */
@media (max-width: 1024px) {
    .ast-separate-container .ast-blog-layout-4-grid .ast-article-post {
        width: 50% !important;
    }

    .ast-archive-description,
    .blog-hero-section {
        padding: 40px 30px !important;
    }

    .ast-archive-description .page-title,
    .blog-hero-title {
        font-size: 2rem !important;
    }
}

/* Moviles: 1 column */
@media (max-width: 767px) {
    #primary.content-area {
        padding: 20px 16px !important;
    }

    .ast-separate-container .ast-blog-layout-4-grid .ast-article-post {
        width: 100% !important;
    }

    .ast-article-post .entry-title a {
        font-size: 1.2rem !important;
    }

    .ast-archive-description,
    .blog-hero-section {
        padding: 30px 20px !important;
        margin-bottom: 24px !important;
    }

    .ast-archive-description .page-title,
    .blog-hero-title {
        font-size: 1.6rem !important;
    }

    .ast-archive-description::after,
    .blog-hero-section::after {
        display: none !important;
    }

    .ast-pagination .page-numbers {
        min-width: 38px !important;
        height: 38px !important;
        padding: 0 10px !important;
        margin: 0 2px !important;
        font-size: 0.85rem !important;
    }

    .blog-hero-search {
        flex-direction: column !important;
        max-width: 100% !important;
        gap: 0 !important;
        border-radius: 16px !important;
        padding: 6px !important;
    }

    .blog-hero-search-input {
        width: 100% !important;
        padding: 14px 18px !important;
        font-size: 1rem !important;
        border-radius: 12px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        color: #fff !important;
        margin-bottom: 8px !important;
    }

    .blog-hero-search-btn {
        width: 100% !important;
        padding: 12px 18px !important;
        border-radius: 12px !important;
        font-size: 1rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
    }
}

/* ============================================
   HERO SEARCH BAR
   ============================================ */
.blog-hero-search {
    display: flex;
    max-width: 420px;
    margin: 24px auto 0;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-hero-search:focus-within {
    border-color: rgba(252, 163, 17, 0.5);
    box-shadow: 0 0 20px rgba(252, 163, 17, 0.1);
}

.blog-hero-search-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-family: inherit;
}

.blog-hero-search-input::placeholder {
    color: #666;
}

.blog-hero-search-btn {
    background: #fca311;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
    border-radius: 0 30px 30px 0;
}

.blog-hero-search-btn:hover {
    background: #e39310;
}

/* ============================================
   READING TIME BADGE
   ============================================ */
.blog-reading-time-wrapper {
    margin-bottom: 10px;
}

.blog-reading-time {
    display: inline-block;
    background: rgba(58, 134, 255, 0.12);
    color: #6baaff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid rgba(58, 134, 255, 0.2);
}

/* ============================================
   BREADCRUMBS (Single Post)
   ============================================ */
.blog-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    margin-bottom: 20px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.blog-breadcrumbs a {
    color: #a0a0a0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-breadcrumbs a:hover {
    color: #fca311;
}

.blog-breadcrumbs .breadcrumb-sep {
    color: #555;
    font-size: 0.9rem;
}

.blog-breadcrumbs .breadcrumb-current {
    color: #fca311;
    font-weight: 600;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   SOCIAL SHARING BUTTONS (Single Post)
   ============================================ */
.blog-share-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
    margin-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-share-label {
    color: #a0a0a0;
    font-size: 0.9rem;
    font-weight: 600;
}

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #121a2e;
    color: #a0a0a0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.blog-share-whatsapp:hover {
    background: #25d366;
    color: #fff;
    border-color: #25d366;
}

.blog-share-twitter:hover {
    background: #1d9bf0;
    color: #fff;
    border-color: #1d9bf0;
}

.blog-share-facebook:hover {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

/* ============================================
   SINGLE POST ENHANCEMENTS
   ============================================ */
.single-post.ast-separate-container .ast-article-single {
    background: #121a2e !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
}

.single-post .entry-content pre {
    background: #0a101f !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    font-size: 0.9rem;
}

.single-post .entry-content code {
    background: rgba(252, 163, 17, 0.1);
    color: #fca311;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.single-post .entry-content blockquote {
    border-left: 4px solid #fca311 !important;
    background: rgba(252, 163, 17, 0.05) !important;
    padding: 20px 24px !important;
    border-radius: 0 8px 8px 0 !important;
    margin: 24px 0 !important;
    font-style: italic;
    color: #c0c0c0;
}

.single-post .entry-content a {
    color: #fca311;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.single-post .entry-content a:hover {
    color: #fff;
}

.single-post .entry-content ul,
.single-post .entry-content ol {
    padding-left: 24px;
    color: #c0c0c0;
}

.single-post .entry-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* Mobile sharing & breadcrumbs */
@media (max-width: 767px) {
    .blog-share-section {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .blog-share-label {
        width: 100%;
        text-align: center;
    }

    .blog-breadcrumbs .breadcrumb-current {
        max-width: 200px;
    }
}