/* ================================================
   Portal da Construção e Reforma | Blog
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700;800&display=swap');

:root {
    --portal-primary: #013D0B;
    --portal-primary-dark: #012a07;
    --portal-primary-soft: #0B5C1A;
    --portal-secondary: #002208;
    --portal-accent: #00A859;
    --portal-accent-dark: #008F4C;
    --portal-warm: #f0f7f1;
    --portal-warm-dark: #dce9de;
    --portal-bg: #f6f8f6;
    --portal-surface: #ffffff;
    --portal-white: #ffffff;
    --portal-text: #1a2e1c;
    --portal-text-light: #4a5f4d;
    --portal-border: #dce5dc;
    --portal-shadow: rgba(1, 61, 11, 0.1);
    --portal-shadow-strong: rgba(1, 61, 11, 0.2);
}

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

html {
    overflow-x: clip;
}

body.blog-page,
body.blog-single {
    background: linear-gradient(180deg, var(--portal-bg) 0%, var(--portal-white) 100%);
    font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
    color: var(--portal-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    max-width: 100%;
}

body.blog-page img,
body.blog-single img {
    max-width: 100%;
    height: auto;
}

body.blog-page .blog-header__logo img,
body.blog-single .blog-header__logo img,
body.blog-page .blog-footer__logo img,
body.blog-single .blog-footer__logo img {
    display: block;
    width: auto;
    max-width: 52px;
    height: 48px;
    max-height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ================================================
   HEADER / NAV
   ================================================ */

.blog-header {
    background: color-mix(in oklch, var(--portal-white) 85%, var(--portal-warm) 15%);
    padding: 14px 0;
    box-shadow: 0 8px 35px color-mix(in oklch, var(--portal-primary) 9%, transparent);
    border-bottom: 1px solid var(--portal-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
}

.blog-header__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.blog-header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
    min-width: 0;
    flex: 0 0 auto;
    max-width: 200px;
}

.blog-header__logo img {
    width: auto;
    max-width: 52px;
    height: 48px;
    max-height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
}

.blog-header__brand {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.blog-header__brand-name {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--portal-text-light);
}

.blog-header__brand-tag {
    font-size: 1.15rem;
    font-weight: 800;
    background: linear-gradient(120deg, var(--portal-primary) 0%, var(--portal-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-header__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 1px solid var(--portal-border);
    border-radius: 10px;
    background: var(--portal-surface);
    cursor: pointer;
    flex-shrink: 0;
}

.blog-header__toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--portal-primary);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.blog-header__nav {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
}

.blog-header__menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-header__menu-item a {
    display: block;
    padding: 8px 10px;
    color: var(--portal-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.blog-header__menu-item a:hover,
.blog-header__menu-item.is-active a {
    color: var(--portal-accent);
    background: color-mix(in oklch, var(--portal-accent) 12%, transparent);
}

.blog-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.blog-header__action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.blog-header__action--whatsapp {
    color: #128c7e;
    background: #e8f8f0;
    border: 1px solid #b8e6cf;
}

.blog-header__action--whatsapp:hover {
    background: #d4f0e3;
    transform: translateY(-1px);
}

.blog-header__action--cta {
    color: var(--portal-white);
    background: linear-gradient(135deg, var(--portal-accent) 0%, var(--portal-accent-dark) 100%);
    box-shadow: 0 4px 14px color-mix(in oklch, var(--portal-accent) 35%, transparent);
}

.blog-header__action--cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px color-mix(in oklch, var(--portal-accent) 45%, transparent);
}

.blog-header--glass {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.85) 100%);
    box-shadow: 0 18px 35px rgba(15, 15, 15, 0.12);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border-color: rgba(255, 255, 255, 0.28);
}

.blog-header--open .blog-header__toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.blog-header--open .blog-header__toggle span:nth-child(2) {
    opacity: 0;
}

.blog-header--open .blog-header__toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ================================================
   MAIN CONTENT
   ================================================ */

.blog-main {
    min-height: 60vh;
    padding-top: 96px;
    overflow-x: clip;
}

.blog-intro {
    padding: 40px 0 10px;
    text-align: center;
}

