/*!
 * IndexGPT Events — frontend styles
 *
 * Typography is theme-driven by design: the module does not enqueue or
 * declare any web fonts. Text inherits the active theme's body + heading
 * font families. To impose the Conscious Mallorca editorial look (Cormorant
 * Garamond display + Plus Jakarta Sans body), add to your child theme:
 *
 *   .igpt-events h1, .igpt-events h2, .igpt-events h3, .igpt-events h4 {
 *    *   }
 */

.igpt-events {
    --igpt-primary: #3aa6a5;
    --igpt-primary-dark: #2a8584;
    --igpt-primary-soft: #d8eded;
    --igpt-hero: #0d3d44;
    --igpt-hero-deep: #0a2e34;
    --igpt-accent: #d99c30;
    --igpt-featured: #f4b740;
    --igpt-text: #0a2e34;
    --igpt-text-soft: #4b6770;
    --igpt-text-faint: #8fa1a8;
    --igpt-background: #ffffff;
    --igpt-bg-soft: #f7faf9;
    --igpt-bg-tint: #eef5f4;
    --igpt-line: #e3eaec;
    --igpt-line-soft: #eef2f3;
    --igpt-shadow-card: 0 1px 2px rgba(10,46,52,0.04), 0 8px 24px -8px rgba(10,46,52,0.10);
    color: var(--igpt-text);
    line-height: 1.55;
}
.igpt-events *,
.igpt-events *::before,
.igpt-events *::after { box-sizing: border-box; }
.igpt-events a { color: inherit; text-decoration: none; }

/* ============== HERO ============== */
.igpt-hero {
    position: relative;
    background: var(--igpt-hero);
    color: #fff;
    padding: 64px 56px 72px;
    overflow: hidden;
    border-radius: 14px;
}
.igpt-hero::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(900px 380px at 80% 20%, color-mix(in srgb, var(--igpt-primary) 40%, transparent), transparent 60%),
        radial-gradient(700px 300px at 10% 90%, color-mix(in srgb, var(--igpt-accent) 18%, transparent), transparent 60%);
    pointer-events: none;
}
.igpt-hero-inner { position: relative; max-width: 1100px; margin: 0 auto; }
.igpt-hero .eyebrow {
    font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--igpt-primary); font-weight: 700; margin-bottom: 14px;
}
.igpt-hero h1 {
    color: #fff;
    font-size: clamp(36px, 5vw, 64px); line-height: 1.04; margin: 0 0 14px;
    letter-spacing: -0.01em;
}
.igpt-hero h1 em { font-style: italic; color: var(--igpt-primary); }
.igpt-hero .lede { color: #fff; font-size: 17px; max-width: 600px; opacity: 0.85; margin: 0 0 32px; }
.igpt-hero .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.igpt-hero .ics-help { font-size: 12px; color: rgba(255,255,255,0.65); margin-left: 10px; display: inline-flex; align-items: center; gap: 6px; }

/* ============== BUTTONS ============== */
.igpt-btn-cta {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--igpt-primary); color: #fff;
    padding: 14px 22px; border-radius: 999px;
    font-weight: 600; font-size: 14px;
    border: none; cursor: pointer;
}
.igpt-btn-cta:hover { background: var(--igpt-primary-dark); }
.igpt-btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; color: #fff;
    padding: 14px 22px; border-radius: 999px;
    font-weight: 600; font-size: 14px;
    border: 1px solid rgba(255,255,255,0.3);
}

