/**
 * Tiger Portfolio — front-end styles.
 *
 * Widget-scoped class names (tg-pf-*). Typography/colors/borders/paddings
 * are driven by per-widget Elementor Style controls (linkable to Global
 * Colors / Global Fonts). Only structural rules live here.
 *
 * @package TigerElements
 */

/* Filter Buttons */
.tg-pf-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.tg-pf-filter-btn {
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Grid Layout — columns driven by the --tg-pf-cols var (set per-device by the
   Columns control, which carries tablet/mobile defaults). */
.tg-pf-grid {
    display: grid;
    grid-template-columns: repeat(var(--tg-pf-cols, 3), 1fr);
    align-items: stretch;
}

/* Masonry layout: CSS-grid row-span technique. The grid uses 1px auto-rows and
   tiger-portfolio-script.js sets each card's `grid-row-end: span N` from its
   natural height, giving a true left-to-right Pinterest fill (CSS multi-column
   could not distribute cards reliably). Until JS runs, cards align to the top. */
.tg-pf-grid--masonry {
    display: grid;
    grid-template-columns: repeat(var(--tg-pf-cols, 3), 1fr);
    grid-auto-rows: 1px;
    gap: var(--tg-pf-gap, 20px);
    align-items: start;
}
.tg-pf-grid--masonry .tg-pf-item {
    display: block;
    width: auto;
    margin: 0;
}
/* Natural heights in masonry — the equal-height grid forces height:100%, which
   would defeat the staggered look. The image keeps its real aspect ratio. */
.tg-pf-grid--masonry .tg-pf-item,
.tg-pf-grid--masonry .tg-pf-inner { height: auto; }
.tg-pf-grid--masonry .tg-pf-img img { height: auto; }

/* Animation classes */
.tg-pf-item {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    height: 100%;
}

.tg-pf-item.show {
    opacity: 1;
    transform: scale(1);
}

/* Card */
.tg-pf-inner {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tg-pf-inner:hover {
    transform: translateY(-5px);
}

/* Image & tags */
.tg-pf-img {
    position: relative;
    width: 100%;
}

.tg-pf-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.tg-pf-mask {
    display: none;
}

.tg-pf-tags {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 4;
}

/* Content & button */
.tg-pf-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tg-pf-title {
    margin: 0 0 10px;
}

.tg-pf-desc {
    margin: 0 0 15px;
}

.tg-pf-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* ════════════════════════════════════════════════════════════════════════
   CARD-STYLE PRESETS — each is a fundamentally different COMPOSITION, not just
   a chrome tweak, so the five options read as five distinct designs:
     • standard → flat editorial: image, then full caption below, arrow link
     • card     → elevated white box, CENTERED text, pill button, big lift
     • zoom     → image only at rest; hover zooms + reveals a centered overlay
     • overlay  → caption ALWAYS on the image, anchored bottom over a gradient
     • minimal  → bare gallery thumb: image + title only (no desc / no button)
   Structural rules are scoped with the doubled `.tg-pf-grid.tg-pf-layout-*`
   class so the preset wins over the Style-control defaults that target the
   same elements; colours/typography stay overridable.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Standard: flat editorial — rounded image, full caption below, link CTA ─ */
.tg-pf-layout-standard .tg-pf-inner {
    background: transparent;
    border: 0;
    box-shadow: none;
}
.tg-pf-layout-standard .tg-pf-inner:hover { transform: none; }
.tg-pf-layout-standard .tg-pf-img img { height: 240px; border-radius: 10px; }
.tg-pf-layout-standard .tg-pf-content { padding: 16px 2px 0; }
.tg-pf-layout-standard .tg-pf-btn {
    background: transparent;
    padding: 0;
    color: inherit;
    font-weight: 600;
}
.tg-pf-layout-standard .tg-pf-btn::after { content: "→"; transition: transform .25s ease; }
.tg-pf-layout-standard .tg-pf-inner:hover .tg-pf-btn::after { transform: translateX(4px); }

/* ── Card: elevated white box, CENTERED caption, pill button, strong lift ── */
.tg-pf-grid.tg-pf-layout-card .tg-pf-inner {
    background: #fff;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(2, 6, 23, .05), 0 14px 34px rgba(2, 6, 23, .12);
}
.tg-pf-layout-card .tg-pf-img img { height: 210px; }
.tg-pf-grid.tg-pf-layout-card .tg-pf-content {
    padding: 24px;
    text-align: center;
    align-items: center;
}
.tg-pf-grid.tg-pf-layout-card .tg-pf-btn {
    background: #1a73e8;
    color: #fff;
    padding: 10px 24px;
    border-radius: 999px;
    justify-content: center;
}
.tg-pf-grid.tg-pf-layout-card .tg-pf-inner:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 56px rgba(2, 6, 23, .20);
}

/* ── Zoom: image only at rest; hover zooms image + reveals centered caption ─ */
.tg-pf-grid.tg-pf-layout-zoom .tg-pf-inner {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    min-height: 320px;
}
.tg-pf-grid.tg-pf-layout-zoom .tg-pf-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    z-index: 1;
}
.tg-pf-layout-zoom .tg-pf-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.tg-pf-grid.tg-pf-layout-zoom .tg-pf-inner:hover .tg-pf-img img { transform: scale(1.18); }
.tg-pf-grid.tg-pf-layout-zoom .tg-pf-mask {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(10, 12, 28, .6);
    opacity: 0;
    transition: opacity .4s ease;
}
.tg-pf-grid.tg-pf-layout-zoom .tg-pf-inner:hover .tg-pf-mask { opacity: 1; }
.tg-pf-grid.tg-pf-layout-zoom .tg-pf-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 24px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .45s ease, transform .45s ease;
}
.tg-pf-grid.tg-pf-layout-zoom .tg-pf-inner:hover .tg-pf-content {
    opacity: 1;
    transform: none;
}
.tg-pf-layout-zoom .tg-pf-title { color: #fff; }
.tg-pf-layout-zoom .tg-pf-desc  { color: rgba(255, 255, 255, .85); }
.tg-pf-grid.tg-pf-layout-zoom .tg-pf-btn {
    background: #fff;
    color: #111;
    padding: 9px 20px;
    border-radius: 999px;
}

/* ── Overlay: caption ALWAYS on the image, anchored bottom over a gradient ── */
.tg-pf-grid.tg-pf-layout-overlay .tg-pf-inner {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    min-height: 340px;
}
.tg-pf-grid.tg-pf-layout-overlay .tg-pf-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    z-index: 1;
}
.tg-pf-layout-overlay .tg-pf-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.tg-pf-grid.tg-pf-layout-overlay .tg-pf-inner:hover .tg-pf-img img { transform: scale(1.08); }
.tg-pf-grid.tg-pf-layout-overlay .tg-pf-mask {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to top, rgba(6, 8, 18, .9) 0%, rgba(6, 8, 18, .35) 45%, rgba(6, 8, 18, 0) 80%);
    transition: background 0.4s ease;
}
.tg-pf-grid.tg-pf-layout-overlay .tg-pf-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}
.tg-pf-layout-overlay .tg-pf-title { color: #fff; }
.tg-pf-layout-overlay .tg-pf-desc  { color: rgba(255, 255, 255, .85); }
.tg-pf-grid.tg-pf-layout-overlay .tg-pf-btn {
    align-self: flex-start;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .7);
    padding: 8px 18px;
    border-radius: 999px;
}
.tg-pf-grid.tg-pf-layout-overlay .tg-pf-btn:hover {
    background: #fff;
    color: #111;
}

/* ── Minimal: bare gallery thumb — rounded image + title only ──────────── */
.tg-pf-layout-minimal .tg-pf-inner {
    background: transparent;
    border: 0;
    box-shadow: none;
}
.tg-pf-layout-minimal .tg-pf-inner:hover { transform: none; }
.tg-pf-layout-minimal .tg-pf-img img { height: 260px; border-radius: 12px; }
.tg-pf-layout-minimal .tg-pf-content { padding: 12px 2px 0; }
.tg-pf-grid.tg-pf-layout-minimal .tg-pf-desc,
.tg-pf-grid.tg-pf-layout-minimal .tg-pf-btn { display: none; }

/* Responsive — the Columns control sets --tg-pf-cols per device (tablet=2,
   mobile=1 defaults), so no forced overrides are needed here. */
