/* ===================================
   main.css - 메인 페이지 전용 스타일
   =================================== */

/* ===== 히어로 섹션 ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background:
        linear-gradient(180deg, rgba(9, 14, 22, 0.55) 0%, rgba(9, 14, 22, 0.12) 22%, rgba(9, 14, 22, 0) 42%),
        linear-gradient(90deg, rgba(9, 14, 22, 0.86) 0%, rgba(9, 14, 22, 0.55) 42%, rgba(9, 14, 22, 0.20) 78%, rgba(9, 14, 22, 0.35) 100%);
}

/* 배경 동영상 레이어 (assets/video/hero.mp4 사용 시) */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* 영상 로딩 전/실패 시 대체 이미지 (항상 뒤에 고정) */
.hero-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

/* 문구 슬라이드 (배경 넘어갈 때 글씨가 바뀜) */
.hero-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

.hero-text.active {
    position: relative;
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.hero-badge {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    background: rgba(232, 90, 36, 0.2);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-family: var(--font-english);
    font-size: clamp(3.4rem, 4vw, 4.6rem);
    font-weight: var(--font-bold);
    color: #ffffff;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-lg);
}

.hero-title span {
    color: var(--color-primary);
}

.hero-description {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-2xl);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
}

/* 히어로 슬라이더 인디케이터 */
.hero-indicators {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-sm);
    z-index: 10;
}

.hero-indicator {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
}

.hero-indicator.active {
    background: var(--color-primary);
    width: 60px;
}

/* 히어로 스크롤 다운 */
.hero-scroll {
    position: absolute;
    bottom: var(--space-2xl);
    right: var(--space-2xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--text-sm);
    z-index: 10;
}

.hero-scroll-icon {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-full);
    position: relative;
}

.hero-scroll-icon::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    animation: scrollDown 1.5s infinite;
}

@keyframes scrollDown {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 20px; }
}

/* ===== 사업분야 섹션 ===== */
.business {
    background: var(--color-bg-section);
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.business-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    cursor: default;
    transition: all var(--transition-base);
    text-align: center;
}

.business-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
}

.business-card-icon {
    width: 52px;
    height: 52px;
    background: var(--color-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
    font-size: var(--text-2xl);
    color: var(--color-on-accent);
}

.business-card-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-text-white);
    margin-bottom: var(--space-sm);
}

.business-card-desc {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ===== 제품 하이라이트 섹션 ===== */
.products {
    background: var(--color-bg-dark);
}

.products-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: var(--space-2xl);
}

.products-tabs {
    display: flex;
    gap: var(--space-md);
}

.products-tab {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-base);
    color: var(--color-text-muted);
    background: transparent;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.products-tab:hover,
.products-tab.active {
    color: var(--color-text-white);
    background: var(--color-bg-card);
}

.products-tab.active {
    background: var(--color-primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.product-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-card-image {
    position: relative;
    height: 200px;
    background: var(--color-bg-section);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-image img {
    max-height: 80%;
    object-fit: contain;
    transition: transform var(--transition-base);
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-primary);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-text-white);
}

.product-card-content {
    padding: var(--space-lg);
}

.product-card-category {
    font-size: var(--text-xs);
    color: var(--color-primary);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-xs);
}

.product-card-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-white);
    margin-bottom: var(--space-sm);
}

.product-card-model {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* ===== 회사 강점 섹션 ===== */
.stats {
    background: var(--gradient-primary);
    padding: var(--space-3xl) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    text-align: center;
}

.stat-item {
    padding: var(--space-xl);
}

.stat-number {
    font-family: var(--font-english);
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    color: var(--color-on-accent);
    margin-bottom: var(--space-sm);
}

.stat-number span {
    font-size: var(--text-3xl);
}

.stat-label {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.9);
}

/* ===== 뉴스/공지 섹션 ===== */
.news {
    background: var(--color-bg-section);
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
}

