/* 
 * 스파 메인 페이지(index.php) 전용 CSS
 * 
 * 이 파일은 spa/index.php 페이지에서만 사용되는 스타일을 포함합니다.
 * 공통 스타일은 spa.css를 참조하세요.
 */

/* ============================================
   히어로 섹션
   ============================================ */
/* 히어로 섹션 시각적 스타일 (레이아웃은 spa.css에서 처리) */
.spa-main-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.spa-main-hero .container {
    margin-top: 90px;
    margin-bottom: 10px;
}

.spa-main-hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.spa-main-hero p {
    font-size: 20px;
    margin-bottom: 20px;
}

/* ============================================
   검색 박스
   ============================================ */
.spa-search-box-top {
    margin-bottom: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.spa-search-box-top form {
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 100%;
}

.spa-search-box-top input {
    flex: 1;
    height: 50px;
    padding: 0 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.spa-search-box-top input:focus {
    border-color: #667eea;
}

.spa-search-box-top button {
    height: 50px;
    padding: 0 40px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.spa-search-box-top button:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.spa-search-box-top .action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.spa-search-box-top .action-btn {
    height: 50px;
    padding: 0 24px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.spa-search-box-top .action-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.spa-search-box-top .action-btn i {
    font-size: 14px;
}

/* ============================================
   인기 스파 썸네일 그리드
   ============================================ */
.spa-thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.spa-thumbnail-grid > a {
    text-decoration: none;
    color: inherit;
}

.spa-thumbnail-box {
    width: 100%;
    max-width: 200px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #f8f9fa;
    margin: 0 auto;
}

.spa-thumbnail-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.spa-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.spa-thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 15px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.spa-thumbnail-box:hover .spa-thumbnail-overlay {
    transform: translateY(0);
}

.spa-thumbnail-name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spa-thumbnail-info {
    font-size: 12px;
    opacity: 0.9;
}

.spa-thumbnail-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
}

.spa-thumbnail-rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.spa-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #ff6b6b;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 5px;
}

/* ============================================
   레이아웃 유틸리티
   ============================================ */
.spa-index-container {
    margin-top: 10px;
    margin-bottom: 20px;
}

.spa-index-section {
    margin-bottom: 60px;
}

.spa-index-section h2 {
    margin-bottom: 30px;
}

.spa-empty-message {
    padding: 40px;
    text-align: center;
}

/* ============================================
   모바일 최적화 (768px 이하)
   ============================================ */
@media (max-width: 768px) {
    /* 히어로 섹션 */
    .spa-main-hero {
        padding: 30px 15px;
    }
    
    .spa-main-hero .container {
        margin-top: 60px !important;
        margin-bottom: 10px !important;
        padding: 0 15px;
    }
    
    .spa-main-hero h1 {
        font-size: 28px !important;
        margin-bottom: 15px !important;
        line-height: 1.3;
    }
    
    .spa-main-hero p {
        font-size: 16px !important;
        margin-bottom: 15px !important;
    }
    
    /* 검색 박스 - 검색 인풋과 버튼 한 줄 배치 */
    .spa-search-box-top {
        margin-bottom: 30px;
        padding: 15px;
    }
    
    .spa-search-box-top form {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .spa-search-box-top input {
        width: 60%;
        height: 48px;
        font-size: 16px;
        padding: 0 18px;
        box-sizing: border-box;
        border: 2px solid #e0e0e0;
        border-radius: 25px;
        flex-shrink: 0;
    }
    
    .spa-search-box-top button {
        height: 48px;
        padding: 0 20px;
        font-size: 14px;
        min-height: 48px;
        white-space: nowrap;
        box-sizing: border-box;
        flex-shrink: 0;
    }
    
    /* 스파 전체보기와 지도로 보기 버튼 한 줄 */
    .spa-search-box-top .action-buttons {
        display: flex;
        flex-direction: row;
        gap: 10px;
        width: 100%;
        flex-wrap: nowrap;
        margin-top: 10px;
    }
    
    .spa-search-box-top .action-btn {
        flex: 1 1 auto;
        min-width: 0;
        height: 48px;
        justify-content: center;
        font-size: 13px;
        padding: 0 12px;
        min-height: 48px;
        white-space: nowrap;
        box-sizing: border-box;
    }
    
    /* 인기 스파 썸네일 그리드 - 좌우 슬라이드 */
    .spa-thumbnail-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
        scrollbar-color: #667eea #f0f0f0;
        margin-top: 15px;
        padding-bottom: 10px;
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .spa-thumbnail-grid::-webkit-scrollbar {
        height: 6px;
    }
    
    .spa-thumbnail-grid::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 3px;
    }
    
    .spa-thumbnail-grid::-webkit-scrollbar-thumb {
        background: #667eea;
        border-radius: 3px;
    }
    
    .spa-thumbnail-grid > a {
        flex: 0 0 160px;
        min-width: 160px;
        max-width: 160px;
        scroll-snap-align: start;
    }
    
    .spa-thumbnail-box {
        width: 100%;
        max-width: 100%;
        height: 160px;
        aspect-ratio: 1;
        margin: 0;
    }
    
    .spa-thumbnail-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .spa-thumbnail-rating {
        font-size: 11px;
        padding: 4px 8px;
        top: 8px;
        left: 8px;
    }
    
    .spa-thumbnail-badge {
        font-size: 10px;
        padding: 3px 6px;
        top: 8px;
        right: 8px;
    }
    
    .spa-thumbnail-overlay {
        padding: 12px;
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.5));
    }
    
    .spa-thumbnail-name {
        font-size: 13px;
        margin-bottom: 4px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    
    .spa-thumbnail-info {
        font-size: 11px;
    }
    
    /* 섹션 제목 */
    .spa-index-section {
        margin-bottom: 40px;
    }
    
    .spa-index-section h2 {
        font-size: 22px !important;
        margin-bottom: 20px !important;
        line-height: 1.3;
    }
    
    /* 슬라이드 섹션 overflow 설정 */
    .spa-index-section:has(.theme-recommendation-row),
    .spa-index-section:has(.spa-thumbnail-grid) {
        overflow: visible;
    }
    
    /* 터치 디바이스 호버 효과 제거 */
    .spa-thumbnail-box:hover {
        transform: none;
    }
    
    .theme-card-bg:hover {
        transform: none;
    }
    
    /* 터치 최적화 */
    .spa-thumbnail-box {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        touch-action: manipulation;
    }
}

/* ============================================
   작은 모바일 화면 (480px 이하)
   ============================================ */
@media (max-width: 480px) {
    .spa-main-hero h1 {
        font-size: 24px !important;
    }
    
    .spa-main-hero p {
        font-size: 14px !important;
    }
    
    /* 검색 박스 */
    .spa-search-box-top {
        padding: 12px;
    }
    
    .spa-search-box-top form {
        gap: 8px;
    }
    
    .spa-search-box-top input {
        padding: 0 15px;
    }
    
    .spa-search-box-top button {
        font-size: 13px;
        padding: 0 12px;
    }
    
    .spa-search-box-top .action-buttons {
        gap: 8px;
    }
    
    .spa-search-box-top .action-btn {
        font-size: 12px;
        padding: 0 10px;
    }
    
    /* 인기 스파 */
    .spa-thumbnail-grid > a {
        flex: 0 0 140px;
        min-width: 140px;
        max-width: 140px;
    }
    
    .spa-thumbnail-box {
        height: 140px;
    }
    
    .spa-thumbnail-grid {
        gap: 10px;
    }
    
    .spa-thumbnail-overlay {
        padding: 10px;
    }
    
    .spa-thumbnail-name {
        font-size: 12px;
    }
    
    .spa-thumbnail-info {
        font-size: 10px;
    }
}
