/**
 * 파일명: home.css
 * 파일경로: /home/majordom/events.kr/assets/css/home.css
 * 기능: 메인 페이지(index.php) 전용 스타일 — 히어로, 검색박스, 이벤트 카드/테이블, 소개·FAQ 섹션
 * 작성일: 2026-06-24
 * 수정일: 2026-06-24
 * 비고: index.php 인라인 <style> 블록에서 분리 (브라우저 캐싱 + ?v=filemtime 캐시 버스팅)
 */

/* ======== [1차] 메인 페이지 스타일 ======== */

/* ---- [2차] 히어로 섹션 ---- */
.hero-section {
    background: linear-gradient(135deg, #0db19e 0%, #3a66df 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: -40px;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* ---- [2차] 검색 박스 ---- */
.search-box {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
    border-top: 4px solid;  /* 추가 */
    border-image: linear-gradient(135deg, #10a37f 0%, #5664d2 100%) 1;  /* 추가 */
}


/* ---- [2차] 특별 필터 버튼 ---- */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 20px;
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f8f9fa;
    border-color: #0d6efd;
    color: #0d6efd;
}

.filter-btn.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* ---- [2차] 기존 이벤트 카드 스타일 (공모전/설문용) ---- */
.event-card {
    transition: all 0.3s ease;
    border: none;
    height: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    overflow: hidden;
    position: relative;
    background: white;
}

.event-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #10a37f 0%, #5664d2 100%);
    z-index: 1;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.event-category {
    background: linear-gradient(135deg, #10a37f 0%, #5664d2 100%);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-title {
    margin-bottom: 1rem;
}

.event-title a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.event-title a:hover {
    color: #10a37f;
}

.event-meta {
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
    margin-top: auto;
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.event-meta-item:hover {
    transform: translateX(5px);
    color: #495057;
}

.event-meta-item i {
    color: #10a37f;
    width: 18px;
    font-size: 1rem;
}

/* ---- [2차] 게시판 테이블 스타일 ---- */
.event-table-wrapper {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-top: 4px solid;
    border-image: linear-gradient(135deg, #10a37f 0%, #5664d2 100%) 1;
}

.event-table {
    margin-bottom: 0;
}

.event-table thead {
    background: #f8f9fa;
}

.event-table th {
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding: 1rem;
}

.event-table td {
    padding: 1rem;
    vertical-align: middle;
}

.event-table tbody tr {
    transition: background 0.2s;
}

.event-table tbody tr:hover {
    background: #f8f9fa;
}

.category-badge {
    background: #e7f3ff;
    color: #0066cc;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.deadline-badge {
    background: #fff3cd;
    color: #856404;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
}

.deadline-urgent {
    background: #f8d7da;
    color: #721c24;
}

.prize-tooltip {
    display: inline-block;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* ---- [2차] AEO 서비스 소개·FAQ 섹션 (카드형) ---- */
/* [3차] 브랜드 그라데이션 토큰 (로고 텍스트와 동일) */
.info-faq-section {
    --brand-gradient: linear-gradient(135deg, #1aad9e 0%, #1a6fd4 100%);
    position: relative;
    margin-top: 3rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem 1.75rem;
    overflow: hidden;
}
.info-faq-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--brand-gradient);
}

/* [3차] 최종 업데이트 pill 뱃지 */
.info-faq-section .update-date {
    display: inline-block;
    margin-bottom: 1.75rem;
    padding: 0.25rem 0.75rem;
    background: #f1f3f5;
    border-radius: 999px;
    color: #868e96;
    font-size: 0.8rem;
}

/* [3차] 섹션 제목 / 본문 */
.info-faq-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}
.info-faq-section h2:not(:first-of-type) {
    margin-top: 2.25rem;
}
.info-faq-section p,
.info-faq-section li {
    color: #495057;
    line-height: 1.8;
    font-size: 0.97rem;
}

/* [3차] 응모 단계 — 번호 뱃지 (CSS 카운터) */
.info-faq-section .info-steps {
    list-style: none;
    padding-left: 0;
    counter-reset: step;
}
.info-faq-section .info-steps li {
    position: relative;
    margin-bottom: 0.75rem;
    padding-left: 2.5rem;
    counter-increment: step;
}
.info-faq-section .info-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    background: var(--brand-gradient);
    border-radius: 50%;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
}

/* [3차] FAQ — Q/A 마커 서브 카드 그리드 */
.faq-list {
    margin-top: 0.5rem;
    display: grid;
    gap: 0.75rem;
}
.faq-item {
    padding: 1.1rem 1.25rem;
    background: #f8f9fa;
    border: 1px solid #eef0f2;
    border-radius: 10px;
}
.faq-item h3,
.faq-item .faq-answer {
    position: relative;
    padding-left: 1.6rem;
}
.faq-item h3::before,
.faq-item .faq-answer::before {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
}
.faq-item h3 {
    font-size: 1.02rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}
.faq-item h3::before {
    content: "Q";
    color: #1aad9e;
}
.faq-item .faq-answer {
    margin: 0;
    color: #6c757d;
    line-height: 1.75;
    font-size: 0.95rem;
}
.faq-item .faq-answer::before {
    content: "A";
    color: #1a6fd4;
}

/* 섹션 제목 스타일 추가 */
.section-title {
    position: relative;
    margin-bottom: 3rem;
    text-align: center;
}

.section-title h2 {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: #6c757d;
    font-size: 1.1rem;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #10a37f 0%, #5664d2 100%);
    border-radius: 2px;
}

/* ---- [2차] 반응형 ---- */
@media (max-width: 768px) {
    .event-table {
        font-size: 0.85rem;
    }

    .event-table th, .event-table td {
        padding: 0.6rem 0.4rem;
    }

    .hide-mobile {
        display: none;
    }

    /* 카테고리 배지 모바일 축소 */
    .category-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }

    /* 이벤트명 2줄 제한 */
    .event-table .event-title-text {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* 응모 버튼 모바일 축소 */
    .event-table .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}
