/* ============================================
   Flutter Studio - Blog Styles
   ============================================ */

.page-header {
    background: var(--gradient-hero);
    padding: 140px 0 80px;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 12px;
}

.page-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.blog-card-img {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.05);
}

.blog-card-img .placeholder-icon {
    font-size: 2.5rem;
    opacity: 0.5;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

/* Blog card gradient backgrounds (fallback if no image) */
.blog-card:nth-child(1) .blog-card-img {
    background: linear-gradient(135deg, #0170B9, #00D4FF);
}

.blog-card:nth-child(2) .blog-card-img {
    background: linear-gradient(135deg, #e44d26, #f7b733);
}

.blog-card:nth-child(3) .blog-card-img {
    background: linear-gradient(135deg, #1a2980, #26d0ce);
}

.blog-card:nth-child(4) .blog-card-img {
    background: linear-gradient(135deg, #614385, #516395);
}

.blog-card:nth-child(5) .blog-card-img {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.blog-card:nth-child(6) .blog-card-img {
    background: linear-gradient(135deg, #0D1B2A, #0170B9);
}

.blog-card-body {
    padding: 24px;
}

.blog-card-body .tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(1, 112, 185, 0.1);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.blog-card-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.82rem;
    color: var(--text-light);
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.blog-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-card h3 a:hover {
    color: var(--primary);
}

.blog-card p {
    color: var(--text-light);
    font-size: 0.92rem;
    margin-bottom: 16px;
}

.blog-card .read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-card .read-more:hover {
    gap: 10px;
}

/* Privacy/Terms Pages */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.legal-content h3 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.8rem;
}

.legal-content p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.legal-content ul {
    margin-left: 20px;
    margin-bottom: 1rem;
}

.legal-content ul li {
    color: var(--text-light);
    font-size: 0.95rem;
    padding: 4px 0;
    list-style: disc;
}

/* Why Us page */
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.why-card {
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    background: var(--white);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

.why-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.why-card .why-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: rgba(1, 112, 185, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.why-card:hover .why-icon {
    background: var(--gradient-accent);
}

.why-card .why-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--primary);
    transition: var(--transition);
}

.why-card:hover .why-icon svg {
    fill: var(--white);
}

.why-card h3 {
    margin-bottom: 12px;
    font-size: 1.15rem;
}

.why-card p {
    color: var(--text-light);
    font-size: 0.92rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        padding: 120px 0 60px;
    }

    .legal-content {
        padding: 0 8px;
    }

    .why-us-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Blog Detail / Article Page
   ============================================ */

.blog-detail-header {
    background: var(--gradient-hero);
    padding: 140px 0 60px;
    text-align: center;
}

.blog-detail-header .container {
    max-width: 800px;
}

.blog-detail-header .tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.blog-detail-header h1 {
    color: var(--white);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.3;
    margin-bottom: 20px;
}

.blog-detail-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.blog-detail-meta .author {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.blog-detail-meta .author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 0.85rem;
}

.blog-detail-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
}

.blog-detail-meta .meta-item svg {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, 0.5);
}

/* Hero image banner */
.blog-hero-image {
    width: 100%;
    max-width: 900px;
    margin: -40px auto 0;
    position: relative;
    z-index: 2;
    padding: 0 24px;
}

.blog-hero-image .hero-img-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.blog-hero-image .hero-img-wrapper .gradient-banner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.2));
}

.blog-hero-image .hero-img-wrapper .hero-blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Article body */
.blog-article {
    max-width: 740px;
    margin: 0 auto;
    padding: 60px 24px 80px;
}

.blog-article h2 {
    font-size: 1.6rem;
    margin: 2.5rem 0 1rem;
    color: var(--secondary);
    position: relative;
    padding-bottom: 10px;
}

.blog-article h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.blog-article h3 {
    font-size: 1.25rem;
    margin: 2rem 0 0.8rem;
    color: var(--secondary);
}

.blog-article p {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 1.2rem;
}

.blog-article ul,
.blog-article ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.blog-article ul li,
.blog-article ol li {
    color: var(--text);
    font-size: 1.02rem;
    line-height: 1.8;
    padding: 4px 0;
    list-style: disc;
}

.blog-article ol li {
    list-style: decimal;
}

.blog-article blockquote {
    margin: 2rem 0;
    padding: 20px 24px;
    border-left: 4px solid var(--primary);
    background: rgba(1, 112, 185, 0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1.7;
}

.blog-article code {
    padding: 2px 8px;
    background: rgba(1, 112, 185, 0.08);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.92rem;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

.blog-article pre {
    margin: 1.5rem 0;
    padding: 24px;
    background: var(--secondary);
    border-radius: var(--radius-md);
    overflow-x: auto;
    position: relative;
}

.blog-article pre code {
    background: none;
    color: #e0e0e0;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.blog-article .info-box {
    margin: 2rem 0;
    padding: 20px 24px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-md);
}

.blog-article .info-box h4 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-article .info-box p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.blog-article img {
    width: 100%;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
}

/* Share / Bottom CTA */
.blog-bottom {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.blog-share {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.blog-share span {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.blog-share a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--off-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-light);
}

.blog-share a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.blog-share a svg {
    width: 18px;
    height: 18px;
}

/* Related posts */
.blog-related {
    padding: 60px 0 80px;
    background: var(--off-white);
}

.blog-related h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.blog-related .blog-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Back link */
.blog-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 20px;
    transition: var(--transition);
}

.blog-back:hover {
    gap: 12px;
}

.blog-back svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .blog-detail-header {
        padding: 120px 0 48px;
    }

    .blog-detail-header h1 {
        font-size: 1.5rem;
    }

    .blog-hero-image {
        margin-top: -24px;
    }

    .blog-article {
        padding: 40px 20px 60px;
    }

    .blog-article h2 {
        font-size: 1.35rem;
    }

    .blog-detail-meta {
        gap: 12px;
    }

    .blog-share {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 100px 0 48px;
    }

    .page-header h1 {
        font-size: 1.6rem;
    }

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

    .blog-detail-header {
        padding: 100px 0 36px;
    }

    .blog-article p {
        font-size: 0.98rem;
    }
}