/* =========================================================
   PortugalOnline Modern Blog Landing
   Used by blog-posts.php only.
   ========================================================= */

#body.pol-blog-home {
    margin-top: 90px;
    padding: 0 0 46px;
    background: #fff;
}

.pol-blog-home *,
.pol-blog-home *::before,
.pol-blog-home *::after {
    box-sizing: border-box;
}

.pol-blog-breadcrumb-strip {
    border-top: 1px solid #ececec;
    border-bottom: 1px solid #e2e2e2;
    background: #f7f7f5;
}

.pol-blog-breadcrumbs {
    max-width: 1080px;
    margin: 0 auto;
    padding: 10px 24px;
}

.pol-blog-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    line-height: 1.4;
}

.pol-blog-breadcrumbs li + li::before {
    content: "›";
    margin-right: 7px;
    color: #8a8a8a;
}

.pol-blog-breadcrumbs a {
    color: #356b2c;
    text-decoration: none;
}

.pol-blog-breadcrumbs a:hover {
    text-decoration: underline;
}

.pol-blog-main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 34px 24px 0;
}

.pol-blog-intro {
    max-width: 880px;
    margin: 0 0 24px;
}

.pol-blog-eyebrow,
.pol-blog-section-kicker {
    margin: 0 0 7px;
    color: #4f7f2c;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.pol-blog-intro h1 {
    margin: 0 0 12px;
    font-size: 35px;
    line-height: 1.16;
    color: #4d3a78;
}

.pol-blog-intro-copy,
.pol-blog-intro-copy p {
    margin-top: 0;
    font-size: 17px;
    line-height: 1.65;
    color: #414141;
}

.pol-blog-intro-copy > *:last-child {
    margin-bottom: 0;
}

/* Category navigation */
.pol-blog-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 38px;
    padding: 16px;
    border: 1px solid #dedfd9;
    border-radius: 8px;
    background: #f7f7f5;
}

.pol-blog-category-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #d3d7ce;
    border-radius: 5px;
    background: #fff;
    color: #365d2d;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.pol-blog-category-nav a:hover,
.pol-blog-category-nav a:focus {
    border-color: #86a678;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    transform: translateY(-1px);
}

.pol-blog-category-nav a.is-current {
    border-color: #4f7f2c;
    background: #4f7f2c;
    color: #fff;
}

/* Section headings */
.pol-blog-section-heading {
    margin: 0 0 18px;
}

.pol-blog-section-heading h2 {
    margin: 0;
    font-size: 29px;
    line-height: 1.2;
    color: #4d3a78;
}

.pol-blog-featured-section {
    margin-bottom: 48px;
}

/* Featured layout */
.pol-blog-featured-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, .9fr);
    gap: 24px;
    align-items: stretch;
}

.pol-blog-picks {
    display: grid;
    gap: 16px;
}

/* Generic article card */
.pol-blog-card {
    overflow: hidden;
    margin: 0;
    border: 1px solid #dedfd9;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .055);
}

.pol-blog-card-media {
    display: block;
    overflow: hidden;
    background: #eceee9;
    text-decoration: none;
}

.pol-blog-card-image {
    display: block;
    width: 100%;
    height: 205px;
    object-fit: cover;
    transition: transform .25s ease;
}

.pol-blog-card:hover .pol-blog-card-image:not(.pol-blog-card-image-placeholder) {
    transform: scale(1.015);
}

.pol-blog-card-image-placeholder {
    background: linear-gradient(135deg, #e8ebe5, #dcded8);
}

.pol-blog-card-body {
    padding: 18px 19px 20px;
}

.pol-blog-card-category {
    display: inline-block;
    margin-bottom: 8px;
    color: #4f7f2c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .055em;
    line-height: 1.3;
    text-decoration: none;
    text-transform: uppercase;
}

.pol-blog-card-title {
    margin: 0 0 8px;
    color: #2f2f2f;
    font-size: 21px;
    line-height: 1.27;
}

.pol-blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.pol-blog-card-title a:hover {
    color: #4f7f2c;
}

.pol-blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 11px;
    color: #777;
    font-size: 12px;
    line-height: 1.4;
}

.pol-blog-card-excerpt {
    margin: 0 0 15px;
    color: #4b4b4b;
    font-size: 15px;
    line-height: 1.58;
}

.pol-blog-card-link {
    color: #356b2c;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.pol-blog-card-link:hover {
    text-decoration: underline;
}

