/* ============================================
   WMO - ARTICLE DETAIL CSS
   Estilo Arkaia V2 adaptado a tema claro WMO
   ============================================ */

/* ============================================
   ARTICLE HERO
   ============================================ */
.article-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: flex-end;
    padding: 140px 0 60px;
    overflow: hidden;
}

.article-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.article-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(18, 18, 18, 0.2) 0%,
        rgba(18, 18, 18, 0.5) 50%,
        rgba(18, 18, 18, 0.92) 100%
    );
}

.article-hero__content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.article-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    margin-bottom: 28px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.article-hero__back:hover {
    color: #ecc600;
}

.article-hero__back svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.article-hero__back:hover svg {
    transform: translateX(-5px);
}

.article-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.article-hero__category {
    padding: 5px 14px;
    background: #ecc600;
    color: #121212;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 4px;
    text-transform: uppercase;
}

.article-hero__date,
.article-hero__read,
.article-hero__views {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.article-hero__title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    color: #fff;
    letter-spacing: -0.02em;
}

.article-hero__author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.article-hero__author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ecc600;
    flex-shrink: 0;
}

.article-hero__author-avatar img,
.article-hero__author-avatar video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-hero__author-info {
    display: flex;
    flex-direction: column;
}

.article-hero__author-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: #fff;
}

.article-hero__author-role {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

/* ============================================
   ARTICLE LAYOUT (two-column)
   ============================================ */
.article-content {
    padding: 60px 0;
    background: #fff;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

/* ============================================
   ARTICLE BODY - Typography
   ============================================ */
.article-body {
    max-width: 750px;
}

.article-body h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.65rem;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 20px;
    color: #121212;
    line-height: 1.3;
}

.article-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 36px;
    margin-bottom: 14px;
    color: #222;
}

.article-body h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 12px;
    color: #333;
}

.article-body strong {
    color: #121212;
    font-weight: 600;
}

.article-body a {
    color: #b89e00;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.article-body a:hover {
    color: #ecc600;
}

.article-body p {
    color: #444;
    font-size: 1.1rem;
    line-height: 1.85;
    margin-bottom: 22px;
}

.article-body ul,
.article-body ol {
    margin-bottom: 22px;
    padding-left: 28px;
}

.article-body li {
    color: #444;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 8px;
}

.article-body li::marker {
    color: #ecc600;
}

/* Blockquote */
.article-body blockquote {
    position: relative;
    margin: 36px 0;
    padding: 24px;
    padding-left: 32px;
    background: #fdf9e2;
    border-left: 4px solid #ecc600;
    border-radius: 0 12px 12px 0;
    font-size: 1.15rem;
    font-style: italic;
    color: #333;
    line-height: 1.7;
}

.article-body blockquote cite {
    display: block;
    margin-top: 12px;
    font-size: 0.9rem;
    font-style: normal;
    color: #888;
}

/* Images */
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px 0;
}

.article-body figure {
    margin: 36px 0;
}

.article-body figure img {
    width: 100%;
    border-radius: 12px;
}

.article-body figcaption {
    margin-top: 10px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
}

/* Code Blocks */
.article-body pre {
    background: #1e1e2e;
    border: 1px solid #2d2d3d;
    border-radius: 12px;
    padding: 24px;
    margin: 28px 0;
    overflow-x: auto;
}

.article-body code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
}

.article-body pre code {
    color: #e0e0e0;
    background: none;
    padding: 0;
}

.article-body p code,
.article-body li code {
    background: #f0f0f0;
    color: #c7254e;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Tables */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.article-body table th {
    background: #121212;
    color: #ecc600;
    font-weight: 600;
    text-align: left;
    padding: 14px 18px;
    font-size: 0.9rem;
}

.article-body table td {
    padding: 12px 18px;
    color: #444;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

.article-body table tr:last-child td {
    border-bottom: none;
}

.article-body table tr:hover td {
    background: #fdf9e2;
}

/* Info/Note boxes */
.article-body .info-box,
.article-body .note-box {
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-left: 4px solid #007bff;
    border-radius: 12px;
    padding: 20px;
    margin: 28px 0;
}

.article-body .info-box p,
.article-body .note-box p {
    color: #333;
    margin-bottom: 0;
}

.article-body .info-box strong,
.article-body .note-box strong {
    color: #007bff;
}

.article-body .warning-box,
.article-body .caution-box {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 4px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    margin: 28px 0;
}

.article-body .warning-box p,
.article-body .caution-box p {
    color: #333;
    margin-bottom: 0;
}

.article-body .pro-tip,
.article-body .tip-box {
    background: #f0fdf0;
    border: 1px solid #a3d9a5;
    border-left: 4px solid #28a745;
    border-radius: 12px;
    padding: 20px;
    margin: 28px 0;
}

.article-body .pro-tip p,
.article-body .tip-box p {
    color: #333;
    margin-bottom: 0;
}

.article-body .conclusion-box,
.article-body .summary-box {
    background: linear-gradient(135deg, #fdf9e2, #fff);
    border: 1px solid #ecc600;
    border-radius: 12px;
    padding: 28px;
    margin: 36px 0;
}

.article-body .conclusion-box h3,
.article-body .summary-box h3 {
    color: #b89e00;
    margin-top: 0;
}

/* HR */
.article-body hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ecc600, transparent);
    margin: 40px 0;
}

/* ============================================
   ARTICLE TAGS
   ============================================ */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e0e0e0;
}

.article-tags__label {
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
}

