/* ==============================================
   BLOG / CATEGORY / ARCHIVE / SEARCH - Shared
   ============================================== */

.blog-wrap {
    width: 100%;
    overflow-x: hidden;
}

/* ----------------------------------------------
   HEADER BAR
   ---------------------------------------------- */

.blog-header {
    background-color: var(--verde-legalzone);
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='2' r='1.5' fill='rgba(221,220,170,0.1)'/%3E%3C/svg%3E");
    position: relative;
    display: flex;
    flex-direction: column;
}

.blog-header__inner {
    padding-top: 2rem;
    padding-bottom: 1.75rem;
}

.blog-header__meta {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .6rem;
}

.blog-header__badge {
    display: inline-block;
    background: rgba(221, 220, 170, .2);
    border: 1px solid rgba(221, 220, 170, .4);
    color: var(--oro-legalzone);
    font-family: 'Roboto', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    padding: .2rem .65rem;
    border-radius: 2px;
}

.blog-header__count {
    font-family: 'Roboto', sans-serif;
    font-size: .72rem;
    color: rgba(255, 255, 255, .55);
    text-transform: uppercase;
    letter-spacing: .07em;
}

.blog-header__title {
    color: #fff;
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    margin: 0 0 .5rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    font-style: normal;
}

.blog-header__title em {
    font-style: italic;
    color: var(--oro-legalzone);
}

.blog-header__desc {
    color: rgba(255, 255, 255, .8);
    font-size: .95rem;
    margin: 0;
    max-width: 600px;
}

.blog-header__bar {
    height: 4px;
    background: var(--oro-legalzone);
    flex-shrink: 0;
}

/* Search form in header */
.blog-search-form {
    display: flex;
    gap: 0;
    max-width: 480px;
    margin-top: 1rem;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .25);
}

.blog-search-input {
    flex: 1;
    background: rgba(255, 255, 255, .12);
    border: none;
    color: #fff;
    padding: .6rem 1rem;
    font-size: .9rem;
    outline: none;
}

.blog-search-input::placeholder {
    color: rgba(255, 255, 255, .5);
}

.blog-search-submit {
    background: var(--oro-legalzone);
    border: none;
    padding: .6rem 1rem;
    color: var(--verde-legalzone);
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* ----------------------------------------------
   BLOG GRID (2 cols in main col)
   ---------------------------------------------- */

.blog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* ----------------------------------------------
   BLOG CARD
   ---------------------------------------------- */

.blog-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .15s;
}

.blog-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
    transform: translateY(-2px);
}

.blog-card__thumb-link {
    display: block;
    overflow: hidden;
}

.blog-card__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.blog-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.blog-card:hover .blog-card__thumb img {
    transform: scale(1.04);
}

.blog-card__readtime {
    position: absolute;
    bottom: .5rem;
    right: .5rem;
    background: rgba(12, 70, 49, .85);
    color: #fff;
    font-size: .68rem;
    font-family: 'Roboto', sans-serif;
    padding: .2rem .5rem;
    border-radius: 3px;
    backdrop-filter: blur(2px);
}

.blog-card__body {
    padding: .9rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__cat {
    display: inline-block;
    background: var(--oro-legalzone);
    color: var(--verde-legalzone);
    font-family: 'Roboto', sans-serif;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: .18rem .5rem;
    border-radius: 2px;
    margin-bottom: .5rem;
    width: fit-content;
}

.blog-card__cat:hover {
    background: #cccb98;
    color: var(--verde-legalzone);
}

.blog-card__title {
    font-size: .95rem;
    line-height: 1.4;
    margin: 0 0 .5rem;
    flex: 1;
}

.blog-card__title a {
    color: var(--negro-legalzone) !important;
}

.blog-card__title a:hover {
    color: var(--verde-legalzone) !important;
}

.blog-card__excerpt {
    font-size: .82rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: .75rem;
}

.blog-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.blog-card__footer time {
    font-size: .72rem;
    color: var(--gris-legalzone);
}

.blog-card__link {
    font-family: 'Roboto', sans-serif;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--verde-legalzone) !important;
    font-weight: 600;
}

/* ----------------------------------------------
   FEATURED POST (home.php)
   ---------------------------------------------- */

.blog-featured {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}

@media (min-width: 640px) {
    .blog-featured {
        flex-direction: row;
    }
}

.blog-featured:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.blog-featured__thumb-link {
    display: block;
    flex-shrink: 0;
}

.blog-featured__thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

@media (min-width: 640px) {
    .blog-featured__thumb {
        width: 320px;
        aspect-ratio: auto;
        height: 100%;
        min-height: 220px;
    }
}

.blog-featured__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s;
}

.blog-featured:hover .blog-featured__thumb img {
    transform: scale(1.04);
}

.blog-featured__thumb .blog-card__cat {
    position: absolute;
    top: .75rem;
    left: .75rem;
    margin: 0;
}

.blog-featured__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-featured__title {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    line-height: 1.3;
    margin: .5rem 0 .75rem;
}

.blog-featured__title a {
    color: var(--negro-legalzone) !important;
}

.blog-featured__title a:hover {
    color: var(--verde-legalzone) !important;
}

.blog-featured__excerpt {
    font-size: .9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex: 1;
}

.blog-card__meta {
    display: flex;
    gap: .75rem;
    font-size: .75rem;
    color: var(--gris-legalzone);
    margin-bottom: .5rem;
}

.blog-read-btn {
    display: inline-block;
    background: var(--verde-legalzone);
    color: #fff !important;
    font-family: 'Roboto', sans-serif;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
    padding: .6rem 1.25rem;
    border-radius: 4px;
    align-self: flex-start;
    transition: background .2s;
}

