/* === WP Tiles Reborn – Public Styles === */

/* Grid container — 4 columns desktop, 2 mobile (hardcoded defaults) */
.wptr-grid {
    display: grid;
    grid-template-columns: repeat(var(--wptr-columns, 4), 1fr);
    gap: var(--wptr-gap, 8px);
    width: 100%;
    box-sizing: border-box;
}

/* Individual tile — always square */
.wptr-tile {
    position: relative;
    overflow: hidden;
    border-radius: var(--wptr-radius, 4px);
    aspect-ratio: 1 / 1;
    background-color: var(--wptr-fallback, #3a86ff);
}

/* Background image */
.wptr-tile-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

/* Transparent overlay — always present, deepens on hover */
.wptr-tile-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

/* Overlay darkens on hover for ALL hover modes */
.wptr-tile:hover .wptr-tile-overlay {
    background: var(--wptr-overlay-hover, rgba(0, 0, 0, 0.45));
}

/* Text content block — title always visible at bottom */
.wptr-tile-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.7rem 0.9rem 0.8rem;
    color: #fff;
    z-index: 2;
    /* Subtle gradient so title stays readable without a full overlay */
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%);
}

/* Title — ALWAYS visible */
.wptr-tile-title {
    margin: 0 0 0.25em;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    /* No border, no underline, no decoration */
    border: none;
    text-decoration: none;
}

.wptr-tile-excerpt {
    margin: 0 0 0.4em;
    font-size: 0.82rem;
    line-height: 1.4;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wptr-tile-date {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
    letter-spacing: 0.02em;
}

.wptr-tile-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255,255,255,0.2);
    padding: 0.15em 0.5em;
    border-radius: 2px;
    margin-bottom: 0.4em;
}

/* Link reset — no underline anywhere inside a tile */
.wptr-tile-link {
    display: block;
    position: absolute;
    inset: 0;
    text-decoration: none;
    color: inherit;
    z-index: 1;
}
.wptr-tile-link:hover,
.wptr-tile-link:focus {
    text-decoration: none;
    color: inherit;
}

/* =====================
   HOVER EFFECTS
   ===================== */

/* --- slide-up ---
   Extra content (excerpt, date) hidden below, slides up on hover.
   Title is always visible (stays in normal flow at bottom). */
.wptr-hover-slide-up .wptr-tile-excerpt,
.wptr-hover-slide-up .wptr-tile-date,
.wptr-hover-slide-up .wptr-tile-category {
    transform: translateY(1rem);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.35s ease;
}
.wptr-hover-slide-up .wptr-tile:hover .wptr-tile-excerpt,
.wptr-hover-slide-up .wptr-tile:hover .wptr-tile-date,
.wptr-hover-slide-up .wptr-tile:hover .wptr-tile-category {
    transform: translateY(0);
    opacity: 1;
}

/* --- fade-in ---
   Extra content fades in; title always visible. */
.wptr-hover-fade-in .wptr-tile-excerpt,
.wptr-hover-fade-in .wptr-tile-date,
.wptr-hover-fade-in .wptr-tile-category {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.wptr-hover-fade-in .wptr-tile:hover .wptr-tile-excerpt,
.wptr-hover-fade-in .wptr-tile:hover .wptr-tile-date,
.wptr-hover-fade-in .wptr-tile:hover .wptr-tile-category {
    opacity: 1;
}

/* --- always --- all content always visible, overlay deepens on hover (handled above) */

/* --- zoom --- background zooms in on hover */
.wptr-hover-zoom .wptr-tile:hover .wptr-tile-bg {
    transform: scale(1.08);
}

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

.wptr-anim-fade .wptr-tile {
    animation: wptr-fade-in 0.6s ease both;
}
@keyframes wptr-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.wptr-anim-rise .wptr-tile {
    animation: wptr-rise 0.55s ease both;
}
@keyframes wptr-rise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wptr-anim-scale .wptr-tile {
    animation: wptr-scale 0.5s ease both;
}
@keyframes wptr-scale {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* Staggered entrance delays */
.wptr-tile:nth-child(1)  { animation-delay: 0.00s; }
.wptr-tile:nth-child(2)  { animation-delay: 0.06s; }
.wptr-tile:nth-child(3)  { animation-delay: 0.12s; }
.wptr-tile:nth-child(4)  { animation-delay: 0.18s; }
.wptr-tile:nth-child(5)  { animation-delay: 0.24s; }
.wptr-tile:nth-child(6)  { animation-delay: 0.30s; }
.wptr-tile:nth-child(7)  { animation-delay: 0.36s; }
.wptr-tile:nth-child(8)  { animation-delay: 0.42s; }
.wptr-tile:nth-child(9)  { animation-delay: 0.48s; }
.wptr-tile:nth-child(10) { animation-delay: 0.54s; }
.wptr-tile:nth-child(11) { animation-delay: 0.60s; }
.wptr-tile:nth-child(12) { animation-delay: 0.66s; }

/* =====================
   RESPONSIVE
   Desktop: 4 cols (from --wptr-columns default)
   Tablet:  2 cols
   Mobile:  2 cols (never 1, per wens)
   ===================== */
@media (max-width: 900px) {
    .wptr-grid {
        --wptr-columns: 2 !important;
    }
}

/* No posts message */
.wptr-no-posts {
    color: #666;
    font-style: italic;
}

/* =====================
   THEMA RESET
   Voorkomt dat thema-stijlen een stippellijn of border
   onder of rond de tegel zetten (artikel, h3, a, li etc.)
   ===================== */
.wptr-grid,
.wptr-grid *,
.wptr-grid *::before,
.wptr-grid *::after {
    box-sizing: border-box;
}

.wptr-tile,
.wptr-tile article,
.wptr-tile li {
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
    outline: none !important;
    box-shadow: none !important;
    list-style: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Stippellijn komt vaak van thema's via a, h2, h3 — alles resetten binnen een tile */
.wptr-tile a,
.wptr-tile a:hover,
.wptr-tile a:focus,
.wptr-tile a:visited {
    text-decoration: none !important;
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.wptr-tile h1,
.wptr-tile h2,
.wptr-tile h3,
.wptr-tile h4,
.wptr-tile h5,
.wptr-tile h6 {
    border: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* =====================
   TITEL AANPASSEN
   Gebruik deze selectors in je thema of extra CSS
   om de tegel-titel te stylen:

   Basis:
   .wptr-tile-title { }

   Titel per hover-effect:
   .wptr-hover-slide-up .wptr-tile-title { }
   .wptr-hover-zoom .wptr-tile-title { }

   Titel van de eerste (grote) tile:
   .wptr-tile:first-child .wptr-tile-title { }

   Voorbeelden:
   .wptr-tile-title {
       font-size: 1rem;
       font-weight: 700;
       font-family: Georgia, serif;
       color: #ffffff;
       text-transform: uppercase;
       letter-spacing: 0.05em;
       text-shadow: 0 1px 4px rgba(0,0,0,0.6);
   }
   ===================== */
