@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Lato:wght@300;400;700&display=swap');

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

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: #222;
    min-height: 100vh;
    background: #f4f6f8;
}

.site-header {
    background-color: #2c3e50;
    color: #fff;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1rem 0.6rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.site-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.site-header h1 a.home-link {
    color: inherit;
    text-decoration: none;
}

.site-header h1 a.home-link:hover {
    color: var(--theme-header-text);
    text-decoration: none;
}

nav > ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px;
    min-width: 220px;
    max-height: 260px;
    overflow-y: auto;
    display: none;
    z-index: 1200;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    list-style: none;
}

.dropdown-menu a {
    color: #1f2937;
    display: block;
    padding: 6px 10px;
    border-radius: 6px;
}

.dropdown-menu a:hover {
    background: #f1f5f9;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.header-tools {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    width: 100%;
}

.tool-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    padding: 4px 10px;
    border-radius: 999px;
}

.tool-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #f8fafc;
}

.lang-btn,
.font-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.75rem;
}

.lang-btn.is-active {
    background: #ffffff;
    color: #111827;
}

.theme-switcher {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    z-index: 1;
}

.theme-choice {
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.7);
    padding: 4px;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.theme-choice.is-active {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
    opacity: 1;
}

.theme-choice:hover {
    opacity: 1;
}

.theme-swatch {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.theme-swatch span {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: var(--swatch-1);
}

.theme-swatch span:nth-child(2) {
    background: var(--swatch-2);
}

.theme-swatch span:nth-child(3) {
    background: var(--swatch-3);
}

.bubble-menu {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    overflow: visible;
    width: 100%;
}

.bubble-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    padding-inline: 8px;
}

.bubble-item {
    text-decoration: none;
    border: none;
    background: transparent;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 68px;
    cursor: pointer;
}

.bubble-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: #111827;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 8px 18px rgba(0, 0, 0, 0.25);
}

.bubble-circle::after {
    content: '';
    width: 50%;
    height: 50%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: block;
}

.bubble-circle.has-image::after {
    display: none;
}

.bubble-circle.has-image {
    background-size: cover;
    background-position: center;
}

.bubble-item.is-center .bubble-circle {
    width: 56px;
    height: 56px;
}

.bubble-label {
    font-size: 0.62rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #f8fafc;
}

.bubble-item:hover .bubble-circle {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    border-color: var(--theme-bubble-ring, #ffffff);
}

.bubble-submenu {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -90px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    background: rgba(10, 10, 10, 0.92);
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(6px);
}

.bubble-menu.is-open .bubble-submenu {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -110px);
}

.bubble-back .bubble-circle {
    border-style: dashed;
}

main.layout {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr) minmax(200px, 240px);
    gap: 16px;
    padding: 140px 16px 32px;
    align-items: start;
}

.rail {
    background: #eef1f4;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #cfcfcf;
    position: sticky;
    top: 120px;
    height: calc(100vh - 160px);
    overflow: hidden;
}

.rail h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
}

.rail-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: calc(100% - 28px);
    overflow: hidden;
}

.rail-item {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 8px;
    align-items: center;
    background: #2f3e46;
    color: #f8fafc;
    border-radius: 6px;
    padding: 6px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.rail-thumb {
    width: 46px;
    height: 46px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.rail-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
}

.rail-status {
    font-size: 0.75rem;
    opacity: 0.85;
}

.rail-item:hover {
    background: #3a4d57;
}

.center-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.split-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.block {
    background: #eef1f4;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #cfcfcf;
}

.block h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
    color: #333;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.cards-container.compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #d6d6d6;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-image {
    position: relative;
    height: 180px;
    background-color: #f2f4f7;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 2px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    pointer-events: none;
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.06);
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.card-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #2c3e50;
}

.card-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    min-height: 54px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #777;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    align-items: center;
}

