/* Variáveis CSS compatíveis com Bootstrap 5 */
:root {
    --bs-primary: #0d6efd;
    --bs-secondary: #6c757d;
    --bs-success: #198754;
    --bs-info: #0dcaf0;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
    --bs-border-radius: 0.5rem;
    --bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Base */
body {
    font-family: var(--bs-body-font-family);
    line-height: 1.6;
    color: var(--bs-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.com-content-article.item-page .left.item-image {
    float: left !important;
    margin: 0 1rem 1rem 0;
    max-width: 33%;
}

.com-content-article.item-page .right.item-image {
    float: right !important;
    margin: 0 0 1rem 2rem;
    max-width: 33%;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--bs-box-shadow);
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: all 0.3s ease-in-out;
}

.navbar-brand img.logo {
    height: 50px;
    transition: transform 0.3s ease-in-out;
}

.navbar-brand:hover img.logo {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    color: var(--bs-dark);
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: var(--bs-border-radius);
    transition: all 0.3s ease-in-out;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: var(--bs-primary) !important;
    color: white !important;
    box-shadow: var(--bs-box-shadow-sm);
}

.offcanvas {
    background: linear-gradient(135deg, #ffffff 0%, var(--bs-light) 100%);
}

/* Welcome */
#welcome {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-success) 100%), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff"><polygon points="0,100 1000,0 1000,100"/></svg>') no-repeat center bottom;
    color: white;
    position: relative;
    overflow: hidden;
}

#welcome::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.position-welcome {
    position: relative;
    z-index: 2;
}

.module-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle-bordered {
    font-size: 1.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.module-content p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

/* Component */
#section-component {
    padding: 3rem 0;
    background-color: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--bs-dark) 0%, #343a40 100%);
    color: white;
    padding: 2rem 0;
    margin-top: auto;
}

.footer p {
    text-align: center;
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

/* Back to Top */
#back-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--bs-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--bs-box-shadow);
    transition: all 0.3s ease-in-out;
    z-index: 1000;
}

#back-top:hover {
    background-color: var(--bs-success);
}

#back-top.show {
    display: flex !important;
}

/* Animações */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Languages */
.mod-languages__list {
    display: flex;
    gap: 0.5rem;
}

.mod-languages__list a {
    transition: transform 0.3s ease-in-out;
    border-radius: var(--bs-border-radius);
    padding: 0.25rem;
}

.mod-languages__list a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Blog & Downloads */
.com-content-category-blog.blog {
    padding: 2rem 0;
    background-color: var(--bs-light);
}

.com-content-category-blog.blog .row {
    margin-bottom: 2rem;
}

.com-content-category-blog.blog [class*="col-lg-"].mb-4 {
    transition: box-shadow 0.3s ease-in-out;
    border-radius: var(--bs-border-radius);
    overflow: hidden;
    background-color: white;
    box-shadow: var(--bs-box-shadow-sm);
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.com-content-category-blog.blog .col-lg-4.mb-4 {
    border-left: none;
}

.com-content-category-blog.blog .col-lg-6.mb-4 {
    border-left: 4px solid var(--bs-primary);
    position: relative;
}

.com-content-category-blog.blog [class*="col-lg-"].mb-4:hover {
    box-shadow: var(--bs-box-shadow);
}

.item-content {
    padding: 1.5rem;
    position: relative;
}




.page-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.com-content-category-blog.blog .col-lg-6.mb-4 .page-header h2 {
    font-size: 1.6rem;
}

.page-header h2 a {
    color: var(--bs-dark);
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.page-header h2 a:hover {
    color: var(--bs-primary);
}

.article-info {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.article-info .published {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bs-secondary);
}

.article-info .icon-calendar {
    color: var(--bs-success);
}

.intro-image-wrapper {
    height: 200px;
    overflow: hidden;
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-light);
}

.intro-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.intro-image-wrapper.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary);
    font-style: italic;
    border: 2px dashed var(--bs-secondary);
}




.item-content .col-md-7.col-lg-9 h3 {
    color: var(--bs-primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.item-content .col-md-7.col-lg-9 p {
    color: var(--bs-dark);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.item-content .col-md-7.col-lg-9 p img {
    max-width: 100%;
    height: auto;
    border-radius: var(--bs-border-radius);
    box-shadow: var(--bs-box-shadow-sm);
    margin: 1rem 0;
}

.readmore {
    text-align: right;
    margin-top: 1rem;
}

.readmore a.btn {
    background-color: var(--bs-primary);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--bs-border-radius);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.com-content-category-blog.blog .col-lg-6.mb-4 .readmore a.btn {
    background-color: var(--bs-success);
    padding: 0.6rem 1.2rem;
}

.readmore a.btn:hover {
    background-color: var(--bs-success);
    color: white;
    box-shadow: var(--bs-box-shadow-sm);
}

.com-content-category-blog.blog .col-lg-6.mb-4 .readmore a.btn:hover {
    background-color: var(--bs-primary);
}

/* Paginação */
.com-content-category-blog__navigation {
    margin-top: 3rem;
    padding: 2rem 0;
    background-color: white;
    border-radius: var(--bs-border-radius);
    box-shadow: var(--bs-box-shadow-sm);
}

.pagination__wrapper {
    text-align: center;
}

.pagination__wrapper .text-center {
    font-size: 1.1rem;
    color: var(--bs-secondary);
    margin-bottom: 1rem;
}

.pagination {
    justify-content: center !important;
    gap: 0.25rem;
}

.pagination .page-item {
    margin: 0 0.125rem;
}

.pagination .page-item .page-link {
    border: none;
    border-radius: var(--bs-border-radius);
    color: var(--bs-dark);
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease-in-out;
    background-color: var(--bs-light);
}

.pagination .page-item.active .page-link {
    background-color: var(--bs-primary) !important;
    color: white !important;
}

.pagination .page-item .page-link:hover {
    background-color: var(--bs-primary) !important;
    color: white !important;
    box-shadow: var(--bs-box-shadow-sm);
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .icon-angle-left,
.pagination .icon-angle-right,
.pagination .icon-angle-double-left,
.pagination .icon-angle-double-right {
    font-size: 0.9rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .module-title { font-size: 2rem; }
    .subtitle-bordered { font-size: 1.2rem; }
    #welcome { padding: 2rem 0; }
    #back-top { bottom: 1rem; right: 1rem; width: 45px; height: 45px; }

    .com-content-category-blog.blog [class*="col-lg-"].mb-4 {
        margin-bottom: 1.5rem !important;
    }

    .intro-image-wrapper {
        height: 150px;
    }

    .page-header h2 {
        font-size: 1.3rem;
    }

    .com-content-category-blog.blog .col-lg-6.mb-4 .page-header h2 {
        font-size: 1.4rem;
    }

    .item-content {
        padding: 1rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .com-content-category-blog__navigation {
        margin-top: 2rem;
        padding: 1.5rem 0;
    }
}