.news-card {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.news-card:hover {
    background: var(--color-bg-hover);
}

.news-card-image {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-content {
    flex: 1;
}

.news-card-date {
    font-size: var(--text-sm);
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.news-card-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-white);
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.news-card-excerpt {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 고객지원 배너 ===== */
.support-banner {
    background: var(--color-bg-dark);
    padding: var(--space-3xl) 0;
}

.support-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2xl);
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-bg-hover);
}

.support-banner-content h3 {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-text-white);
    margin-bottom: var(--space-sm);
}

.support-banner-content p {
    color: var(--color-text-muted);
}

.support-banner-contacts {
    display: flex;
    gap: var(--space-2xl);
}

.support-contact {
    text-align: center;
}

.support-contact-label {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.support-contact-number {
    font-family: var(--font-english);
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-primary);
}

/* ===== 반응형 ===== */
@media (max-width: 1200px) {
    .hero-title {
        font-size: var(--text-4xl);
    }
    
    .business-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: var(--text-4xl);
    }
    
    .hero-description {
        font-size: var(--text-lg);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .support-banner-inner {
        flex-direction: column;
        text-align: center;
        gap: var(--space-xl);
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 600px;
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .business-grid {
        grid-template-columns: 1fr;
    }
    
    .products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-lg);
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
/* ===== 제품 안내 밴드 (쇼핑몰형 제품카드 대체) ===== */
.products-info {
    background: var(--color-bg-dark);
    text-align: center;
}

.products-info .section-title,
.products-info .section-subtitle {
    text-align: center;
}

.products-info-actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    flex-wrap: wrap;
}

/* ===== 포털 런처 도크 (오른쪽 세로 스택) ===== */
.portal-dock {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.portal-fab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 20px 11px 13px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(232, 90, 36, 0.4);
    transition: transform 0.25s var(--ease, ease), box-shadow 0.25s ease;
    animation: portalFabIn 0.6s ease both;
}

.portal-fab:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 42px rgba(232, 90, 36, 0.55);
    color: #fff;
}

.portal-fab-icon {
    position: relative;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 18px;
}

.portal-fab-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.55);
    animation: portalFabPulse 2s ease-out infinite;
}

.portal-fab-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.portal-fab-title {
    font-family: var(--font-english, sans-serif);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.02em;
}

.portal-fab-sub {
    font-size: 12.5px;
    font-weight: 500;
    opacity: 0.92;
}

.portal-fab-arrow {
    font-size: 13px;
    opacity: 0.9;
    transition: transform 0.25s ease;
}

.portal-fab:hover .portal-fab-arrow {
    transform: translateX(4px);
}

@keyframes portalFabIn {
    from { opacity: 0; transform: translateY(20px) scale(0.92); }
    to   { opacity: 1; transform: none; }
}

@keyframes portalFabPulse {
    0%   { transform: scale(1);   opacity: 0.7; }
    100% { transform: scale(1.6); opacity: 0; }
}

@media (max-width: 640px) {
    .portal-dock { right: 14px; top: auto; bottom: 84px; transform: none; gap: 10px; }
    .portal-fab { padding: 9px 16px 9px 11px; gap: 10px; }
    .portal-fab-icon { width: 34px; height: 34px; font-size: 15px; }
    .portal-fab-title { font-size: 14px; }
    .portal-fab-sub { font-size: 11px; }
    .portal-fab-arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .portal-fab { animation: none; }
    .portal-fab-icon::after { animation: none; display: none; }
}

/* ===== News & Notice — 서버 공지 연동 (home-news.js) ===== */
.news-more {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--color-primary);
    white-space: nowrap;
}

.news-more:hover { text-decoration: underline; }

