/* ============================================
   BLOG STYLES - Fundo Moraga
   ============================================ */

/* Blog Hero */
.blog-hero {
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.92) 0%, rgba(28, 28, 28, 0.88) 100%),
                url('https://fundomoragastorage.blob.core.windows.net/assets/images/blog-hero-bg.jpg') center/cover;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 999px;
    color: var(--accent-color);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.blog-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.blog-hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
}

/* Article Pages */
body.blog-article-page {
    background:
        radial-gradient(circle at top left, rgba(212, 175, 55, 0.10), transparent 28%),
        linear-gradient(180deg, #f7f3ea 0%, #f1ebe0 42%, #f8f6f2 100%);
    color: #1f2937;
}

.breadcrumbs {
    padding: 110px 0 18px;
    color: #6b7280;
    font-size: 0.94rem;
}

.breadcrumbs .container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.breadcrumbs a {
    color: inherit;
}

.breadcrumbs a:hover {
    color: var(--accent-dark);
}

.separator {
    opacity: 0.55;
}

.article-container {
    width: min(1080px, calc(100vw - 32px));
    margin: 0 auto 56px;
    padding: clamp(32px, 4vw, 56px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 32px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.10), 0 10px 28px rgba(212, 175, 55, 0.08);
    backdrop-filter: blur(14px);
}

.article-header,
.article-content,
.article-footer {
    max-width: 780px;
    margin: 0 auto;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(212, 175, 55, 0.08));
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #6b4f0d;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.article-header h1 {
    margin: 22px 0 18px;
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: clamp(2.9rem, 6vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
    color: #111827;
    text-wrap: balance;
}

.article-excerpt {
    margin: 0 0 30px;
    font-size: clamp(1.16rem, 2vw, 1.45rem);
    line-height: 1.85;
    color: #4b5563;
    max-width: 760px;
    font-weight: 400;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 24px 0 20px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    margin-bottom: 24px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 10px 24px rgba(212, 175, 55, 0.18);
}

.author-name {
    font-weight: 700;
    color: #111827;
}

.article-date,
.article-stats {
    color: #6b7280;
}

.article-stats {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 0.96rem;
}

.article-share {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.article-share > span {
    font-weight: 700;
    color: #111827;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.10);
    color: #334155;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.share-btn:hover,
.share-btn:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.10), 0 10px 22px rgba(212, 175, 55, 0.14);
}

.article-content {
    font-size: 1.07rem;
    color: #1f2937;
}

.article-content .lead {
    margin-bottom: 34px;
    padding: 0 0 0 24px;
    border-left: 4px solid rgba(212, 175, 55, 0.95);
    font-size: 1.18rem;
    line-height: 1.95;
    color: #2d3748;
}

.article-content p,
.article-content li {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.98;
    hyphens: auto;
}

.article-content p {
    margin-bottom: 1.35rem;
}

.article-content h2 {
    margin: 42px 0 18px;
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.article-content ul,
.article-content ol {
    margin: 0 0 1.6rem;
    padding-left: 1.3rem;
}

.article-content li {
    margin-bottom: 0.8rem;
}

.article-hero-media {
    margin: 26px 0 40px;
}

.article-hero-frame {
    position: relative;
    overflow: hidden;
    padding: 14px;
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(212, 175, 55, 0.78), rgba(17, 24, 39, 0.88)),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.35), transparent 26%);
    box-shadow: 0 30px 50px rgba(15, 23, 42, 0.18), 0 20px 36px rgba(212, 175, 55, 0.16);
}

.article-hero-frame::after {
    content: '';
    position: absolute;
    inset: 14px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.0) 45%, rgba(0, 0, 0, 0.34) 100%);
    pointer-events: none;
}

.article-hero-image {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 22px;
    filter: saturate(1.06) contrast(1.02);
    transform: scale(1.01);
}

.article-hero-badge {
    position: absolute;
    top: 26px;
    left: 26px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #fff8e7;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.article-hero-caption {
    margin-top: 16px;
    padding: 16px 20px;
    border-left: 4px solid rgba(212, 175, 55, 0.95);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(255, 255, 255, 0.9));
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.7;
}

.info-box,
.warning-box,
.cta-box {
    margin: 30px 0;
    padding: 26px 28px;
    border-radius: 24px;
}

.info-box {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.94));
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.warning-box {
    background: linear-gradient(135deg, rgba(255, 250, 240, 0.98), rgba(254, 243, 199, 0.62));
    border: 1px solid rgba(245, 158, 11, 0.24);
}

.cta-box {
    background: linear-gradient(145deg, #111827, #1f2937 65%, #293548);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.24);
}

.cta-box h3 {
    margin-bottom: 12px;
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: clamp(1.7rem, 3vw, 2.25rem);
    color: #fff;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.8);
}

.cta-box .btn,
.cta-box .btn-secondary {
    margin: 10px 12px 0 0;
}

.article-footer {
    margin-top: 42px;
    padding-top: 28px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.article-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.tag-label {
    font-weight: 700;
    color: #111827;
}

.tag {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    color: #7c5f12;
    font-weight: 600;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.tag:hover {
    background: rgba(212, 175, 55, 0.18);
}

.related-articles {
    padding: 0 0 100px;
}

.related-articles .container {
    width: min(1180px, calc(100vw - 32px));
}

.related-articles h2 {
    margin-bottom: 28px;
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: #111827;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.related-card {
    display: block;
    padding: 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 38px rgba(15, 23, 42, 0.13);
}

.related-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 18px;
}

.related-card h3 {
    margin-bottom: 12px;
    color: #111827;
    font-size: 1.15rem;
    line-height: 1.5;
}

.related-card .read-more {
    display: inline-flex;
}

/* Featured Post */
.featured-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-color);
    color: #000;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.featured-post {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.featured-image {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-category {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 16px;
    background: rgba(212, 175, 55, 0.95);
    color: #000;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    border-radius: 6px;
}

