/* =============================================
   X-CRINO Competition Page — Figma Styles (A.I. Photographymayank)
============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    /* Figma: photosession.com Competitions palette — blue: #1F4377 */
    --comp-accent: #1F4377;
    --comp-accent-hover: #1a3866;
    --comp-heading: #2F4858;
    --comp-heading-alt: #363231;
    --comp-upcoming: #1F4377;
    --comp-active: #22c55e;
    --comp-past: #9ca3af;
    --text-dark: #363231;
    --text-muted: #6C757D;
    --text-light: #9ca3af;
    --bg-dark: #ffffff;
    --bg-card: #ffffff;
    --bg-footer: #F8F9FA;
    --border-light: #e5e7eb;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-pill: 9999px;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

/* Scoped to competition sections to avoid overriding main layout */
.comp-hero,
.comp-steps,
.comp-filters,
.comp-list,
.comp-main-content {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
}
.comp-hero h1, .comp-steps h2, .comp-steps h3, .comp-card h3,
.comp-list h2, .comp-list h3 { font-family: 'Poppins', sans-serif; }

/* ========== HERO ========== */
.comp-hero {
    background: #faf8f5;
    background-image: url('https://images.unsplash.com/photo-1492691527719-9d1e07e534b4?w=1600&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 80px 32px 100px;
    overflow: hidden;
}
.comp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(250,248,245,0.92) 0%, rgba(245,243,240,0.95) 100%);
}
.comp-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    background: #ffffff;
    border: 1px solid var(--border-light);
    margin-bottom: 40px;
}
.hero-pill .pill-label { color: #1F4377; }
.hero-pill .pill-active { color: var(--comp-heading); }
.hero-pill .pill-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}
.hero-title {
    font-size: clamp(3.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
}
.hero-title .title-open { color: #000000; }
.hero-title .title-accent { color: #1F4377; }
.hero-tagline {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 640px;
    line-height: 1.6;
    margin: 0 auto;
}

/* ========== YOUR PATH TO RECOGNITION ========== */
.comp-steps {
    background: #ffffff;
    padding: 64px 32px;
}
.comp-steps-inner {
    max-width: 1280px;
    margin: 0 auto;
}
.comp-steps-title {
    font-size: 2.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #000000;
    text-align: center;
    margin-bottom: 48px;
}
.comp-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    justify-items: center;
}
.step-card {
    background: #ffffff;
    border-radius: 25px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #D1D3D3;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 320px;
    width: 100%;
    aspect-ratio: 1;
    box-sizing: border-box;
}
.step-card .step-pill {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    background: #ffffff;
    color: var(--comp-accent);
    border: 1px solid rgba(31, 67, 119, 0.25);
    white-space: nowrap;
}
.step-icon {
    width: 72px;
    height: 72px;
    background: rgba(31, 67, 119, 0.12);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--comp-accent);
    font-size: 1.875rem;
    margin-bottom: 24px;
    flex-shrink: 0;
}
.step-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--comp-heading);
    margin-bottom: 10px;
}
.step-card p {
    font-size: 0.9375rem;
    font-weight: 400;
    color: #000000;
    line-height: 1.5;
    max-width: 280px;
}

/* ========== SEARCH & FILTERS ========== */
.comp-filters {
    max-width: 1536px;
    margin: 0 auto;
    padding: 32px 32px 20px;
}
.comp-filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.comp-search-wrap {
    flex: 1;
    min-width: 280px;
    position: relative;
}
.comp-search-wrap i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.125rem;
}
.comp-search-wrap input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: none;
    border-radius: 24px;
    font-size: 0.9375rem;
    background: #f3f4f6;
    color: var(--text-dark);
}
.comp-search-wrap input::placeholder { color: var(--text-muted); }
.comp-filter-selects {
    display: flex;
    gap: 12px;
    align-items: center;
}
.comp-filter-selects select {
    padding: 12px 36px 12px 14px;
    border: none;
    border-radius: 24px;
    font-size: 0.875rem;
    background: #f3f4f6;
    color: var(--text-dark);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.comp-filter-selects .comp-funnel-icon { color: var(--text-muted); font-size: 1.125rem; }
.comp-clear {
    font-size: 0.875rem;
    color: var(--text-light);
    cursor: pointer;
    text-decoration: none;
}
.comp-clear:hover { color: var(--comp-accent); }
.comp-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.comp-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--comp-accent);
    border-radius: 24px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #fff;
}
.comp-filter-tag .tag-remove { cursor: pointer; color: rgba(255,255,255,0.9); text-decoration: none; }
.comp-results-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}
.comp-results-count .count-range { font-weight: 700; color: var(--comp-heading); }

