/**
 * Masterclass Showcase - Frontend Styles
 * Diseño basado en Tailwind CSS - Hingenia Style
 */

/* Google Fonts - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Variables CSS (se sobrescriben dinámicamente desde WordPress) */
:root {
    --mcs-primary: #1d4ed8;
    --mcs-primary-light: #3b82f6;
    --mcs-secondary: #1e40af;
    --mcs-text: #1e293b;
    --mcs-text-light: #64748b;
    --mcs-bg: #f8fafc;
    --mcs-card-bg: #ffffff;
    --mcs-live-badge: #dc2626;
    --mcs-border: #e2e8f0;
    --mcs-border-light: #f1f5f9;

    /* Colores de categorías */
    --mcs-cat-estructural: #2563eb;
    --mcs-cat-bim: #ea580c;
    --mcs-cat-vias: #16a34a;
    --mcs-cat-gerencia: #9333ea;
}

/* Reset específico del plugin */
.mcs-container *,
.mcs-container *::before,
.mcs-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Contenedor Principal */
.mcs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 24px;
    background-color: var(--mcs-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--mcs-text);
}

/* ==================== HEADER ==================== */
.mcs-header {
    text-align: center;
    margin-bottom: 48px;
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
}

/* Badge Superior - Agenda Semanal */
.mcs-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background-color: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--mcs-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.mcs-badge-dot {
    position: relative;
    width: 8px;
    height: 8px;
}

.mcs-badge-dot::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: #60a5fa;
    border-radius: 50%;
    animation: mcs-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.mcs-badge-dot::after {
    content: '';
    position: relative;
    display: block;
    width: 8px;
    height: 8px;
    background-color: #3b82f6;
    border-radius: 50%;
}

