/**
 * Blog Cards Grid - Professional Design
 * Based on betting/sports theme with gradient backgrounds
 */

/* ========================================
   SECTION CONTAINER
   ======================================== */
.blog-cards-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #0a1929 0%, #0d1f2d 100%);
    min-height: 100vh;
}

.blog-cards-section .container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   GRID LAYOUT
   ======================================== */
.blog-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* ========================================
   BLOG CARD
   ======================================== */
.blog-card {
    background: linear-gradient(180deg, #0f2d3e 0%, #1a2332 100%);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(16, 185, 129, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.blog-card:hover::before {
    opacity: 1;
}

/* ========================================
   CARD IMAGE SECTION
   ======================================== */
.blog-card-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #0d4a3e 0%, #0a5c4a 50%, #0d4a3e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blog-card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(16, 185, 129, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(16, 185, 129, 0.15) 0%, transparent 50%);
    animation: gradientShift 8s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.trend-icon {
    position: relative;
    z-index: 2;
    color: rgba(16, 185, 129, 0.6);
    animation: iconFloat 3s ease-in-out infinite;
}

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

.blog-card:hover .trend-icon {
    color: rgba(16, 185, 129, 0.9);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

/* ========================================
   CARD CONTENT
   ======================================== */
.blog-card-content {
    padding: 24px;
    position: relative;
}

.read-time {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: rgba(148, 163, 184, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.4;
    margin: 0 0 16px 0;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: #10b981;
}

.blog-card-excerpt {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(203, 213, 225, 0.9);
    margin: 0 0 24px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   CARD FOOTER
   ======================================== */
.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.blog-card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-date,
.blog-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(148, 163, 184, 0.7);
}

.blog-date svg,
.blog-author svg {
    width: 16px;
    height: 16px;
    color: rgba(16, 185, 129, 0.5);
}

/* ========================================
   READ MORE LINK
   ======================================== */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #10b981;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.read-more::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #10b981;
    transition: width 0.3s ease;
}

.read-more:hover {
    color: #34d399;
    gap: 12px;
}

.read-more:hover::after {
    width: calc(100% - 28px);
}

.read-more svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.read-more:hover svg {
    transform: translateX(4px);
}

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

/* Large Tablets and Small Desktops */
@media (max-width: 1200px) {
    .blog-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .blog-cards-section {
        padding: 60px 0;
    }

    .blog-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-card-image {
        height: 180px;
    }

    .blog-card-content {
        padding: 20px;
    }

    .blog-card-title {
        font-size: 18px;
    }

    .blog-card-excerpt {
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .blog-cards-section {
        padding: 40px 0;
    }

    .blog-cards-section .container {
        padding: 0 16px;
    }

    .blog-cards-grid {
        gap: 16px;
    }

    .blog-card {
        border-radius: 12px;
    }

    .blog-card-image {
        height: 160px;
    }

    .trend-icon svg {
        width: 48px;
        height: 48px;
    }

    .blog-card-content {
        padding: 16px;
    }

    .blog-card-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .blog-card-excerpt {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .blog-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding-top: 16px;
    }

    .read-more {
        align-self: flex-end;
    }
}

/* ========================================
   LOADING ANIMATION
   ======================================== */
.blog-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .trend-icon,
    .blog-card-image::before,
    .read-more,
    .blog-card::before {
        animation: none;
        transition: none;
    }
}

/* Focus styles for accessibility */
.read-more:focus {
    outline: 2px solid #10b981;
    outline-offset: 4px;
    border-radius: 4px;
}

.blog-card:focus-within {
    outline: 2px solid #10b981;
    outline-offset: 4px;
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */
@media (prefers-color-scheme: dark) {
    .blog-cards-section {
        background: linear-gradient(180deg, #050a0f 0%, #0a1219 100%);
    }

    .blog-card {
        background: linear-gradient(180deg, #0a1e2a 0%, #0f1821 100%);
    }
}
