/* ==========================================================================
   WEDORA — Theme Cards (infographic style)
   A white rounded panel with a coloured tab on top and a coloured block
   offset behind it. Used on the home page and the themes gallery.
   ========================================================================== */

.tc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 2.25rem;
    align-items: start;
    /* clearance for the offset block behind each card, plus breathing room
       before whatever follows the grid */
    margin-bottom: 4rem;
}

/* ---- The card ---------------------------------------------------------- */
.tc-card {
    --tc-accent:      #be185d;
    --tc-accent-soft: #fdf2f8;
    --tc-accent-deep: #9d174d;

    position: relative;
    padding: 0 14px 14px 0;          /* room for the offset block behind */
    isolation: isolate;
}

/* the coloured block peeking out bottom-right */
.tc-card::before {
    content: "";
    position: absolute;
    inset: 42px 0 0 24px;
    border-radius: 26px;
    background: var(--tc-accent);
    opacity: .9;
    z-index: -1;
    transition: inset .4s cubic-bezier(.22,.61,.36,1), opacity .4s ease;
}
.tc-card:hover::before { inset: 42px 0 0 18px; opacity: 1; }

/* ---- Coloured tab ------------------------------------------------------ */
.tc-tab {
    position: relative;
    z-index: 2;
    display: block;
    width: 76%;
    margin: 0 auto;
    padding: .7rem 1rem .85rem;
    background: var(--tc-accent);
    color: #ffffff;
    text-align: center;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    border-radius: 14px 14px 22px 22px;
}
/* the little wings that tuck the tab into the card */
.tc-tab::before,
.tc-tab::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 22px;
    height: 22px;
    background: var(--tc-accent);
    z-index: -1;
}
.tc-tab::before { left: -14px;  border-bottom-right-radius: 22px; }
.tc-tab::after  { right: -14px; border-bottom-left-radius: 22px; }

/* ---- White body -------------------------------------------------------- */
.tc-body {
    position: relative;
    z-index: 1;
    margin-top: -14px;
    background: #ffffff;
    border-radius: 24px;
    padding: 2.25rem 1.6rem 1.75rem;
    text-align: center;
    box-shadow: 0 14px 34px -22px rgba(15, 23, 42, .4);
    transition: transform .4s cubic-bezier(.22,.61,.36,1), box-shadow .4s ease;
}
.tc-card:hover .tc-body {
    transform: translateY(-5px);
    box-shadow: 0 22px 44px -22px rgba(15, 23, 42, .45);
}

.tc-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--tc-accent-deep);
    margin: 0 0 1.25rem;
    text-transform: uppercase;
}

/* ---- Thumbnail + badge ------------------------------------------------- */
/* The figure does NOT clip, so the badge can straddle the thumbnail edge.
   The thumb inside it does the clipping for the image. */
.tc-figure {
    position: relative;
    margin-bottom: 2.25rem;
}
.tc-thumb {
    border-radius: 18px;
    overflow: hidden;
    background: var(--tc-accent-soft);
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    padding: .75rem;
}
.tc-thumb img {
    width: 100%;
    height: 100%;
    /* contain, so the full 800x500 artwork shows rather than being cropped */
    object-fit: contain;
    display: block;
    transition: transform .6s cubic-bezier(.22,.61,.36,1);
}
.tc-card:hover .tc-thumb img { transform: scale(1.04); }

/* small accent disc straddling the thumbnail edge, like the reference icon */
.tc-badge {
    position: absolute;
    left: 50%;
    bottom: -22px;
    transform: translateX(-50%);
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--tc-accent);
    color: var(--tc-accent);
    font-size: 1.15rem;
    line-height: 1;
    box-shadow: 0 6px 14px -8px rgba(15, 23, 42, .5);
}

.tc-desc {
    font-size: .93rem;
    line-height: 1.7;
    color: #64748b;
    margin: 0 0 1.5rem;
}

/* ---- Actions ----------------------------------------------------------- */
.tc-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .6rem;
    align-items: stretch;
}

.tc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: .8rem;
    font-weight: 600;
    padding: .8rem 1rem;
    border-radius: 12px;
    border: 1px solid transparent;
    line-height: 1.3;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.tc-btn-ghost {
    border-color: #e2e8f0;
    color: #334155;
}
.tc-btn-ghost:hover {
    border-color: var(--tc-accent);
    color: var(--tc-accent);
    background: var(--tc-accent-soft);
}
.tc-btn-solid {
    background: var(--tc-accent);
    color: #ffffff;
    white-space: nowrap;
}
.tc-btn-solid:hover { background: var(--tc-accent-deep); color: #ffffff; }

/* ==========================================================================
   Per-theme accents — matched to each theme's own artwork
   ========================================================================== */
.tc-card--rose {
    --tc-accent:      #be185d;
    --tc-accent-soft: #fdf2f8;
    --tc-accent-deep: #9d174d;
}
.tc-card--gold {
    --tc-accent:      #b45309;
    --tc-accent-soft: #fffbeb;
    --tc-accent-deep: #8a3f07;
}
.tc-card--navy {
    --tc-accent:      #1e3a8a;
    --tc-accent-soft: #eef2ff;
    --tc-accent-deep: #172b63;
}

/* ==========================================================================
   Responsive & motion
   ========================================================================== */
@media (max-width: 480px) {
    .tc-actions { grid-template-columns: 1fr; }
    .tc-body { padding: 2rem 1.25rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .tc-card::before,
    .tc-body,
    .tc-thumb img { transition: none; }
    .tc-card:hover .tc-body { transform: none; }
}