@keyframes mcs-ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Título Principal */
.mcs-title {
    font-size: 48px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 24px 0;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.mcs-title-highlight {
    background: linear-gradient(to right, #1d4ed8, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Descripción */
.mcs-description {
    font-size: 18px;
    color: #64748b;
    line-height: 1.75;
    margin: 0;
}

/* ==================== FILTROS Y BUSCADOR WRAPPER ==================== */
.mcs-filters-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 48px;
}

/* ==================== FILTROS ==================== */
.mcs-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* ==================== BARRA DE BÚSQUEDA ==================== */
.mcs-search-wrapper {
    width: 100%;
    max-width: 480px;
}

.mcs-search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.mcs-search-box:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.mcs-search-box:focus-within {
    border-color: var(--mcs-primary, #1d4ed8) !important;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mcs-search-box .mcs-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.3s ease;
    z-index: 1;
    display: block;
}

.mcs-search-box .mcs-search-icon circle,
.mcs-search-box .mcs-search-icon path {
    stroke: currentColor;
    stroke-width: 2;
}

.mcs-search-box:focus-within .mcs-search-icon {
    color: var(--mcs-primary, #1d4ed8);
}

.mcs-container .mcs-search-input,
.mcs-search-box .mcs-search-input,
input.mcs-search-input,
input#mcs-search-input {
    width: 100% !important;
    height: auto !important;
    padding: 14px 48px 14px 48px !important;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.mcs-search-input::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
    opacity: 1 !important;
}

.mcs-search-input:focus {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.mcs-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0 !important;
    background-color: #f1f5f9 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.mcs-search-clear svg {
    width: 14px;
    height: 14px;
    color: #64748b;
}

.mcs-search-clear:hover {
    background-color: #e2e8f0 !important;
}

.mcs-search-clear:hover svg {
    color: #1e293b;
}

/* Mensaje sin resultados de búsqueda - SOLO UNO */
.mcs-no-search-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background-color: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mcs-no-search-results-icon {
    width: 56px;
    height: 56px;
    color: #94a3b8;
    margin-bottom: 16px;
    display: block;
}

.mcs-no-search-results-icon circle,
.mcs-no-search-results-icon path {
    stroke: currentColor;
}

.mcs-no-search-results p {
    margin: 0;
    font-size: 16px;
    color: #64748b;
    line-height: 1.5;
}

.mcs-no-search-results .mcs-search-term {
    font-weight: 600;
    color: #1e293b;
}

.mcs-container .mcs-filters .mcs-filter-btn,
.mcs-filters .mcs-filter-btn,
button.mcs-filter-btn {
    padding: 10px 20px !important;
    background-color: #ffffff !important;
    background-image: none !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 9999px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform: translateY(0);
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.5 !important;
    text-decoration: none !important;
    outline: none !important;
    margin: 0 !important;
}

.mcs-container .mcs-filters .mcs-filter-btn:hover,
.mcs-filters .mcs-filter-btn:hover,
button.mcs-filter-btn:hover {
    border-color: var(--mcs-filter-hover, #cbd5e1) !important;
    color: var(--mcs-filter-hover-text, #1e293b) !important;
    background-color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    transform: translateY(-2px);
}

.mcs-container .mcs-filters .mcs-filter-btn.active,
.mcs-filters .mcs-filter-btn.active,
button.mcs-filter-btn.active {
    background-color: var(--mcs-filter-active-bg, #0f172a) !important;
    border-color: var(--mcs-filter-active-bg, #0f172a) !important;
    color: var(--mcs-filter-active-text, #ffffff) !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.15), 0 4px 6px -2px rgba(15, 23, 42, 0.1) !important;
    transform: translateY(-2px);
}

/* ==================== GRID ==================== */
.mcs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Grid responsive según columnas */
.mcs-container[data-columns="1"] .mcs-grid { grid-template-columns: 1fr; }
.mcs-container[data-columns="2"] .mcs-grid { grid-template-columns: repeat(2, 1fr); }
.mcs-container[data-columns="3"] .mcs-grid { grid-template-columns: repeat(3, 1fr); }
.mcs-container[data-columns="4"] .mcs-grid { grid-template-columns: repeat(4, 1fr); }
.mcs-container[data-columns="5"] .mcs-grid { grid-template-columns: repeat(5, 1fr); }
.mcs-container[data-columns="6"] .mcs-grid { grid-template-columns: repeat(6, 1fr); }

/* ==================== TARJETAS ==================== */
.mcs-card {
    background-color: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.mcs-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.mcs-card.mcs-hidden {
    display: none;
}

/* Imagen de la tarjeta */
.mcs-card-image {
    position: relative;
    height: 192px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.mcs-card-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.7), transparent);
    z-index: 1;
}

.mcs-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.mcs-card:hover .mcs-card-image img {
    transform: scale(1.1);
}

/* Badge En Vivo */
.mcs-live-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background-color: #dc2626;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.mcs-live-dot {
    width: 6px;
    height: 6px;
    background-color: #ffffff;
    border-radius: 50%;
    animation: mcs-pulse 1s ease-in-out infinite;
}

@keyframes mcs-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Badge Categoría */
.mcs-category-badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
    backdrop-filter: blur(4px);
}

/* Colores específicos de categoría por defecto */
.mcs-category-badge[style*="estructural"],
.mcs-category-badge.cat-estructural {
    background-color: rgba(37, 99, 235, 0.9);
}

.mcs-category-badge[style*="bim"],
.mcs-category-badge.cat-bim {
    background-color: rgba(234, 88, 12, 0.9);
}

.mcs-category-badge[style*="vias"],
.mcs-category-badge.cat-vias {
    background-color: rgba(22, 163, 74, 0.9);
}

.mcs-category-badge[style*="gerencia"],
.mcs-category-badge.cat-gerencia {
    background-color: rgba(147, 51, 234, 0.9);
}

/* Contenido de la tarjeta */
.mcs-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mcs-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.mcs-card:hover .mcs-card-title {
    color: var(--mcs-primary);
}

/* Meta información */
.mcs-card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.mcs-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.mcs-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--mcs-primary);
}

.mcs-icon-whatsapp {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Acciones de la tarjeta */
.mcs-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.mcs-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.mcs-btn:active {
    transform: scale(0.98);
}

/* Botón Primario - WhatsApp Verde */
.mcs-btn-primary {
    background-color: #16a34a;
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(22, 163, 74, 0.2), 0 4px 6px -2px rgba(22, 163, 74, 0.1);
}

.mcs-btn-primary:hover {
    background-color: #15803d;
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(22, 163, 74, 0.3), 0 4px 6px -2px rgba(22, 163, 74, 0.15);
}

/* Botón Secundario - Notificarme */
.mcs-btn-secondary {
    background-color: #ffffff;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.mcs-btn-secondary:hover {
    border-color: var(--mcs-primary);
    color: var(--mcs-primary);
}

/* Botón Info */
.mcs-btn-info {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    min-width: 46px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.mcs-btn-info:hover {
    background-color: #f8fafc;
    color: var(--mcs-primary);
    border-color: #bfdbfe;
}

.mcs-btn-info .mcs-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    color: inherit;
}

.mcs-btn-info .mcs-icon circle,
.mcs-btn-info .mcs-icon line {
    stroke: currentColor;
    stroke-width: 2;
}

.mcs-btn-info svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mcs-btn-info svg circle,
.mcs-btn-info svg line {
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.mcs-btn-info svg circle {
    fill: none;
}

/* Asegurar que el punto de la "i" se vea */
.mcs-btn-info svg line[x1="12"][y1="8"] {
    stroke-width: 3;
    stroke-linecap: round;
}

/* ==================== CARD PRÓXIMAMENTE ==================== */
.mcs-card.mcs-upcoming {
    opacity: 0.75;
}

.mcs-card.mcs-upcoming:hover {
    opacity: 1;
}

.mcs-card.mcs-upcoming .mcs-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f1f5f9;
}

.mcs-card.mcs-upcoming .mcs-card-image::before {
    display: none;
}

.mcs-upcoming-icon {
    width: 48px;
    height: 48px;
    color: #cbd5e1;
}

.mcs-upcoming-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.mcs-btn-disabled {
    width: 100%;
    padding: 14px 16px;
    background-color: #f1f5f9;
    color: #94a3b8;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: not-allowed;
    border: none;
}

/* Sin resultados */
.mcs-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #64748b;
}

.mcs-no-results p {
    margin: 0;
    font-size: 16px;
}

/* ==================== RESPONSIVE - TABLET GRANDE ==================== */
@media (max-width: 1280px) {
    .mcs-grid {
        gap: 20px;
    }
}

/* ==================== RESPONSIVE - TABLET ==================== */
@media (max-width: 1024px) {
    .mcs-container {
        padding: 40px 20px;
    }

    .mcs-header {
        margin-bottom: 40px;
    }

    .mcs-title {
        font-size: 36px;
    }

    .mcs-description {
        font-size: 16px;
    }

    .mcs-filters-wrapper {
        gap: 20px;
    }

    .mcs-search-wrapper {
        max-width: 400px;
    }

    .mcs-grid,
    .mcs-container[data-columns="4"] .mcs-grid,
    .mcs-container[data-columns="5"] .mcs-grid,
    .mcs-container[data-columns="6"] .mcs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .mcs-container[data-columns="1"] .mcs-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== RESPONSIVE - TABLET PEQUEÑA ==================== */
@media (max-width: 768px) {
    .mcs-container {
        padding: 32px 16px;
    }

    .mcs-header {
        margin-bottom: 32px;
    }

    .mcs-badge {
        font-size: 10px;
        padding: 5px 12px;
        margin-bottom: 20px;
    }

    .mcs-title {
        font-size: 28px;
        margin-bottom: 16px;
    }

    .mcs-title-highlight {
        display: block;
    }

    .mcs-description {
        font-size: 15px;
        line-height: 1.6;
    }

    .mcs-filters-wrapper {
        gap: 16px;
        margin-bottom: 32px;
    }

    .mcs-filters {
        gap: 8px;
    }

    .mcs-filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .mcs-search-wrapper {
        max-width: 100%;
    }

    .mcs-container .mcs-search-input,
    .mcs-search-box .mcs-search-input,
    input.mcs-search-input {
        padding: 12px 44px 12px 44px !important;
        font-size: 14px !important;
    }

    .mcs-search-box .mcs-search-icon {
        left: 14px;
        width: 18px;
        height: 18px;
        min-width: 18px;
        min-height: 18px;
    }

    .mcs-grid,
    .mcs-container[data-columns="2"] .mcs-grid,
    .mcs-container[data-columns="3"] .mcs-grid,
    .mcs-container[data-columns="4"] .mcs-grid,
    .mcs-container[data-columns="5"] .mcs-grid,
    .mcs-container[data-columns="6"] .mcs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .mcs-card-image {
        height: 160px;
    }

    .mcs-card-content {
        padding: 16px;
    }

    .mcs-card-title {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .mcs-meta-item {
        padding: 6px 10px;
        font-size: 11px;
    }

    .mcs-card-meta {
        margin-bottom: 16px;
    }

    .mcs-btn {
        padding: 12px 14px;
        font-size: 10px;
    }

    .mcs-btn-info {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }
}

/* ==================== RESPONSIVE - MÓVIL ==================== */
@media (max-width: 480px) {
    .mcs-container {
        padding: 24px 12px;
    }

    .mcs-title {
        font-size: 24px;
    }

    .mcs-description {
        font-size: 14px;
    }

    /* Filtros mejorados para móvil - Grid de chips */
    .mcs-filters {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
        overflow-x: visible;
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 0;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .mcs-filters::-webkit-scrollbar {
        display: none;
    }

    .mcs-container .mcs-filters .mcs-filter-btn,
    .mcs-filters .mcs-filter-btn,
    button.mcs-filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 10px 12px !important;
        font-size: 12px !important;
        text-align: center;
        justify-content: center;
        border-radius: 10px !important;
        width: 100%;
    }

    /* El botón "Todos" ocupa toda la fila */
    .mcs-filters .mcs-filter-btn:first-child {
        grid-column: 1 / -1;
    }

    .mcs-grid,
    .mcs-container[data-columns="1"] .mcs-grid,
    .mcs-container[data-columns="2"] .mcs-grid,
    .mcs-container[data-columns="3"] .mcs-grid,
    .mcs-container[data-columns="4"] .mcs-grid,
    .mcs-container[data-columns="5"] .mcs-grid,
    .mcs-container[data-columns="6"] .mcs-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .mcs-card-image {
        height: 180px;
    }

    .mcs-card-actions {
        flex-direction: row;
    }

    .mcs-btn {
        padding: 14px 16px;
        font-size: 11px;
    }
}

/* Para pantallas muy pequeñas, ajustar más */
@media (max-width: 360px) {
    .mcs-filters {
        grid-template-columns: 1fr;
    }

    .mcs-filters .mcs-filter-btn:first-child {
        grid-column: 1;
    }
}

/* ==================== ANIMACIONES DE FILTRO ==================== */
.mcs-card {
    animation: mcs-fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes mcs-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Transición suave al filtrar */
.mcs-card.mcs-fade-out {
    animation: mcs-fadeOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes mcs-fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.mcs-card.mcs-fade-in {
    animation: mcs-fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ==================== ACCESIBILIDAD ==================== */
.mcs-filter-btn:focus,
.mcs-btn:focus,
.mcs-btn-info:focus {
    outline: 2px solid var(--mcs-primary);
    outline-offset: 2px;
}

/* Modo de alto contraste */
@media (prefers-contrast: high) {
    .mcs-card {
        border: 2px solid var(--mcs-text);
    }

    .mcs-filter-btn {
        border-width: 2px;
    }
}

/* Reducir movimiento si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
    .mcs-card,
    .mcs-card:hover,
    .mcs-card-image img,
    .mcs-btn,
    .mcs-filter-btn {
        transition: none;
        animation: none;
    }

    .mcs-badge-dot::before,
    .mcs-live-dot {
        animation: none;
    }
}

/* ==================== VISTA COMPACTA MÓVIL ==================== */
/* Por defecto, las tarjetas compactas están ocultas */
.mcs-compact-card {
    display: none;
}

/* En móvil, cuando está activa la vista compacta */
@media (max-width: 768px) {
    /* Ocultar tarjetas normales en vista compacta */
    .mcs-container.mcs-mobile-compact .mcs-card {
        display: none !important;
    }

    /* Mostrar tarjetas compactas */
    .mcs-container.mcs-mobile-compact .mcs-compact-card {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px;
        background-color: var(--mcs-card-bg, #ffffff);
        border-radius: 16px;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
        transition: all 0.3s ease;
        border: 1px solid #f1f5f9;
    }

    .mcs-container.mcs-mobile-compact .mcs-compact-card:hover {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

    /* Grid de una columna para compactas */
    .mcs-container.mcs-mobile-compact .mcs-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* Icono de categoría */
    .mcs-compact-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        min-width: 52px;
        border-radius: 12px;
        flex-shrink: 0;
    }

    .mcs-compact-icon svg {
        width: 28px;
        height: 28px;
    }

    /* Contenido principal */
    .mcs-compact-content {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    /* Header con categoría y live badge */
    .mcs-compact-header {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mcs-compact-category {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .mcs-compact-live {
        display: inline-flex;
        align-items: center;
        padding: 2px 6px;
        background-color: var(--mcs-live-badge, #dc2626);
        color: #ffffff;
        font-size: 9px;
        font-weight: 700;
        border-radius: 4px;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    /* Título */
    .mcs-compact-title {
        margin: 0;
        font-size: 14px;
        font-weight: 600;
        color: var(--mcs-text, #0f172a);
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Meta (fecha y hora) */
    .mcs-compact-meta {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .mcs-compact-date,
    .mcs-compact-time {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 11px;
        color: #64748b;
    }

    .mcs-compact-date svg,
    .mcs-compact-time svg {
        width: 12px;
        height: 12px;
        flex-shrink: 0;
    }

    /* Acción (botones) */
    .mcs-compact-action {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    .mcs-compact-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 10px 14px;
        border-radius: 10px;
        font-size: 10px;
        font-weight: 700;
        text-decoration: none;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        transition: all 0.3s ease;
        white-space: nowrap;
        border: none;
        cursor: pointer;
    }

    .mcs-compact-btn svg {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }

    .mcs-compact-btn span {
        display: none;
    }

    .mcs-compact-btn-primary {
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
        color: #ffffff;
        box-shadow: 0 2px 4px rgba(37, 211, 102, 0.3);
    }

    .mcs-compact-btn-primary:hover {
        box-shadow: 0 4px 8px rgba(37, 211, 102, 0.4);
        transform: translateY(-1px);
    }

    .mcs-compact-btn-secondary {
        background-color: #f8fafc;
        color: #475569;
        border: 1px solid #e2e8f0;
    }

    .mcs-compact-btn-secondary:hover {
        background-color: #f1f5f9;
        border-color: #cbd5e1;
    }

    .mcs-compact-info {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        min-width: 36px;
        background-color: transparent;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        color: #94a3b8;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mcs-compact-info svg {
        width: 16px;
        height: 16px;
    }

    .mcs-compact-info:hover {
        background-color: #f8fafc;
        color: var(--mcs-primary, #1d4ed8);
        border-color: #bfdbfe;
    }

    /* Ocultar tarjetas compactas filtradas */
    .mcs-compact-card.mcs-hidden {
        display: none !important;
    }
}

/* En pantallas muy pequeñas, mostrar texto en botón */
@media (max-width: 400px) {
    .mcs-compact-btn {
        padding: 8px 10px;
    }

    .mcs-compact-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .mcs-compact-icon svg {
        width: 24px;
        height: 24px;
    }

    .mcs-compact-title {
        font-size: 13px;
    }

    .mcs-compact-meta {
        gap: 8px;
    }

    .mcs-compact-date,
    .mcs-compact-time {
        font-size: 10px;
    }
}
