/* =========================================
   COMPETITIONS PRO (Neo-Brutalist / SaaS Theme)
   ========================================= */

:root {
    --pro-bg: #fafafa;
    --pro-surface: #ffffff;
    --pro-border: #e2e8f0;
    --pro-border-hover: #94a3b8;
    --pro-text: #0f172a;
    --pro-text-muted: #64748b;
    --pro-accent: #000000;
    --pro-accent-light: #f1f5f9;
    --pro-accent-blue: #2563eb;
    --pro-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --pro-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
}

.competitions-pro-container {
    /* padding: 32px 24px; */
    /* background-color: var(--pro-bg); */
    color: var(--pro-text);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- HEADER BAR --- */
.competitions-pro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    gap: 20px;
    /* background: var(--pro-surface); */
    padding: 16px 24px;
    /* border: 1px solid var(--pro-border); */
    border-radius: 12px;
    box-shadow: var(--pro-shadow-sm);
    flex-wrap: wrap;
}

.competitions-pro-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--pro-accent);
}

/* --- GLOBAL SEARCH INPUT --- */
.competition-pro-search {
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    position: relative;
}

.competition-pro-search input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid var(--pro-border);
    border-radius: 8px;
    font-size: 14px;
    background-color: var(--pro-bg);
    color: var(--pro-text);
    transition: all 0.2s ease;
}

.competition-pro-search input:focus {
    outline: none;
    border-color: var(--pro-accent);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
    background-color: var(--pro-surface);
}

.competition-pro-search svg {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--pro-text-muted);
}

/* --- HEADER ACTIONS --- */
.competitions-pro-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.competition-pro-btn {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid var(--pro-border);
    background: var(--pro-surface);
    color: var(--pro-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.competition-pro-btn:hover {
    border-color: var(--pro-border-hover);
    background: var(--pro-accent-light);
}

.competition-pro-btn--primary {
    background: #4fd1c5;
    color: #0a1337;
    border-color: var(--pro-accent);
}

.competition-pro-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--pro-shadow-md);
    background: #1e293b;
    border-color: #1e293b;
    color: #f4f8fc;
}

/* --- STRUCTURAL LAYOUT --- */
.competition-pro-row {
    margin-bottom: 40px;
    display: grid;
    gap: 16px;
}

.competition-pro-row-head {
    display: grid;
    gap: 6px;
}

.competition-pro-section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--pro-text);
    letter-spacing: -0.01em;
    padding-bottom: 0;
    border-bottom: none;
    display: block;
}

.competition-pro-section-subtitle {
    display: block;
    font-size: 13px;
    color: var(--pro-text-muted);
    margin: 0;
}

/* --- FLUID COMPETITION FLOWS --- */
.competition-pro-flow,
.competition-pro-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    align-items: start;
    overflow: visible;
    padding-bottom: 0;
    scroll-snap-type: none;
}

.competition-pro-carousel::-webkit-scrollbar {
    display: none;
}

/* --- "ALL COMPETITIONS" (GRID) --- */
.competitions-pro-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 20px;
    align-items: start;
}

/* --- THE NEW PRO CARD --- */
.competition-pro-card {
    background-color: var(--pro-surface);
    border: 1px solid var(--pro-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: grid;
    grid-template-rows: auto 1fr;
    align-content: start;
    min-width: 0;
    height: 100%;
}

.competition-pro-card:hover {
    border-color: var(--pro-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--pro-shadow-md);
}

.competition-pro-card-banner {
    min-height: clamp(148px, 24vw, 220px);
    /* aspect-ratio: 16 / 10; */
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--pro-border);
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 14px;
}

.competition-pro-card-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.14) 0%, rgba(15, 23, 42, 0.62) 100%);
}

.competition-pro-card-banner-head {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

/* Badge over banner */
.competition-pro-badge {
    position: relative;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.competition-pro-banner-date {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--pro-text);
    font-size: 12px;
    font-weight: 700;
}

.competition-pro-card-content {
    padding: 18px;
    display: grid;
    gap: 12px;
    align-content: start;
}

.competition-pro-card-heading {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.competition-pro-card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--pro-text);
}

.competition-pro-card-meta,
.competition-pro-card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: flex-start;
}

.competition-pro-chip,
.competition-pro-tag {
    background: var(--pro-accent-light);
    color: var(--pro-text-muted);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.competition-pro-chip--code {
    background: var(--pro-accent);
    color: #fff;
}

.competition-pro-card-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.competition-pro-fact {
    min-width: 0;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--pro-border);
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.9), rgba(255, 255, 255, 0.98));
}

.competition-pro-fact span {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pro-text-muted);
}

.competition-pro-fact strong {
    display: block;
    font-size: 14px;
    line-height: 1.35;
    color: var(--pro-text);
    word-break: break-word;
}

.competition-pro-inline-empty {
    padding: 18px;
    border: 1px dashed var(--pro-border-hover);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--pro-text-muted);
}

/* --- NEW TAB TOGGLES / READABILITY FIX --- */
.competitions-pro-title-area {
    display: flex;
    align-items: center;
    gap: 32px;
}

.competitions-pro-tabs-segmented {
    display: inline-flex;
    background: var(--pro-bg);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--pro-border);
}

.competition-pro-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pro-text-muted);
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.competition-pro-tab:hover {
    color: var(--pro-text);
}

.competition-pro-tab.active {
    background: var(--pro-text);
    color: #f8fbff;
    box-shadow: var(--pro-shadow-sm);
}

/* --- BANNER DATE COMPONENT --- */
.competition-pro-date-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    /* background: linear-gradient(to top, rgb(236 214 214 / 85%) 0%, transparent 100%); */
    padding: 24px 16px 12px;
    color: #193354;
    font-size: 13px;
    font-weight: 700;
    /* text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); */
}

@media (max-width: 960px) {
    .competitions-pro-container {
        padding: 10px 0px;
        min-height: auto;
    }

    .competitions-pro-header {
        align-items: stretch;
    }

    .competitions-pro-title-area {
        width: 100%;
        gap: 20px;
        flex-wrap: wrap;
    }

    .competition-pro-search {
        order: 3;
        max-width: none;
        width: 100%;
    }

    .competition-pro-flow,
    .competition-pro-carousel,
    .competitions-pro-list {
        gap: 16px;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    }
}

@media (max-width: 640px) {
    .competitions-pro-container {
        padding: 10px 0px;
        min-height: auto
    }

    .competitions-pro-header {
        padding: 14px;
        gap: 14px;
    }

    .competitions-pro-title-area {
        gap: 12px;
    }

    .competitions-pro-tabs-segmented {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
        width: 100%;
    }

    .competition-pro-tab {
        width: auto;
    }

    .competitions-pro-actions {
        width: 100%;
    }

    .competitions-pro-actions .competition-pro-btn {
        flex: 1 1 160px;
        width: auto;
    }

    .competitions-pro-list {
        grid-template-columns: 1fr;
    }

    .competition-pro-card {
        min-width: 0;
    }

    .competition-pro-card-banner {
        aspect-ratio: auto;
        min-height: 140px;
    }

    .competition-pro-card-content {
        padding: 14px;
        gap: 10px;
    }

    .competition-pro-card-facts {
        grid-template-columns: 1fr;
    }
}