/*------------------------------------------------------
Table of Contents
--------------------------------------------------------
0. CSS Reset
1. Basic Styles
2. Typography
3. TopBar
4. Menu
5. Breadcrumbs
6. Footer
7. Site Structure & Appearance
8. Filters
9. Post Types
10. Pages - Sidebar Left
11. Pages - Content
12. Teaching Syllabi / Singles
13. Page list search
14. Pagination 
------------------------------------------------------*/

/*------------------------------------------------------
0. CSS RESET
------------------------------------------------------*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*------------------------------------------------------
1. BASIC STYLES
------------------------------------------------------*/
html {
    font-size: 16px;
}

p {
    font-family: 'Verdana', sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #333;
    margin-bottom: 0.625rem;
}

a {
    color: #2c4964;
    text-decoration: none;
}

a:visited {
    color: #2c4964;
}

a.basic-link {
    color: #dabc74;
    text-decoration: none;
}

h1,
.h1 {
    font-size: 2rem;
}

h2,
.h2 {
    font-size: 1.5rem;
}

/*------------------------------------------------------
2. TOPBAR
------------------------------------------------------*/

.topbar {
    background-color: #f5f7fa;/*#1977cc;*/
    height: 46px;
    padding: 0;
    font-size: 14px;
    transition: all 0.5s;
}

.topbar a {
    color: #ffffff;
    text-decoration: none;
}

.topbar a:hover {
    text-decoration: underline;
}


/*------------------------------------------------------
TOPBAR SEARCH
------------------------------------------------------*/

.topbar .wp-block-search {
    margin: 0;
}

.topbar .wp-block-search__inside-wrapper {
    height: 32px;
    background-color: #e6eef5;
    border-radius: 0;
    overflow: hidden;
    border: none;
    display: flex;
    align-items: center;
}

.topbar .wp-block-search__input {
    background-color: #dce6ef;
    border: none;
    font-size: 13px;
    padding: 4px 8px;
    color: #2c4964;
    outline: none;
}

.topbar .wp-block-search__input::placeholder {
    color: #6c757d;
}

/* botão do icon */
.topbar .wp-block-search__button {
    background-color: #1977cc;
    border: none;
    padding: 4px 12px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* hover subtil */
.topbar .wp-block-search__button:hover {
    background-color: #1565ad;
}

/*------------------------------------------------------
3. MENU
------------------------------------------------------*/
.menu1 {
    position: sticky;
    top: 0;
    z-index: 1020;
    background-color: #ffffff;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #eaeaea;
    padding: 8px 0;
}

.navbar-nav li {
    margin-right: 20px;
}

.navbar-nav li:last-child {
    margin-right: 0;
}

.navbar-nav li a {
    position: relative;
    text-decoration: none;
    color: #314d67;
}

.navbar-nav li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: #007bff;
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

.navbar-nav li a:hover::after,
.navbar-nav li a.active::after {
    width: 100%;
}

/*------------------------------------------------------
4. BREADCRUMBS
------------------------------------------------------*/
.breadcrumb {
    margin: 0;
    margin-top: 7px;
    padding: 10px 15px;
    font-size: 0.9rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    list-style: none;
    gap: 5px;
    background-color: /*#f8f9fa;*/ #EEF4F8;
    border-radius: 5px;
}

.breadcrumb li a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease-in-out;
}

.breadcrumb li a:hover {
    color: #0056b3;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    color: #6c757d;
    margin: 0 8px;
    font-weight: bold;
}

.breadcrumb li.active {
    color: #333;
    font-weight: 600;
}

/*------------------------------------------------------
5. FOOTER
------------------------------------------------------*/
.site-footer {
    background-color: #F1F7FC;
    padding: 20px 0;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, .1);
}

.site-footer-bottom {
    background-color: #F1F7FC;
    color: #fff;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.site-footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    width: calc(100% - 40px);
    max-width: 1140px;
    height: 1px;
    background-color: #e7e3e3;
    left: 50%;
    transform: translateX(-50%);
}

/*------------------------------------------------------
6. SITE STRUCTURE & APPEARANCE
------------------------------------------------------*/
.main {
    padding-top: 25px;
}

.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1170px;
    }
}

/*------------------------------------------------------
7. FILTERS
------------------------------------------------------*/
.sidebar-filter {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    width: 100%;
    margin-top: 1.5em;
}