.blog-read-btn:hover {
    background: var(--verdesecundario-legalzone);
}

/* ----------------------------------------------
   SEARCH RESULTS
   ---------------------------------------------- */

.search-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    transition: box-shadow .2s, transform .15s;
}

.search-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    transform: translateY(-1px);
}

.search-item__num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--oro-legalzone);
    color: var(--verde-legalzone);
    font-family: 'Roboto', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: .15rem;
}

.search-item__thumb-link {
    flex-shrink: 0;
    display: block;
}

.search-item__thumb {
    width: 90px;
    height: 68px;
    border-radius: 6px;
    overflow: hidden;
}

.search-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-item__body {
    flex: 1;
    min-width: 0;
}

.search-item__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-bottom: .4rem;
    font-size: .72rem;
    color: var(--gris-legalzone);
}

.search-item__title {
    font-size: 1rem;
    line-height: 1.35;
    margin: 0 0 .4rem;
}

.search-item__title a {
    color: var(--negro-legalzone) !important;
}

.search-item__title a:hover {
    color: var(--verde-legalzone) !important;
}

.search-item__excerpt {
    font-size: .82rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: .5rem;
}

/* ----------------------------------------------
   PAGINATION
   ---------------------------------------------- */

.blog-pagination {
    margin-top: 2rem;
}

.blog-pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-pagination .page-numbers li a,
.blog-pagination .page-numbers li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 .6rem;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    font-size: .82rem;
    border: 1px solid #ddd;
    color: var(--negro-legalzone) !important;
    background: #fff;
    transition: background .15s, border-color .15s;
}

.blog-pagination .page-numbers li a:hover {
    background: var(--verde-legalzone);
    border-color: var(--verde-legalzone);
    color: #fff !important;
}

.blog-pagination .page-numbers li .current {
    background: var(--verde-legalzone);
    border-color: var(--verde-legalzone);
    color: #fff !important;
}

/* ----------------------------------------------
   EMPTY STATE
   ---------------------------------------------- */

.blog-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gris-legalzone);
}

.blog-empty p {
    margin-bottom: 1.25rem;
    font-size: 1rem;
}

.blog-empty__cats {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin-top: 1rem;
}

/* ----------------------------------------------
   SIDEBAR
   ---------------------------------------------- */

.blog-sidebar-inner {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.blog-sidebar-widget {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
}

.blog-sidebar-title {
    font-size: .88rem;
    color: var(--verde-legalzone);
    border-left: 3px solid var(--oro-legalzone);
    padding-left: .6rem;
    margin: 0 0 1rem;
}

/* Categories list */
.blog-cats-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.blog-cats-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .45rem .6rem;
    border-radius: 6px;
    color: var(--negro-legalzone) !important;
    font-size: .85rem;
    transition: background .15s;
}

.blog-cats-list li a:hover {
    background: var(--blanco-legalzone);
    color: var(--verde-legalzone) !important;
}

.blog-cats-count {
    background: var(--blanco-legalzone);
    color: var(--gris-legalzone);
    font-family: 'Roboto', sans-serif;
    font-size: .68rem;
    padding: .1rem .45rem;
    border-radius: 10px;
}

/* CTA Box */
.blog-sidebar-cta {
    background: var(--verde-legalzone);
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='2' r='1.5' fill='rgba(221,220,170,0.12)'/%3E%3C/svg%3E");
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
}

.blog-sidebar-cta__title {
    color: var(--oro-legalzone);
    font-size: 1rem;
    margin: 0 0 .65rem;
}

.blog-sidebar-cta__text {
    color: rgba(255, 255, 255, .82);
    font-size: .82rem;
    line-height: 1.5;
    margin-bottom: 1.1rem;
}

.blog-sidebar-cta__btn {
    display: block;
    background: var(--oro-legalzone);
    color: var(--verde-legalzone) !important;
    font-family: 'Roboto', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .6rem 1rem;
    border-radius: 4px;
    text-align: center;
    transition: background .2s;
}

.blog-sidebar-cta__btn:hover {
    background: #e8e7b8;
}

/* Ranking sidebar inside blog-sidebar-widget */
.blog-sidebar-widget .ranking-sidebar .ranking-content {
    display: none;
}

.blog-sidebar-widget .ranking-sidebar .ranking-item {
    background: var(--blanco-legalzone);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem .5rem .6rem 1.5rem;
    margin-bottom: .5rem;
    border-radius: 6px;
    position: relative;
    border: 1px solid #eee;
}

.blog-sidebar-widget .ranking-sidebar .ranking-position {
    background: var(--oro-legalzone);
    color: var(--verde-legalzone);
    font-family: 'Roboto', sans-serif;
    font-size: .65rem;
    font-weight: 700;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px 0 0 6px;
}

.blog-sidebar-widget .ranking-sidebar .ranking-logo img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.blog-sidebar-widget .ranking-sidebar .btn-reseña {
    display: none !important;
}

.blog-sidebar-widget .ranking-sidebar .btn-visitar {
    background: var(--verde-legalzone);
    color: #fff !important;
    font-size: .68rem;
    padding: 10px 20px;
    border-radius: 8px;
    text-transform: uppercase;
}

/* ----------------------------------------------
   RESPONSIVE
   ---------------------------------------------- */

@media (max-width: 767px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-featured {
        flex-direction: column;
    }

    .blog-featured__thumb {
        width: 100%;
        height: auto;
        min-height: unset;
        aspect-ratio: 16 / 9;
    }

    .blog-sidebar-inner {
        position: static;
    }

    .search-item__thumb {
        width: 70px;
        height: 52px;
    }

    .blog-header__title {
        font-size: 1.25rem;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .blog-grid {
        grid-template-columns: 1fr 1fr;
    }
}
