:root {
    --sp-primary: #601028;
    --sp-primary-soft: #7e1b3a;
    --sp-secondary: #a62346;
    --sp-accent: #0f766e;
    --sp-bg: #f6f3ef;
    --sp-surface: #ffffff;
    --sp-text: #1f2937;
    --sp-muted: #6b7280;
    --sp-border: #e8dee2;
    --sp-shadow-sm: 0 3px 14px rgba(76, 18, 38, 0.07);
    --sp-shadow-md: 0 12px 28px rgba(66, 20, 36, 0.12);
    --sp-radius-md: 14px;
    --sp-radius-lg: 20px;
    --sp-transition: all 0.22s ease;
}

* {
    font-family:
        "Montserrat",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

body {
    background: var(--sp-bg);
}

.sp-page {
    width: min(1320px, calc(100% - 2rem));
    margin: 1.75rem auto 2.5rem;
}

.sp-hero {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: var(--sp-primary) url("/images/fondo_rojo.png") center / cover
        no-repeat;
    border: none;
    padding: 1.1rem 2rem;
    color: #fff;
    box-shadow: none;
}

.sp-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.45rem;
}

.sp-hero-escudo {
    width: 52px;
    height: auto;
    opacity: 0.92;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.sp-hero-main {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sp-hero-kicker {
    margin: 0 auto 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.12);
    padding: 0.3rem 0.7rem;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sp-hero-kicker i {
    font-size: 0.45rem;
    opacity: 0.95;
}

.sp-hero-title {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: clamp(1.2rem, 2.4vw, 1.6rem);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.sp-hero-subtitle {
    margin: 0.15rem auto 0;
    max-width: 740px;
    font-size: 0.88rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

.sp-hero-chips {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.sp-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.38rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.sp-hero-stats {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 200px;
}

.sp-hero-stat {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.sp-hero-stat span {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.9;
}

.sp-hero-stat strong {
    margin-top: 0.1rem;
    font-size: 1.15rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.sp-alert {
    margin: 1rem 0;
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 0.8rem 0.95rem;
    font-weight: 600;
}

.sp-alert-success {
    background: #ebf9f2;
    color: #0f5132;
    border-color: #9ddfba;
}

.sp-alert-warning {
    background: #fff7df;
    color: #8a6100;
    border-color: #f1dc99;
}

.sp-alert-danger {
    background: #fdf0f2;
    color: #7a2236;
    border-color: #efc2cf;
}

.sp-alert-info {
    background: #edf6ff;
    color: #1d4f8f;
    border-color: #bfd9fb;
}

.sp-shell {
    margin-top: 1.2rem;
    background: var(--sp-surface);
    border: 1px solid var(--sp-border);
    border-radius: 10px;
    box-shadow: var(--sp-shadow-sm);
    padding: 1.5rem;
}

.sp-toolbar {
    display: flex;
    gap: 0.8rem;
    align-items: flex-end;
    margin-bottom: 0.95rem;
}

.sp-search {
    flex: 1;
}

.sp-search-label {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.8rem;
    color: var(--sp-muted);
    font-weight: 700;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sp-search input {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #dac9d0;
    background: #fff;
    min-height: 46px;
    padding: 0.7rem 0.85rem;
    color: var(--sp-text);
    font-size: 0.95rem;
    transition: var(--sp-transition);
}

.sp-search input:focus {
    outline: none;
    border-color: #b43c5f;
    box-shadow: 0 0 0 3px rgba(166, 35, 70, 0.18);
}

.sp-clear-btn {
    border: 1px solid #d4c3ca;
    background: #fff;
    color: #5f2435;
    border-radius: 12px;
    min-height: 46px;
    padding: 0.65rem 1rem;
    font-weight: 700;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: var(--sp-transition);
}

.sp-clear-btn:hover {
    border-color: #9b2f4e;
    background: #fff5f8;
}

.sp-periods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.2rem;
}

.sp-period-btn {
    border: 1px solid #ddcfd5;
    background: #fff;
    color: #611f34;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    transition: var(--sp-transition);
}

.sp-period-btn:hover {
    background: #fff6f8;
    border-color: #b43c5f;
}

.sp-period-btn.is-active {
    background: #8e2042;
    border-color: #8e2042;
    color: #fff;
    box-shadow: 0 6px 14px rgba(166, 35, 70, 0.24);
}

.sp-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.sp-tab {
    border: 1px solid #e7d8de;
    border-radius: 8px;
    background: #fff;
    color: #5a2335;
    min-height: 58px;
    padding: 0.75rem 0.85rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    transition: var(--sp-transition);
}

.sp-tab:hover {
    border-color: #be4668;
    transform: translateY(-2px);
}

.sp-tab.is-active {
    background: #611329;
    color: #fff;
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(96, 16, 40, 0.26);
}

.sp-tab-main {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.sp-tab-count {
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 800;
    border: 1px solid #d7c4cb;
    background: #fff;
    color: #651c32;
}

.sp-tab.is-active .sp-tab-count {
    border-color: rgba(255, 255, 255, 0.44);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.sp-panel {
    display: none;
    animation: sp-fade-up 0.22s ease;
}

.sp-panel.is-active {
    display: block;
}

.sp-panel-header h2 {
    margin: 0;
    display: flex;
    gap: 0.55rem;
    align-items: center;
    font-size: 1.1rem;
    color: #5c1e33;
    font-weight: 800;
}

.sp-panel-header p {
    margin: 0.35rem 0 1rem;
    color: var(--sp-muted);
    font-size: 0.9rem;
}

.sp-commission-filter {
    margin: 0.25rem 0 0.95rem;
    border: 1px solid #e8d9df;
    border-radius: 8px;
    background: #fff7fa;
    padding: 0.7rem 0.75rem;
}

.sp-commission-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: #6d2940;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.sp-commission-filter-controls {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
}

.sp-commission-filter-controls select {
    width: 100%;
    min-height: 40px;
    border: 1px solid #d9c6cd;
    border-radius: 8px;
    background: #fff;
    padding: 0.55rem 0.7rem;
    color: var(--sp-text);
    font-size: 0.9rem;
}

.sp-commission-filter-controls select:focus {
    outline: none;
    border-color: #b43c5f;
    box-shadow: 0 0 0 3px rgba(166, 35, 70, 0.15);
}

.sp-commission-filter-controls .choices {
    width: 100%;
    margin-bottom: 0;
}

.sp-commission-filter-controls .choices__inner {
    min-height: 40px;
    border: 1px solid #d9c6cd;
    border-radius: 8px;
    background: #fff;
    padding: 0.42rem 0.65rem;
    font-size: 0.9rem;
}

.sp-commission-filter-controls .choices.is-focused .choices__inner,
.sp-commission-filter-controls .choices.is-open .choices__inner {
    border-color: #b43c5f;
    box-shadow: 0 0 0 3px rgba(166, 35, 70, 0.15);
}

.sp-commission-filter-controls .choices__list--dropdown {
    border: 1px solid #d9c6cd;
    border-radius: 8px;
}

.sp-commission-filter-controls
    .choices__list--dropdown
    .choices__item--selectable.is-highlighted {
    background: #fff0f4;
    color: #6d2940;
}

.sp-commission-filter-controls button {
    border: 1px solid #d4c3ca;
    background: #fff;
    color: #5f2435;
    border-radius: 8px;
    min-height: 40px;
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--sp-transition);
}

.sp-commission-filter-controls button:hover {
    border-color: #9b2f4e;
    background: #fff0f4;
}

.sp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.sp-card {
    border-radius: 6px;
    border: 1px solid #eadde1;
    background: #fff;
    box-shadow: 0 4px 15px rgba(83, 26, 44, 0.08);
    padding: 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    transition: var(--sp-transition);
}

.sp-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 22px rgba(77, 20, 37, 0.14);
    border-color: #d5a9b8;
}

.sp-card[hidden] {
    display: none !important;
}

.sp-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.45rem;
}

.sp-badge-type,
.sp-badge-period {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.3rem 0.6rem;
    font-size: 0.74rem;
    font-weight: 700;
}

.sp-badge-type {
    color: #651f35;
    background: #f7e6ec;
}

.sp-badge-period {
    color: #0a5a54;
    background: #dbf3f1;
}

.sp-card-title {
    margin: 0.85rem 0;
    font-size: 1.12rem;
    color: var(--sp-text);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.01em;
}

.sp-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 0.95rem;
}

.sp-card-meta span {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    border-radius: 10px;
    padding: 0.35rem 0.6rem;
    background: #fff;
    border: 1px solid #eadadf;
    color: #5f6369;
    font-size: 0.83rem;
    font-weight: 700;
}

.sp-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.sp-btn {
    border-radius: 10px;
    padding: 0.5rem 0.74rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--sp-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.sp-btn-primary {
    border: 1px solid #8a1f40;
    background: #8a1f40;
    color: #fff;
}

.sp-btn-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 7px 14px rgba(166, 35, 70, 0.25);
}

.sp-btn-secondary {
    border: 1px solid #d7c7ce;
    background: #fff;
    color: #5b2435;
}

.sp-btn-secondary:hover {
    background: #fff4f7;
    color: #5b2435;
}

.sp-btn-youtube {
    border: 1px solid #cb2027;
    background: #cb2027;
    color: #fff;
}

.sp-btn-youtube:hover {
    color: #fff;
    box-shadow: 0 7px 14px rgba(203, 32, 39, 0.25);
}

.sp-empty {
    border: 1px dashed #ddc8cf;
    border-radius: 14px;
    background: #fffafc;
    color: #744254;
    text-align: center;
    padding: 1.35rem 1rem;
}

.sp-empty i {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}

.sp-empty p {
    margin: 0;
    font-weight: 600;
}

@keyframes sp-fade-up {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .sp-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .sp-page {
        width: calc(100% - 1rem);
        margin-top: 1rem;
    }

    .sp-hero {
        padding: 0.7rem 0.75rem;
    }

    .sp-hero-escudo {
        width: 36px;
    }

    .sp-hero-subtitle {
        font-size: 0.78rem;
    }

    .sp-hero-stats {
        max-width: 180px;
    }

    .sp-commission-filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .sp-commission-filter-controls .choices {
        width: 100%;
    }

    .sp-commission-filter-controls button {
        justify-content: center;
    }

    .sp-shell {
        padding: 1rem;
    }

    .sp-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .sp-clear-btn {
        width: 100%;
        justify-content: center;
    }

    .sp-tabs {
        grid-template-columns: 1fr;
    }
}
