/*
Theme Name:     Newspaper Child theme
Theme URI: 		http://themeforest.net/user/tagDiv/portfolio
Description:    Child theme made by tagDiv
Author:         tagDiv
Author URI: 	http://themeforest.net/user/tagDiv/portfolio
Template:       Newspaper
Version:        9.0c
*/


/*  ----------------------------------------------------------------------------
    This file will load automatically when the child theme is active. You can use it
    for custom CSS.
*/

/* =========================
   TABLAS EN POSTS
   ========================= */

.td-post-content .table-scroll-wrap {
    position: relative;
    margin: 2.6rem 0 2rem;
}

.td-post-content .table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e3ddd3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,.04);
}

/* Table */
.td-post-content .table-scroll table,
.td-post-content .table-scroll.wp-block-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    background: transparent;
    font-size: 0.95rem;
    line-height: 1.55;
    border: 0;
}

/* Header */
.td-post-content .table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #faf7f2;
    color: #1f2937;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    text-align: left;
    border-bottom: 1px solid #e3ddd3;
}

/* Rows
   Reset top/left explicitly: the core wp-block-table CSS sets
   "border: 1px solid" (currentColor) on every th/td, so without this
   the top and left edges keep that default color instead of ours. */
.td-post-content .table-scroll th,
.td-post-content .table-scroll td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
    border-top: 0;
    border-left: 0;
    border-right: 1px solid #f0ece4;
    border-bottom: 1px solid #f0ece4;
}

/* Last column right, no border */
.td-post-content .table-scroll tr > *:last-child {
    border-right: 0;
}

/* Last row, no bottom border */
.td-post-content .table-scroll tbody tr:last-child > * {
    border-bottom: 0;
}

/* Zebra */
.td-post-content .table-scroll tbody tr:nth-child(even) {
    background: rgba(0,0,0,0.018);
}

/* Hover */
.td-post-content .table-scroll tbody tr:hover {
    background: rgba(0,0,0,0.03);
}

/* Cell text */
.td-post-content .table-scroll td {
    color: #405b5c;
}

/* If markup uses <th> inside tbody, render as a normal cell */
.td-post-content .table-scroll tbody th {
    position: static;
    top: auto;
    z-index: auto;
    background: transparent;
    color: #405b5c;
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: normal;
}

/* Rounded corners on first/last cells */
.td-post-content .table-scroll thead tr:first-child > *:first-child {
    border-top-left-radius: 14px;
}
.td-post-content .table-scroll thead tr:first-child > *:last-child {
    border-top-right-radius: 14px;
}
.td-post-content .table-scroll tbody tr:last-child > *:first-child {
    border-bottom-left-radius: 14px;
}
.td-post-content .table-scroll tbody tr:last-child > *:last-child {
    border-bottom-right-radius: 14px;
}

/* Scrollbar */
.td-post-content .table-scroll::-webkit-scrollbar {
    height: 10px;
}
.td-post-content .table-scroll::-webkit-scrollbar-track {
    background: #f3ede7;
    border-radius: 999px;
}
.td-post-content .table-scroll::-webkit-scrollbar-thumb {
    background: #cbb6a5;
    border-radius: 999px;
}
.td-post-content .table-scroll::-webkit-scrollbar-thumb:hover {
    background: #b99f8b;
}

/* Little "psst, you can scroll this" note floating above the table,
   not a header bar — only matters once the table actually overflows.
   Lives on the outer wrap (no overflow) so it never gets clipped by
   the inner .table-scroll, which has overflow-x: auto. */
