/*
Theme Name: Kadence Child
Theme URI: https://www.kadencewp.com/
Description: Kadence Child Theme for MarathonTalk
Author: 마라톤톡
Template: kadence
Version: 1.0.3
Text Domain: kadence-child
*/

/* ============================================
   Race Info Block
   ============================================ */
.race-info-block {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-sizing: border-box;
}

.race-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.race-meta li {
    padding: 10px 0;
    font-size: 1.05rem;
    border-bottom: 1px solid #f3f4f6;
}

.race-meta li strong {
    display: inline-block;
    min-width: 80px;
    color: #6b7280;
    font-weight: 600;
    margin-right: 8px;
}

/* 종목 정보 표 */
.race-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.race-table th,
.race-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.race-table thead th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.race-table tbody tr:hover {
    background: #f9fafb;
}

/* 버튼 */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    margin-right: 8px;
    margin-top: 12px;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-outline {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-outline:hover {
    background: #2563eb;
    color: #fff;
}

/* 대회 상태 뱃지 */
.race-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    background: #e0f2fe;
    color: #0369a1;
    margin-bottom: 16px;
}

.race-status-접수중 { background: #dcfce7; color: #166534; }
.race-status-마감임박 { background: #fef3c7; color: #92400e; }
.race-status-접수마감 { background: #fee2e2; color: #991b1b; }

/* 표 제목 */
.race-info-block h3 {
    margin-top: 32px;
    padding-bottom: 12px;
    border-bottom: 2px solid #2563eb;
    display: inline-block;
    font-size: 1.3rem;
}

/* 콘텐츠 영역 정렬 */
.entry-content,
.site-main {
    max-width: 900px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box;
}

/* 위치 */
.race-location {
    margin-top: 24px;
    padding: 16px 0;
}

/* 태그 */
.race-tags {
    margin-top: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.race-tag-group {
    margin-bottom: 8px;
}

.race-tag-group strong {
    margin-right: 8px;
    color: #6b7280;
}

.race-tag {
    display: inline-block;
    padding: 4px 12px;
    margin: 4px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
}

.race-tag:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* 모바일 */
@media (max-width: 767px) {
    .race-info-block {
        padding: 16px;
        border-radius: 8px;
    }
    .race-table th,
    .race-table td {
        padding: 10px 6px;
        font-size: 0.9rem;
    }
    .btn {
        display: block;
        width: 100%;
        text-align: center;
        margin-right: 0;
    }
}

/* ============================================
   Race Archive (대회 목록)
   ============================================ */
.race-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.race-archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.race-archive-header h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.race-archive-count {
    color: #6b7280;
    font-size: 1.1rem;
}

.race-archive-count strong {
    color: #2563eb;
    font-size: 1.3rem;
}

/* 필터 */
.race-filters {
    background: #f9fafb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.race-filter-group {
    margin-bottom: 20px;
}

.race-filter-group:last-child {
    margin-bottom: 0;
}

.race-filter-group > label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #374151;
    font-size: 0.95rem;
}

.race-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    font-size: 0.9rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
}

.chip:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.chip.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    font-weight: 600;
}

/* 대회 카드 그리드 */
.race-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 767px) {
    .race-grid {
        grid-template-columns: 1fr;
    }
}

/* 카드 */
.race-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.race-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.race-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.race-card-date {
    color: #2563eb;
    font-weight: 600;
}

.race-card-dday {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
}

.race-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.4;
}

.race-card-title a {
    color: #1f2937;
    text-decoration: none;
}

.race-card-title a:hover {
    color: #2563eb;
}

.race-card-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    flex-grow: 1;
}

.race-card-meta li {
    padding: 4px 0;
    color: #4b5563;
    font-size: 0.95rem;
}

.race-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.race-card-more {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.race-card-more:hover {
    text-decoration: underline;
}

/* 페이지네이션 */
.race-pagination {
    text-align: center;
    margin: 40px 0;
}

.race-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
}

.race-pagination .page-numbers:hover,
.race-pagination .page-numbers.current {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* 빈 결과 */
.race-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 12px;
    color: #6b7280;
}

.race-empty a {
    color: #2563eb;
    font-weight: 600;
}

/* 지난 대회 카드 (회색 처리) */
.race-card-past {
    opacity: 0.7;
    background: #f9fafb;
}

.race-card-dday.past {
    background: #e5e7eb;
    color: #6b7280;
}

/* ============================================
   Home Page (홈페이지)
   ============================================ */

.home-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* HERO 섹션 */
.home-hero {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 16px;
    padding: 60px 40px;
    margin: 20px 0 60px;
    text-align: center;
    color: #fff;
}

.home-hero-inner {
    max-width: 700px;
    margin: 0 auto;
}

.home-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px;
    line-height: 1.3;
}

.home-hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.95;
    margin: 0 0 32px;
    color: #fff;
}

.home-hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 32px;
}

.home-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.home-stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 6px;
    color: #fff;
}

.home-hero-cta {
    display: inline-block;
    background: #fff;
    color: #2563eb;
    padding: 16px 32px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    font-size: 1.05rem;
    transition: all 0.2s;
}

.home-hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    color: #1d4ed8;
}

/* 섹션 공통 */
.home-section {
    margin-bottom: 60px;
}

.home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.home-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 24px;
    color: #1f2937;
}

.home-section-header h2 {
    margin: 0;
}

.home-section-more {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
}

.home-section-more:hover {
    text-decoration: underline;
}

/* 다가오는 대회 카드 그리드 */
.home-race-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .home-race-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .home-race-grid {
        grid-template-columns: 1fr;
    }
    .home-hero {
        padding: 40px 20px;
    }
    .home-hero-title {
        font-size: 1.75rem;
    }
    .home-hero-stats {
        gap: 30px;
    }
    .home-stat-number {
        font-size: 2rem;
    }
}

.home-race-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.home-race-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.home-race-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.home-race-date {
    color: #2563eb;
    font-weight: 600;
}

.home-race-dday {
    background: #fef3c7;
    color: #92400e;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8rem;
}

.home-race-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 14px;
    line-height: 1.4;
}

.home-race-title a {
    color: #1f2937;
    text-decoration: none;
}

.home-race-title a:hover {
    color: #2563eb;
}

.home-race-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    flex-grow: 1;
}

.home-race-meta li {
    padding: 3px 0;
    color: #4b5563;
    font-size: 0.9rem;
}

.home-race-more {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
}

.home-race-more:hover {
    text-decoration: underline;
}

/* 지역/종목 칩 */
.home-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.home-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s;
}

.home-chip:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.home-chip-count {
    background: #f3f4f6;
    color: #6b7280;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.home-chip:hover .home-chip-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}