.card-actions .btn {
    flex: 1;
    min-width: 110px;
    font-size: 0.85rem;
    padding: 0.45rem 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.timeline-horizontal {
    position: relative;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #d6dee6;
    padding: 30px 20px;
    overflow-x: auto;
}

.timeline-track {
    position: relative;
    display: flex;
    align-items: center;
    gap: 26px;
    min-height: 200px;
}

.timeline-track::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 4px;
    background: linear-gradient(90deg, #1d4ed8, #0ea5e9, #14b8a6);
    border-radius: 999px;
}

.timeline-node {
    position: relative;
    width: 220px;
    flex: 0 0 220px;
    height: 180px;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    background: #0ea5e9;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 6px rgba(14, 165, 233, 0.2);
    z-index: 2;
    overflow: hidden;
    border: 3px solid #ffffff;
}

.timeline-branch {
    position: absolute;
    left: 50%;
    width: 2px;
    background: #94a3b8;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-dot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.timeline-label {
    position: absolute;
    left: 50%;
    width: 200px;
    transform: translateX(-50%);
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    text-decoration: none;
    color: #1f2937;
    padding: 10px 12px;
}

.timeline-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-meta {
    font-size: 0.8rem;
    color: #64748b;
}

.timeline-node.is-top .timeline-branch {
    bottom: 50%;
    height: 26px;
}

.timeline-node.is-bottom .timeline-branch {
    top: 50%;
    height: 26px;
}

.timeline-node.is-top .timeline-label {
    bottom: calc(50% + 30px);
}

.timeline-node.is-bottom .timeline-label {
    top: calc(50% + 30px);
}

.timeline-type {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.7rem;
    background: #e2e8f0;
    color: #1f2937;
}

.timeline-empty {
    text-align: center;
    color: #64748b;
    padding: 12px 0;
}

.partners-carousel {
    display: flex;
    align-items: center;
    gap: 12px;
}

.carousel-btn {
    background: #2f3e46;
    color: #f8fafc;
    border: none;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.carousel-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 4px;
    flex: 1;
}

.partner-card {
    background: transparent;
    border-radius: 12px;
    border: 1px solid transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    text-decoration: none;
    color: #1f2937;
}

.partner-card img {
    max-width: 100%;
    max-height: 70px;
    object-fit: contain;
    display: block;
}

.partner-card.size-small {
    width: 140px;
}

.partner-card.size-medium {
    width: 180px;
}

.partner-card.size-large {
    width: 220px;
}

.partners-empty {
    color: #64748b;
    padding: 8px 0;
}

.list-page {
    background: #f4f6f8;
}

.list-container {
    max-width: 1200px;
    margin: 140px auto 60px;
    padding: 0 16px;
}

.list-hero {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.list-hero h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    margin-bottom: 6px;
    color: #1f2937;
}

.list-controls {
    margin-top: 12px;
}

.list-controls input {
    width: 100%;
    max-width: 380px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5f5;
}

.cta-banner {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    background: linear-gradient(120deg, #0f172a, #1f2937);
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.cta-banner::after {
    content: "";
    position: absolute;
    inset: -60% -20%;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.16), transparent 60%);
    animation: ctaSheen 8s linear infinite;
}

.cta-banner * {
    position: relative;
    z-index: 1;
}

.cta-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cta-text strong {
    font-size: 1rem;
    letter-spacing: 0.2px;
}

.cta-text span {
    font-size: 0.9rem;
    color: rgba(248, 250, 252, 0.85);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    animation: ctaPulse 2.6s ease-in-out infinite;
}

.cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(37, 99, 235, 0.32);
    filter: brightness(1.05);
}

@keyframes ctaSheen {
    0% { transform: translateX(-10%); opacity: 0.4; }
    50% { transform: translateX(10%); opacity: 0.18; }
    100% { transform: translateX(-10%); opacity: 0.4; }
}

@keyframes ctaPulse {
    0%, 100% { box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25); }
    50% { box-shadow: 0 14px 26px rgba(37, 99, 235, 0.35); }
}

@media (max-width: 720px) {
    .cta-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

.list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.list-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.list-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.list-content {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.list-content h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    color: #1f2937;
}

.list-content p {
    color: #4b5563;
    line-height: 1.6;
    flex: 1;
}

.list-meta {
    font-size: 0.85rem;
    color: #64748b;
}

.list-empty {
    color: #64748b;
    text-align: center;
    padding: 16px 0;
}

@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        max-height: none;
        padding: 0;
    }

    .nav-dropdown:hover .dropdown-menu {
        display: block;
    }
}

.detail-page {
    background: #f4f6f8;
    color: #2c3e50;
}

.detail-container {
    max-width: 1000px;
    margin: 120px auto 60px;
    padding: 0 16px;
}