.td-post-content .table-scroll-wrap::before {
    content: "Psst, this table scrolls sideways →";
    position: absolute;
    top: -14px;
    left: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: #01175e;
    background: #fff;
    border: 1px solid #e3ddd3;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

/* Responsive */
@media (max-width: 768px) {
    .td-post-content .table-scroll-wrap {
        margin: 2.2rem 0 1.5rem;
    }

    .td-post-content .table-scroll {
        border-radius: 12px;
    }

    .td-post-content .table-scroll table {
        min-width: 620px;
        font-size: 0.9rem;
    }

    .td-post-content .table-scroll th,
    .td-post-content .table-scroll td {
        padding: 12px 14px;
    }
}

/* =========================
   RELATED POST CARD BLOCK
   ========================= */

.td-post-content .wp-block-easycozyhome-related-post-card {
    --ech-rpc-surface: #ffffff;
    --ech-rpc-border: #e3ddd3;
    --ech-rpc-muted-surface: #faf7f2;
    --ech-rpc-title: #1f2937;
    --ech-rpc-body: #405b5c;
    --ech-rpc-accent: #01175e;
    --ech-rpc-accent-soft: rgba(1, 23, 94, 0.06);
    margin: 2.2rem 0;
    position: relative;
}

.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__card {
    display: grid;
    gap: 1rem 1.25rem;
    padding: 1.2rem;
    border: 1px solid var(--ech-rpc-border);
    border-radius: 18px;
    background: var(--ech-rpc-surface);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__frame {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__label,
.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.32rem 0.72rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__label {
    color: var(--ech-rpc-accent);
    background: linear-gradient(to bottom, rgba(0,0,0,.02), rgba(0,0,0,0));
    border-color: var(--ech-rpc-border);
}

.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__badge {
    color: var(--ech-rpc-accent);
    background: var(--ech-rpc-accent-soft);
    border-color: rgba(1, 23, 94, 0.14);
}

.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__media {
    display: block;
    text-decoration: none;
}

.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    object-fit: cover;
}

.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__content {
    display: grid;
    gap: 0.72rem;
    min-width: 0;
}

.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__titleLink {
    display: block;
    width: 100%;
    text-decoration: none;
}

.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__title {
    color: var(--ech-rpc-title);
    font-family: "Work Sans", inherit;
    font-size: 1.32rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__titleLink:hover .ech-rpc__title,
.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__titleLink:focus-visible .ech-rpc__title {
    color: var(--ech-rpc-accent);
}

.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__excerpt {
    margin: 0;
    color: var(--ech-rpc-body);
    font-size: 0.96rem;
    line-height: 1.6;
}

.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__cta {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 0.35rem;
    padding: 0.62rem 0.95rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: var(--ech-rpc-title);
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__cta:hover,
.td-post-content .wp-block-easycozyhome-related-post-card .ech-rpc__cta:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

/* Editorial: imagen lateral + texto, la variante "rica" por defecto */
.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-editorial .ech-rpc__card {
    grid-template-columns: minmax(0, 215px) minmax(0, 1fr);
    align-items: stretch;
    background: linear-gradient(180deg, rgba(250,247,242,.92) 0, rgba(255,255,255,1) 72px);
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-editorial .ech-rpc__frame {
    grid-column: 1 / -1;
    margin: -1.2rem -1.2rem 0;
    padding: 0.9rem 1.2rem 0.8rem;
    border-bottom: 1px solid var(--ech-rpc-border);
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-editorial .ech-rpc__media img {
    width: 100%;
    height: 100%;
    min-height: 220px;
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-editorial .ech-rpc__content {
    align-content: center;
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-editorial .ech-rpc__title {
    font-size: 1.4rem;
}

/* Inline: tarjeta compacta tipo "noticia relacionada" dentro del párrafo */
.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-inline .ech-rpc__card {
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-areas:
        "media frame"
        "media content";
    align-items: center;
    gap: 0.85rem 1rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(250,247,242,.8), rgba(255,255,255,1) 48%);
    box-shadow: none;
    position: relative;
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-inline .ech-rpc__card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 16px 0 0 16px;
    background: var(--ech-rpc-accent);
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-inline .ech-rpc__media {
    grid-area: media;
    width: 100%;
    align-self: stretch;
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-inline .ech-rpc__media img {
    aspect-ratio: 1 / 1;
    height: 100%;
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-inline .ech-rpc__content {
    grid-area: content;
    align-self: center;
    gap: 0.4rem;
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-inline .ech-rpc__frame {
    grid-area: frame;
    align-self: end;
    gap: 0.4rem;
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-inline .ech-rpc__label {
    display: none;
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-inline .ech-rpc__title {
    font-size: 1.02rem;
    line-height: 1.3;
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-inline .ech-rpc__excerpt {
    font-size: 0.88rem;
    line-height: 1.45;
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-inline .ech-rpc__cta {
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--ech-rpc-accent);
    font-size: 0.86rem;
}

/* Highlight: tarjeta destacada a ancho completo, para el "must read" del artículo */
.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-highlight .ech-rpc__card {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    border-color: #d9c9b6;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(31,20,16,.03), rgba(31,20,16,0) 32%),
        linear-gradient(135deg, #faf7f2, #fff 65%);
    box-shadow: 0 18px 42px rgba(0,0,0,.06);
    position: relative;
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-highlight .ech-rpc__card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: linear-gradient(90deg, var(--ech-rpc-accent), #d9c9b6);
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-highlight .ech-rpc__frame {
    justify-content: space-between;
    padding-top: 0.3rem;
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-highlight .ech-rpc__label {
    color: #ffffff;
    background: var(--ech-rpc-accent);
    border-color: var(--ech-rpc-accent);
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-highlight .ech-rpc__title {
    font-size: 1.55rem;
    line-height: 1.1;
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-highlight .ech-rpc__excerpt {
    max-width: 58ch;
    font-size: 1rem;
}

.td-post-content .wp-block-easycozyhome-related-post-card.is-variant-highlight .ech-rpc__cta {
    padding: 0.72rem 1.05rem;
    border-color: var(--ech-rpc-accent);
    background: var(--ech-rpc-accent);
    color: #ffffff;
}

@media (max-width: 720px) {
    .td-post-content .wp-block-easycozyhome-related-post-card.is-variant-editorial .ech-rpc__card {
        grid-template-columns: 1fr;
    }

    .td-post-content .wp-block-easycozyhome-related-post-card.is-variant-editorial .ech-rpc__media img {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }
}

@media (max-width: 560px) {
    .td-post-content .wp-block-easycozyhome-related-post-card.is-variant-inline .ech-rpc__card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "frame"
            "media"
            "content";
    }

    .td-post-content .wp-block-easycozyhome-related-post-card.is-variant-inline .ech-rpc__media img {
        aspect-ratio: 16 / 9;
    }
}