/* ========== COMPETITION CARDS ========== */
.comp-list {
    width: 100%;
    max-width: 1700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 32px 40px;
    border-radius: 0;
    position: relative;
}
.comp-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.comp-card {
    background: #FFFFFF;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}
.comp-card:hover { box-shadow: 0 10px 25px -5px rgba(0,0,0,0.15), 0 8px 10px -6px rgba(0,0,0,0.1); }
.comp-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #e5e7eb;
    overflow: hidden;
    border-radius: 28px 28px 0 0;
}
.comp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.comp-card-image .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, transparent 40%, rgba(0,0,0,0.5) 70%, rgba(0,0,0,0.85) 100%);
}
.comp-card-tags {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    z-index: 2;
}
.comp-card-status {
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.comp-card-status.active { background: var(--comp-active); color: #fff; }
.comp-card-status.past { background: var(--comp-past); color: #fff; }
.comp-card-status.upcoming { background: var(--comp-upcoming); color: #fff; }
.comp-card-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
    background: rgb(31, 67, 119);
    padding: 4px 10px;
    border-radius: 4px;
}
.comp-card-category::before {
    content: '';
    width: 20px;
    height: 1px;
    background: rgba(255,255,255,0.9);
    flex-shrink: 0;
}
.comp-card-image .card-title-block .comp-card-category {
    display: inline-flex;
    margin-bottom: 8px;
}
.comp-card-share {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 2;
    font-size: 1rem;
    border: none;
}
.comp-card-share:hover { background: rgba(255, 255, 255, 0.4); color: #fff; }
.comp-card-image .card-title-block {
    position: absolute;
    bottom: 18px;
    left: 18px;
    right: 18px;
    z-index: 2;
    text-align: left;
}
.comp-card-image .card-title-block h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.3;
}
.comp-card-image .card-title-block .card-desc-img {
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255,255,255,0.95);
    line-height: 1.45;
}
.comp-card-body {
    padding: 24px 20px;
    background: #FFFFFF;
}
.comp-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    margin-bottom: 20px;
}
.comp-card-detail {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8125rem;
}
.comp-card-detail i {
    color: #6b7280;
    margin-top: 2px;
    font-size: 1rem;
}
.comp-card-detail .label {
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #9ca3af;
    font-size: 0.6875rem;
}
.comp-card-detail .value { color: #000000; font-weight: 700; }
.comp-card-detail .value.prize { color: rgb(31, 67, 119); font-weight: 700; }
.comp-card-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.comp-card-actions .btn-participate,
.comp-card-actions .btn-notify,
.comp-card-actions .btn-view-details {
    text-decoration: none;
}
.btn-participate {
    padding: 14px 24px;
    background: rgb(31, 67, 119);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}
.btn-participate:hover { background: #1a3866; color: #fff; }
.btn-notify {
    padding: 14px 24px;
    background: rgb(31, 67, 119);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    justify-content: center;
    text-decoration: none;
}
.btn-notify:hover { background: #1a3866; color: #fff; }
.btn-view-details {
    padding: 14px 24px;
    background: #e5e7eb;
    color: #000000;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.btn-view-details:hover { background: #d1d5db; color: #000000; }

/* ========== PAGINATION ========== */
.comp-pagination-wrap {
    display: flex;
    justify-content: center;
    padding: 32px 0 48px;
}
.comp-pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}
.comp-pagination a, .comp-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-dark);
    background: #f3f4f6;
}
.comp-pagination a:hover { background: #e5e7eb; color: var(--comp-heading); }
.comp-pagination .current {
    background: rgb(31, 67, 119);
    color: #fff;
}

/* ========== EMPTY STATE ========== */
.comp-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .comp-steps-grid { grid-template-columns: 1fr; }
    .comp-cards-grid { grid-template-columns: repeat(2, 1fr); }
    .comp-hero { padding: 60px 24px 80px; }
    .comp-steps { padding: 48px 24px; }
    .comp-filters { padding: 24px 24px 16px; }
    .comp-list { padding: 0 24px 32px; }
}
@media (max-width: 768px) {
    .comp-hero { padding: 40px 16px 60px; }
    .hero-title { font-size: clamp(2rem, 8vw, 3rem); margin-bottom: 16px; }
    .hero-tagline { font-size: 1rem; }
    .hero-pill { padding: 8px 16px; font-size: 0.75rem; margin-bottom: 28px; }
    .comp-steps { padding: 40px 16px; }
    .comp-steps-title { font-size: 1.5rem; margin-bottom: 32px; }
    .comp-filters-row { flex-direction: column; align-items: stretch; gap: 12px; }
    .comp-search-wrap { min-width: 0; }
    .comp-filter-selects { flex-wrap: wrap; }
    .comp-list { padding: 0 16px 24px; }
    .comp-cards-grid { grid-template-columns: 1fr; gap: 20px; }
    .comp-card-body { padding: 18px 16px; }
    .comp-card-actions { flex-direction: column; gap: 10px; }
    .btn-participate, .btn-view-details, .btn-notify { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
    .comp-hero { padding: 32px 12px 48px; }
    .hero-title { font-size: clamp(1.75rem, 7vw, 2.5rem); }
    .comp-steps { padding: 32px 12px; }
    .comp-steps-title { font-size: 1.35rem; margin-bottom: 24px; }
    .comp-list { padding: 0 12px 20px; }
    .comp-cards-grid { gap: 16px; }
}
