/* === Posts grid (la vista posts/index i posts/show) === */
.tlg-section {
    padding: 60px 20px;
}
.tlg-container {
    max-width: 1200px;
    margin: 0 auto;
}
.tlg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 2rem;
}
@media (max-width: 1024px) {
    .tlg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .tlg-grid { grid-template-columns: 1fr; }
}

.tlg-post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s, box-shadow 0.25s;
}
.tlg-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.tlg-post-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.tlg-post-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tlg-post-card time {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.tlg-post-card h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px 0;
    color: #000;
}

.tlg-post-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 0 0 16px 0;
    flex: 1;
}

.tlg-readmore {
    color: #FF7517;
    font-weight: 600;
    font-size: 14px;
    margin-top: auto;
}

/* Pagination */
.tlg-pagination {
    text-align: center;
}
.tlg-pagination nav {
    display: inline-flex;
}
.tlg-pagination a, .tlg-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}
.tlg-pagination a:hover {
    background: #FF7517;
    color: #fff;
    border-color: #FF7517;
}
.tlg-pagination .active span,
.tlg-pagination [aria-current] span {
    background: #FF7517;
    color: #fff;
    border-color: #FF7517;
}

/* h1 de la pàgina /noticias o /news */
.tlg-section > .tlg-container > h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 3rem;
}

/* Single post page */
.tlg-post {
    max-width: 900px;
    margin: 0 auto;
}
.tlg-post-cover {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 2rem;
}
.tlg-post-meta {
    color: #888;
    font-size: 14px;
    margin-bottom: 1rem;
}
.tlg-post h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.tlg-post-body {
    line-height: 1.7;
}
.tlg-post-body img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
}

/* === Watermark de categoria al post (rey-postItem-catText) — força la visibilitat === */
@media (min-width:1025px) {
    .rey-postItem-catText {
        display: flex !important;
        justify-content: center;
        max-width: 100vw;
        overflow: hidden;
        font-size: 14vw;
        font-weight: 600;
        line-height: 1;
        position: absolute;
        opacity: 0.04;
        color: #000;
        top: -50px;
        text-transform: uppercase;
        white-space: nowrap;
        pointer-events: none;
        left: 50%;
        transform: translateX(-50%);
    }
    @supports (-webkit-text-stroke-color: currentColor) and (-webkit-text-fill-color: transparent) {
        .rey-postItem-catText {
            opacity: 0.07;
            -webkit-text-fill-color: transparent;
            -webkit-text-stroke-color: currentColor;
            -webkit-text-stroke-width: 2px;
        }
    }
    .rey-postItem-catText + .rey-postHeader {
        padding-top: 80px;
    }
}

/* Layout del post individual */
.rey-siteMain {
    padding: 60px 20px;
}
.rey-siteMain-inner {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}
.rey-postItem {
    position: relative;
}
.rey-postHeader {
    position: relative;
    margin-bottom: 30px;
    z-index: 2;
}
.rey-postTitle {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.7px;
    margin-bottom: 20px;
    color: #000;
}
@media (min-width: 1025px) {
    .rey-postTitle {
        font-size: 42px;
    }
}
.rey-postInfo {
    color: #888;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
}
.rey-postMedia {
    position: relative;
    margin: 0 0 30px 0;
    z-index: 2;
}
.rey-postMedia img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}
.rey-postContent {
    position: relative;
    z-index: 2;
    font-size: 17px;
    line-height: 1.7;
    color: #333;
}
.rey-postContent p {
    margin-bottom: 1.25em;
}