/*------------------------------------------------------
8. POST TYPES
------------------------------------------------------*/
.publication-post,
.conference-post,
.project-post,
.teaching-post {
    padding: 1.25rem 1rem 1.5rem 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #d9d9d9;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.publication-post:hover,
.conference-post:hover,
.project-post:hover,
.teaching-post:hover {
    background-color: #ecf9fa;
}

.conference-meta,
.publication-meta,
.workshop-meta,
.teaching-meta {
    font-size: .9rem;
    font-weight: 400;
    color: #777;
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wp-block-image.alignleft,
figure.alignleft {
    margin-right: 20px !important;
    margin-bottom: 20px !important;
}

.wp-block-image.alignright,
figure.alignright {
    margin-left: 20px !important;
    margin-bottom: 20px !important;
}

.wp-block-image {
    margin-bottom: 1rem;
}

/*------------------------------------------------------
9. PAGES - SIDEBAR LEFT
------------------------------------------------------*/
.left-sidebar {
    background-color: #ffffff;
    padding: 20px;
    text-align: center;
}

.left-sidebar .widget {
    margin-bottom: 20px;
}

.left-sidebar .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.left-sidebar .widget ul li {
    margin: 5px 0;
}

.left-sidebar .widget ul li a {
    display: block;
    padding: 12px;
    font-size: 12px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    background: #f8f9fa;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    text-transform: uppercase;
}

.left-sidebar .widget ul li a:hover,
.left-sidebar .widget ul li.active a {
    background: #1977cc;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/*------------------------------------------------------
10. PAGES - CONTENT
------------------------------------------------------*/
.page-content {
    padding: 20px;
}

/*------------------------------------------------------
11. TEACHING SYLLABI - LISTS / IMAGES
------------------------------------------------------*/
.teaching-post .row {
    align-items: flex-start;
}

.teaching-thumb,
.teaching-image,
.article-image,
.book-feature-image {
    overflow: hidden;
}

.teaching-thumb img,
.teaching-image img,
.article-image img,
.book-feature-image img,
.single-teaching-article img,
.single-teaching-book img {
    max-width: 100%;
    height: auto;
    display: block;
}

.teaching-thumb {
    margin-bottom: 1rem;
}

.teaching-image-top,
.teaching-image-bottom,
.article-image-top,
.article-image-bottom {
    text-align: center;
}

.teaching-image-top img,
.teaching-image-bottom img,
.article-image-top img,
.article-image-bottom img {
    margin: 0 auto;
}

.teaching-post .col-md-3 .teaching-thumb img {
    width: 100%;
}

.teaching-post .teaching-title {
    margin-bottom: 0.65rem;
    line-height: 1.25;
}

.teaching-post .teaching-title a {
    color: #234d78;
}

.teaching-post .teaching-title a:hover {
    color: #1977cc;
}

.teaching-post .teaching-meta {
    margin-bottom: 0.75rem;
}

.teaching-post .teaching-excerpt {
    margin-top: 0.5rem;
}

/* imagem do article quando está à direita ficar mesmo encostada à direita */
.teaching-post .row .col-md-3:last-child .teaching-thumb,
.teaching-post .row .col-md-4:last-child .article-image,
.single-teaching-article .row .col-md-4:last-child .article-image {
    display: flex;
    justify-content: flex-end;
}

.teaching-post .row .col-md-3:last-child .teaching-thumb img,
.teaching-post .row .col-md-4:last-child .article-image img,
.single-teaching-article .row .col-md-4:last-child .article-image img {
    margin-left: auto;
}

/*------------------------------------------------------
12. SINGLE ARTICLE / SINGLE BOOK
------------------------------------------------------*/
.single-teaching-article .entry-content,
.single-teaching-book .entry-content {
    margin-top: 20px;
}

.single-teaching-article .entry-title,
.single-teaching-book .entry-title {
    margin-bottom: 10px;
}

.single-teaching-article .article-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.single-teaching-article .article-image-top img,
.single-teaching-article .article-image-bottom img {
    margin: 0 auto;
}

.single-teaching-book .book-feature-image img {
    max-width: 260px;   /* tamanho máximo da capa */
    width: auto;        /* nunca estica */
    height: auto;       /* mantém proporção */
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-radius: 6px;
}

/*para article*/
.book-feature-image {
    display: flex;
    align-items: flex-start;
}

/* botão elegante do download do book */
.book-download-box {
    margin-top: 30px;
}

.book-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    background-color: #1977cc;
    color: #ffffff !important;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    line-height: 1;
    border: 1px solid #1977cc;
    box-shadow: 0 4px 10px rgba(25, 119, 204, 0.18);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.book-download-btn:hover,
.book-download-btn:focus {
    background-color: #125a99;
    border-color: #125a99;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(18, 90, 153, 0.24);
    text-decoration: none;
}

.book-download-btn::before {
    content: "↓";
    font-size: 14px;
    font-weight: 700;
}

/*------------------------------------------------------
13. RESPONSIVE ADJUSTMENTS
------------------------------------------------------*/
@media (max-width: 767.98px) {
    .teaching-post .row .col-md-3:last-child .teaching-thumb,
    .teaching-post .row .col-md-4:last-child .article-image,
    .single-teaching-article .row .col-md-4:last-child .article-image {
        justify-content: flex-start;
    }

    .teaching-post .row .col-md-3:last-child .teaching-thumb img,
    .teaching-post .row .col-md-4:last-child .article-image img,
    .single-teaching-article .row .col-md-4:last-child .article-image img {
        margin-left: 0;
    }

    .book-download-btn {
        width: 100%;
    }
}


/*-------------------------------------------------------
14. PAGE SEARCH
--------------------------------------------------------*/
.search-result-item {
    padding: 1.25rem 0 1.5rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #d9d9d9;
}

.search-result-thumb img {
    max-width: 100%;
    height: auto;
    display: block;
}

.search-result-type {
    font-size: 0.85rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.search-result-title {
    font-size: 2rem;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.search-result-title a {
    color: #234d78;
    text-decoration: none;
}

.search-result-title a:hover {
    color: #1977cc;
}

.search-result-excerpt {
    font-size: 1rem;
    color: #333;
}

/*truncar resultados*/
.search-result-excerpt {
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/*-----------------------------------------
14. Pagination
-----------------------------------------*/

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

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    font-size: 14px;
    font-weight: 600;

    color: #1977cc;
    background-color: #eef4f8;

    border: 1px solid #dbe6ef;
    border-radius: 4px;

    text-decoration: none;
    transition: all 0.2s ease;
}

/* hover */
.pagination .page-numbers:hover {
    background-color: #1977cc;
    color: #ffffff;
    border-color: #1977cc;
}

/* página ativa */
.pagination .page-numbers.current {
    background-color: #1977cc;
    color: #ffffff;
    border-color: #1977cc;
}

/* next/prev */
.pagination .next,
.pagination .prev {
    width: auto;
    padding: 0 14px;
}