/* ═══════════════════════════════════════════════════════════════
   Inspiration — /inspire  (Mindtrip-style, full redesign)
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS custom properties ────────────────────────────────────── */
:root,
html.dark {
    --ip-text:          #f0f0f0;
    --ip-text-sub:      rgba(255,255,255,.65);
    --ip-muted:         rgba(255,255,255,.4);
    --ip-border:        rgba(255,255,255,.1);
    --ip-input-bg:      rgba(255,255,255,.06);
    --ip-input-border:  rgba(255,255,255,.12);
    --gcard-bg:         rgba(255,255,255,.04);
    --gcard-shadow:     rgba(0,0,0,.5);
    --gcard-ph:         rgba(255,255,255,.08);
    --gcard-border:     rgba(255,255,255,.08);
}
html:not(.dark) {
    --ip-text:          #111;
    --ip-text-sub:      #444;
    --ip-muted:         #888;
    --ip-border:        rgba(0,0,0,.08);
    --ip-input-bg:      #fff;
    --ip-input-border:  rgba(0,0,0,.12);
    --gcard-bg:         #fff;
    --gcard-shadow:     rgba(0,0,0,.1);
    --gcard-ph:         #f3f4f6;
    --gcard-border:     rgba(0,0,0,.08);
}

/* ── Page wrapper ─────────────────────────────────────────────── */
.ip-page {
    min-height: 100vh;
    padding-bottom: 4rem;
}

/* ── Page heading ─────────────────────────────────────────────── */
.ip-header {
    padding: 1.5rem 1.5rem 0.5rem;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.ip-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--ip-text);
    letter-spacing: -0.01em;
}
.ip-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    background: #E05A2B;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s, transform .15s;
}
.ip-create-btn:hover {
    background: #c84d23;
    transform: translateY(-1px);
}

/* ── Search row ───────────────────────────────────────────────── */
.ip-search-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1.5rem 0.75rem;
    max-width: 860px;
    margin: 0 auto;
}

.ip-search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--ip-input-border);
    background: var(--ip-input-bg);
    transition: border-color .2s, box-shadow .2s;
}
.ip-search-bar:focus-within {
    border-color: #E05A2B;
    box-shadow: 0 0 0 3px rgba(224,90,43,.12);
}

.ip-search-icon {
    color: var(--ip-muted);
    flex-shrink: 0;
}
.ip-search-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.875rem;
    color: var(--ip-text);
}
.ip-search-input::placeholder { color: var(--ip-muted); }

.ip-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ip-muted);
    padding: 2px;
    display: flex;
    align-items: center;
    border-radius: 50%;
    transition: color .15s, background .15s;
}
.ip-search-clear:hover {
    color: var(--ip-text);
    background: var(--ip-border);
}
.ip-search-clear.hidden { display: none; }

/* Filters button */
.ip-filters-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--ip-input-border);
    background: var(--ip-input-bg);
    color: var(--ip-text-sub);
    font-size: 0.83rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .2s, background .2s, color .2s;
}
.ip-filters-btn:hover,
.ip-filters-btn[aria-expanded="true"] {
    border-color: #E05A2B;
    color: var(--ip-text);
    background: rgba(224,90,43,.08);
}

.ip-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #E05A2B;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0 5px;
    line-height: 1;
}
.ip-filter-badge.hidden { display: none; }

/* ── Filter panel ─────────────────────────────────────────────── */
.ip-filter-panel {
    border-top: 1px solid var(--ip-border);
    border-bottom: 1px solid var(--ip-border);
    background: var(--ip-input-bg);
    padding: 1rem 0;
}
.ip-filter-panel.hidden { display: none; }

.ip-filter-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.ip-filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.ip-filter-label {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--ip-muted);
    min-width: 60px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ip-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.ip-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--ip-input-border);
    background: transparent;
    color: var(--ip-text-sub);
    font-size: 0.78rem;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .18s, background .18s, color .18s;
}
.ip-chip:hover {
    border-color: #E05A2B;
    color: var(--ip-text);
}
.ip-chip.active {
    border-color: #E05A2B;
    background: rgba(224,90,43,.12);
    color: #E05A2B;
    font-weight: 600;
}
.ip-filter-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.1rem;
}
.ip-clear-btn {
    font-size: 0.78rem;
    color: #E05A2B;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 0;
    transition: opacity .15s;
}
.ip-clear-btn:hover { opacity: .7; }