.article-tag {
    padding: 5px 14px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    color: #555;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.article-tag:hover {
    border-color: #ecc600;
    color: #b89e00;
    background: #fdf9e2;
}

/* ============================================
   ARTICLE SHARE
   ============================================ */
.article-share {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid #e0e0e0;
}

.article-share__label {
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
}

.article-share__buttons {
    display: flex;
    gap: 10px;
}

.article-share__btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    color: #666;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.article-share__btn svg {
    width: 18px;
    height: 18px;
}

.article-share__btn--twitter:hover {
    background: #000;
    border-color: #000;
    color: #fff;
}

.article-share__btn--facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
    color: #fff;
}

.article-share__btn--linkedin:hover {
    background: #0A66C2;
    border-color: #0A66C2;
    color: #fff;
}

.article-share__btn--whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
    color: #fff;
}

.article-share__btn--copy:hover {
    background: #ecc600;
    border-color: #ecc600;
    color: #121212;
}

.article-share__btn--copy.copied {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
}

/* ============================================
   ARTICLE SIDEBAR
   ============================================ */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-card {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 24px;
}

.sidebar-card__title {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
    display: flex;
    align-items: center;
}

/* Author Card */
.author-card {
    text-align: center;
}

.author-card__avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 14px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ecc600;
}

.author-card__avatar img,
.author-card__avatar video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-card__name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #222;
}

.author-card__role {
    color: #b89e00;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.author-card__bio {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Related Articles */
.related-articles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-article {
    display: flex;
    gap: 12px;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.related-article:hover {
    background: #f0f0f0;
}

.related-article__image {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.related-article__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-article__content h4 {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
    color: #333;
    transition: color 0.3s ease;
}

.related-article:hover .related-article__content h4 {
    color: #b89e00;
}

.related-article__content span {
    color: #999;
    font-size: 0.8rem;
}

/* ============================================
   SIDEBAR TOC
   ============================================ */
.sidebar-toc .sidebar-card__title {
    display: flex;
    align-items: center;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.toc-nav::-webkit-scrollbar {
    width: 4px;
}

.toc-nav::-webkit-scrollbar-track {
    background: transparent;
}

.toc-nav::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.toc-nav__link {
    display: block;
    padding: 6px 12px;
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    border-left: 2px solid transparent;
    border-radius: 0 4px 4px 0;
    transition: all 0.3s ease;
    text-decoration: none;
}

.toc-nav__link:hover {
    color: #b89e00;
    background: #fdf9e2;
    border-left-color: #ecc60060;
}

.toc-nav__link--active {
    color: #b89e00;
    border-left-color: #ecc600;
    background: #fdf9e2;
    font-weight: 600;
}

.toc-nav__link--h3 {
    padding-left: 28px;
    font-size: 0.8rem;
}

/* ============================================
   SIDEBAR CTA
   ============================================ */
.sidebar-cta {
    text-align: center;
    background: linear-gradient(135deg, #121212, #1a1a2e);
    border: none;
}

.sidebar-cta__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(236, 198, 0, 0.15);
    border-radius: 50%;
    color: #ecc600;
    font-size: 1.4rem;
}

.sidebar-cta__title {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: #fff;
}

.sidebar-cta__text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 18px;
}

.sidebar-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: #ecc600;
    color: #121212;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.sidebar-cta__btn:hover {
    background: #d4b200;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(236, 198, 0, 0.4);
    color: #121212;
}

/* ============================================
   MORE ARTICLES (grid below article)
   ============================================ */
.more-articles {
    padding: 60px 0;
    background: #f5f5f5;
}

.more-articles__title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    text-transform: uppercase;
    margin-bottom: 36px;
    color: #222;
}

.more-articles .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.more-articles .blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.more-articles .blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.more-articles .blog-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.more-articles .blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 0;
    margin: 0;
}

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

.more-articles .blog-card__content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.more-articles .blog-card__meta {
    display: flex;
    gap: 14px;
    color: #999;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.more-articles .blog-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #222;
}

.more-articles .blog-card__excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.more-articles .blog-card__link {
    color: #b89e00;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.more-articles .blog-card__link:hover {
    color: #ecc600;
}

.more-articles .blog-card__category {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cat-color, #ecc600);
    background: color-mix(in srgb, var(--cat-color, #ecc600) 12%, white 88%);
    border: 1px solid color-mix(in srgb, var(--cat-color, #ecc600) 25%, transparent 75%);
    z-index: 1;
}

/* ============================================
   BACK TO BLOG BUTTON
   ============================================ */
.back-to-blog {
    padding: 40px 0;
    background: #fff;
    text-align: center;
}

.back-to-blog__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: #121212;
    color: #ecc600;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-to-blog__btn:hover {
    background: #ecc600;
    color: #121212;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(236, 198, 0, 0.3);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr 320px;
    }

    .article-sidebar {
        position: sticky;
        top: 100px;
        height: fit-content;
    }
}

@media (min-width: 1200px) {
    .article-hero {
        min-height: 70vh;
    }
}

@media (max-width: 768px) {
    .article-hero {
        min-height: 50vh;
        padding: 120px 0 40px;
    }

    .article-hero__title {
        font-size: 1.6rem;
    }

    .article-hero__meta {
        gap: 10px;
        font-size: 0.8rem;
    }

    .article-hero__author-avatar {
        width: 40px;
        height: 40px;
    }

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

    .article-body p,
    .article-body li {
        font-size: 1rem;
    }

    .article-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .more-articles .blog-grid {
        grid-template-columns: 1fr;
    }
}