/* ============== CAT STRIP ============== */
.igpt-cat-strip {
    background: #fff;
    padding: 18px 36px;
    border-bottom: 1px solid var(--igpt-line-soft);
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    border-radius: 0 0 14px 14px;
}
.igpt-cat-strip .lbl {
    font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--igpt-text-faint); margin-right: 4px;
}
.igpt-cat-strip .chip {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--igpt-bg-tint);
    font-size: 13px; font-weight: 600; color: var(--igpt-text);
    cursor: pointer; border: 1px solid transparent;
}
.igpt-cat-strip .chip:hover { background: var(--igpt-primary-soft); }
.igpt-cat-strip .chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.igpt-cat-strip .chip.active { background: var(--igpt-hero-deep); color: #fff; }
.igpt-cat-strip .chip.featured { background: var(--igpt-featured); color: #fff; }
.igpt-cat-strip .chip.featured::before { content: '★'; margin-right: 1px; }
.igpt-cat-strip .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.igpt-cat-strip .view-toggle {
    display: inline-flex; gap: 0; border: 1px solid var(--igpt-line);
    border-radius: 999px; overflow: hidden;
}
.igpt-cat-strip .view-toggle .t {
    padding: 6px 14px; font-size: 12px; font-weight: 600;
    color: var(--igpt-text-soft); cursor: pointer;
}
.igpt-cat-strip .view-toggle .t.active { background: var(--igpt-hero-deep); color: #fff; }
.igpt-cat-strip .view-jumps {
    display: inline-flex;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--igpt-text-soft);
}
.igpt-cat-strip .view-jumps a {
    display: inline-flex; align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--igpt-bg-tint);
    color: var(--igpt-text);
    text-decoration: none;
    transition: background 0.15s;
}
.igpt-cat-strip .view-jumps a::before {
    content: '↓';
    margin-right: 5px;
    font-weight: 700;
    color: var(--igpt-primary-dark);
}
.igpt-cat-strip .view-jumps a:hover { background: var(--igpt-primary-soft); }

/* ============== SECTION ============== */
.igpt-section { padding: 40px 36px; background: #fff; }
.igpt-section .section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 22px; gap: 16px;
}
.igpt-section .section-head h2 {
    font-size: 34px; margin: 0; letter-spacing: -0.005em;
    color: var(--igpt-hero-deep);
}
.igpt-events h1, .igpt-events h2, .igpt-events h3, .igpt-events h4 { color: inherit; }
.igpt-feat-card h3 { color: #fff; }
.igpt-feat-card .read { color: var(--igpt-hero-deep); }
.igpt-section .section-head .sub { font-size: 13px; color: var(--igpt-text-soft); }

/* ============== FEATURED CAROUSEL ============== */
.igpt-featured {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 18px;
}
@media (max-width: 900px) {
    .igpt-featured { grid-template-columns: 1fr; }
}
.igpt-feat-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 380px;
    color: #fff;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 22px;
    box-shadow: var(--igpt-shadow-card);
    background-size: cover; background-position: center;
}
.igpt-feat-card::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,46,52,0) 30%, rgba(10,46,52,0.85) 100%);
    z-index: 0;
}
.igpt-feat-card > * { position: relative; z-index: 1; }
.igpt-feat-card .feat-tag {
    position: absolute; top: 18px; left: 18px;
    background: rgba(255,255,255,0.96); color: var(--igpt-text);
    padding: 5px 11px; border-radius: 999px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
    z-index: 2;
}
.igpt-feat-card .feat-tag.gold { background: var(--igpt-featured); color: #fff; }
.igpt-feat-card .meta {
    font-size: 12px; opacity: 0.85; font-weight: 500;
    display: flex; gap: 10px; margin-bottom: 8px;
}
.igpt-feat-card h3 {
    font-size: 28px; margin: 0 0 10px; line-height: 1.1; letter-spacing: -0.005em;
}
.igpt-feat-card.lg h3 { font-size: 36px; }
.igpt-feat-card .who { font-size: 13px; opacity: 0.85; margin-bottom: 14px; }
.igpt-feat-card .who strong { font-weight: 600; }
.igpt-feat-card .feat-foot {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px;
}
.igpt-feat-card .price { font-weight: 700; font-size: 14px; }
.igpt-feat-card .read {
    background: #fff; color: var(--igpt-hero-deep);
    padding: 8px 14px; border-radius: 999px;
    font-weight: 600; font-size: 12px;
}

/* ============== DAY GROUP / EVENT ROW ============== */
.igpt-day-group { margin-bottom: 32px; }
.igpt-day-group .day-head {
    display: flex; align-items: baseline; gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--igpt-line);
    margin-bottom: 16px;
}
.igpt-day-group .day-head .num {
    font-size: 38px; color: var(--igpt-hero-deep); line-height: 1;
}
.igpt-day-group .day-head .label { font-size: 13px; color: var(--igpt-text-soft); font-weight: 600; }
.igpt-day-group .day-head .label strong { color: var(--igpt-text); display: block; font-size: 16px; font-weight: 700; }
.igpt-day-group .day-head .count { margin-left: auto; font-size: 12px; color: var(--igpt-text-faint); font-weight: 500; }