.detail-alert {
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.detail-header {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #dde3ea;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.detail-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.detail-meta {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.detail-description {
    color: #374151;
    line-height: 1.7;
}

.detail-media {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-media img {
    width: auto;
    max-width: 100%;
    max-height: 420px;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    background: #f2f4f7;
    padding: 8px;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
    align-self: center;
}

.doc-embed {
    width: 100%;
    max-width: 100%;
    height: 420px;
    border: 0;
    border-radius: 10px;
    background: #f2f4f7;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
}

.relato-shell {
    max-width: 1100px;
    margin: calc(var(--header-offset-compact) + 40px) auto 60px;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.relato-hero,
.relato-story-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #dde3ea;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.relato-story-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 780px) {
    .relato-story-grid {
        grid-template-columns: 1fr;
    }
}

.relato-form {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #dde3ea;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.relato-form h3 {
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 10px;
}

.relato-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px 16px;
    align-items: start;
}

.relato-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.relato-field.inline {
    grid-column: 1 / -1;
}

.relato-field input[type=\"text\"],
.relato-field input[type=\"url\"],
.relato-field input[type=\"file\"] {
    border-radius: 10px;
    border: 1px solid #cbd5f5;
    padding: 10px 12px;
}

.relato-editor {
    grid-column: 1 / -1;
    border: 1px solid #cbd5f5;
    border-radius: 12px;
    overflow: hidden;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    background: #f1f5f9;
    border-bottom: 1px solid #cbd5f5;
}

.editor-toolbar button,
.editor-toolbar select,
.editor-toolbar input[type=\"color\"] {
    border: 1px solid #cbd5f5;
    background: #ffffff;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 0.85rem;
}

.emoji-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.editor-content {
    min-height: 160px;
    padding: 12px;
    outline: none;
    font-size: 1rem;
}

.editor-content:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
}

.relato-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
}

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

@media (max-width: 1100px) {
    .relato-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .relato-grid {
        grid-template-columns: 1fr;
    }
}

.relato-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.relato-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    background: #e2e8f0;
}

.relato-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.relato-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #64748b;
}

.relato-texto {
    color: #1f2937;
}

.relato-link a {
    color: #2563eb;
}

.relato-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.relato-request {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.relato-request input {
    flex: 1;
    min-width: 180px;
    border-radius: 8px;
    border: 1px solid #cbd5f5;
    padding: 8px 10px;
}

.relato-pending {
    font-size: 0.85rem;
    color: #475569;
}

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

.petition-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    border: 1px solid #dde3ea;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.petition-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.petition-status {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.petition-status.open {
    background: #dcfce7;
    color: #166534;
}

.petition-status.closed {
    background: #fee2e2;
    color: #991b1b;
}

.petition-meta {
    color: #6b7280;
    font-size: 0.9rem;
}

.petition-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.timeline {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.timeline-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #dde3ea;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.timeline-item img,
.comment-body img,
.detail-media img,
.doc-link img,
.detail-header img,
.detail-container img.detail-photo,
.detail-container .doc-text img {
    max-width: 100%;
    max-height: 420px;
    width: auto;
    height: auto;
    object-fit: contain !important;
    display: block;
    margin: 8px auto;
    background: #f2f4f7;
    padding: 8px;
    border-radius: 10px;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
}

.assistant-page {
    background: #f4f6f8;
    color: #1f2937;
}

.assistant-shell {
    max-width: 1100px;
    margin: 120px auto 80px;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.assistant-hero,
.assistant-results,
.assistant-tips {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #dde3ea;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.assistant-hero h2,
.assistant-results h3,
.assistant-tips h3 {
    font-family: 'Montserrat', sans-serif;
    margin: 0 0 8px;
}

.assistant-input {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.assistant-input input {
    flex: 1;
    min-width: 240px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #cbd5f5;
    font-size: 1rem;
}

.assistant-input button {
    padding: 12px 18px;
    border-radius: 12px;
    border: none;
    background: #2f4b5a;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
}

.assistant-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #475569;
    font-size: 0.9rem;
}

.assistant-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.assistant-chips button {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #cbd5f5;
    background: #e2e8f0;
    cursor: pointer;
    font-size: 0.85rem;
}

.assistant-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

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

.assistant-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    padding: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.assistant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.assistant-card h4 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.assistant-card p {
    margin: 0 0 10px;
    color: #475569;
    font-size: 0.9rem;
}

.assistant-tags {
    display: inline-block;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.assistant-tips ul {
    margin: 0;
    padding-left: 18px;
    color: #475569;
    line-height: 1.6;
}

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

.timeline-item h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    margin-bottom: 8px;
    color: #1f2937;
}

.timeline-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 10px;
}

.doc-text {
    background: #f5f7fa;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e2e8f0;
}

.term-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #dbe2ea;
    margin-top: 8px;
}

.term-text {
    white-space: pre-line;
    color: #1f2937;
    font-size: 0.95rem;
    line-height: 1.6;
}

.term-checkbox {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 10px;
    font-weight: 600;
    color: #1f2937;
}

.term-checkbox input {
    margin-top: 3px;
}

.term-extra {
    margin-top: 12px;
}

.term-extra summary {
    cursor: pointer;
    font-weight: 600;
    color: #1f2937;
}

.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1d4ed8;
    font-weight: 600;
    text-decoration: none;
}

