/**
 * @파일명 css/_main_info.css
 * @제작사 ZZAN Studio
 * @설명 메인 페이지 서비스 바로가기 카드 섹션 스타일
 */

/* [1] 섹션 메인 컨테이너 */
.main-info-section {
    padding: 140px 0;
    background: #1e2227; /* 배경색을 더 밝은 회색으로 상향하여 구분감 확보 */
    position: relative;
    overflow: hidden;
}

/* [1-1] 다이나믹 배경 비주얼 및 데이터 그리드 효과 */
.info-bg-visual {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* 데이터 그리드 라인 효과 */
.data-grid {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(225, 33, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(225, 33, 0, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    /* 마스크 제거 혹은 완화하여 전체적으로 배경이 보이게 함 */
    mask-image: radial-gradient(circle at center, black 60%, transparent 95%);
    z-index: 1;
}

.glow-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 1; /* 투명도 최대화 */
    z-index: 0;
}

#infoCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* [2] 섹션 헤더 (타이틀 및 라인 장식) */
.main-info-section .section-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 10;
}

.main-info-section .sub-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-red);
    letter-spacing: 4px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.main-info-section .section-title {
    font-size: 48px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -1.5px;
    margin-bottom: 25px;
}

.title-line {
    width: 60px;
    height: 4px;
    background: var(--primary-red);
    margin: 0 auto;
    border-radius: 2px;
}

/* [3] 프리미엄 카드 그리드 레이아웃 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    position: relative;
    z-index: 10;
    perspective: 2000px; 
}

.info-card-wrap {
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.info-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* 롤아웃 시 부드러운 복구를 위해 transition 추가 */
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), border-color 0.4s, background 0.4s;
    text-decoration: none !important;
    transform-style: preserve-3d;
}

/* 캔버스를 모든 요소보다 위에 배치하여 효과가 가려지지 않게 함 */
.card-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.card-border-gradient {
    display: none;
}

@keyframes borderRotate {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* [3-1] 카드 내부 요소 (이미지, 텍스트, 아이콘) 스타일 */
.info-card .img-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #1a1d23;
}

.info-card .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.info-card .img-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(15, 17, 21, 0.8));
    opacity: 0.6;
    transition: opacity 0.5s ease;
}

.info-card .default-graphic {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(225, 33, 0, 0.2);
    transition: all 0.5s ease;
}

.info-card .default-graphic svg {
    width: 60px;
    height: 60px;
}

.info-card .text-box {
    padding: 40px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    z-index: 6;
}

.info-card .title {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    transition: transform 0.5s ease, color 0.5s ease;
    text-align: center; 
}

.info-card .desc-list {
    list-style: none;
    padding: 0; margin: 0;
    margin-bottom: 30px;
}

.info-card .desc-list li {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
    line-height: 1.5;
    transition: all 0.4s ease;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-card .desc-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary-red);
    border-radius: 50%;
    margin-top: 9px;
    flex-shrink: 0;
    box-shadow: 0 0 10px var(--primary-red);
}

/* Card Footer & More Text */
.card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.more-text {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.4; 
    transform: translateX(0);
    transition: all 0.4s ease;
}

.card-arrow {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1); 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8); 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-arrow svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* [3-2] 호버 애니메이션 및 상호작용 효과 */
.info-card-wrap:hover {
    transform: translateY(-10px); /* 3D 회전 제거 */
    z-index: 20;
}

.info-card-wrap:hover .info-card {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-red);
}

/* 가벼운 CSS 기반 보더 애니메이션 복구 */
.info-card::after {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(90deg, var(--primary-red), transparent, var(--primary-red));
    background-size: 200% 200%;
    border-radius: 32px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
}

.info-card-wrap:hover .info-card::after {
    opacity: 0.5;
    animation: borderFlow 3s linear infinite;
}

@keyframes borderFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.info-card-wrap:hover .img-box img {
    transform: scale(1.1);
}

.info-card-wrap:hover .img-overlay {
    opacity: 0.3;
}

.info-card-wrap:hover .default-graphic {
    color: var(--primary-red);
    transform: scale(1.1);
}

.info-card-wrap:hover .title {
    color: var(--primary-red);
    transform: translateX(5px);
}

.info-card-wrap:hover .desc-list li {
    color: #fff;
    transform: translateX(5px);
}

.info-card-wrap:hover .more-text {
    opacity: 1;
    transform: translateX(0);
}

.info-card-wrap:hover .card-arrow {
    background: var(--primary-red);
    box-shadow: 0 0 20px rgba(225, 33, 0, 0.4);
    transform: rotate(-45deg);
}

/* [4] 반응형 스타일 조절 */
@media screen and (max-width: 1200px) {
    .info-grid { gap: 20px; }
    .info-card .text-box { padding: 30px; }
    .info-card .title { font-size: 22px; }
}

@media screen and (max-width: 991px) {
    .info-grid { grid-template-columns: 1fr 1fr; }
    .main-info-section .section-title { font-size: 38px; }
}

@media screen and (max-width: 768px) {
    .main-info-section { padding: 80px 0; }
    .info-grid { grid-template-columns: 1fr; gap: 30px; }
    .info-card-wrap:hover { transform: translateY(-10px); } 
}
