/* 기본 리셋 및 폰트 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    min-height: 100vh;
    overflow-x: hidden;
    /* 마우스 드레그 방지 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* 터치 제스처 방지 */
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-action: manipulation;
    touch-action: manipulation;
}

/* PC에서 스크롤바 숨기기 */
@media (min-width: 768px) {
    body {
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    body::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
}

.container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* 헤더 바 스타일 */
.header-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.header-content {
    z-index: 2;
    animation: fadeInUp 1s ease-out;
    padding: 0 20px;
}

.logo {
    font-size: 1.8rem; /* PC 글자 크기 축소 (기존 1.8rem에서) */
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin: 0;
    animation: glow 3s ease-in-out infinite alternate;
}

/* 플로팅 셰이프 애니메이션 */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

/* 섹션 공통 스타일 */
section {
    width: 100%;
    padding: 80px 0;
    position: relative;
}

/* 상품 섹션 */
.products-section {
    background: linear-gradient(135deg, #357abd 0%, #2c5aa0 100%);
    padding: 120px 0 100px 0;
    margin-top: 80px; /* 헤더 바 높이만큼 여백 */
}

.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin: 0 auto;
    max-width: 1400px;
    padding: 0 40px;
    /* 레이아웃 안정성을 위한 설정 */
    grid-auto-rows: 1fr;
    align-items: start;
}

.product-card {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    padding: 0;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
    cursor: pointer;
    /* 카드 높이 안정화 */
    height: fit-content;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.product-card:hover::before {
    left: 100%;
}

.product-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 35px 70px rgba(0,0,0,0.2);
}

/* 상품 썸네일 */
.product-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 1; /* 정사각형 비율 */
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0; /* 썸네일 크기 고정 */
}

.product-icon {
    width: 80px;
    height: 80px;
    padding: 4px;
    box-sizing: border-box;
    animation: bounce 2s ease-in-out infinite;
    transition: all 0.3s ease;
    /* SVG 이미지가 잘 보이도록 필터 제거 */
}

.product-icon:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.8));
}

/* 상세보기 오버레이 완전히 숨김 */
.product-overlay {
    display: none;
}





/* 상품 콘텐츠 영역 */
.product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15px;
}

/* 가로형 원형 아이콘들 */
.feature-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.feature-icon {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    min-width: 60px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

.feature-icon:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.4);
    background: linear-gradient(135deg, #357abd 0%, #2c5aa0 100%);
}

.product-description {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
    text-align: center;
}



/* 푸터 */
.footer {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3f7a 100%);
    color: white;
    text-align: center;
    padding: 40px 0;
}

.footer-content p {
    margin: 10px 0;
    opacity: 0.8;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 25px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #4a90e2;
}

.modal-body {
    padding: 40px;
}

.modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.modal-header h2 {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 700;
}

.modal-description {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 15px;
}

.modal-story-title {
    color: #333;
    font-size: 1.3rem;
    font-weight: bold;
    margin: 20px 0 15px 0;
    padding-left: 20px;
    border-left: 4px solid #4a90e2;
}



.modal-details {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    padding: 20px;
    background: rgba(53, 122, 189, 0.1);
    border-radius: 15px;
}

.modal-banner {
    margin-top: 30px;
    padding: 0;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.banner-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.banner-image:hover {
    transform: translateY(-2px);
}

/* 애니메이션 키프레임 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    from {
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    }
    to {
        text-shadow: 2px 2px 20px rgba(255,255,255,0.5), 0 0 30px rgba(255,255,255,0.3);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== 반응형 디자인 최적화 ===== */

/* PC (1200px 이상) */
@media (min-width: 1200px) {
    .products-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 50px;
        padding: 0 60px;
    }
    
    .product-card {
        min-height: 320px;
    }
    
    .product-thumbnail {
        aspect-ratio: 1; /* 정사각형 유지 */
    }
    
    .product-icon {
        width: 90px;
        height: 90px;
        padding: 4px;
        box-sizing: border-box;
    }
    
    .product-description {
        font-size: 1.1rem;
    }
}

/* 태블릿 (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .header-content {
        padding: 0 30px;
    }
    
    .logo {
        font-size: 3.5rem;
    }
    
    .products-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        padding: 0 30px;
        max-width: 900px;
    }
    
    .product-card {
        min-height: 280px;
    }
    
    .product-thumbnail {
        aspect-ratio: 1; /* 정사각형 유지 */
    }
    
    .product-icon {
        width: 80px;
        height: 80px;
        padding: 4px;
        box-sizing: border-box;
    }
    
    .product-description {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .modal-content {
        width: 85%;
        margin: 8% auto;
    }
    
    .modal-body {
        padding: 35px 25px;
    }
    
    .modal-header h2 {
        font-size: 2.2rem;
    }
    
    .modal-description {
        font-size: 1rem;
    }
}

