/* ============================================================
   Creative Wellness Grid — Front-end Stylesheet
   ============================================================ */

/* Google Font import — Cormorant Garamond (display) + Jost (body) */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600&family=Jost:wght@300;400;500&display=swap');

/* ── Root defaults ─────────────────────────────────────────── */
.cwg-grid *,
.cwg-grid *::before,
.cwg-grid *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Outer grid ────────────────────────────────────────────── */
.cwg-grid {
    display: flex;
    width: 100%;
    height: 540px;       /* overridden by Elementor control */
    gap: 2px;            /* overridden by Elementor control */
    overflow: hidden;
    font-family: 'Jost', sans-serif;
}

/* ── Hero panel ────────────────────────────────────────────── */
.cwg-hero {
    position: relative;
    flex: 0 0 43%;       /* overridden by Elementor control */
    background-size: cover;
    background-position: center;
    background-color: #2a2a2a;
    overflow: hidden;
}

/* Dark overlay on hero */
.cwg-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    pointer-events: none;
}

.cwg-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 36px;
    z-index: 2;
}

/* ── Cards wrapper ─────────────────────────────────────────── */
.cwg-cards-wrap {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;            /* overridden by Elementor control */
}

/* ── Individual card ───────────────────────────────────────── */
.cwg-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Image overlay (when card has a background image) */
.cwg-img-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* Hover tint overlay */
.cwg-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.30);
    opacity: 0;
    transition: opacity 400ms ease;
    z-index: 2;
    pointer-events: none;
}

.cwg-card:hover .cwg-hover-overlay {
    opacity: 1;
}

/* ── Default card content ──────────────────────────────────── */
.cwg-default-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px 32px;
    z-index: 3;
    transition: opacity 400ms ease, transform 400ms ease;
}

.cwg-card:hover .cwg-default-content {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}

/* ── Hover card content ────────────────────────────────────── */
.cwg-hover-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px 32px;
    z-index: 4;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 400ms ease, transform 400ms ease;
    pointer-events: none;
}

.cwg-card:hover .cwg-hover-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Slot number (large, top-right) ────────────────────────── */
.cwg-number {
    position: absolute;
    top: 18px;
    right: 24px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 72px;
    font-weight: 300;
    line-height: 1;
    color: rgba(245,237,224,0.15);
    user-select: none;
    pointer-events: none;
    letter-spacing: -2px;
}

/* ── Tag row (line + label) ────────────────────────────────── */
.cwg-tag-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cwg-tag-line {
    display: inline-block;
    width: 28px;
    height: 1px;
    background-color: #c9a07a;
    flex-shrink: 0;
}

.cwg-tag {
    font-family: 'Jost', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c9a07a;
}

/* ── Title ─────────────────────────────────────────────────── */
.cwg-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.2;
    color: #f5ede0;
    margin-bottom: 8px;
}

/* Hero title is slightly larger */
.cwg-hero .cwg-title {
    font-size: 36px;
}

/* ── Meta ───────────────────────────────────────────────────── */
.cwg-meta {
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: rgba(245,237,224,0.65);
    margin-bottom: 0;
}

/* ── Description (hover only) ──────────────────────────────── */
.cwg-desc {
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    font-weight: 300;
    line-height: 1.65;
    color: rgba(245,237,224,0.90);
    margin-top: 14px;
    margin-bottom: 18px;
}

/* ── Explore link ───────────────────────────────────────────── */
.cwg-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Jost', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    color: #f5ede0;
    position: relative;
    padding-bottom: 3px;
}

.cwg-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: #f5ede0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 300ms ease;
}

.cwg-card:hover .cwg-link:hover::after {
    transform: scaleX(1);
}

.cwg-arrow {
    font-size: 14px;
    transition: transform 250ms ease;
}

.cwg-link:hover .cwg-arrow {
    transform: translateX(4px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .cwg-grid {
        height: auto;
        flex-direction: column;
    }

    .cwg-hero {
        flex: none;
        height: 320px;
    }

    .cwg-cards-wrap {
        flex: none;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .cwg-card {
        min-height: 200px;
    }
}

@media (max-width: 600px) {
    .cwg-cards-wrap {
        grid-template-columns: 1fr;
    }

    .cwg-hero {
        height: 260px;
    }

    .cwg-card {
        min-height: 180px;
    }

    .cwg-number {
        font-size: 52px;
    }

    .cwg-title {
        font-size: 22px;
    }

    .cwg-hero .cwg-title {
        font-size: 28px;
    }
}

/* ── Touch / tap active state ───────────────────────────────── */
.cwg-card.cwg-touch-active .cwg-hover-overlay      { opacity: 1; }
.cwg-card.cwg-touch-active .cwg-default-content    { opacity: 0; transform: translateY(12px); pointer-events: none; }
.cwg-card.cwg-touch-active .cwg-hover-content      { opacity: 1; transform: translateY(0);    pointer-events: auto; }
