/*
 * 파일명: main.css
 * 위치: /assets/css/main.css
 * 기능: 꽃배달 서비스 메인 스타일시트 (새로운 디자인)
 * 작성일: 2025-06-30
 * 수정일: 2025-06-30
 */

/* ===================================
   CSS 변수 및 기본 설정
   =================================== */
:root {
    /* 꽃배달 테마 색상 */
    --primary-color: #ff6b8a;
    --primary-light: #ffb3c6;
    --primary-dark: #e91e63;
    --secondary-color: #4caf50;
    --secondary-light: #81c784;
    
    /* 그라데이션 */
    --gradient-primary: linear-gradient(135deg, #ff6b8a 0%, #ff8a95 50%, #ffa8a8 100%);
    --gradient-hero: linear-gradient(135deg, #ff6b8a 0%, #e91e63 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #fdf7f7 100%);
    
    /* 색상 팔레트 */
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --info-color: #2196f3;
    
    /* 중성 색상 */
    --text-dark: #2d3748;
    --text-medium: #4a5568;
    --text-light: #718096;
    --text-lighter: #a0aec0;
    --border-color: #e2e8f0;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    
    /* 그림자 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    
    /* 트랜지션 */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* 폰트 */
    --font-primary: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===================================
   기본 리셋 및 타이포그래피
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

/* ===================================
   히어로 섹션
   =================================== */
.hero-section {
    position: relative;
    min-height: 40vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    overflow: hidden;
    color: white;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 1.1rem;
    font-weight: 500;
}

.stat-divider {
    opacity: 0.7;
    font-size: 1.2rem;
}

/* ===================================
   섹션 공통 스타일
   =================================== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-medium);
    font-weight: 300;
}

/* ===================================
   카테고리 섹션
   =================================== */
.categories-section {
    padding: 5rem 0;
    background-color: var(--bg-light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background: var(--gradient-card);
    border: none;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.category-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.category-count {
    color: var(--text-medium);
    font-size: 0.95rem;
}

/* ===================================
   사이트 목록 섹션
   =================================== */
.sites-section {
    padding: 5rem 0;
}

.category-section {
    margin-bottom: 4rem;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
    background: var(--gradient-card);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.category-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.category-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-height: none; /* 높이 제한 제거 */
}

/* 2줄 제한을 위한 반응형 그리드 */
@media (min-width: 1200px) {
    .sites-grid {
        grid-template-columns: repeat(4, 1fr); /* 4열 */
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .sites-grid {
        grid-template-columns: repeat(3, 1fr); /* 3열 */
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .sites-grid {
        grid-template-columns: repeat(2, 1fr); /* 2열 */
    }
}

@media (max-width: 575px) {
    .sites-grid {
        grid-template-columns: 1fr; /* 1열 */
    }
}

.site-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.site-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.site-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.site-content {
    flex: 1;
}

.site-name {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* 사이트명 앞에 분홍색 외부링크 아이콘 */
.site-name a:before {
    content: "\f35d"; /* FontAwesome external-link-alt 아이콘 */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
}

/* 사이트명 링크 스타일 */
.site-name a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
}

.site-name a:hover {
    color: var(--primary-color);
}

.site-name a:hover:before {
    background: var(--primary-dark);
}


.site-description {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.site-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.view-count {
    color: var(--text-light);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

/* ===================================
   더보기 버튼
   =================================== */
.more-sites {
    text-align: center;
    margin-top: 2rem;
}

.more-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.more-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.more-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85rem;
}

/* ===================================
   CTA 섹션
   =================================== */
.cta-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.cta-card {
    background: var(--gradient-card);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-normal);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ===================================
   빈 상태
   =================================== */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-medium);
    margin-bottom: 2rem;
}

/* ===================================
   애니메이션
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   반응형 디자인
   =================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
    
    .sites-grid {
        grid-template-columns: 1fr;
    }
    
    .category-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cta-card {
        padding: 2rem;
        margin: 0 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 35vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-divider {
        display: none;
    }
    
    .site-card {
        padding: 1rem;
    }
    
    .more-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}



/* 사이트 링크 및 아이콘 스타일 */
.site-icon {
    font-size: 0.8em;
    margin-right: 0.5rem;
    transition: var(--transition-fast);
}

.site-link.has-website .site-icon {
    color: var(--primary-color);
}

.site-link.no-website .site-icon {
    color: #6c757d;
}

.site-link:hover.has-website .site-icon {
    color: var(--primary-dark);
}

.site-link:hover.no-website .site-icon {
    color: #5a6268;
}

/* 전화번호 링크와 같은 색상 매칭 */
.phone-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    border-bottom: 1px dotted var(--primary-color);
}

.phone-link:hover {
    color: var(--primary-dark);
    border-bottom: 1px solid var(--primary-dark);
}

.phone-link:before {
    content: "📞 ";
    font-size: 0.9em;
    margin-right: 0.2em;
}


/* ===================================
   푸터 섹션
   =================================== */
.footer-section {
    background: #2d3748;
    color: #a0aec0;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid #4a5568;
}

.footer-section p {
    color: #e2e8f0;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 0;
}

.footer-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.footer-section .mt-2 {
    text-align: center;
}

.footer-section .mt-2 a {
    color: #a0aec0;
    margin: 0 1rem;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    transition: var(--transition-fast);
}

.footer-section .mt-2 a:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.footer-section .mt-2 a i {
    color: var(--primary-color);
    opacity: 0.8;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .footer-section {
        padding: 1.5rem 0;
        margin-top: 3rem;
    }
    
    .footer-section .mt-2 a {
        display: block;
        margin: 0.5rem 0;
        justify-content: center;
    }
}