.news-card-datebox {
    width: 88px;
    height: 96px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(160deg, #ff7a3d, #e85a24);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.news-card-datebox .ncd-month { font-size: 13px; font-weight: 700; opacity: .9; }
.news-card-datebox .ncd-day   { font-size: 30px; font-weight: 800; line-height: 1; }
.news-card-datebox .ncd-year  { font-size: 11px; opacity: .75; }

.news-card-imp {
    display: inline-block;
    background: #e5484d;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: 1px;
}

/* ===== 팝업/배너 (popup.js — 관리자에서 등록) ===== */
.site-popup {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.site-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 20, .6);
}

.site-popup-box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    max-width: 420px;
    width: 100%;
    max-height: 86vh;
    overflow: auto;
    font-family: 'Pretendard', sans-serif;
}

.site-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(255, 255, 255, .85);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    color: #333;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
}

.site-popup-img { display: block; width: 100%; }

.site-popup-body { padding: 26px 24px 6px; }
.site-popup-label { font-size: 12px; font-weight: 800; color: #e85a24; margin: 0 0 6px; }
.site-popup-title { font-size: 19px; font-weight: 700; color: #16202b; line-height: 1.45; margin: 0 0 10px; }
.site-popup-desc  { font-size: 14px; color: #566173; line-height: 1.7; margin: 0 0 6px; }

.site-popup-actions { padding: 10px 24px 4px; }
.site-popup-link {
    display: inline-block;
    background: #e85a24;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 8px;
    text-decoration: none;
}
.site-popup-link:hover { background: #c94a1a; }

.site-popup-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px 16px;
    border-top: 1px solid #edf0f4;
    margin-top: 14px;
}
.site-popup-foot label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #7b8794; cursor: pointer; }
.site-popup-foot input { accent-color: #e85a24; }
.site-popup-dismiss {
    background: none;
    border: 1px solid #dfe4ea;
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #333d4b;
    cursor: pointer;
}

/* 우측 하단 배너 */
.site-banner {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9000;
    max-width: 340px;
    background: #fff;
    border: 1px solid #e3e7ee;
    border-left: 5px solid #e85a24;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    padding: 16px 18px;
    font-family: 'Pretendard', sans-serif;
}

.site-banner-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    color: #8a93a2;
    cursor: pointer;
    line-height: 1;
}

.site-banner-label { font-size: 12px; font-weight: 800; color: #e85a24; margin: 0 0 4px; }
.site-banner-title { font-size: 14px; font-weight: 700; color: #16202b; margin: 0 0 6px; line-height: 1.5; }
.site-banner-desc  { font-size: 12px; color: #7b8794; margin: 0 0 10px; }
.site-banner-link {
    display: inline-block;
    background: #e85a24;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
}

@media (max-width: 576px) {
    .site-banner { right: 12px; bottom: 12px; left: 12px; max-width: none; }
}

/* ===== 히어로 공지 스트립 (home-news.js) ===== */
.hero-notice {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px clamp(16px, 5vw, 48px);
    background: rgba(10, 14, 20, .55);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.hero-notice-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-primary, #e85a24);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 999px;
}

.hero-notice-link {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
    color: #fff;
}

.hero-notice-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity .35s;
}

.hero-notice-link:hover .hero-notice-title { text-decoration: underline; }

.hero-notice-date {
    flex-shrink: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, .55);
}

.hero-notice-more {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, .75);
}

.hero-notice-more:hover { color: #fff; }

/* 스트립이 생기면 인디케이터/스크롤 아이콘을 살짝 올린다 */
.hero.has-notice .hero-indicators,
.hero.has-notice .hero-scroll {
    bottom: calc(var(--space-2xl) + 46px);
}

@media (max-width: 576px) {
    .hero-notice { gap: 10px; padding: 10px 14px; }
    .hero-notice-date, .hero-notice-more { display: none; }
}

/* 하단 배너 여러 개 — 세로로 쌓기 (popup.js) */
.site-banner-stack {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 340px;
}

.site-banner-stack .site-banner {
    position: static;
    right: auto;
    bottom: auto;
}

@media (max-width: 576px) {
    .site-banner-stack { right: 12px; bottom: 12px; left: 12px; max-width: none; }
}
