/* Convert a Document - Article Template */

:root {
    --blue-950: #082944;
    --blue-900: #0b3a6a;
    --blue-800: #134a8a;
    --blue-700: #1d5fb0;
    --blue-500: #2f80ed;
    --blue-100: #e7f0ff;
    --slate-900: #1b2330;
    --slate-700: #3a4658;
    --slate-500: #5a6b82;
    --slate-200: #e6ebf2;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(15, 35, 70, 0.12);
    --shadow-card: 0 10px 25px rgba(15, 35, 70, 0.08);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    line-height: 1.7;
    color: var(--slate-700);
    background: linear-gradient(135deg, #f2f7ff 0%, #e6f0ff 45%, #fbfdff 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(47, 128, 237, 0.08) 0 120px, transparent 140px),
        radial-gradient(circle at 85% 10%, rgba(19, 74, 138, 0.07) 0 160px, transparent 190px),
        radial-gradient(circle at 88% 85%, rgba(47, 128, 237, 0.06) 0 180px, transparent 220px);
    pointer-events: none;
    z-index: -1;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--blue-700);
    text-decoration: none;
}

a:hover {
    color: var(--blue-800);
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
    padding: 24px 0 64px;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 20px;
}

.logo {
    font-family: "Fraunces", "Georgia", serif;
    font-size: clamp(1.8rem, 2.4vw, 2.4rem);
    font-weight: 700;
    color: var(--blue-900);
    letter-spacing: 0.5px;
}

.main-nav {
    display: flex;
    gap: 18px;
    align-items: center;
    background: var(--white);
    padding: 6px;
    border-radius: 999px;
    box-shadow: var(--shadow-card);
}

.main-nav a {
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    color: var(--slate-700);
}

.main-nav a.active,
.main-nav a:hover {
    background: var(--blue-100);
    color: var(--blue-800);
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--slate-500);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--blue-700);
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 28px;
    align-items: start;
}

.article {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: clamp(28px, 4vw, 42px);
    box-shadow: var(--shadow-soft);
}

.hero {
    background: linear-gradient(135deg, rgba(47, 128, 237, 0.12), rgba(19, 74, 138, 0.08));
    border: 1px solid rgba(47, 128, 237, 0.2);
    padding: clamp(20px, 3vw, 30px);
    border-radius: var(--radius-md);
    margin-bottom: 28px;
    animation: float-in 0.7s ease-out;
}

.hero-title {
    font-family: "Fraunces", "Georgia", serif;
    font-size: clamp(2rem, 3.5vw, 3rem);
    color: var(--slate-900);
    margin: 10px 0 12px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--slate-700);
    margin: 0 0 16px;
}

.article-content h2 {
    font-family: "Fraunces", "Georgia", serif;
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    color: var(--slate-900);
    margin: 28px 0 12px;
}

.article-content h3 {
    font-size: 1.25rem;
    color: var(--slate-900);
    margin: 20px 0 10px;
}

.article-content p {
    margin: 0 0 16px;
}

.article-content ul,
.article-content ol {
    margin: 0 0 16px 20px;
    padding: 0;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content code {
    background: #eef3ff;
    color: var(--blue-900);
    padding: 2px 6px;
    border-radius: 6px;
    font-family: "Courier New", monospace;
    font-size: 0.92em;
}

.article-content pre {
    background: #0e2236;
    color: #f4f8ff;
    padding: 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 0 0 16px;
}

.article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--slate-500);
    font-size: 0.95rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--slate-200);
    color: var(--blue-800);
    font-weight: 600;
}

.intro-card {
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: #f7fbff;
    border-left: 4px solid var(--blue-500);
    margin-bottom: 24px;
    animation: float-in 0.7s ease-out 0.1s both;
}

.toc {
    padding: 18px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    background: #fbfdff;
    margin-bottom: 28px;
}

.toc h2 {
    font-size: 1.1rem;
    margin: 0 0 12px;
    color: var(--slate-900);
}

.toc ul {
    margin: 0;
    padding-left: 18px;
    overflow-wrap: anywhere;
}

.content-section {
    margin-bottom: 28px;
    animation: float-in 0.8s ease-out 0.15s both;
}

.content-section h2 {
    font-family: "Fraunces", "Georgia", serif;
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    color: var(--slate-900);
    margin-bottom: 12px;
}

.content-section h3 {
    font-size: 1.25rem;
    color: var(--slate-900);
    margin: 20px 0 10px;
}

.callout {
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin: 20px 0;
    border-left: 4px solid var(--blue-700);
    background: #f4f8ff;
}

.callout.tip {
    border-left-color: #2c7a7b;
    background: #f1fbfb;
}