/* ── Section heading ──────────────────────────────────────────── */
.ip-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 1rem 1.5rem 0.65rem;
    max-width: 1600px;
    margin: 0 auto;
}
.ip-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ip-text);
}
.ip-result-count {
    font-size: 0.75rem;
    color: var(--ip-muted);
}

/* ── Guide grid ───────────────────────────────────────────────── */
.ip-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    padding: 0 1.5rem 3rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* ── Guide card ───────────────────────────────────────────────── */
.gcard {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: var(--gcard-bg);
    border: 1px solid var(--gcard-border);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s;
}
.gcard:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px var(--gcard-shadow);
}
html:not(.dark) .gcard {
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
html:not(.dark) .gcard:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* Image wrap */
.gcard-img-wrap {
    position: relative;
    height: 196px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gcard-ph);
}
.gcard-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.gcard:hover .gcard-img { transform: scale(1.05); }
.gcard-img-ph {
    width: 100%;
    height: 100%;
    background: var(--gcard-ph);
}

/* Badges row — top left */
.gcard-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.gcard-duration,
.gcard-places {
    background: rgba(255,255,255,.9);
    color: #111;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    line-height: 1.4;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    letter-spacing: 0.01em;
    white-space: nowrap;
}
.gcard-places {
    background: rgba(224,90,43,.9);
    color: #fff;
}

/* Action buttons — top right */
.gcard-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 0.3rem;
}
/*
 * Match the site-wide card-action-btn convention used on /explore:
 * light translucent button, the SVG icon flips color when saved.
 * (Defined in explore.css as .card-action-btn / .card-action-btn.saved.)
 */
.gcard-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, transform .15s;
}
.gcard-btn:hover { background: #fff; transform: scale(1.1); }
.gcard-btn:active { transform: scale(.95); }
.gcard-btn:focus-visible { outline: 2px solid #E05A2B; outline-offset: 2px; }
.gcard-btn:disabled { opacity: .6; cursor: wait; }

/* Saved state: button background stays the same; only the heart icon takes the brand color. */
.gcard-like.is-saved svg {
    fill: #E05A2B;
    stroke: #E05A2B;
    color: #E05A2B;
}

/* Card body */
.gcard-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.gcard-title {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--ip-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.005em;
}
.gcard-loc {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.71rem;
    color: var(--ip-muted);
    margin-top: 1px;
}
.gcard-loc-icon { flex-shrink: 0; opacity: .65; }
.gcard-loc span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gcard-author {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
}
.gcard-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.gcard-avatar-ph {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(224,90,43,.25);
    color: #E05A2B;
    font-size: 0.58rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.gcard-author-name {
    font-size: 0.68rem;
    color: var(--ip-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Loading spinner ──────────────────────────────────────────── */
.ip-loading {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}
.ip-loading.hidden { display: none; }
.ip-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--ip-border);
    border-top-color: #E05A2B;
    border-radius: 50%;
    animation: ip-spin .75s linear infinite;
}
@keyframes ip-spin { to { transform: rotate(360deg); } }

/* ── Empty state ──────────────────────────────────────────────── */
.ip-empty {
    text-align: center;
    padding: 4rem 1rem;
}
.ip-empty.hidden { display: none; }
.ip-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.ip-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ip-text);
    margin-bottom: 0.35rem;
}
.ip-empty-sub {
    font-size: 0.85rem;
    color: var(--ip-muted);
    margin-bottom: 1.25rem;
}
.ip-empty-reset {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    border: 1px solid #E05A2B;
    background: transparent;
    color: #E05A2B;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, color .18s;
}
.ip-empty-reset:hover {
    background: #E05A2B;
    color: #fff;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1400px) {
    .ip-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
    .ip-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
    .ip-header { padding: 1rem 1rem 0.4rem; }
    .ip-search-row { padding: 0.4rem 1rem 0.6rem; }
    .ip-section-head { padding: 0.75rem 1rem 0.5rem; }
    .ip-filter-inner { padding: 0 1rem; }
    .ip-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0 1rem 3rem;
    }
    .gcard-img-wrap { height: 156px; }
    .gcard-title { font-size: 0.78rem; }
    .ip-filters-label-text { display: none; }
}
@media (max-width: 480px) {
    .ip-grid { gap: 0.6rem; }
    .gcard-img-wrap { height: 136px; }
    .gcard-body { padding: 8px 10px 10px; }
}
