/**
 * Mapas Culturais - Modern Design System (2026)
 * Built for PHP 8.5 & CodeIgniter 4 Architecture
 * Preserving authentic Mapas Culturais identity, original logo & color palette
 */

:root {
    /* Mapas Culturais Original Brand Colors */
    --mc-primary: #1c5690;
    --mc-primary-dark: #133d66;
    --mc-primary-light: #2570bc;
    --mc-primary-subtle: #f0f6fa;
    --mc-accent: #f39c12;
    --mc-accent-hover: #d68910;
    --mc-accent-light: #fef5e7;
    --mc-dark: #222222;
    --mc-dark-header: #1c1c1c;

    /* Mapas Culturais Canonical Entity Color System */
    --mc-event: #b3b921;
    --mc-event-dark: #6e7208;
    --mc-event-subtle: #fbfceb;
    --mc-event-border: #dbe069;

    --mc-agent: #1dabc6;
    --mc-agent-dark: #0f7a8e;
    --mc-agent-subtle: #edf9fb;
    --mc-agent-border: #79d7e7;

    --mc-space: #e83f96;
    --mc-space-dark: #ab1764;
    --mc-space-subtle: #fdf0f7;
    --mc-space-border: #f38fbf;

    --mc-project: #cc0033;
    --mc-project-dark: #990026;
    --mc-project-subtle: #fdf0f2;
    --mc-project-border: #ea7088;

    --mc-opportunity: #ED2CD4;
    --mc-opportunity-dark: #a10f8e;
    --mc-opportunity-subtle: #fdf0fb;
    --mc-opportunity-border: #f588e4;

    --mc-developer: #9966cc;

    /* Scaffolding */
    --mc-bg: #f5f7fa;
    --mc-card: #ffffff;
    --mc-border: #e2e8f0;
    --mc-text: #222222;
    --mc-text-muted: #666666;
    --mc-radius: 8px;
    --mc-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --mc-shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.08), 0 3px 6px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--mc-bg);
    color: var(--mc-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.mc-navbar {
    background-color: #ffffff;
    border-top: 5px solid var(--mc-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    padding: 0.65rem 1rem;
    transition: all 0.2s ease;
    z-index: 1050;
}
.mc-navbar .dropdown-menu {
    z-index: 1060;
}
.mc-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0;
}
.mc-logo {
    max-height: 48px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}
.mc-logo:hover {
    transform: scale(1.02);
}
.mc-nav-link {
    color: #334155 !important;
    font-weight: 600;
    font-size: 0.925rem;
    padding: 0.5rem 0.85rem !important;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.mc-nav-link:hover {
    color: var(--mc-primary) !important;
    background-color: var(--mc-primary-subtle);
}
.mc-nav-link.active {
    color: var(--mc-primary) !important;
    background-color: var(--mc-primary-subtle);
    font-weight: 700;
}

/* User name truncation & responsive navbar protection */
.mc-nav-username {
    display: inline-block;
    vertical-align: middle;
    max-width: 110px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .mc-nav-link {
        font-size: 0.85rem !important;
        padding: 0.45rem 0.55rem !important;
        gap: 0.35rem !important;
    }
    .mc-logo {
        max-height: 40px;
    }
    .mc-nav-username {
        max-width: 95px;
    }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .mc-nav-link {
        font-size: 0.9rem !important;
        padding: 0.5rem 0.65rem !important;
    }
    .mc-nav-username {
        max-width: 130px;
    }
}

@media (min-width: 1400px) {
    .mc-nav-username {
        max-width: 175px;
    }
}

@media (max-width: 991.98px) {
    .mc-nav-username {
        max-width: 200px;
    }
    .mc-navbar .navbar-collapse {
        padding-top: 0.75rem;
        padding-bottom: 0.5rem;
    }
    .mc-navbar .d-flex.align-items-center {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid #e2e8f0;
    }
}

/* Hero Section */
.mc-hero {
    background: linear-gradient(135deg, #0e3054 0%, #1c5690 60%, #2570bc 100%);
    color: white;
    padding: 4.5rem 1rem 3.5rem;
    position: relative;
    overflow: hidden;
}
.mc-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 85% 25%, rgba(243, 156, 18, 0.16) 0%, transparent 50%),
                radial-gradient(circle at 15% 75%, rgba(29, 171, 198, 0.12) 0%, transparent 40%);
    pointer-events: none;
}
.mc-hero-title {
    font-weight: 800;
    font-size: 2.75rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.mc-hero-lead {
    font-size: 1.15rem;
    color: #e2e8f0;
    max-width: 650px;
    margin-bottom: 2rem;
}
.mc-hero-search {
    background: white;
    padding: 0.4rem;
    border-radius: 50px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
    max-width: 650px;
}
.mc-hero-search input {
    border: none;
    outline: none;
    padding: 0.6rem 1.25rem;
    font-size: 1rem;
    border-radius: 50px;
}
.mc-hero-search .btn {
    border-radius: 50px;
    padding: 0.6rem 1.75rem;
    font-weight: 600;
    background-color: var(--mc-accent);
    color: #ffffff;
    border: none;
}
.mc-hero-search .btn:hover {
    background-color: var(--mc-accent-hover);
    color: #ffffff;
}

/* Stats Counter */
.mc-stats-card {
    background: white;
    border-radius: var(--mc-radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--mc-shadow);
    border: 1px solid var(--mc-border);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.mc-stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--mc-shadow-lg);
}
.mc-stats-icon {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.mc-stats-number {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: var(--mc-dark);
}
.mc-stats-label {
    font-size: 0.85rem;
    color: var(--mc-text-muted);
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Entity Cards */
.mc-card {
    background: white;
    border-radius: var(--mc-radius);
    border: 1px solid var(--mc-border);
    box-shadow: var(--mc-shadow);
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
}
.mc-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--mc-shadow-lg);
    border-color: #cbd5e1;
    color: inherit;
}
.mc-card-img {
    height: 180px;
    background-color: #f1f5f9;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}
.mc-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.mc-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--mc-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.mc-card-text {
    font-size: 0.9rem;
    color: var(--mc-text-muted);
    line-height: 1.45;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mc-card-footer {
    padding: 0.85rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid var(--mc-border);
    font-size: 0.825rem;
    color: var(--mc-text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Entity Badges using Original Mapas Culturais Colors */
.badge-entity {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.badge-agent {
    background-color: var(--mc-agent-subtle);
    color: var(--mc-agent-dark);
    border: 1px solid var(--mc-agent-border);
}
.badge-space {
    background-color: var(--mc-space-subtle);
    color: var(--mc-space-dark);
    border: 1px solid var(--mc-space-border);
}
.badge-event {
    background-color: var(--mc-event-subtle);
    color: var(--mc-event-dark);
    border: 1px solid var(--mc-event-border);
}
.badge-project {
    background-color: var(--mc-project-subtle);
    color: var(--mc-project-dark);
    border: 1px solid var(--mc-project-border);
}
.badge-opportunity {
    background-color: var(--mc-opportunity-subtle);
    color: var(--mc-opportunity-dark);
    border: 1px solid var(--mc-opportunity-border);
}
.badge-seal {
    background-color: #fefce8;
    color: #92400e;
    border: 1px solid #fef08a;
}
.badge-verified {
    background-color: var(--mc-agent-subtle);
    color: var(--mc-agent-dark);
    border: 1px solid var(--mc-agent-border);
    font-size: 0.75rem;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Pill Tags */
.mc-tag {
    background: #eef2f6;
    color: #475569;
    font-size: 0.8rem;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-weight: 500;
    text-decoration: none !important;
    display: inline-block;
    transition: all 0.15s ease;
}
.mc-tag:hover {
    background: #e2e8f0;
    color: var(--mc-primary);
}

/* Section Header */
.mc-section-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.mc-section-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--mc-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

/* Single Profile Pages */
.mc-profile-hero {
    background: white;
    border-bottom: 1px solid var(--mc-border);
    padding: 3rem 0 2rem;
    position: relative;
    transition: background-color 0.2s ease;
}
.mc-avatar-lg {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--mc-shadow-lg);
    background-color: #f8fafc;
}
.mc-profile-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--mc-primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}
.mc-profile-subtitle {
    font-size: 1.15rem;
    color: var(--mc-text-muted);
    line-height: 1.5;
}

/* ==========================================================================
   High-Contrast Profile Hero with Banner (Agentes, Espaços, Eventos, etc.)
   Ensures WCAG AAA contrast regardless of background image lightness/colors
   ========================================================================== */
.mc-profile-hero.has-banner,
.mc-profile-hero[style*="background-image"] {
    position: relative;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Fallback gradient scrim for any banner element lacking multi-stops */
.mc-profile-hero.has-banner:not([style*="linear-gradient"])::before,
.mc-profile-hero[style*="background-image"]:not([style*="linear-gradient"])::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(15, 23, 42, 0.94) 0%,
        rgba(15, 23, 42, 0.82) 45%,
        rgba(15, 23, 42, 0.65) 100%
    ),
    linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.5) 0%,
        rgba(15, 23, 42, 0.92) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.mc-profile-hero.has-banner > .container,
.mc-profile-hero[style*="background-image"] > .container {
    position: relative;
    z-index: 2;
}

/* Soft ambient vignette behind title and description for ultimate legibility */
.mc-profile-hero.has-banner .mc-hero-details,
.mc-profile-hero[style*="background-image"] .mc-hero-details {
    background: radial-gradient(ellipse at left, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0) 80%);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    margin: -0.5rem -0.75rem;
}

/* Crystal-clear typography with high-contrast drop-shadows */
.mc-profile-hero.has-banner .mc-profile-title,
.mc-profile-hero[style*="background-image"] .mc-profile-title {
    color: #ffffff !important;
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 4px 16px rgba(0, 0, 0, 0.75);
}

.mc-profile-hero.has-banner .mc-profile-subtitle,
.mc-profile-hero[style*="background-image"] .mc-profile-subtitle {
    color: #f8fafc !important;
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 2px 8px rgba(0, 0, 0, 0.8);
    max-width: 900px;
}

/* Avatar on banner */
.mc-profile-hero.has-banner .mc-avatar-lg,
.mc-profile-hero[style*="background-image"] .mc-avatar-lg {
    border: 3.5px solid #ffffff !important;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.7), 0 4px 6px -2px rgba(0, 0, 0, 0.4) !important;
}

/* Breadcrumbs on banner */
.mc-profile-hero.has-banner .breadcrumb,
.mc-profile-hero[style*="background-image"] .breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
}
.mc-profile-hero.has-banner .breadcrumb-item,
.mc-profile-hero[style*="background-image"] .breadcrumb-item {
    color: rgba(255, 255, 255, 0.82) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    font-weight: 500;
}
.mc-profile-hero.has-banner .breadcrumb-item a,
.mc-profile-hero[style*="background-image"] .breadcrumb-item a {
    color: #ffffff !important;
    opacity: 0.88;
    text-decoration: none;
    transition: opacity 0.15s ease-in-out;
}
.mc-profile-hero.has-banner .breadcrumb-item a:hover,
.mc-profile-hero[style*="background-image"] .breadcrumb-item a:hover {
    opacity: 1;
    text-decoration: underline;
}
.mc-profile-hero.has-banner .breadcrumb-item.active,
.mc-profile-hero[style*="background-image"] .breadcrumb-item.active {
    color: #ffffff !important;
    opacity: 1;
    font-weight: 700;
}
.mc-profile-hero.has-banner .breadcrumb-item + .breadcrumb-item::before,
.mc-profile-hero[style*="background-image"] .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Badges on banner */
.mc-profile-hero.has-banner .badge,
.mc-profile-hero[style*="background-image"] .badge {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.mc-profile-hero.has-banner .badge.bg-light,
.mc-profile-hero[style*="background-image"] .badge.bg-light {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
}
.mc-profile-hero.has-banner .badge.bg-light .text-muted,
.mc-profile-hero.has-banner .badge.bg-light .text-secondary,
.mc-profile-hero[style*="background-image"] .badge.bg-light .text-muted,
.mc-profile-hero[style*="background-image"] .badge.bg-light .text-secondary {
    color: #334155 !important;
}
.mc-profile-hero.has-banner .badge.bg-secondary-subtle,
.mc-profile-hero[style*="background-image"] .badge.bg-secondary-subtle {
    background-color: #f8fafc !important;
    color: #0f172a !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
}
.mc-profile-hero.has-banner .badge.bg-primary-subtle,
.mc-profile-hero[style*="background-image"] .badge.bg-primary-subtle {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border-color: #bae6fd !important;
}
.mc-profile-hero.has-banner .badge.bg-success-subtle,
.mc-profile-hero[style*="background-image"] .badge.bg-success-subtle {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    border-color: #bbf7d0 !important;
}
.mc-profile-hero.has-banner .badge.bg-warning-subtle,
.mc-profile-hero[style*="background-image"] .badge.bg-warning-subtle {
    background-color: #fef9c3 !important;
    color: #854d0e !important;
    border-color: #fef08a !important;
}

/* Secondary & Back Buttons on Banner */
.mc-profile-hero.has-banner .btn-outline-secondary,
.mc-profile-hero[style*="background-image"] .btn-outline-secondary {
    color: #ffffff !important;
    background-color: rgba(15, 23, 42, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.mc-profile-hero.has-banner .btn-outline-secondary:hover,
.mc-profile-hero[style*="background-image"] .btn-outline-secondary:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.25) !important;
    border-color: #ffffff !important;
}
.min-w-0 {
    min-width: 0 !important;
}

.mc-info-card {
    background: white;
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    padding: 1.5rem;
    box-shadow: var(--mc-shadow);
    margin-bottom: 1.5rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.mc-info-card ul,
.mc-info-card li {
    min-width: 0;
}

.mc-info-card a.text-truncate {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mc-info-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--mc-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.75rem;
}

/* Search Interface & Map */
#mc-search-map {
    width: 100%;
    height: 600px;
    border-radius: var(--mc-radius);
    box-shadow: var(--mc-shadow);
    border: 1px solid var(--mc-border);
    z-index: 10;
}
.mc-filter-bar {
    background: white;
    border-radius: var(--mc-radius);
    padding: 1rem 1.25rem;
    border: 1px solid var(--mc-border);
    box-shadow: var(--mc-shadow);
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Modern Search Toolbar & Filters System
   ========================================================================== */

.mc-search-toolbar-sticky {
    position: sticky;
    top: 73px;
    z-index: 1000;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    padding: 0.75rem 0;
    transition: all 0.2s ease;
}

@media (max-width: 991px) {
    .mc-search-toolbar-sticky {
        top: 68px;
    }
}

/* Unified 42px Control Height & Baseline Alignment */
.mc-search-toolbar-sticky .input-group,
.mc-search-toolbar-sticky .form-control,
.mc-search-toolbar-sticky .form-select,
.mc-search-toolbar-sticky .input-group-text,
.mc-search-toolbar-sticky .btn,
.mc-search-toolbar-sticky .mc-view-switcher {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
}

/* Input Group Text (Prefix Icons) */
.mc-search-toolbar-sticky .input-group-text {
    background-color: #f8fafc;
    border-color: #d0d7de;
    color: #64748b;
    padding: 0 0.85rem;
    font-size: 0.95rem;
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Form Inputs and Selects */
.mc-search-toolbar-sticky .form-control,
.mc-search-toolbar-sticky .form-select {
    border-color: #d0d7de;
    background-color: #ffffff;
    color: #1e293b;
    font-size: 0.885rem;
    font-weight: 500;
    padding: 0 0.85rem;
    line-height: 40px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.mc-search-toolbar-sticky .form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
    font-size: 0.85rem;
}

.mc-search-toolbar-sticky .form-control:focus,
.mc-search-toolbar-sticky .form-select:focus {
    border-color: var(--mc-primary);
    box-shadow: 0 0 0 3px rgba(28, 86, 144, 0.15);
    background-color: #ffffff;
    z-index: 3;
}

.mc-search-toolbar-sticky .input-group:focus-within .input-group-text {
    border-color: var(--mc-primary);
    background-color: #ffffff;
    color: var(--mc-primary);
}

/* Select Radius */
.mc-search-toolbar-sticky .mc-select-group .form-select {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    cursor: pointer;
}

/* Search Clear Button */
.mc-search-toolbar-sticky .mc-btn-clear {
    width: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border-top: 1px solid #d0d7de;
    border-bottom: 1px solid #d0d7de;
    border-left: none;
    border-right: none;
    color: #94a3b8;
    border-radius: 0;
    transition: all 0.15s ease;
}
.mc-search-toolbar-sticky .mc-btn-clear:hover {
    color: #ef4444;
    background-color: #fef2f2;
}

/* Search Submit Button */
.mc-search-toolbar-sticky .mc-btn-search {
    padding: 0 1.15rem;
    font-size: 0.885rem;
    font-weight: 600;
    background-color: var(--mc-primary);
    border: 1px solid var(--mc-primary);
    color: #ffffff;
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.mc-search-toolbar-sticky .mc-btn-search:hover {
    background-color: var(--mc-primary-dark);
    border-color: var(--mc-primary-dark);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(28, 86, 144, 0.3);
}

/* Filter Toggle Button */
.mc-btn-filter-toggle {
    padding: 0 0.95rem;
    font-size: 0.885rem;
    font-weight: 600;
    color: #334155;
    background-color: #f8fafc;
    border: 1px solid #d0d7de;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mc-btn-filter-toggle:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--mc-primary);
}
.mc-btn-filter-toggle[aria-expanded="true"],
.mc-btn-filter-toggle.active {
    background-color: var(--mc-primary-subtle);
    border-color: var(--mc-primary);
    color: var(--mc-primary);
    box-shadow: 0 0 0 2px rgba(28, 86, 144, 0.15);
}

/* Segmented View Mode Switcher (Mapa vs Lista) */
.mc-view-switcher {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    background-color: #f1f5f9;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    gap: 3px;
    box-sizing: border-box;
}

.mc-view-switcher .mc-view-btn {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 0.85rem;
    font-size: 0.835rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    background-color: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.mc-view-switcher .mc-view-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.7);
    color: #1e293b;
}
.mc-view-switcher .mc-view-btn.active {
    background-color: var(--mc-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 5px rgba(28, 86, 144, 0.25);
}
.mc-view-switcher .mc-view-btn i {
    font-size: 0.85rem;
}

/* Advanced Filters Drawer / Sidebar Panel */
.mc-filter-sidebar-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--mc-radius);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

@media (min-width: 992px) {
    .mc-filter-sidebar-card {
        position: sticky;
        top: 135px;
        z-index: 100;
        max-height: calc(100vh - 155px);
        overflow-y: auto;
    }
}

.mc-filter-sidebar-card .form-label {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.mc-filter-sidebar-card .form-control,
.mc-filter-sidebar-card .form-select {
    height: 36px;
    min-height: 36px;
    border-color: #cbd5e1;
    border-radius: 6px;
    font-size: 0.84rem;
    background-color: #ffffff;
}

.mc-filter-sidebar-card .form-control:focus,
.mc-filter-sidebar-card .form-select:focus {
    border-color: var(--mc-primary);
    box-shadow: 0 0 0 3px rgba(28, 86, 144, 0.12);
}

.mc-filter-sidebar-card .form-check-label {
    font-size: 0.825rem;
    cursor: pointer;
}

/* Mobile responsive rules */
@media (max-width: 575px) {
    .mc-search-toolbar-sticky .mc-btn-filter-toggle {
        flex: 1 1 auto;
        justify-content: center;
    }
    .mc-search-toolbar-sticky .mc-view-switcher {
        flex: 1 1 auto;
        justify-content: center;
    }
    .mc-view-switcher .mc-view-btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* Footer */
.mc-footer {
    background-color: #16202c;
    border-top: 4px solid var(--mc-primary);
    color: #94a3b8;
    padding: 3rem 0 2rem;
    margin-top: auto;
    font-size: 0.9rem;
}
.mc-footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.15s ease;
}
.mc-footer a:hover {
    color: white;
}
.mc-footer-title {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Entity Color Utility Classes */
.color-event { color: var(--mc-event) !important; }
.color-agent { color: var(--mc-agent) !important; }
.color-space { color: var(--mc-space) !important; }
.color-project { color: var(--mc-project) !important; }
.color-opportunity { color: var(--mc-opportunity) !important; }

.bg-event-subtle { background-color: var(--mc-event-subtle) !important; }
.bg-agent-subtle { background-color: var(--mc-agent-subtle) !important; }
.bg-space-subtle { background-color: var(--mc-space-subtle) !important; }
.bg-project-subtle { background-color: var(--mc-project-subtle) !important; }
.bg-opportunity-subtle { background-color: var(--mc-opportunity-subtle) !important; }

/* Filter entity active states */
.btn-filter-entity.active[data-entity="event"] {
    background-color: var(--mc-event) !important;
    border-color: var(--mc-event) !important;
    color: #ffffff !important;
}
.btn-filter-entity.active[data-entity="event"] i {
    color: #ffffff !important;
}

.btn-filter-entity.active[data-entity="space"] {
    background-color: var(--mc-space) !important;
    border-color: var(--mc-space) !important;
    color: #ffffff !important;
}
.btn-filter-entity.active[data-entity="space"] i {
    color: #ffffff !important;
}

.btn-filter-entity.active[data-entity="agent"] {
    background-color: var(--mc-agent) !important;
    border-color: var(--mc-agent) !important;
    color: #ffffff !important;
}
.btn-filter-entity.active[data-entity="agent"] i {
    color: #ffffff !important;
}

.btn-filter-entity.active[data-entity="project"] {
    background-color: var(--mc-project) !important;
    border-color: var(--mc-project) !important;
    color: #ffffff !important;
}
.btn-filter-entity.active[data-entity="project"] i {
    color: #ffffff !important;
}

.btn-filter-entity.active[data-entity="opportunity"] {
    background-color: var(--mc-opportunity) !important;
    border-color: var(--mc-opportunity) !important;
    color: #ffffff !important;
}
.btn-filter-entity.active[data-entity="opportunity"] i {
    color: #ffffff !important;
}

/* Standardized Clean Tag Chips & Category Cards */
.mc-tag-chip {
    display: inline-block;
    padding: 0.25rem 0.55rem;
    font-size: 0.765rem;
    font-weight: 500;
    color: #495057;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    line-height: 1.35;
}
.mc-tag-chip:hover {
    color: #111827;
    background-color: #e9ecef;
    border-color: #ced4da;
}

.mc-category-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.mc-category-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}
.mc-category-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #f1f5f9;
}
.mc-category-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.mc-category-card-desc {
    font-size: 0.785rem;
    color: #64748b;
    margin-bottom: 0.85rem;
    line-height: 1.4;
    min-height: 2.2rem;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .mc-hero { padding: 3rem 1rem 2.5rem; }
    .mc-hero-title { font-size: 2rem; }
    .mc-avatar-lg { width: 90px; height: 90px; }
    .mc-profile-title { font-size: 1.65rem; }
    #mc-search-map { height: 400px; }
}

/* ==========================================================================
   Mapas Culturais - Map Pin Markers & Clusters (SVG Teardrop with Icons)
   ========================================================================== */
.mc-pin-container, .mc-cluster-pin-container {
    background: transparent !important;
    border: none !important;
}

.mc-pin-container:hover, .mc-cluster-pin-container:hover {
    z-index: 99999 !important;
}

.mc-pin-wrapper {
    position: relative;
    width: 36px;
    height: 46px;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.mc-pin-wrapper:hover {
    transform: scale(1.18) translateY(-4px);
    z-index: 1000 !important;
}

.mc-pin-content {
    position: absolute;
    top: 7px;
    left: 7px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
    pointer-events: none;
    background: transparent;
}

.mc-cluster-wrapper {
    position: relative;
    width: 42px;
    height: 52px;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
}

.mc-cluster-wrapper:hover {
    transform: scale(1.15) translateY(-3px);
    z-index: 1000 !important;
}

.mc-cluster-content {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    letter-spacing: -0.5px;
}