.igpt-event-row {
    display: grid;
    grid-template-columns: 180px 1fr 220px 140px;
    gap: 22px;
    padding: 18px 0;
    border-bottom: 1px solid var(--igpt-line-soft);
    align-items: center;
    cursor: pointer;
    transition: background 0.15s;
}
.igpt-event-row:hover { background: var(--igpt-bg-soft); }
.igpt-event-row .ev-img {
    width: 180px; height: 120px;
    border-radius: 10px;
    background-size: cover; background-position: center;
    background-color: var(--igpt-bg-tint);
    position: relative;
    overflow: hidden;
}
.igpt-event-row .ev-img .cat-flag {
    position: absolute; top: 10px; left: 10px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
    background: rgba(255,255,255,0.95);
}
.igpt-event-row .ev-body .time {
    font-size: 12px; font-weight: 600; color: var(--igpt-primary-dark);
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 6px;
}
.igpt-event-row .ev-body h4 {
    color: var(--igpt-hero-deep);
    font-size: 26px; margin: 0 0 6px; line-height: 1.15;
}
.igpt-event-row .ev-body .desc {
    font-size: 13px; color: var(--igpt-text-soft); margin: 0 0 8px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.igpt-event-row .ev-body .org {
    font-size: 12px; color: var(--igpt-text-soft);
    display: flex; align-items: center; gap: 6px;
}
.igpt-event-row .ev-body .org .av {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--igpt-bg-tint); display: inline-block;
}
.igpt-event-row .ev-meta { font-size: 13px; color: var(--igpt-text-soft); }
.igpt-event-row .ev-meta .loc { color: var(--igpt-text); font-weight: 600; margin-bottom: 4px; }
.igpt-event-row .ev-meta .langs { font-size: 11px; color: var(--igpt-text-faint); margin-top: 6px; letter-spacing: 0.06em; }
.igpt-event-row .ev-meta .langs span { padding: 2px 6px; border: 1px solid var(--igpt-line); border-radius: 4px; margin-right: 4px; }
.igpt-event-row .ev-action { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.igpt-event-row .ev-action .price { font-size: 17px; font-weight: 700; color: var(--igpt-text); }
.igpt-event-row .ev-action .btn-mini {
    background: var(--igpt-primary); color: #fff;
    padding: 7px 14px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
}

@media (max-width: 900px) {
    .igpt-event-row {
        grid-template-columns: 100px 1fr;
        gap: 14px;
    }
    .igpt-event-row .ev-img { width: 100px; height: 90px; }
    .igpt-event-row .ev-meta,
    .igpt-event-row .ev-action { grid-column: 2; }
}

.igpt-empty { text-align: center; padding: 40px 0; color: var(--igpt-text-soft); }

/* ============== MONTH GRID ============== */
.igpt-month-bar {
    display: flex; align-items: center; padding: 22px 36px;
    border-bottom: 1px solid var(--igpt-line);
    gap: 20px;
    background: #fff;
}
.igpt-month-bar .nav-pill {
    display: inline-flex; align-items: center; gap: 16px;
    padding: 8px 14px;
    border: 1px solid var(--igpt-line);
    border-radius: 999px;
    font-weight: 600; font-size: 14px;
}
.igpt-month-bar .nav-pill .arrow {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--igpt-bg-tint); display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; cursor: pointer;
}
.igpt-month-bar h2 { font-size: 36px; margin: 0; letter-spacing: -0.005em; color: var(--igpt-hero-deep); }
.igpt-month-bar .today {
    padding: 8px 14px; border-radius: 999px;
    background: var(--igpt-bg-tint); font-size: 13px; font-weight: 600;
}

