* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #21405c;
    --secondary-color: #2f7db8;
    --accent-color: #d59433;
    --text-color: #223140;
    --muted-color: #5f7182;
    --bg-color: #eef3f7;
    --surface-color: #ffffff;
    --surface-alt: #f7fafc;
    --border-color: #d6e1ea;
    --shadow-color: rgba(23, 42, 58, 0.12);
}

body {
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background: linear-gradient(180deg, #edf2f6 0%, #f7fafc 100%);
}

a {
    color: var(--secondary-color);
}

header {
    background: linear-gradient(135deg, #21405c 0%, #315c82 100%);
    color: white;
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(22, 41, 60, 0.18);
}

header h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3vw, 2.6rem);
    margin-bottom: 0.4rem;
}

header .subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.container {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.5rem 1rem 2rem;
}

.sidebar {
    width: 290px;
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 30px var(--shadow-color);
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.sidebar h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid rgba(47, 125, 184, 0.25);
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li + li {
    margin-top: 0.35rem;
}

.sidebar ul li a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.sidebar ul li a:hover,
.sidebar ul li a:focus-visible {
    background: rgba(47, 125, 184, 0.12);
    color: var(--primary-color);
    transform: translateX(3px);
    outline: none;
}

.content {
    flex: 1;
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 22px;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 30px var(--shadow-color);
}

.home-hero {
    padding: 1.75rem;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(47, 125, 184, 0.12), rgba(213, 148, 51, 0.12));
    border: 1px solid rgba(47, 125, 184, 0.18);
    margin-bottom: 1.5rem;
}

.home-hero h2,
.post-content h2 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--primary-color);
}

.home-hero h2 {
    font-size: clamp(1.9rem, 3vw, 2.4rem);
    margin-bottom: 0.9rem;
}

.lead {
    font-size: 1.08rem;
    color: #31475c;
}

.tag-list,
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.2rem;
}

.tag-list span,
.post-tags span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.8rem;
    background: rgba(33, 64, 92, 0.08);
    color: var(--primary-color);
    border: 1px solid rgba(33, 64, 92, 0.12);
    border-radius: 999px;
    font-size: 0.92rem;
}

.summary-grid,
.profile-grid,
.post-grid {
    display: grid;
    gap: 1rem;
}

.summary-grid,
.profile-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 1.5rem;
}

.info-card,
.post-card,
.project-panel {
    background: var(--surface-alt);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(23, 42, 58, 0.06);
}

.info-card,
.project-panel {
    padding: 1.2rem;
}

.info-card h3,
.project-panel h3 {
    color: var(--primary-color);
    margin-bottom: 0.65rem;
}

.info-card p,
.project-panel p {
    color: var(--muted-color);
}

.recent-posts h3,
.content h3 {
    color: var(--primary-color);
}

.recent-posts h3 {
    margin-bottom: 1rem;
}

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

.post-card {
    padding: 1.2rem;
    border-left: 5px solid var(--secondary-color);
}

.post-card h4 {
    font-family: Georgia, "Times New Roman", serif;
    margin-bottom: 0.65rem;
    color: var(--primary-color);
}

.post-card h4 a {
    color: inherit;
    text-decoration: none;
}

.post-card h4 a:hover {
    color: var(--secondary-color);
}

.card-meta,
.post-meta {
    color: var(--muted-color);
    font-size: 0.92rem;
}

.card-link,
.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.card-link:hover,
.text-link:hover,
.back-link:hover {
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}

.post-content h2 {
    font-size: clamp(1.8rem, 2.8vw, 2.3rem);
    margin-bottom: 0.6rem;
}

.post-content > p,
.post-content section p {
    text-align: justify;
}

.post-content section {
    margin-top: 1.7rem;
}

.post-content h3 {
    margin-bottom: 0.85rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--border-color);
}

.post-content p + p {
    margin-top: 0.9rem;
}