/* Main featured card */
.pol-blog-card-featured {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pol-blog-card-featured .pol-blog-card-image {
    height: 330px;
}

.pol-blog-card-featured .pol-blog-card-body {
    padding: 22px 24px 24px;
}

.pol-blog-card-featured .pol-blog-card-title {
    font-size: 27px;
    line-height: 1.22;
}

.pol-blog-card-featured .pol-blog-card-excerpt {
    font-size: 16px;
}

/* Smaller cards beside the feature */
.pol-blog-card-compact {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    min-height: 0;
}

.pol-blog-card-compact .pol-blog-card-media {
    height: 100%;
}

.pol-blog-card-compact .pol-blog-card-image {
    height: 100%;
    min-height: 152px;
}

.pol-blog-card-compact .pol-blog-card-body {
    padding: 14px 15px;
}

.pol-blog-card-compact .pol-blog-card-title {
    font-size: 17px;
    line-height: 1.28;
}

.pol-blog-card-compact .pol-blog-card-meta {
    margin-bottom: 7px;
    font-size: 11px;
}

.pol-blog-card-compact .pol-blog-card-excerpt {
    display: none;
}

.pol-blog-card-compact .pol-blog-card-link {
    font-size: 13px;
}

/* Latest articles */
.pol-blog-latest-section {
    margin-top: 8px;
}

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

.pol-blog-grid .pol-blog-card {
    display: flex;
    flex-direction: column;
}

.pol-blog-grid .pol-blog-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.pol-blog-grid .pol-blog-card-link {
    margin-top: auto;
}

/* Pagination */
.pol-blog-pagination {
    margin-top: 34px;
}

.pol-blog-pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pol-blog-pagination a,
.pol-blog-pagination span {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border: 1px solid #d3d7ce;
    border-radius: 5px;
    background: #fff;
    color: #365d2d;
    text-decoration: none;
}

.pol-blog-pagination .current {
    border-color: #4f7f2c;
    background: #4f7f2c;
    color: #fff;
}

/* Tablet */
@media screen and (max-width: 900px) {
    .pol-blog-featured-layout {
        grid-template-columns: 1fr;
    }

    .pol-blog-picks {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pol-blog-card-compact {
        display: block;
    }

    .pol-blog-card-compact .pol-blog-card-image {
        height: 170px;
        min-height: 0;
    }

    .pol-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media screen and (max-width: 620px) {
    #body.pol-blog-home {
        margin-top: 91px;
        padding-bottom: 32px;
    }

    .pol-blog-breadcrumbs {
        padding: 9px 16px;
    }

    .pol-blog-main {
        padding: 25px 16px 0;
    }

    .pol-blog-intro h1 {
        font-size: 29px;
        line-height: 1.2;
    }

    .pol-blog-intro-copy,
    .pol-blog-intro-copy p {
        font-size: 16px;
        line-height: 1.6;
    }

    .pol-blog-category-nav {
        gap: 7px;
        margin-bottom: 30px;
        padding: 12px;
    }

    .pol-blog-category-nav a {
        min-height: 36px;
        padding: 7px 10px;
        font-size: 13px;
    }

    .pol-blog-section-heading h2 {
        font-size: 25px;
    }

    .pol-blog-featured-section {
        margin-bottom: 38px;
    }

    .pol-blog-card-featured .pol-blog-card-image {
        height: 225px;
    }

    .pol-blog-card-featured .pol-blog-card-body {
        padding: 18px;
    }

    .pol-blog-card-featured .pol-blog-card-title {
        font-size: 23px;
    }

    .pol-blog-picks,
    .pol-blog-grid {
        grid-template-columns: 1fr;
    }

    .pol-blog-card-compact {
        display: grid;
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .pol-blog-card-compact .pol-blog-card-image {
        height: 100%;
        min-height: 145px;
    }

    .pol-blog-card-image {
        height: 205px;
    }

    .pol-blog-card-title {
        font-size: 20px;
    }
}

/* =========================================================
   Modern Blog Category Archives
   ========================================================= */

.pol-blog-category-page .pol-blog-category-intro {
    margin-bottom: 24px;
}

.pol-blog-category-page .pol-blog-category-feature {
    margin: 0 0 46px;
}

.pol-blog-category-page .pol-blog-category-feature .pol-blog-card-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    align-items: stretch;
}

.pol-blog-category-page .pol-blog-category-feature .pol-blog-card-media {
    min-height: 320px;
}

.pol-blog-category-page .pol-blog-category-feature .pol-blog-card-featured .pol-blog-card-image {
    height: 100%;
    min-height: 320px;
}

.pol-blog-category-page .pol-blog-category-feature .pol-blog-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pol-blog-category-page .pol-blog-category-feature .pol-blog-card-link {
    align-self: flex-start;
}

@media screen and (max-width: 800px) {
    .pol-blog-category-page .pol-blog-category-feature .pol-blog-card-featured {
        display: block;
    }

    .pol-blog-category-page .pol-blog-category-feature .pol-blog-card-media {
        min-height: 0;
    }

    .pol-blog-category-page .pol-blog-category-feature .pol-blog-card-featured .pol-blog-card-image {
        height: 235px;
        min-height: 0;
    }
}

/* =========================================================
   Compact Blog Hero
   Uses the featured image from legacy Blog page ID 2156.
   ========================================================= */

.pol-blog-hero {
    width: 100%;
    height: 265px;
    overflow: hidden;
    background: #e9ece7;
}

.pol-blog-hero img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 48%;
}

@media screen and (max-width: 900px) {
    .pol-blog-hero {
        height: 220px;
    }
}

@media screen and (max-width: 620px) {
    .pol-blog-hero {
        height: 170px;
    }
}

/* =========================================================
   Breadcrumbs — match the other PortugalOnline sections
   ========================================================= */

#body.pol-blog-home .pol-blog-breadcrumb-strip {
    display: block;
    position: relative;
    z-index: 5;
    float: none !important;
    clear: both !important;
    width: 100%;
    height: auto !important;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible;
    background: #f7f9fc;
    border-top: 1px solid #e3e8ef;
    border-bottom: 1px solid #dce3ec;
    box-sizing: border-box;
}