.callout.warning {
    border-left-color: #c7722a;
    background: #fff6ef;
}

.warning-box {
    border-left-color: #c7722a;
    background: #fff6ef;
}

.tip-box {
    border-left-color: #2c7a7b;
    background: #f1fbfb;
}

.info-box,
.success-box,
.highlight-box {
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin: 20px 0;
    border-left: 4px solid var(--blue-700);
    background: #f4f8ff;
}

.success-box {
    border-left-color: #2f855a;
    background: #f0fbf4;
}

.highlight-box {
    border-left-color: #8b5cf6;
    background: #f6f2ff;
}

.case-study {
    background: linear-gradient(135deg, #f3e7ff 0%, #f9f0ff 100%);
    border-left: 4px solid #8b5cf6;
    padding: 18px 20px;
    margin: 20px 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.case-study h3 {
    color: #6d28d9;
    margin-top: 0;
    margin-bottom: 12px;
}

.key-takeaways {
    background: linear-gradient(135deg, #fff9c4 0%, #fff3a1 100%);
    border-left: 4px solid #f6c344;
    padding: 18px 20px;
    margin: 20px 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.key-takeaways h3 {
    color: #b45309;
    margin-top: 0;
    margin-bottom: 12px;
}

.mistake-box {
    background: #fff6ef;
    border-left: 4px solid #c7722a;
    padding: 18px 20px;
    margin: 20px 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.implementation-guide {
    background: #f8f9fa;
    border-left: 4px solid #6c757d;
    padding: 18px 20px;
    margin: 20px 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
}

.related-articles-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin: 16px 0;
}

/* AdSense Ad Containers */
.ad-container {
    margin: 20px auto;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

.ad-leaderboard {
    margin: 20px auto 30px;
}

.ad-multiplex {
    margin: 40px auto;
}

@media (max-width: 1024px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }

    .ad-leaderboard {
        margin: 15px auto 20px;
    }

    .ad-multiplex {
        margin: 30px auto;
    }
}

.related-article-card {
    display: block;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    background: var(--white);
    color: var(--blue-800);
    box-shadow: var(--shadow-card);
}

.related-article-card:hover {
    border-color: var(--blue-500);
    color: var(--blue-900);
}

.image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: #f0f0f0;
}

.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.lazy-image.loaded {
    opacity: 1;
}

.hero-section {
    min-height: 220px;
    border-radius: var(--radius-md);
    background: #eef3ff;
    margin: 16px 0;
}

.example-box,
.code-box,
.code-block {
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin: 20px 0;
    border: 1px solid var(--slate-200);
    background: #fbfdff;
    box-shadow: var(--shadow-card);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.code-title {
    font-weight: 600;
    color: var(--slate-900);
}

.lead {
    font-size: 1.1rem;
    color: var(--slate-700);
}

.comparison-grid {
    display: grid;
    gap: 16px;
    margin: 18px 0;
}

.comparison-item {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.comparison-table th,
.comparison-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--slate-200);
}

.comparison-table th {
    background: var(--blue-700);
    color: var(--white);
    font-weight: 600;
}

.comparison-table tr:nth-child(even) td {
    background: #f8fbff;
}

.ad-slot {
    margin: 24px auto 28px;
    text-align: center;
    display: flex;
    justify-content: center;
}

.ad-slot .adsbygoogle {
    display: block;
    width: min(100%, 728px);
    height: auto;
}

.step-grid {
    display: grid;
    gap: 16px;
    margin: 18px 0;
}

.step-card {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-200);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.step-card h4 {
    margin: 0 0 8px;
    color: var(--blue-800);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--slate-200);
}

.data-table th {
    background: var(--blue-700);
    color: var(--white);
    font-weight: 600;
}

.data-table tr:nth-child(even) td {
    background: #f8fbff;
}

.content-section table:not(.comparison-table):not(.data-table) {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border-radius: var(--radius-sm);
}

.content-section table:not(.comparison-table):not(.data-table) th,
.content-section table:not(.comparison-table):not(.data-table) td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--slate-200);
}

.content-section table:not(.comparison-table):not(.data-table) th {
    background: var(--blue-700);
    color: var(--white);
    font-weight: 600;
}

.content-section table:not(.comparison-table):not(.data-table) tr:nth-child(even) td {
    background: #f8fbff;
}

.content-section img,
.content-section table,
.content-section pre {
    max-width: 100%;
}