.blog-intro__title {
    font-size: clamp(1.75rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 12px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.blog-intro__subtitle {
    max-width: 640px;
    margin: 0 auto;
    color: var(--portal-text-light);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ================================================
   BLOG TOOLBAR (busca + filtros)
   ================================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.blog-toolbar {
    padding: 24px 0 16px;
    border-bottom: 1px solid var(--portal-border);
    background: var(--portal-surface);
}

.blog-toolbar .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

.blog-search-form {
    display: flex;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    border-radius: 999px;
    overflow: hidden;
    border: 2px solid var(--portal-border);
    background: var(--portal-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.blog-search-form:focus-within {
    border-color: var(--portal-accent);
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--portal-accent) 25%, transparent);
}

.blog-search-form__input {
    flex: 1;
    padding: 12px 20px;
    border: 0;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--portal-text);
    background: transparent;
}

.blog-search-form__input::placeholder {
    color: var(--portal-text-light);
}

.blog-search-form__input:focus {
    outline: none;
}

.blog-search-form__btn {
    padding: 12px 20px;
    border: 0;
    background: var(--portal-primary);
    color: var(--portal-white);
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s;
}

.blog-search-form__btn:hover {
    background: var(--portal-primary-dark);
}

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.blog-filters__label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--portal-text-light);
}

.blog-filters__link {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--portal-text);
    background: var(--portal-bg);
    transition: background 0.2s, color 0.2s;
}

.blog-filters__link:hover {
    background: color-mix(in oklch, var(--portal-accent) 15%, transparent);
    color: var(--portal-accent-dark);
}

.blog-filters__link.is-active {
    background: var(--portal-primary);
    color: var(--portal-white);
}

.blog-filters__select-wrap {
    display: inline-block;
}

.blog-filters__select {
    padding: 8px 32px 8px 14px;
    border-radius: 999px;
    border: 2px solid var(--portal-border);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--portal-text);
    background: var(--portal-white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a5f7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.blog-filters__select:focus {
    outline: none;
    border-color: var(--portal-accent);
}

/* ================================================
   BLOG PAGINATION
   ================================================ */

.blog-pagination {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--portal-border);
}

.blog-pagination__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.blog-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--portal-text);
    background: var(--portal-white);
    border: 2px solid var(--portal-border);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.blog-pagination__link:hover:not(.blog-pagination__link--disabled):not(.blog-pagination__link--current) {
    background: var(--portal-primary);
    color: var(--portal-white);
    border-color: var(--portal-primary);
}

.blog-pagination__link--current {
    background: var(--portal-primary);
    color: var(--portal-white);
    border-color: var(--portal-primary);
    cursor: default;
}

.blog-pagination__link--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.blog-pagination__link--prev,
.blog-pagination__link--next {
    padding: 0 20px;
}

.blog-pagination__dots {
    padding: 0 8px;
    font-weight: 700;
    color: var(--portal-text-light);
}

/* ================================================
   CONTAINER
   ================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.section-padding {
    padding: 70px 0;
}

/* ================================================
   BLOG GRID
   ================================================ */

.blog-grid {
    padding: 80px 0 100px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.g-4 > * {
    padding: 15px;
}

.g-5 > * {
    padding: 20px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-lg-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    min-width: 0;
}

/* ================================================
   BLOG CARDS
   ================================================ */

.blog-card {
    background: var(--portal-white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 50px var(--portal-shadow);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.blog-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 32px 80px var(--portal-shadow-strong);
    border-color: color-mix(in oklch, var(--portal-accent) 22%, transparent);
}

.blog-card__image {
    display: block;
    overflow: hidden;
    position: relative;
    height: 240px;
}

.blog-card__image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, color-mix(in oklch, var(--portal-primary) 12%, transparent) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover .blog-card__image::after {
    opacity: 1;
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__image img {
    transform: scale(1.08);
}

.blog-card__body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__category {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--portal-accent-dark);
    margin-bottom: 16px;
    font-weight: 700;
}

.blog-card__category i {
    font-size: 0.85rem;
}

.blog-card__title {
    font-size: 1.45rem;
    line-height: 1.3;
    margin-bottom: 16px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-card__title a {
    color: var(--portal-text);
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-card__title a:hover {
    color: var(--portal-accent-dark);
}

.blog-card__date {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--portal-text-light);
    font-size: 0.88rem;
    margin-bottom: 18px;
    font-weight: 500;
}

.blog-card__date i {
    color: var(--portal-accent);
}

.blog-card__description {
    color: var(--portal-text-light);
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.blog-card__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--portal-accent-dark);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.98rem;
    transition: all 0.3s ease;
}

.blog-card__link:hover {
    color: var(--portal-primary);
    gap: 14px;
}

.blog-card__link i {
    transition: transform 0.3s ease;
}

.blog-card__link:hover i {
    transform: translateX(5px);
}

/* ================================================
   EMPTY STATE
   ================================================ */

.blog-empty {
    background: var(--portal-white);
    border-radius: 30px;
    padding: 80px 50px;
    text-align: center;
    box-shadow: 0 20px 60px var(--portal-shadow);
    color: var(--portal-text);
}

.blog-empty i {
    font-size: 64px;
    background: linear-gradient(135deg, var(--portal-primary) 0%, var(--portal-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    display: block;
}

.blog-empty h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--portal-text);
    font-weight: 700;
}

.blog-empty p {
    margin: 0 auto 30px;
    max-width: 600px;
    color: var(--portal-text-light);
    font-size: 1.05rem;
}

/* ================================================
   POST HERO (Single Post)
   ================================================ */

.post-hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, var(--portal-primary) 0%, var(--portal-secondary) 100%);
    color: var(--portal-white);
}