#body.pol-blog-home .pol-blog-breadcrumbs {
    display: block;
    float: none !important;
    clear: both !important;
    width: 100%;
    max-width: 1180px;
    height: auto !important;
    margin: 0 auto;
    padding: 10px 30px;
    box-sizing: border-box;
}

#body.pol-blog-home .pol-blog-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

#body.pol-blog-home .pol-blog-breadcrumbs li {
    display: inline-flex;
    float: none !important;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
    color: #4f5865;
    font-size: 14px;
    line-height: 1.35;
    list-style: none;
}

#body.pol-blog-home .pol-blog-breadcrumbs li + li::before {
    display: inline-block;
    margin: 0 9px;
    color: #8a95a3;
    content: "›";
    font-size: 17px;
    font-weight: 400;
    line-height: 1;
}

#body.pol-blog-home .pol-blog-breadcrumbs a,
#body.pol-blog-home .pol-blog-breadcrumbs span {
    display: inline-block;
    padding: 0 !important;
    font-size: 14px;
    line-height: 1.35;
    text-decoration: none;
}

#body.pol-blog-home .pol-blog-breadcrumbs a {
    color: #4f5865;
}

#body.pol-blog-home .pol-blog-breadcrumbs a:hover,
#body.pol-blog-home .pol-blog-breadcrumbs a:focus {
    color: #244fa8;
    text-decoration: underline;
}

#body.pol-blog-home .pol-blog-breadcrumbs span[aria-current="page"] {
    color: #3b68c9;
    font-weight: 700;
}

@media screen and (max-width: 620px) {
    #body.pol-blog-home .pol-blog-breadcrumbs {
        padding: 9px 16px;
    }

    #body.pol-blog-home .pol-blog-breadcrumbs li,
    #body.pol-blog-home .pol-blog-breadcrumbs a,
    #body.pol-blog-home .pol-blog-breadcrumbs span {
        font-size: 13px;
    }
}

/* =========================================================
   Standard hero / legacy carousel overlap fix
   The old theme applies margin-bottom:-90px to hero carousels.
   Cancel it on the modern blog so the breadcrumb sits below
   the hero instead of cutting through it.
   ========================================================= */

#body.pol-blog-home > .carousel {
    display: block;
    float: none !important;
    clear: both !important;
    width: 100%;
    margin-bottom: 0 !important;
}

#body.pol-blog-home > .carousel > .image-page-header {
    display: block;
    float: none !important;
    clear: both !important;
    width: 100%;
    overflow: hidden;
}

