/* ============================================
   BLOG STYLES
   ============================================ */

/* Reset container for blog pages */
.blog-container {
    padding: 0 !important;
    max-width: 100% !important;
}

.blog-container + .footer {
    margin-top: 0 !important;
}

/* --------------------------------------------
   Blog List Page
   -------------------------------------------- */
.blog-page {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 60px 20px;
    background: #f9fafb;
}

.blog-page > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.blog-page .section-header {
    margin-bottom: 60px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    border-color: #09B6A2;
    box-shadow: 0 4px 24px rgba(9, 182, 162, 0.15);
}

.blog-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #e8f7f5 0%, #d1f0ec 50%, #e8f7f5 100%);
}

.blog-card-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(9, 182, 162, 0.15) 50%,
        transparent 100%
    );
    animation: shimmer 1.8s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 0;
}

.blog-card-image img.loaded {
    opacity: 1;
}

.blog-card-image.loaded {
    background: transparent;
}

.blog-card-image.loaded::before {
    display: none;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.02);
}

.blog-card-content {
    padding: 24px 28px 28px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.blog-card-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(9, 182, 162, 0.1);
    color: #09B6A2;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
}

.blog-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.3;
}

.blog-card-excerpt {
    font-size: 1rem;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 16px;
}

.blog-card-date {
    font-size: 0.9rem;
    color: #9CA3AF;
    margin-top: auto;
}

.blog-empty {
    text-align: center;
    padding: 80px 20px;
    color: #9CA3AF;
    font-size: 1.1rem;
}

/* --------------------------------------------
   Article Page
   -------------------------------------------- */
.blog-article {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    background: #f9fafb;
    min-height: 100vh;
}

.article-hero {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
}

.article-hero img {
    width: 100%;
    height: auto;
    /* border-radius: 16px; */
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); */
}

.article-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

.article-container:last-of-type {
    padding-top: 40px;
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6B7280;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.article-back i {
    font-size: 1.1rem;
}

.article-header-nav {
    margin-bottom: 24px;
}

.article-back:hover {
    color: #09B6A2;
}

.article-header {
    margin-bottom: 32px;
    padding-top: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid #E5E7EB;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.article-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(9, 182, 162, 0.1);
    color: #09B6A2;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 20px;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 16px;
}

.article-meta {
    color: #9CA3AF;
    font-size: 1rem;
}

.article-content {
    color: #374151;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-lead {
    font-size: 1.25rem;
    color: #4B5563;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #E5E7EB;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 48px 0 20px;
}

.article-content p {
    margin-bottom: 20px;
}

/* --------------------------------------------
   Prompt Block
   -------------------------------------------- */
.prompt-block {
    background: #111827;
    border-radius: 16px;
    overflow: hidden;
    margin: 32px 0;
}

.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.prompt-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9CA3AF;
    font-size: 0.9rem;
    font-weight: 500;
}

.prompt-copy-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #09B6A2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.prompt-copy-btn:hover {
    background: #079383;
}

.prompt-copy-btn.copied {
    background: #10B981;
}

.prompt-content {
    padding: 24px;
    color: #E5E7EB;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* --------------------------------------------
   Parameters Grid
   -------------------------------------------- */
.params-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0 40px;
}

.param-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    grid-template-rows: auto auto;
    gap: 4px 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
}

.param-name {
    grid-row: 1 / 3;
    font-family: 'SF Mono', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: #09B6A2;
    background: rgba(9, 182, 162, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    align-self: center;
    text-align: center;
}

.param-desc {
    font-weight: 600;
    color: #111827;
}

.param-example {
    font-size: 0.95rem;
    color: #6B7280;
}

/* --------------------------------------------
   Tips List
   -------------------------------------------- */
.tips-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 40px;
}

.tips-list li {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    margin-bottom: 12px;
}

.tips-list li i {
    font-size: 1.5rem;
    color: #09B6A2;
    flex-shrink: 0;
}

.tips-list li div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tips-list li strong {
    color: #111827;
    font-size: 1.05rem;
}

.tips-list li span {
    color: #6B7280;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --------------------------------------------
   Article CTA
   -------------------------------------------- */
.article-cta {
    position: relative;
    text-align: center;
    padding: 40px 40px;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 50%, #115e59 100%);
    border-radius: 24px;
    margin-top: 56px;
    overflow: hidden;
    box-shadow: 0 20px 40px -12px rgba(13, 148, 136, 0.35);
}

.article-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.article-cta::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.article-cta > * {
    position: relative;
    z-index: 1;
}

.article-cta h3 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.article-cta p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    background: transparent;
    color: white;
    border: 3px solid white;
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 50px;
}

.cta-button:hover {
    color: #0d9488;
    border-color: white;
}

.cta-button:hover::before {
    opacity: 1;
}

.cta-button i {
    transition: transform 0.3s ease;
}

.cta-button:hover i {
    transform: translateX(4px);
}

/* --------------------------------------------
   Responsive
   -------------------------------------------- */
@media (max-width: 900px) {
    .blog-grid {
        gap: 24px;
    }

    .blog-card-content {
        padding: 20px 24px 24px;
    }

    .blog-card-title {
        font-size: 1.2rem;
    }

    .blog-card-excerpt {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .blog-page {
        padding: 40px 16px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .article-hero {
        padding: 20px 16px 0;
    }

    .article-hero img {
        border-radius: 12px;
    }

    .article-title {
        font-size: 1.75rem;
    }

    .article-lead {
        font-size: 1.1rem;
    }

    .param-item {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .param-name {
        grid-row: auto;
        justify-self: start;
        margin-bottom: 8px;
    }

    .prompt-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .prompt-copy-btn {
        justify-content: center;
    }

    .article-cta {
        padding: 48px 24px;
        border-radius: 20px;
    }

    .article-cta h3 {
        font-size: 1.5rem;
    }

    .article-cta p {
        font-size: 1rem;
    }

    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
    }
}