.featured-content {
    padding: 40px;
}

.post-date {
    display: block;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.featured-content h2 {
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 20px;
}

.featured-content h2 a {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.featured-content h2 a:hover {
    color: var(--accent-color);
}

.post-excerpt {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 25px;
}

.post-meta {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-meta svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

/* Filter Section */
.filter-section {
    padding: 60px 0 40px;
    background: white;
}

.filter-bar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-btn {
    padding: 12px 28px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    color: var(--text-dark);
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.filter-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
}

.search-bar {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-bar input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.search-bar svg {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    opacity: 0.5;
}

/* Blog Grid */
.blog-grid-section {
    padding: 60px 0 100px;
    background: white;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.blog-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

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

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

.post-category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    background: rgba(212, 175, 55, 0.95);
    color: #000;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

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

.blog-card-content time {
    display: block;
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

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

.blog-card-content h3 a {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

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

.blog-card-content p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reading-time {
    color: var(--text-light);
    font-size: 0.9rem;
}

.read-more {
    color: var(--accent-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: var(--primary-color);
    gap: 8px;
}

/* Load More */
.load-more-section {
    text-align: center;
    margin-top: 60px;
}

/* Newsletter */
.newsletter-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.newsletter-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 15px;
}

.newsletter-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.newsletter-form {
    display: flex;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 16px 24px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.newsletter-privacy {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* Dark Mode Specific */
body[data-theme="dark"] {
    --primary-color: #1a1a1a;
    --secondary-color: #2d2d2d;
    --text-dark: #e5e5e5;
    --text-light: #b0b0b0;
    --bg-light: #0f0f0f;
    --white: #0a0a0a;
}

body[data-theme="dark"] .featured-post,
body[data-theme="dark"] .blog-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"].blog-article-page {
    background: linear-gradient(180deg, #090909 0%, #111827 50%, #0f172a 100%);
    color: #e5e7eb;
}

body[data-theme="dark"] .breadcrumbs,
body[data-theme="dark"] .article-date,
body[data-theme="dark"] .article-stats,
body[data-theme="dark"] .article-hero-caption {
    color: #cbd5e1;
}

body[data-theme="dark"] .article-container,
body[data-theme="dark"] .related-card,
body[data-theme="dark"] .share-btn,
body[data-theme="dark"] .info-box,
body[data-theme="dark"] .warning-box {
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
}

body[data-theme="dark"] .article-header h1,
body[data-theme="dark"] .article-content h2,
body[data-theme="dark"] .author-name,
body[data-theme="dark"] .tag-label,
body[data-theme="dark"] .related-articles h2,
body[data-theme="dark"] .related-card h3,
body[data-theme="dark"] .article-share > span {
    color: #f8fafc;
}

body[data-theme="dark"] .article-excerpt,
body[data-theme="dark"] .article-content,
body[data-theme="dark"] .article-content .lead,
body[data-theme="dark"] .tag,
body[data-theme="dark"] .read-more {
    color: #cbd5e1;
}

body[data-theme="dark"] .tag {
    background: rgba(212, 175, 55, 0.10);
    border-color: rgba(212, 175, 55, 0.18);
}

body[data-theme="dark"] .featured-section,
body[data-theme="dark"] .blog-grid-section {
    background: #0a0a0a;
}

body[data-theme="dark"] .filter-section {
    background: #0f0f0f;
}

body[data-theme="dark"] .filter-btn {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .search-bar input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .featured-post {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .featured-image {
        min-height: 300px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        min-height: 50vh;
        padding: 80px 20px 40px;
    }

    .breadcrumbs {
        padding-top: 96px;
    }

    .article-container {
        width: min(100vw - 20px, 1080px);
        padding: 24px 18px 28px;
        border-radius: 24px;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-stats {
        justify-content: flex-start;
    }

    .article-content p,
    .article-content li {
        line-height: 1.9;
    }

    .article-hero-frame {
        padding: 10px;
        border-radius: 22px;
    }

    .article-hero-frame::after {
        inset: 10px;
        border-radius: 16px;
    }

    .article-hero-image {
        border-radius: 16px;
    }

    .article-hero-badge {
        top: 18px;
        left: 18px;
        padding: 8px 12px;
        font-size: 0.72rem;
    }

    .info-box,
    .warning-box,
    .cta-box {
        padding: 20px 18px;
        border-radius: 20px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-content {
        padding: 30px 20px;
    }
    
    .featured-content h2 {
        font-size: 1.8rem;
    }
    
    .filter-bar {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
    }
    
    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-card {
        padding: 40px 20px;
    }
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 10px;
    z-index: 10000;
    padding: 10px 20px;
    background: var(--accent-color);
    color: #000;
    font-weight: 700;
    border-radius: 6px;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 10px;
}

/* Dark Mode Toggle Button */
.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: white;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}