/* 모바일 (767px 이하) */
@media (max-width: 767px) {
    .header-bar {
        height: 60px; /* 헤더 바 높이 조정 */
        padding: 0 15px; /* 좌우 패딩 추가 */
    }
    
    .header-content {
        padding: 0 10px;
        width: 100%;
        max-width: 100%;
        overflow: hidden; /* 오버플로우 방지 */
    }
    
    .logo {
        font-size: 1.2rem; /* 글자 크기 대폭 축소 */
        margin: 0;
        line-height: 1.1;
        white-space: nowrap; /* 줄바꿈 방지 */
        overflow: hidden; /* 오버플로우 방지 */
        text-overflow: ellipsis; /* 긴 텍스트는 ...으로 표시 */
        max-width: 100%;
    }
    
    .products-section {
        padding: 60px 0;
        margin-top: 60px; /* 헤더 바 높이만큼 여백 */
    }
    
    .products-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        padding: 0 15px;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .product-card {
        min-height: 220px;
        border-radius: 15px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    
    .product-card:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    }
    
    .product-thumbnail {
        aspect-ratio: 1; /* 정사각형 유지 */
    }
    
    .product-icon {
        width: 80px;
        height: 80px;
        padding: 4px;
        box-sizing: border-box;
        animation: none; /* 모바일에서는 애니메이션 제거 */
    }
    

    
    .feature-icon {
        font-size: 0.7rem;
        padding: 6px 10px;
        border-radius: 12px;
        min-width: 45px;
    }
    
    .footer {
        padding: 30px 0;
    }
    
    .footer-content p {
        font-size: 0.9rem;
        margin: 8px 0;
    }
    
    /* 모바일 모달 최적화 */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 100%;
        margin: 5% auto;
        border-radius: 20px;
        max-height: 90vh;
    }
    
    .close-modal {
        right: 20px;
        top: 15px;
        font-size: 1.8rem;
    }
    
    .modal-body {
        padding: 25px 20px;
    }
    
    .modal-header {
        margin-bottom: 25px;
    }
    
    .modal-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .modal-description {
        font-size: 0.95rem;
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .modal-story-title {
        font-size: 1.1rem;
        margin: 15px 0 10px 0;
        padding-left: 15px;
    }
    
    .modal-features {
        gap: 8px;
        margin-bottom: 20px;
    }
    

    
    .modal-details {
        font-size: 0.9rem;
        padding: 15px;
    }
    
    .modal-details h4 {
        font-size: 1.1rem;
        margin: 15px 0 8px 0;
    }
    
    .modal-details ul {
        padding-left: 15px;
    }
    
    .modal-details li {
        margin: 6px 0;
    }
    
    .modal-banner {
        margin-top: 20px;
        padding-top: 15px;
    }
    
    .banner-image {
        max-width: 100%;
        border-radius: 8px;
    }
}

/* 작은 모바일 (480px 이하) */
@media (max-width: 480px) {
    .header-bar {
        height: 60px;
        padding: 0 10px; /* 더 작은 패딩 */
    }
    
    .header-content {
        padding: 0 5px;
    }
    
    .logo {
        font-size: 1rem; /* 더 작은 글자 크기 */
        margin: 0;
        line-height: 1.0;
    }
    
    .products-container {
        grid-template-columns: repeat(3, 1fr);
        padding: 0 10px;
        gap: 10px;
    }
    
    .product-card {
        border-radius: 12px;
        min-height: 200px;
    }
    
    .product-thumbnail {
        aspect-ratio: 1; /* 정사각형 유지 */
    }
    
    .product-icon {
        width: 70px;
        height: 70px;
        padding: 3px;
        box-sizing: border-box;
    }
    
    .feature-icon {
        font-size: 0.65rem;
        padding: 4px 8px;
        border-radius: 10px;
        min-width: 35px;
    }
    

    
    .modal-content {
        margin: 2% auto;
    }
    
    .modal-body {
        padding: 20px 15px;
    }
    
    .modal-header h2 {
        font-size: 1.6rem;
    }
    
    .modal-description {
        font-size: 0.9rem;
        padding: 12px;
    }
    
    .modal-story-title {
        font-size: 1rem;
        margin: 12px 0 8px 0;
        padding-left: 12px;
    }
    
    .modal-banner {
        margin-top: 15px;
        padding-top: 10px;
    }
    
    .banner-image {
        border-radius: 6px;
    }
}

/* 가로 모드 모바일 최적화 */
@media (max-width: 767px) and (orientation: landscape) {
    .header-bar {
        height: 60px;
        padding: 0 10px;
    }
    
    .header-content {
        padding: 0 5px;
    }
    
    .logo {
        font-size: 1rem;
        margin: 0;
        line-height: 1.0;
    }
    
    .products-section {
        padding: 40px 0;
        margin-top: 60px;
    }
    
    .products-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 15px;
    }
    
    .product-thumbnail {
        height: 100px;
    }
    
    .product-icon {
        font-size: 2.5rem;
    }
    
    .product-title {
        font-size: 1.2rem;
        margin: 15px 0 10px;
    }
    
    .product-description {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    .feature {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none;
        box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    }
    
    .product-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .feature:hover {
        transform: none;
        box-shadow: none;
    }
    
    .feature:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* 스크롤 애니메이션을 위한 클래스 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 호버 효과 개선 */
.product-card:hover .product-icon {
    animation: none;
    transform: scale(1.1);
}

.product-card:hover .feature {
    background: linear-gradient(135deg, #357abd 0%, #4a90e2 100%);
}

/* 접근성 개선 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid #000;
    }
    
    .feature {
        border: 1px solid #000;
    }
} 