.post-hero--empty {
    padding: 180px 0;
    text-align: center;
}

.post-hero__back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.post-hero__back:hover {
    color: var(--portal-white);
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.post-hero__tag {
    display: inline-block;
    padding: 8px 24px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    font-weight: 700;
    margin-bottom: 20px;
    border: 2px solid transparent;
    color: #fff;
}

.post-hero h1 {
    font-size: 2.8rem;
    line-height: 1.25;
    max-width: 900px;
    margin-bottom: 25px;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.95rem;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.post-meta i {
    color: var(--portal-accent);
    font-size: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ================================================
   POST CONTENT
   ================================================ */

.post-content {
    padding: 80px 0 120px;
    background: var(--portal-bg);
}

.post-content__featured-image {
    border-radius: 25px;
    overflow: hidden;
    margin-bottom: 50px;
    box-shadow: 0 20px 60px var(--portal-shadow);
    border: 4px solid var(--portal-white);
    position: relative;
}

.post-content__featured-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 25px;
    border: 3px solid transparent;
    background: var(--portal-accent) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.25;
}

.post-content__featured-image img {
    width: 100%;
    display: block;
    height: auto;
    object-fit: cover;
    max-height: 500px;
}

.post-content__body {
    background: var(--portal-white);
    border-radius: 25px;
    padding: 50px 60px;
    box-shadow: 0 20px 60px var(--portal-shadow);
    color: var(--portal-text);
    line-height: 1.8;
    overflow-wrap: anywhere;
    word-break: break-word;
    overflow: hidden;
    min-width: 0;
    font-size: 1.05rem;
}

.post-content__body h2,
.post-content__body h3,
.post-content__body h4 {
    color: var(--portal-text);
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: 700;
}

.post-content__body h2 {
    font-size: 1.8rem;
    color: var(--portal-primary);
}

.post-content__body h3 {
    font-size: 1.5rem;
    color: var(--portal-secondary);
}

.post-content__body p {
    margin-bottom: 20px;
}

.post-content__body ul,
.post-content__body ol {
    margin: 0 0 25px 30px;
    padding: 0;
}

.post-content__body li {
    margin-bottom: 10px;
    padding-left: 10px;
}

.post-content__body img {
    max-width: 100%;
    border-radius: 20px;
    margin: 30px 0;
    height: auto;
    box-shadow: 0 10px 40px var(--portal-shadow);
}

.post-content__body a {
    color: var(--portal-accent-dark);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.post-content__body a:hover {
    border-bottom-color: var(--portal-accent-dark);
}

.post-content__body * {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

/* ================================================
   POST SHARE
   ================================================ */

.post-share {
    margin-top: 50px;
    padding: 40px;
    background: var(--portal-white);
    border-radius: 25px;
    box-shadow: 0 20px 60px var(--portal-shadow);
    border: 2px solid color-mix(in oklch, var(--portal-accent) 30%, transparent);
}

.post-share h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--portal-text);
    font-weight: 700;
}

.post-share__links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.post-share__links .btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.post-share__links .btn-tiktok {
    color: #000000;
    border-color: #000000;
    background: transparent;
}

.post-share__links .btn-tiktok:hover {
    background: #000000;
    color: white;
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.post-share__links .btn-whatsapp {
    color: #25D366;
    border-color: #25D366;
    background: transparent;
}

.post-share__links .btn-whatsapp:hover {
    background: #25D366;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.post-share__links .btn-phone {
    color: var(--portal-primary);
    border-color: var(--portal-primary);
    background: transparent;
}

.post-share__links .btn-phone:hover {
    background: var(--portal-primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px var(--portal-shadow-strong);
}

.post-share__links .btn-primary {
    border: none;
}

.post-share__links .btn-primary:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px var(--portal-shadow-strong);
}

/* ================================================
   POST NAVIGATION
   ================================================ */

.post-navigation {
    margin-top: 40px;
}

.post-navigation .btn {
    font-weight: 700;
    color: var(--portal-accent-dark);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: var(--portal-white);
    border-radius: 30px;
    box-shadow: 0 5px 20px var(--portal-shadow);
    transition: all 0.3s ease;
}

.post-navigation .btn:hover {
    background: var(--portal-primary);
    color: var(--portal-white);
    transform: translateX(-5px);
}

/* ================================================
   SIDEBAR
   ================================================ */

.post-sidebar {
    position: sticky;
    top: 120px;
    padding-left: 15px;
}

.sidebar-widget {
    background: var(--portal-white);
    border-radius: 25px;
    padding: 35px;
    box-shadow: 0 20px 60px var(--portal-shadow);
    margin-bottom: 30px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    border-color: color-mix(in oklch, var(--portal-accent) 30%, transparent);
    transform: translateY(-3px);
    box-shadow: 0 25px 70px color-mix(in oklch, var(--portal-primary) 18%, transparent);
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--portal-text);
    font-weight: 700;
    background: linear-gradient(135deg, var(--portal-primary) 0%, var(--portal-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-widget p {
    margin-bottom: 20px;
    color: var(--portal-text-light);
}

.sidebar-widget--cta {
    text-align: center;
    background: linear-gradient(135deg, var(--portal-primary) 0%, var(--portal-secondary) 100%);
    color: var(--portal-white);
    border: none;
}

.sidebar-widget--cta h3 {
    color: var(--portal-white);
    -webkit-text-fill-color: var(--portal-white);
}

.sidebar-widget--cta p {
    color: rgba(255, 255, 255, 0.95);
}

.sidebar-widget--cta .btn {
    background: var(--portal-accent);
    color: var(--portal-primary);
    font-weight: 700;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.sidebar-widget--cta .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    background: var(--portal-accent-dark);
    color: var(--portal-white);
}

.sidebar-widget--cta .btn.btn-primary {
    background-color: #fff;
    color: var(--portal-primary);
    box-shadow: 0 12px 35px var(--portal-shadow);
}

.sidebar-widget--cta .btn.btn-primary:hover {
    background-color: var(--portal-warm);
    color: var(--portal-primary);
    box-shadow: 0 8px 20px var(--portal-shadow);
    transform: translateY(-2px);
}

/* ================================================
   RECENT POSTS
   ================================================ */

.recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-posts__link {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: var(--portal-text);
    align-items: center;
    padding: 10px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.recent-posts__link:hover {
    background: var(--portal-bg);
    color: var(--portal-accent-dark);
}

.recent-posts__thumb {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    border-radius: 15px;
    overflow: hidden;
    background: var(--portal-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid color-mix(in oklch, var(--portal-accent) 30%, transparent);
}

.recent-posts__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-posts__info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9rem;
    flex: 1;
    overflow: hidden;
}

.recent-posts__info strong {
    font-weight: 700;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.recent-posts__info time {
    font-size: 0.8rem;
    color: var(--portal-text-light);
}

.recent-posts__empty {
    margin: 0;
    color: var(--portal-text-light);
    font-style: italic;
}

/* ================================================
   BUTTONS
   ================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 38px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--portal-accent) 0%, var(--portal-primary-soft) 100%);
    color: #fff;
    box-shadow: 0 12px 35px var(--portal-shadow);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 18px 45px var(--portal-shadow-strong);
    background: linear-gradient(135deg, var(--portal-primary) 0%, var(--portal-primary-dark) 100%);
    color: #fff;
}

.btn-link {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: var(--portal-primary);
    border: 2px solid var(--portal-border);
    box-shadow: none;
    padding: 12px 24px;
}

.btn-outline:hover {
    background: var(--portal-warm);
    border-color: var(--portal-accent);
    color: var(--portal-accent);
    transform: translateY(-2px);
}

.w-100 {
    width: 100%;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.text-center {
    text-align: center;
}

/* ================================================
   PORTAL CTA
   ================================================ */

.blog-portal-cta {
    padding: 48px 0;
    background: linear-gradient(135deg, var(--portal-warm) 0%, var(--portal-white) 100%);
    border-top: 1px solid var(--portal-border);
    border-bottom: 1px solid var(--portal-border);
}

.blog-portal-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding: 28px 32px;
    background: var(--portal-surface);
    border-radius: 16px;
    border: 1px solid var(--portal-border);
    box-shadow: 0 8px 30px var(--portal-shadow);
}

.blog-portal-cta__content h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    font-weight: 800;
    color: var(--portal-primary);
    margin-bottom: 8px;
}

.blog-portal-cta__content p {
    color: var(--portal-text-light);
    max-width: 520px;
    margin: 0;
}

.blog-portal-cta__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-outline--whatsapp {
    color: #128c7e;
    border-color: #b8e6cf;
}

.btn-outline--whatsapp:hover {
    background: #e8f8f0;
    color: #0d6b5f;
}

/* ================================================
   FOOTER
   ================================================ */

.blog-footer {
    background: linear-gradient(135deg, var(--portal-primary) 0%, var(--portal-primary-dark) 100%);
    color: var(--portal-white);
    padding: 70px 0 35px;
    text-align: center;
}

.blog-footer__content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-footer__logo {
    margin-bottom: 20px;
}

.blog-footer__logo img {
    width: auto;
    max-width: 72px;
    height: 60px;
    max-height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.2));
}

.blog-footer__text {
    font-size: 0.95rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.blog-footer__links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.blog-footer__links a {
    color: var(--portal-white);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.blog-footer__links a:hover {
    opacity: 0.8;
}

.blog-footer__copy {
    font-size: 0.85rem;
    opacity: 0.8;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-footer__credits {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: 15px;
    padding-top: 0;
}

.publinet-credit {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.publinet-credit:hover {
    opacity: 1;
    color: rgba(255, 255, 255, 0.95);
}

.publinet-logo {
    height: 16px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    border-radius: 3px;
}

.publinet-credit:hover .publinet-logo {
    opacity: 1;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 1199px) and (min-width: 992px) {
    .blog-header__menu-item a {
        padding: 8px 7px;
        font-size: 0.8rem;
    }

    .blog-header__action {
        padding: 8px 11px;
        font-size: 0.8rem;
    }
}

@media (max-width: 1199px) {
    .post-sidebar {
        top: 100px;
    }
}

@media (max-width: 991px) {
    .col-lg-4,
    .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .blog-hero {
        padding: 60px 0 50px;
    }

    .blog-hero h1 {
        font-size: 2.3rem;
    }

    .post-hero {
        padding: 100px 0 50px;
    }

    .post-hero h1 {
        font-size: 2.2rem;
    }

    .post-sidebar {
        position: static;
        margin-top: 40px;
        padding-left: 0;
    }

    .post-content__body {
        padding: 40px 30px;
    }

    .post-share {
        padding: 30px;
    }

    .blog-header__toggle {
        display: flex;
    }

    .blog-header__nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0 20px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        background: var(--portal-surface);
        border-bottom: 1px solid var(--portal-border);
        box-shadow: 0 12px 24px var(--portal-shadow);
        transition: max-height 0.35s ease, opacity 0.25s ease, visibility 0.25s ease, padding 0.25s ease;
    }

    .blog-header--open .blog-header__nav {
        max-height: 80vh;
        overflow-y: auto;
        opacity: 1;
        visibility: visible;
        padding: 16px 20px 20px;
    }

    .blog-header {
        position: fixed;
    }

    .blog-header__container {
        position: static;
        flex-wrap: nowrap;
    }

    .blog-header__menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 2px;
    }

    .blog-header__menu-item a {
        padding: 12px 14px;
        font-size: 1rem;
    }

    .blog-header__actions {
        flex-direction: column;
        width: 100%;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--portal-border);
    }

    .blog-header__action {
        justify-content: center;
        width: 100%;
        padding: 12px 16px;
    }

    .blog-portal-cta__inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 20px;
    }

    .blog-portal-cta__buttons {
        width: 100%;
    }

    .blog-portal-cta__buttons .btn {
        flex: 1 1 auto;
        justify-content: center;
        min-width: calc(50% - 5px);
    }
}

@media (max-width: 767px) {
    .blog-toolbar .container {
        flex-direction: column;
        align-items: stretch;
    }

    .blog-search-form {
        max-width: none;
        width: 100%;
    }

    .blog-filters {
        justify-content: flex-start;
        width: 100%;
    }

    .row {
        margin-left: 0;
        margin-right: 0;
    }

    .g-4 > *,
    .g-5 > * {
        padding-left: 0;
        padding-right: 0;
    }

    .col-lg-4,
    .col-lg-8,
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .blog-search-form__btn {
        animation: none;
    }

    .blog-card:hover {
        transform: none;
    }

    .blog-pagination__link {
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        font-size: 0.9rem;
    }

    .blog-hero h1 {
        font-size: 2rem;
    }

    .blog-hero p {
        font-size: 1rem;
    }

    .post-hero h1 {
        font-size: 1.8rem;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .blog-card__image {
        height: 200px;
    }

    .blog-portal-cta__buttons .btn {
        min-width: 100%;
    }

    .post-share__links .btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .recent-posts__link {
        gap: 12px;
    }

    .recent-posts__thumb {
        flex: 0 0 60px;
        width: 60px;
        height: 60px;
    }

    .post-content__body {
        padding: 30px 20px;
        font-size: 1rem;
    }

    .sidebar-widget {
        padding: 25px;
    }

    .blog-footer__credits {
        font-size: 0.7rem;
    }

    .publinet-logo {
        height: 14px;
    }

    .post-meta {
        gap: 12px;
    }

    .post-meta span {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

@media (max-width: 575px) {
    .blog-hero {
        padding: 50px 0 40px;
    }

    .blog-hero h1 {
        font-size: 1.7rem;
    }

    .post-hero {
        padding: 80px 0 40px;
    }

    .post-hero--empty {
        padding: 120px 0;
    }

    .post-hero h1 {
        font-size: 1.6rem;
    }

    .blog-empty {
        padding: 50px 20px;
    }

    .blog-empty h2 {
        font-size: 1.5rem;
    }

    body.blog-page .blog-header__logo img,
    body.blog-single .blog-header__logo img {
        max-width: 44px;
        height: 40px;
        max-height: 40px;
    }

    .blog-header__brand-tag {
        font-size: 1rem;
    }

    .blog-main {
        padding-top: 88px;
    }

    .section-padding {
        padding: 50px 0;
    }

    .blog-grid {
        padding: 50px 0 70px;
    }

    .blog-intro::before,
    .blog-intro::after {
        display: none;
    }
}

/* ================================================
   ANIMATIONS
   ================================================ */

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

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes floatSoft {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(2deg);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 168, 89, 0.35);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 168, 89, 0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.blog-header--loaded {
    animation: slideDown 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.blog-intro {
    position: relative;
    overflow: hidden;
}

.blog-intro::before,
.blog-intro::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.12;
    animation: floatSoft 8s ease-in-out infinite;
}

.blog-intro::before {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, var(--portal-accent) 0%, transparent 70%);
    top: -80px;
    right: -60px;
}

.blog-intro::after {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--portal-primary-soft) 0%, transparent 70%);
    bottom: -40px;
    left: -40px;
    animation-delay: -3s;
}

.blog-intro__title {
    background: linear-gradient(120deg, var(--portal-primary) 0%, var(--portal-accent) 50%, var(--portal-primary-soft) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both, gradientShift 6s ease 0.8s infinite;
}

.blog-intro__subtitle {
    animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.25s both;
}

.blog-toolbar {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both;
}

.blog-search-form__btn {
    animation: pulseGlow 2.5s ease-in-out infinite;
}

.blog-card__category {
    background: linear-gradient(90deg, var(--portal-warm) 0%, var(--portal-warm-dark) 50%, var(--portal-warm) 100%);
    background-size: 200% auto;
    padding: 6px 14px;
    border-radius: 999px;
    animation: shimmer 4s linear infinite;
}

.blog-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1), transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.post-hero {
    position: relative;
    overflow: hidden;
}

.post-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 168, 89, 0.08) 50%, transparent 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    pointer-events: none;
}

.post-hero h1 {
    animation: fadeInUp 0.65s cubic-bezier(0.4, 0, 0.2, 1) 0.15s both;
}

.post-meta {
    animation: fadeInUp 0.65s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.post-content__featured-image {
    animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.post-content__body {
    animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both;
}

.blog-card {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
    .blog-header--loaded,
    .blog-intro__title,
    .blog-intro__subtitle,
    .blog-toolbar,
    .blog-card,
    .post-hero h1,
    .post-meta,
    .post-content__featured-image,
    .post-content__body {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .blog-intro::before,
    .blog-intro::after {
        animation: none;
    }

    .blog-search-form__btn {
        animation: none;
    }

    .blog-card__category {
        animation: none;
    }

    .blog-reveal {
        opacity: 1;
        transform: none;
    }
}