.igpt-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--igpt-line);
    padding: 1px;
}
.igpt-cal-grid .dow {
    background: var(--igpt-bg-soft);
    padding: 10px 8px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--igpt-text-faint);
}
.igpt-cal-grid .cal-cell {
    background: #fff;
    min-height: 120px;
    padding: 8px;
    position: relative;
    display: flex; flex-direction: column; gap: 4px;
}
.igpt-cal-grid .cal-cell.muted { background: var(--igpt-bg-soft); color: var(--igpt-text-faint); }
.igpt-cal-grid .cal-cell.today { box-shadow: inset 0 0 0 2px var(--igpt-primary); }
.igpt-cal-grid .cal-cell .d {
    font-size: 22px; font-weight: 600;
    color: var(--igpt-hero-deep);
    margin-bottom: 4px;
}
.igpt-cal-grid .ev-pill {
    display: block;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 11px; font-weight: 600;
    color: var(--igpt-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.igpt-cal-grid .ev-pill .t { font-family: ui-monospace, Menlo, monospace; opacity: 0.7; margin-right: 4px; }
.igpt-cal-grid .ev-pill.more {
    background: transparent; color: var(--igpt-text-faint); font-weight: 500;
}

@media (max-width: 768px) {
    .igpt-month-bar {
        flex-wrap: wrap;
        padding: 14px 16px;
        gap: 10px;
    }
    .igpt-month-bar h2 {
        order: -1;
        flex: 1 0 100%;
        font-size: 22px;
        text-align: center;
    }
    .igpt-month-bar .nav-pill { padding: 6px 10px; gap: 10px; font-size: 13px; }
    .igpt-month-bar .nav-pill > span { display: none; }
    .igpt-month-bar .today { margin-left: auto; padding: 6px 12px; font-size: 12px; }

    .igpt-cal-grid .dow { padding: 6px 2px; font-size: 9px; letter-spacing: 0.06em; }
    .igpt-cal-grid .cal-cell { min-height: 72px; padding: 4px; gap: 2px; }
    .igpt-cal-grid .cal-cell .d { font-size: 14px; margin-bottom: 2px; }
    .igpt-cal-grid .ev-pill { padding: 2px 5px; font-size: 10px; border-radius: 4px; }
    .igpt-cal-grid .ev-pill .t { display: none; }
}

@media (max-width: 480px) {
    .igpt-cal-grid .cal-cell { min-height: 56px; padding: 3px; }
    .igpt-cal-grid .cal-cell .d { font-size: 12px; }
    /* Day cells are too narrow to show pill text — collapse pills to thin
     * coloured bars so each cell still communicates "something happens" via
     * the category colour. The `+N more` pill keeps its text. */
    .igpt-cal-grid .ev-pill:not(.more) {
        height: 5px;
        padding: 0;
        border-radius: 3px;
        overflow: hidden;
        text-indent: -9999px;
    }
    .igpt-cal-grid .ev-pill.more { font-size: 9px; padding: 0; }
}

/* ============== MAP ============== */
.igpt-events-map { background: var(--igpt-bg-soft); padding: 12px; border-radius: 14px; }
.igpt-leaflet { width: 100%; border-radius: 12px; overflow: hidden; }
.igpt-pin {
    display: flex; align-items: center; justify-content: center;
}
.igpt-pin .pin-dot {
    display: block; width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid #fff; box-shadow: 0 2px 6px rgba(10,46,52,0.35);
}
.igpt-popup strong { display: block; font-size: 18px; color: var(--igpt-hero-deep); margin-bottom: 4px; }
.igpt-popup .loc { font-size: 12px; color: var(--igpt-text-soft); margin-bottom: 6px; }
.igpt-popup .when { font-size: 12px; color: var(--igpt-primary-dark); font-weight: 600; }
.igpt-popup .btn {
    display: inline-block; margin-top: 8px;
    background: var(--igpt-primary); color: #fff;
    padding: 5px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 600;
}
