/* ═══════════════════════════════════════════════════════
   Kukura — Opportunities Module Styles
   ═══════════════════════════════════════════════════════ */

/* ── Opportunity Card ─────────────────────────────────── */
.opp-card {
    background: #fff;
    border-radius: 14px;
    border: 2px solid var(--cat-color, #A7A27C);
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 260ms cubic-bezier(.4,0,.2,1),
                box-shadow 260ms cubic-bezier(.4,0,.2,1);
}

.opp-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 32px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
}

/* Image */
.opp-card-img {
    position: relative;
    overflow: hidden;
    height: 170px;
    flex-shrink: 0;
}
.opp-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}
.opp-card:hover .opp-card-img img { transform: scale(1.04); }

/* Urgency badge on image */
.opp-urgency {
    position: absolute;
    top: 10px; right: 10px;
    font-size: 11px;
    font-weight: 700;
    padding: .25rem .65rem;
    border-radius: 9999px;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.opp-urgency.hot  { background: #DC2626; color: #fff; }
.opp-urgency.soon { background: #f59e0b; color: #1F2937; }

/* Body */
.opp-card-body {
    padding: 1.1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: .6rem;
}

/* Header row: org info + type pill */
.opp-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.opp-org-info {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    flex: 1;
}
.opp-org-logo-placeholder {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #f0f0ea;
    border: 1.5px solid #e9e8e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    color: var(--cat-color, #A7A27C);
    flex-shrink: 0;
    overflow: hidden;
}
.opp-org-logo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.opp-org-name {
    font-size: .72rem;
    font-weight: 600;
    color: #6B7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.opp-type-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .22rem .65rem;
    border-radius: 9999px;
    background: #f6f6f0;
    color: var(--theme-color1, #788a29);
    flex-shrink: 0;
}
.opp-type-pill i { font-size: .65rem; }

/* Category */
.opp-cat-tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .72rem;
    font-weight: 700;
    color: var(--cat-color, #8B8660);
    letter-spacing: .03em;
}
.opp-cat-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 3px;
    background: var(--cat-color, #A7A27C);
    flex-shrink: 0;
}

/* Title */
.opp-card-title {
    font-size: .95rem;
    font-weight: 800;
    color: #1F2937;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Description */
.opp-card-desc {
    font-size: .82rem;
    color: #6B7280;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Reward */
.opp-card-reward {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    font-size: .8rem;
    font-weight: 500;
    color: #1F2937;
    background: #f6f6f0;
    border-left: 3px solid var(--theme-base, #A7A27C);
    border-radius: 0 6px 6px 0;
    padding: .35rem .6rem;
}
.opp-card-reward i { color: var(--theme-color1, #788a29); margin-top: 2px; flex-shrink: 0; }

/* Meta + deadline */
.opp-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: auto;
    padding-top: .4rem;
}
.opp-deadline {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 9999px;
    background: #f6f6f0;
    color: #374151;
}
.opp-deadline i { font-size: .68rem; color: var(--theme-base, #A7A27C); }
.opp-deadline.hot  { background: #fef2f2; color: #991b1b; }
.opp-deadline.hot  i { color: #DC2626; }
.opp-deadline.soon { background: #fffbeb; color: #92400e; }
.opp-deadline.soon i { color: #f59e0b; }
.opp-deadline.open { background: #f0fdf4; color: #166534; }
.opp-deadline.open i { color: #16a34a; }

/* CTA */
.opp-card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    padding: .55rem 1rem;
    border-radius: 8px;
    background: var(--theme-color1, #788a29);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 200ms, transform 150ms;
    margin-top: .5rem;
}
.opp-card-cta:hover { background: #2d360f; color: #fff; transform: none; }
.opp-card-cta i { font-size: .75rem; }

/* ── Browse / Listing page ────────────────────────────── */

/* Hero */
.opp-hero {
    background: linear-gradient(150deg, #141708 0%, #252d0d 40%, #3f4a1a 75%, #5f6d26 100%);
    padding: 4rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}
.opp-hero::before {
    content: '';
    position: absolute;
    top: -120px; right: -80px;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(167,162,124,.10) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}
.opp-hero-eyebrow {
    display: inline-block;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #d1d84c;
    background: rgba(255,255,255,.1);
    padding: .28rem .85rem;
    border-radius: 9999px;
    margin-bottom: .85rem;
}
.opp-hero h1 {
    font-size: clamp(1.7rem, 4.5vw, 2.8rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -.025em;
    margin-bottom: .6rem;
}
.opp-hero-sub {
    font-size: 1rem;
    color: rgba(255,255,255,.72);
    margin-bottom: 2rem;
    max-width: 520px;
}

/* Search bar */
.opp-search-wrap {
    position: relative;
    max-width: 700px;
}
.opp-search-inner {
    display: flex;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.opp-search-icon {
    padding: 0 .85rem;
    display: flex;
    align-items: center;
    color: #A7A27C;
    font-size: 1rem;
    flex-shrink: 0;
}
.opp-search-inner input {
    flex: 1;
    border: none;
    outline: none;
    padding: .85rem 0;
    font-size: .95rem;
    color: #1F2937;
    background: transparent;
    min-width: 0;
}
.opp-search-inner input::placeholder { color: #9CA3AF; }
.opp-search-divider {
    width: 1px;
    background: #e5e7eb;
    margin: .6rem 0;
    flex-shrink: 0;
}
.opp-search-inner select {
    border: none;
    outline: none;
    padding: .85rem .75rem;
    font-size: .875rem;
    color: #374151;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    width: 160px;
}
.opp-search-btn {
    background: var(--theme-color1, #788a29);
    color: #fff;
    border: none;
    padding: .85rem 1.5rem;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    transition: background 200ms;
    flex-shrink: 0;
}
.opp-search-btn:hover { background: #2d360f; }

/* Live search dropdown */
.opp-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,.14);
    max-height: 340px;
    overflow-y: auto;
    z-index: 50;
}
.opp-search-item {
    display: block;
    padding: .75rem 1rem;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: background 150ms;
}
.opp-search-item:last-child { border-bottom: none; }
.opp-search-item:hover { background: #f6f6f0; }
.opp-search-item-title {
    font-size: .88rem;
    font-weight: 700;
    color: #1F2937;
    display: block;
    margin-bottom: 2px;
}
.opp-search-item-desc {
    font-size: .78rem;
    color: #6B7280;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hero stats */
.opp-hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.opp-hero-stat { color: rgba(255,255,255,.9); }
.opp-hero-stat strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 2px;
}
.opp-hero-stat span { font-size: .8rem; color: rgba(255,255,255,.65); }

/* ── Categories ───────────────────────────────────────── */
.opp-cats {
    padding: 3rem 0;
    background: #fff;
    border-bottom: 1px solid #f0f0ea;
}
.opp-cat-card {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .9rem 1rem .9rem 1rem;
    background: #fff;
    border: 1px solid #e9e8e0;
    border-radius: 12px;
    text-decoration: none;
    color: #1F2937;
    position: relative;
    overflow: hidden;
    transition: transform 220ms, box-shadow 220ms, border-color 220ms;
}
.opp-cat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    border-color: var(--cat-color, #A7A27C);
    color: #1F2937;
}
.opp-cat-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    background: var(--cat-tint, #f6f6f0);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
    color: var(--cat-color, #788a29);
    flex-shrink: 0;
    transition: transform 220ms;
}
.opp-cat-card:hover .opp-cat-icon { transform: scale(1.08); }
.opp-cat-info { flex: 1; min-width: 0; }
.opp-cat-name {
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.2;
}
.opp-cat-count {
    font-size: .73rem;
    color: #6B7280;
    margin-top: 2px;
}
.opp-cat-swatch {
    position: absolute;
    top: 0; right: 0;
    width: 10px;
    height: 100%;
    background: var(--cat-color, #A7A27C);
    opacity: .18;
    transition: opacity 220ms, width 220ms;
    border-radius: 0 12px 12px 0;
}
.opp-cat-card:hover .opp-cat-swatch {
    opacity: .28;
    width: 12px;
}

/* ── Toolbar & Filters ────────────────────────────────── */
.opp-toolbar {
    background: #fff;
    border: 1px solid #e9e8e0;
    border-radius: 14px 14px 0 0;
    padding: .875rem 1.1rem;
}
.opp-toolbar.closed { border-radius: 14px; }

.opp-type-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .8rem;
    font-weight: 600;
    padding: .35rem .9rem;
    border-radius: 9999px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 180ms;
    white-space: nowrap;
}
.opp-type-btn:hover { border-color: var(--theme-base, #A7A27C); color: var(--theme-color1, #788a29); }
.opp-type-btn.is-active {
    background: var(--theme-color1, #788a29);
    border-color: var(--theme-color1, #788a29);
    color: #fff;
}
.opp-type-btn i { font-size: .72rem; }

.opp-sort-select {
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: .35rem .75rem;
    font-size: .8rem;
    color: #374151;
    background: #fff;
    outline: none;
    cursor: pointer;
    transition: border-color 180ms;
}
.opp-sort-select:focus { border-color: var(--theme-base, #A7A27C); }

.opp-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    font-weight: 600;
    padding: .38rem .9rem;
    border-radius: 8px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 180ms;
}
.opp-filter-btn:hover, .opp-filter-btn.is-active {
    background: var(--theme-color1, #788a29);
    border-color: var(--theme-color1, #788a29);
    color: #fff;
}
.opp-filter-badge {
    background: #d1d84c;
    color: #1F2937;
    font-size: .65rem;
    font-weight: 800;
    padding: .1rem .4rem;
    border-radius: 9999px;
    min-width: 18px;
    text-align: center;
}
.opp-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
    font-weight: 600;
    padding: .35rem .75rem;
    border-radius: 8px;
    border: 1.5px solid #fca5a5;
    background: #fff;
    color: #dc2626;
    cursor: pointer;
    transition: all 180ms;
}
.opp-clear-btn:hover { background: #fef2f2; }

/* Advanced filters panel */
.opp-filters-panel {
    background: #fafaf4;
    border: 1px solid #e9e8e0;
    border-top: none;
    border-radius: 0 0 14px 14px;
    padding: 1rem 1.1rem;
}
.opp-filter-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--theme-color2, #8B8660);
    margin-bottom: .35rem;
    display: block;
}
.opp-filter-select,
.opp-filter-input {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: .45rem .7rem;
    font-size: .83rem;
    color: #1F2937;
    background: #fff;
    outline: none;
    transition: border-color 180ms;
}
.opp-filter-select:focus,
.opp-filter-input:focus { border-color: var(--theme-base, #A7A27C); }

/* ── Results grid ─────────────────────────────────────── */
.opp-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: .5rem;
}
.opp-results-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1F2937;
    margin: 0;
}
.opp-results-count {
    font-size: .82rem;
    color: #6B7280;
    font-weight: 500;
}

/* ── Loading Skeleton ─────────────────────────────────── */
.opp-skeleton-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e9e8e0;
    overflow: hidden;
}
.opp-skel-img  { height: 170px; background: linear-gradient(90deg, #f6f6f0 25%, #eef1dc 50%, #f6f6f0 75%); background-size: 400% 100%; animation: opp-shimmer 1.4s ease infinite; }
.opp-skel-body { padding: 1.1rem 1.25rem; }
.opp-skel-line { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #f6f6f0 25%, #eef1dc 50%, #f6f6f0 75%); background-size: 400% 100%; animation: opp-shimmer 1.4s ease infinite; margin-bottom: .75rem; }
.opp-skel-line.w-80 { width: 80%; }
.opp-skel-line.w-60 { width: 60%; }
.opp-skel-line.w-40 { width: 40%; }
.opp-skel-line.w-90 { width: 90%; }
.opp-skel-line.h-full { height: 40px; }
@keyframes opp-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Empty state ──────────────────────────────────────── */
.opp-empty {
    text-align: center;
    padding: 4rem 1rem;
}
.opp-empty-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: #f6f6f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem;
    color: var(--theme-base, #A7A27C);
    margin: 0 auto 1.25rem;
}
.opp-empty h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1F2937;
    margin-bottom: .4rem;
}
.opp-empty p {
    font-size: .9rem;
    color: #6B7280;
    max-width: 340px;
    margin: 0 auto 1.5rem;
    line-height: 1.7;
}
.opp-empty-reset {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    font-weight: 700;
    padding: .55rem 1.4rem;
    border-radius: 8px;
    background: var(--theme-color1, #788a29);
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 200ms;
}
.opp-empty-reset:hover { background: #2d360f; color: #fff; }

/* ── Section headers (featured / new / trending) ──────── */
.opp-sec {
    padding: 3.5rem 0;
}
.opp-sec.tinted { background: #fafaf4; }
.opp-sec-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.opp-sec-label {
    display: inline-block;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--theme-color1, #788a29);
    background: #f6f6f0;
    padding: .22rem .75rem;
    border-radius: 9999px;
    margin-bottom: .35rem;
}
.opp-sec-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1F2937;
    margin: 0;
    line-height: 1.2;
}
.opp-sec-link {
    font-size: .82rem;
    font-weight: 700;
    color: var(--theme-color1, #788a29);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .3rem;
    white-space: nowrap;
}
.opp-sec-link:hover { color: #2d360f; }

/* Horizontal scroll row */
.opp-scroll-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 1fr);
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: .5rem;
    scrollbar-width: thin;
    scrollbar-color: #e0e8be transparent;
}
.opp-scroll-row::-webkit-scrollbar { height: 4px; }
.opp-scroll-row::-webkit-scrollbar-track { background: transparent; }
.opp-scroll-row::-webkit-scrollbar-thumb { background: #e0e8be; border-radius: 9999px; }

/* ── Pagination override ──────────────────────────────── */
.opp-pagination .pagination {
    gap: .3rem;
    flex-wrap: wrap;
}
.opp-pagination .page-item .page-link {
    border-radius: 8px !important;
    border: 1.5px solid #e9e8e0;
    color: #374151;
    font-size: .82rem;
    font-weight: 600;
    padding: .4rem .75rem;
    line-height: 1.5;
    transition: all 180ms;
}
.opp-pagination .page-item .page-link:hover {
    background: #f6f6f0;
    border-color: var(--theme-base, #A7A27C);
    color: var(--theme-color1, #788a29);
}
.opp-pagination .page-item.active .page-link {
    background: var(--theme-color1, #788a29);
    border-color: var(--theme-color1, #788a29);
    color: #fff;
}
.opp-pagination .page-item.disabled .page-link {
    opacity: .45;
    pointer-events: none;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 575px) {
    .opp-hero { padding: 2.5rem 0 2rem; }
    .opp-search-inner select { display: none; }
    .opp-search-divider { display: none; }
    .opp-hero-stats { gap: 1.25rem; }
    .opp-type-btn { font-size: .75rem; padding: .3rem .7rem; }
}
@media (max-width: 767px) {
    .opp-toolbar { padding: .75rem .875rem; }
    .opp-filters-panel { padding: .875rem; }
    .opp-sec { padding: 2.5rem 0; }
}