.post-content pre {
    background: #1e2a36;
    color: #e4edf5;
    padding: 1.25rem 1.4rem;
    border-radius: 14px;
    overflow-x: auto;
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 1rem 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.post-content code {
    font-family: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
}

.post-content pre code {
    background: none;
    padding: 0;
    border: none;
    font-size: inherit;
    color: inherit;
}

.post-content p code,
.post-content li code {
    background: rgba(33, 64, 92, 0.1);
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-size: 0.88em;
    color: var(--primary-color);
}

.post-content ul {
    margin-left: 1.25rem;
}

.post-content li + li,
.reference-list li + li,
.related-links li + li {
    margin-top: 0.55rem;
}

.highlight-list {
    list-style: none;
    margin-left: 0;
}

.highlight-list li {
    padding: 0.8rem 0.95rem;
    border-left: 4px solid var(--accent-color);
    background: rgba(213, 148, 51, 0.08);
    border-radius: 0 12px 12px 0;
}

.highlight-list li + li {
    margin-top: 0.75rem;
}

.reference-list,
.related-links ul,
.project-facts {
    margin-left: 1.1rem;
}

.project-facts strong {
    color: var(--primary-color);
}

.post-section-note {
    padding: 1rem 1.1rem;
    background: rgba(47, 125, 184, 0.08);
    border: 1px solid rgba(47, 125, 184, 0.16);
    border-radius: 14px;
    color: #35506a;
}

footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1.15rem;
    margin-top: 1rem;
}

@media (max-width: 900px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
        max-height: none;
    }
}

@media (max-width: 640px) {
    header {
        padding: 2rem 1rem;
    }

    .container {
        padding: 1rem 0.75rem 1.5rem;
    }

    .content,
    .sidebar {
        padding: 1.2rem;
    }

    .home-hero {
        padding: 1.2rem;
    }
}

/* Pagina 9 - imagens e formatos */

.post-hero {
    text-align: center;
    margin-bottom: 2rem;
}

.post-hero .lead {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.info-grid,
.format-grid,
.choice-grid,
.video-grid,
.media-row {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

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

.media-row {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.format-card,
.choice-card,
.video-card {
    background: var(--surface-alt);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.15rem;
    box-shadow: 0 8px 20px rgba(23, 42, 58, 0.06);
}

.format-card h4,
.choice-card h4,
.video-card h4,
.info-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.45rem;
}

.format-card p,
.choice-card p,
.video-card p,
.info-card p {
    color: var(--muted-color);
    text-align: left;
}

.post-content figure {
    margin: 0;
    text-align: center;
}

.post-content figure img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 20px rgba(23, 42, 58, 0.08);
}

.post-content figcaption {
    margin-top: 0.55rem;
    color: var(--muted-color);
    font-size: 0.92rem;
}

.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--surface-color);
    box-shadow: 0 8px 20px rgba(23, 42, 58, 0.06);
}

.format-comparison {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

.format-comparison th,
.format-comparison td {
    padding: 0.85rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border-color);
}

.format-comparison th {
    background: rgba(47, 125, 184, 0.1);
    color: var(--primary-color);
}

.format-comparison tbody tr:last-child td {
    border-bottom: none;
}

.format-comparison tbody tr:hover {
    background: rgba(47, 125, 184, 0.06);
}

.format-name,
.best-use {
    color: var(--primary-color);
    font-weight: 700;
}

.format-tag {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: rgba(33, 64, 92, 0.08);
    color: var(--primary-color);
    border: 1px solid rgba(33, 64, 92, 0.12);
    font-size: 0.88rem;
    white-space: nowrap;
}

.video-card iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: 14px;
    margin-top: 0.75rem;
}

@media (max-width: 640px) {
    .format-comparison {
        min-width: 720px;
    }

    .format-card,
    .choice-card,
    .video-card {
        padding: 1rem;
    }
}


.flow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.flow-card {
    background: var(--surface-alt);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.2rem;
    text-align: center;
    box-shadow: 0 8px 20px rgba(23, 42, 58, 0.06);
}

.flow-number {
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.6rem;
    font-weight: bold;
}

.blog-image {
    width: 100%;
    border-radius: 10px;
    margin: 15px 0;
}

.area-use-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.area-use-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    background: var(--surface-alt);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 20px var(--shadow-color);
}

.area-use-media img {
    width: 100%;
    border-radius: 12px;
}

.area-use-text h4 {
    color: var(--primary-color);
    margin-bottom: 0.65rem;
}

.area-use-text p {
    color: var(--muted-color);
    text-align: left;
}