.doc-link:hover {
    color: #1e40af;
}

.comment-list {
    margin-top: 12px;
    padding-left: 0;
    color: #374151;
    list-style: none;
}

.comment-item {
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    flex-shrink: 0;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.comment-body {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    margin-bottom: 4px;
}

.comment-text {
    color: #374151;
}

.comment-form {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5f5;
    font-family: 'Lato', sans-serif;
}

.emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.emoji-picker button {
    border: 1px solid #cbd5f5;
    background: #ffffff;
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 1rem;
}

.comment-auth {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    color: #475569;
}

.comment-auth-actions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-bar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.share-button {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.share-button svg {
    width: 14px;
    height: 14px;
    display: block;
    fill: currentColor;
}

.share-button:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.share-facebook { background: #1877f2; }
.share-instagram { background: #e1306c; }
.share-whatsapp { background: #25d366; }
.share-x { background: #111827; }
.share-linkedin { background: #0a66c2; }

.share-button.is-copied {
    background: #16a34a;
}

.comment-share {
    margin-top: 6px;
}

.comment-form button {
    width: fit-content;
}

.comment-editor-shell {
    border: 1px solid #cbd5f5;
    border-radius: 12px;
    background: #f8fafc;
    overflow: hidden;
}

.comment-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: #eef2f7;
    border-bottom: 1px solid #cbd5f5;
}

.comment-toolbar button,
.comment-toolbar select,
.comment-toolbar input[type="color"] {
    border: 1px solid #cbd5f5;
    background: #ffffff;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}

.comment-toolbar button:hover {
    background: #e5edff;
}

.comment-editor {
    min-height: 140px;
    padding: 12px;
    background: #ffffff;
}

.comment-editor:focus {
    outline: none;
}

.editor-error {
    border: 1px solid #fca5a5;
}

footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
}

footer p {
    font-size: 0.9rem;
    opacity: 0.85;
}

.btn {
    background-color: #3498db;
    color: #fff;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.admin-muted {
    color: #64748b;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.btn-primary {
    background-color: #3498db;
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-warning {
    background-color: #f39c12;
}

.btn-warning:hover {
    background-color: #d98208;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
}

.status-critico {
    background-color: #e74c3c;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-atencao {
    background-color: #f39c12;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-preservado {
    background-color: #27ae60;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-risco {
    background-color: #e67e22;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-afetivo {
    background-color: #9b59b6;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-relato {
    background-color: #3498db;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-industrial {
    background-color: #34495e;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-default {
    background-color: #95a5a6;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

    .rail {
        position: static;
        height: auto;
    }

    .center-column {
        order: 1;
    }

    .rail-left {
        order: 2;
    }

    .rail-right {
        order: 3;
    }
}

@media (max-width: 900px) {
    .split-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .site-header h1 {
        font-size: 1.6rem;
    }

    nav ul {
        gap: 0.75rem;
    }

    main.layout {
        padding-top: 160px;
    }
    .bubble-item {
        width: 60px;
    }

    .bubble-circle {
        width: 40px;
        height: 40px;
    }

    .bubble-item.is-center .bubble-circle {
        width: 50px;
        height: 50px;
    }

    .bubble-submenu {
        position: static;
        transform: none;
        opacity: 0;
        pointer-events: none;
        display: none;
        margin-top: 10px;
    }

    .bubble-menu.is-open .bubble-submenu {
        opacity: 1;
        pointer-events: auto;
        display: flex;
    }
}

@media (max-width: 520px) {
    nav ul {
        flex-direction: column;
        gap: 0.4rem;
    }

    main.layout {
        padding-top: 190px;
    }
}

.site-theme {
    --header-offset: 220px;
    --header-offset-compact: 205px;
    --theme-bg: #f3f3f3;
    --theme-surface: #ffffff;
    --theme-ink: #111111;
    --theme-border: #d0d0d0;
    --theme-header: #2c3e50;
    --theme-header-text: #f8fafc;
    --theme-accent: #4682B4;
    --theme-bubble-bg: #1e3a57;
    --theme-bubble-ring: #9bb9d6;
    --theme-rail: #1b3851;
    --theme-rail-ink: #f5f5f5;
    --theme-button: #2f5f8d;
    --theme-button-hover: #3c78ad;
    --theme-button-text: #ffffff;
    --theme-button-secondary: #23445f;
    --theme-button-secondary-hover: #2b5a7a;
    --theme-button-warning: #2a4b68;
    --theme-button-warning-hover: #335b80;
    --theme-control-hover: rgba(255, 255, 255, 0.2);
    --theme-timeline: #1f2a36;
    --theme-timeline-accent: #4682B4;
    background: var(--theme-bg);
    color: var(--theme-ink);
}

.site-theme.theme-steel {
    --theme-header: #4682B4;
    --theme-header-text: #f8fafc;
    --theme-accent: #4682B4;
    --theme-bubble-bg: #1e3a57;
    --theme-bubble-ring: #9bb9d6;
    --theme-rail: #1b3851;
    --theme-rail-ink: #f5f5f5;
    --theme-button: #2f5f8d;
    --theme-button-hover: #3c78ad;
    --theme-button-secondary: #23445f;
    --theme-button-secondary-hover: #2b5a7a;
    --theme-button-warning: #2a4b68;
    --theme-button-warning-hover: #335b80;
    --theme-timeline: #1f2a36;
    --theme-timeline-accent: #4682B4;
}

.site-theme.theme-sand {
    --theme-header: #CD853F;
    --theme-header-text: #111111;
    --theme-accent: #CD853F;
    --theme-bubble-bg: #7b4d24;
    --theme-bubble-ring: #e4b07b;
    --theme-rail: #8a5528;
    --theme-rail-ink: #fff3e5;
    --theme-button: #b87436;
    --theme-button-hover: #d3914f;
    --theme-button-text: #111111;
    --theme-button-secondary: #8a5a31;
    --theme-button-secondary-hover: #a36a3a;
    --theme-button-warning: #a56733;
    --theme-button-warning-hover: #bc7a3f;
    --theme-control-hover: rgba(0, 0, 0, 0.12);
    --theme-timeline: #7b4d24;
    --theme-timeline-accent: #CD853F;
}

.site-theme.theme-mint {
    --theme-header: #98FB98;
    --theme-header-text: #0b2b0b;
    --theme-accent: #98FB98;
    --theme-bubble-bg: #2f6a2f;
    --theme-bubble-ring: #b7f7b7;
    --theme-rail: #2f6a2f;
    --theme-rail-ink: #f0fff0;
    --theme-button: #3f8f3f;
    --theme-button-hover: #4aa84a;
    --theme-button-text: #f7fff7;
    --theme-button-secondary: #2f6a2f;
    --theme-button-secondary-hover: #3a8340;
    --theme-button-warning: #37773a;
    --theme-button-warning-hover: #4a944f;
    --theme-control-hover: rgba(0, 0, 0, 0.12);
    --theme-timeline: #2f6a2f;
    --theme-timeline-accent: #98FB98;
}

.site-theme.theme-midnight {
    --theme-bg: #0c0c0c;
    --theme-surface: #111111;
    --theme-ink: #f5f5f5;
    --theme-border: #1f1f1f;
    --theme-header: #000000;
    --theme-header-text: #f5f5f5;
    --theme-accent: #f5f5f5;
    --theme-bubble-bg: #0f0f0f;
    --theme-bubble-ring: #f5f5f5;
    --theme-rail: #111111;
    --theme-rail-ink: #f5f5f5;
    --theme-button: #2f2f2f;
    --theme-button-hover: #444444;
    --theme-button-text: #f5f5f5;
    --theme-button-secondary: #1f1f1f;
    --theme-button-secondary-hover: #333333;
    --theme-button-warning: #3a3a3a;
    --theme-button-warning-hover: #4b4b4b;
    --theme-control-hover: rgba(255, 255, 255, 0.18);
    --theme-timeline: #f5f5f5;
    --theme-timeline-accent: #f5f5f5;
}

.site-theme.theme-silver {
    --theme-header: #C0C0C0;
    --theme-header-text: #111111;
    --theme-accent: #C0C0C0;
    --theme-bubble-bg: #6b6b6b;
    --theme-bubble-ring: #e0e0e0;
    --theme-rail: #5a5a5a;
    --theme-rail-ink: #f5f5f5;
    --theme-button: #9a9a9a;
    --theme-button-hover: #b1b1b1;
    --theme-button-text: #111111;
    --theme-button-secondary: #7f7f7f;
    --theme-button-secondary-hover: #969696;
    --theme-button-warning: #8a8a8a;
    --theme-button-warning-hover: #a2a2a2;
    --theme-control-hover: rgba(0, 0, 0, 0.12);
    --theme-timeline: #5a5a5a;
    --theme-timeline-accent: #C0C0C0;
}

.site-theme .site-header {
    background-color: var(--theme-header);
    color: var(--theme-header-text);
}

.site-theme .site-header a {
    color: var(--theme-header-text);
}

.site-theme a {
    color: var(--theme-accent);
}

.site-theme a:hover {
    color: var(--theme-button-hover);
}

.site-theme .bubble-circle {
    background-color: var(--theme-bubble-bg);
    border-color: var(--theme-bubble-ring);
    background-size: cover;
    background-position: center;
}

.site-theme .bubble-label {
    color: var(--theme-header-text);
}

.site-theme .tool-group {
    background: rgba(255, 255, 255, 0.16);
}

.site-theme .lang-btn:hover,
.site-theme .font-btn:hover {
    background: var(--theme-control-hover);
}

.site-theme .lang-btn.is-active {
    background: var(--theme-header-text);
    color: var(--theme-header);
}

.site-theme .bubble-submenu {
    background: rgba(12, 12, 12, 0.94);
}

.site-theme main.layout {
    padding-top: var(--header-offset);
}

.site-theme .list-container,
.site-theme .assistant-shell,
.site-theme .detail-container {
    margin-top: var(--header-offset-compact);
}

.site-theme .rail,
.site-theme .block,
.site-theme .timeline-horizontal,
.site-theme .card,
.site-theme .list-card,
.site-theme .detail-header,
.site-theme .assistant-hero,
.site-theme .assistant-results,
.site-theme .assistant-tips {
    background: var(--theme-surface);
    border-color: var(--theme-border);
}

.site-theme .parceiros {
    background: #ffffff;
    color: #111111;
}

.site-theme .partners-carousel {
    background: transparent;
    color: #111111;
}

.site-theme .rail-item {
    background: var(--theme-rail);
    color: var(--theme-rail-ink);
}

.site-theme .btn {
    background-color: var(--theme-button);
    color: var(--theme-button-text);
}

.site-theme .btn:hover {
    background-color: var(--theme-button-hover);
}

.site-theme .btn-secondary {
    background-color: var(--theme-button-secondary);
}

.site-theme .btn-secondary:hover {
    background-color: var(--theme-button-secondary-hover);
}

.site-theme .btn-warning {
    background-color: var(--theme-button-warning);
}

.site-theme .btn-warning:hover {
    background-color: var(--theme-button-warning-hover);
}

.site-theme .timeline-track::before {
    background: linear-gradient(90deg, var(--theme-timeline), var(--theme-timeline-accent), var(--theme-timeline));
}

.site-theme .timeline-dot {
    background: var(--theme-timeline-accent);
    box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.15);
}

.site-theme .timeline-type {
    background: var(--theme-surface);
    color: var(--theme-ink);
}

.site-theme .carousel-btn {
    background: var(--theme-button);
    color: var(--theme-button-text);
}

.site-theme .carousel-btn:hover {
    background: var(--theme-button-hover);
}

.site-theme footer {
    background: var(--theme-header);
    color: var(--theme-header-text);
}

@media (max-width: 768px) {
    .site-theme {
        --header-offset: 205px;
        --header-offset-compact: 190px;
    }
}

@media (max-width: 520px) {
    .site-theme {
        --header-offset: 200px;
        --header-offset-compact: 185px;
    }
}