.ad-container {
    margin: 20px auto;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

.ad-leaderboard {
    margin: 20px auto 30px;
}

.ad-multiplex {
    margin: 30px auto;
}

.cta {
    margin: 32px 0;
    padding: 24px;
    border-radius: var(--radius-md);
    background: linear-gradient(120deg, var(--blue-700), var(--blue-900));
    color: var(--white);
    display: grid;
    gap: 12px;
    animation: float-in 0.8s ease-out 0.2s both;
}

.cta h3 {
    margin: 0;
    font-family: "Fraunces", "Georgia", serif;
    font-size: 1.6rem;
}

.cta p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cta-actions a {
    background: var(--white);
    color: var(--blue-900);
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: var(--shadow-card);
}

.cta-actions a.secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.faq {
    border-top: 1px solid var(--slate-200);
    padding-top: 20px;
}

.faq details {
    border-radius: var(--radius-sm);
    border: 1px solid var(--slate-200);
    padding: 12px 16px;
    margin-bottom: 12px;
    background: var(--white);
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--slate-900);
}

.related-grid {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.related-card {
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--slate-200);
    background: #fbfdff;
}

.sidebar {
    display: grid;
    gap: 16px;
}

.sidebar-card {
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-card);
    animation: float-in 0.8s ease-out 0.25s both;
}

.sidebar-card h3 {
    margin-top: 0;
    color: var(--slate-900);
    font-size: 1.05rem;
}

.sidebar-card ul {
    margin: 0;
    padding-left: 18px;
}

.index-hero {
    background: linear-gradient(135deg, rgba(47, 128, 237, 0.15), rgba(11, 58, 106, 0.1));
    border: 1px solid rgba(47, 128, 237, 0.2);
    border-radius: var(--radius-lg);
    padding: clamp(26px, 4vw, 40px);
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.index-hero h1 {
    font-family: "Fraunces", "Georgia", serif;
    font-size: clamp(2.2rem, 3.6vw, 3.2rem);
    color: var(--slate-900);
    margin-bottom: 12px;
}

.index-hero p {
    max-width: 820px;
    margin: 0 auto 18px;
    color: var(--slate-700);
    font-size: 1.1rem;
}

.hero-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-badges .pill {
    background: var(--white);
}

.category-tabs {
    display: flex;
    gap: 10px;
    margin: 24px 0;
    padding: 10px;
    background: var(--white);
    border-radius: 999px;
    box-shadow: var(--shadow-card);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.category-tab {
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: var(--slate-700);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 999px;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-tab:hover,
.category-tab.active {
    background: var(--blue-100);
    color: var(--blue-800);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin: 20px 0 32px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 30px rgba(15, 35, 70, 0.15);
    border-color: rgba(47, 128, 237, 0.25);
}

.article-card-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.article-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0 0 10px;
}

.article-card-description {
    color: var(--slate-700);
    line-height: 1.6;
    margin-bottom: 12px;
    flex-grow: 1;
}

.article-card-meta {
    display: flex;
    gap: 14px;
    font-size: 0.9rem;
    color: var(--slate-500);
    border-top: 1px solid var(--slate-200);
    padding-top: 12px;
    margin-top: auto;
    flex-wrap: wrap;
}

.article-card-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.index-callout {
    border-radius: var(--radius-md);
    padding: 18px 22px;
    border-left: 4px solid var(--blue-700);
    background: #f4f8ff;
    margin: 28px 0 16px;
}

.index-callout a {
    font-weight: 600;
}

.coming-soon {
    opacity: 0.6;
    position: relative;
}

.coming-soon::after {
    content: "Coming Soon";
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--blue-700);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.author-card {
    display: grid;
    gap: 10px;
    border-top: 1px solid var(--slate-200);
    padding-top: 20px;
    margin-top: 28px;
}

.author-card strong {
    color: var(--slate-900);
}

.site-footer {
    margin-top: 40px;
    padding: 24px 0 8px;
    color: var(--slate-500);
}

.footer-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 16px;
}

.footer-grid h4 {
    margin: 0 0 10px;
    color: var(--slate-900);
}

.footer-grid ul {
    margin: 0;
    padding-left: 18px;
}

@keyframes float-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 960px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .category-tabs {
        border-radius: var(--radius-md);
    }
}

@media (max-width: 1024px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }

    .ad-leaderboard {
        margin: 15px auto 20px;
    }

    .ad-multiplex {
        margin: 25px auto;
    }
}

@media (max-width: 720px) {
    .site-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .main-nav {
        width: 100%;
        justify-content: space-between;
    }

    .article {
        padding: 24px;
    }

    .comparison-table,
    .data-table,
    .content-section table:not(.comparison-table):not(.data-table) {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .toc a,
    .content-section {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

@media (max-width: 520px) {
    .main-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav a {
        text-align: center;
    }

    .cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .category-tabs {
        flex-direction: column;
        border-radius: var(--radius-md);
    }

    .category-tab {
        width: 100%;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
