/* style.css - Estilos para Manoel Oliveira Portal */

:root {
    --primary-color: #095169;
    --secondary-color: #059b9a;
    --accent-color: #53ba83;
    --text-main: #1a2e21;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #0f172a;
        --white: #1e293b;
        --text-main: #f1f5f9;
        --primary-color: #0ea5e9;
        --secondary-color: #2dd4bf;
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    }

    body {
        background: #0b0f1a;
    }

    .search-container input {
        background: #334155;
        color: white;
    }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background: var(--bg-light);
}

header {
    background: rgba(9, 81, 105, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--white);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--white);
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #ffffff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.4rem 0.2rem;
    position: relative;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

/* A linha "artística" que desliza sob o link */
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

nav a:hover,
nav a.ativo-link {
    opacity: 1;
}

nav a:hover::after,
nav a.ativo-link::after {
    width: 100%;
}

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    text-align: center;
    padding: 3rem 2rem 5rem 2rem;
    border-bottom: none;
}

.shortcut-bar {
    margin-top: -2.5rem;
    position: relative;
    z-index: 10;
}

.shortcut-bar .container {
    padding-top: 0;
    padding-bottom: 0;
}

.shortcut-list {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 1rem;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    scrollbar-width: none;
}

.shortcut-list::-webkit-scrollbar {
    display: none;
}

.shortcut-btn {
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: 12px;
    border: 1px solid #edf2f7;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shortcut-btn:hover {
    background: #f8fafc;
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.secao-titulo {
    text-align: center;
    margin: 2rem 0;
    font-size: 2.5rem;
    color: #1e293b;
}

.grid-posts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.page-content {
    display: flex;
    gap: 2.5rem;
    margin-top: 1rem;
}

.sidebar {
    flex: 0 0 220px;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar h3 {
    margin-bottom: 1.2rem;
    color: #1a202c;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.search-container {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-radius: 10px;
    overflow: hidden;
    border: 1.5px solid #e2e8f0;
    transition: var(--transition);
    background: var(--white);
}

.search-container:focus-within {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(5, 155, 154, 0.1);
}

.search-container input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    font-size: 0.9rem;
    outline: none;
    background: var(--white);
}

.search-container button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.7rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.3s ease;
}

.search-container button:hover {
    background: var(--secondary-color);
}

.botoes-categoria {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.botoes-categoria button {
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid #e6f5f5;
    color: var(--primary-color);
    text-align: left;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.95rem;
}

.botoes-categoria button:hover,
.botoes-categoria button.ativo {
    background: #e6f5f5;
    border-color: var(--secondary-color);
    color: var(--primary-color);
}

.content-right {
    flex: 1;
}

.card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: translateY(20px);
}

.card-reveal {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-mini {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-header-mini {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;
}

.card:hover .card-info-mini h4 {
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.card-thumb-mini {
    flex: 0 0 180px;
}

.card-thumb-mini img {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    /* Efeito de fade-in para imagens */
    animation: fadeInImg 1s ease;
}

@keyframes fadeInImg {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.card-info-mini {
    flex: 1;
    min-width: 0;
}

.excerpt-mini {
    font-size: 0.85rem;
    color: #555;
    margin-top: 6px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-info-mini h4 {
    font-size: 1.15rem;
    margin: 0;
    line-height: 1.2;
    color: var(--primary-color);
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.badge-mini {
    font-size: 0.65rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    font-weight: 800;
    display: inline-block;
    margin-bottom: 6px;
    margin-right: 8px;
    background: rgba(5, 155, 154, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.btn-ler-mini {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
    align-self: flex-start;
}

.related-posts-header {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* Grid e Cards para Posts Relacionados (Horizontal) */
.grid-related {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.card-related {
    background: var(--white);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.card-related:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

.card-related img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-related-content {
    padding: 12px;
}

.card-related-content h4 {
    font-size: 0.85rem;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-ler-mini:hover {
    text-decoration: underline;
}

.btn-voltar {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    color: var(--primary-color);
    border: 1px solid #edf2f7;
    padding: 0.6rem 1.5rem;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    margin: 2rem 0;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    font-family: inherit;
}

/* Garante que imagens e conteúdos do Blogger não quebrem o layout */
.post-detalhe img,
.post-detalhe .separator img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Ajuste de recuo para listas dentro dos artigos */
.post-body ul,
.post-body ol {
    padding-left: 2rem;
    margin-bottom: 1.5rem;
    list-style-position: outside;
}

.post-body li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.post-body p {
    margin-bottom: 1.2rem;
}

/* Caixas de Destaque para Exemplos e Cálculos */
.exemplo-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
}

/* Estilização de Citações */
.post-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--secondary-color);
    background: rgba(5, 155, 154, 0.05);
    font-style: italic;
    color: #4a5568;
}

.post-body q {
    font-style: italic;
    color: var(--primary-color);
}

.post-body cite {
    font-size: 0.9rem;
    color: #718096;
    font-style: normal;
    font-weight: 600;
}

.post-detalhe {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.btn-voltar:hover {
    background: #f8fafc;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateX(-5px);
    box-shadow: var(--shadow-md);
}

.footer {
    background: var(--primary-color);
    color: #e6f5f5;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

.ad-area {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin: 1.5rem 0;
}

.skeleton {
    background: #e2e8f0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 6px;
}

.skeleton-card {
    display: flex;
    gap: 24px;
    padding: 20px;
}

.skeleton-info {
    flex: 1;
}

.skeleton-img {
    flex: 0 0 180px;
    height: 120px;
}

.skeleton-title {
    height: 20px;
    width: 80%;
    margin-bottom: 8px;
}

.skeleton-text {
    height: 15px;
    width: 100%;
    margin-bottom: 5px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Estilos para Tabelas de Dados */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    /* Light border for the whole table */
    border-radius: 8px;
    overflow: hidden;
    /* Ensures rounded corners apply to content */
    box-shadow: var(--shadow-sm);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    /* Internal borders */
    text-align: left;
}

.data-table thead th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    text-align: center;
    /* Center align headers */
    border-bottom: 2px solid var(--secondary-color);
    /* Stronger bottom border for header */
}

.data-table tbody tr:nth-child(even) {
    background-color: #f8fafc;
    /* Zebra stripping */
}

.data-table tbody tr:hover {
    background-color: #eef2f7;
    /* Hover effect */
}

.data-table tbody td.text-right,
.data-table tfoot td.text-right {
    text-align: right;
}

.data-table tfoot tr {
    font-weight: bold;
    background-color: #e6f5f5;
    /* Footer background */
    color: var(--primary-color);
}

.data-table tfoot td {
    border-top: 2px solid var(--secondary-color);
}

/* Specific styling for the RBA status row */
.data-table .status-row {
    font-size: 0.75rem;
    color: #64748b;
    background-color: #f1f5f9;
    text-align: center;
}

@media (max-width: 768px) {
    .page-content {
        flex-direction: column;
    }

    .sidebar {
        position: static;
        order: 2;
        flex: none;
    }

    .content-right {
        order: 1;
    }

    .card-header-mini {
        flex-direction: column;
    }

    .card-thumb-mini {
        flex: none;
        width: 100%;
    }

    .card-thumb-mini img {
        width: 100%;
        height: auto;
    }

    .grid-related {
        grid-template-columns: 1fr;
    }
}