/* 카운트다운 컨테이너 - 반응형 */
.countdown-container {
    position: relative;  /* 기본값: relative */
    right: auto;
    top: auto;
    width: 100%;
    max-width: 100%;
    z-index: 500;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 0;  /* data-cards-section의 margin-top으로 간격 제어 */
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

/* 카운트다운 타이머 */
.countdown-timer {
    position: relative;
    width: 100%;
    max-width: 960px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: transparent;
    padding: 0;
}

/* 제목 및 모래시계 테이블 구조 */
.countdown-title-table {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
    flex-shrink: 0;
}

/* 제목 행 */
.countdown-title-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* 제목 왼쪽 열 */
.countdown-title-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 21px;  /* 30px * 0.7 */
    font-weight: 700;
    color: #ffffff;
    text-align: left;
    letter-spacing: -1.26px;  /* -1.8px * 0.7 */
    text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);
}

.countdown-title-text {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.countdown-subtitle {
    margin: 0;
    padding: 0;
    line-height: 1.2;
    font-size: 21px;  /* 30px * 0.7 */
    font-weight: 700;
}

/* 제목 중간 열 (모래시계) */
.countdown-title-mid {
    display: flex;
    align-items: center;
    padding-left: 0;
}

/* 모래시계 아이콘 */
.countdown-hourglass {
    width: 26.6px;  /* 38px * 0.7 */
    height: 42px;  /* 60px * 0.7 */
    display: flex;
    align-items: flex-end;
}

.hourglass-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.25));
}

/* 제목 큰 열 (년 숫자) - 데스크톱에서는 숨김 (숫자 영역에 포함) */
.countdown-title-big {
    display: none;
}

/* 제목 오른쪽 열 */
.countdown-title-right {
    display: none;
}

/* 스페이서 행 */
.countdown-title-spacer-row {
    display: none;
}

.countdown-spacer {
    display: none;
}

/* 숫자 및 단위 컨테이너 */
.countdown-numbers {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    margin-top: 0;
    padding-left: 0;
    flex-wrap: wrap;
}

/* 각 카운트다운 항목 */
.countdown-item {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 0.5rem;
    width: auto;
    margin-bottom: 0;
}

/* 모바일용 년 항목 (데스크톱에서도 표시) */
.countdown-item-years-mobile {
    display: flex;
}

/* 카운트다운 숫자 */
.countdown-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 60px;  /* 데스크톱 가로 배치용 크기 조정 */
    font-weight: 400;  /* 가장 얇은 두께 */
    font-style: normal;
    line-height: normal;
    color: #ffffff;
    text-align: left;
    letter-spacing: -3px;
    text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);
    margin: 0;
    padding: 0;
}

/* 카운트다운 레이블 */
.countdown-label {
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 20px;  /* 데스크톱 가로 배치용 크기 조정 */
    font-weight: 700;
    font-style: normal;
    line-height: normal;
    color: #ffffff;
    text-align: left;
    letter-spacing: -1px;
    text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);
    margin-left: 0;
    padding: 0;
}

/* 카운트다운 레이블 (세로 정렬용 - 시간) */
.countdown-label-vertical {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    font-family: 'Droid Sans', 'Noto Sans KR', sans-serif;
    font-size: 20px;  /* 데스크톱 가로 배치용 크기 조정 */
    font-weight: 700;
    font-style: normal;
    line-height: normal;
    color: #ffffff;
    text-align: left;
    letter-spacing: -1px;
    margin-left: 0;
    padding: 0;
    gap: 0;
}

.countdown-label-vertical div {
    text-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25);
    margin: 0;
    padding: 0;
    display: inline;
}

/* 반응형 미디어 쿼리 */

/* 데스크톱 (1490px 이상) */
@media (min-width: 1490px) {
    .countdown-container {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        max-width: 960px;
        margin-top: 2rem;
        margin-bottom: 0;  /* data-cards-section의 margin-top으로 간격 제어 */
        margin-left: auto;
        margin-right: auto;
        padding: 0;
        justify-content: center;
    }
    
    .countdown-timer {
        max-width: 960px;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 2rem;
    }
    
    .countdown-title-table {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    
    .countdown-title-left {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .countdown-numbers {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    
    .countdown-value {
        font-family: 'Orbitron', sans-serif;
        font-weight: 400;  /* 가장 얇은 두께 */
        font-size: 60px;
        letter-spacing: -3px;
    }
    
    .countdown-label,
    .countdown-label-vertical {
        font-size: 20px;
        letter-spacing: -1px;
    }
    
    .countdown-title-text,
    .countdown-subtitle {
        font-size: 21px;  /* 30px * 0.7 */
        letter-spacing: -1.26px;  /* -1.8px * 0.7 */
    }
}

/* 태블릿 (768px ~ 1489px) */
@media (min-width: 768px) and (max-width: 1489px) {
    .countdown-container {
        justify-content: center;
        margin-top: 2rem;
        margin-bottom: 0;  /* data-cards-section의 margin-top으로 간격 제어 */
        margin-left: auto;
        margin-right: auto;
    }
    
    .countdown-timer {
        align-items: center;
        max-width: 350px;
    }
    
    .countdown-title-table {
        grid-template-columns: auto auto auto auto;
        justify-content: center;
    }
    
    .countdown-title-left {
        align-items: center;
        text-align: center;
    }
    
    .countdown-numbers {
        align-items: center;
    }
    
    .countdown-value {
        font-family: 'Orbitron', sans-serif;
        font-weight: 400;  /* 가장 얇은 두께 */
        font-size: 70px;  /* 100px * 0.7 */
        letter-spacing: -4.2px;  /* -6px * 0.7 */
    }
    
    .countdown-label,
    .countdown-label-vertical {
        font-size: 16.8px;  /* 24px * 0.7 */
        letter-spacing: -1.05px;  /* -1.5px * 0.7 */
    }
    
    .countdown-title {
        font-size: 16.8px;  /* 24px * 0.7 */
        letter-spacing: -1.05px;  /* -1.5px * 0.7 */
    }
}

/* 모바일 (767px 이하) */
@media (max-width: 767px) {
    /* 메인화면의 카운트다운 순서 조정 */
    body:has(.main-title-section) .countdown-container {
        order: 3;  /* main-title-image-section 아래, data-cards-section 위 */
    }
    
    .countdown-container {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 1.5rem;
        margin-bottom: 0;  /* data-cards-section의 margin-top으로 간격 제어 */
        margin-left: auto;
        margin-right: auto;
        padding: 0 1rem;
        width: 100%;
    }
    
    .countdown-timer {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        max-width: 100%;
        width: 100%;
    }
    
    /* 모바일: 제목과 모래시계를 가운데 정렬 */
    .countdown-title-table {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        margin-bottom: 1rem;
        width: 100%;
    }
    
    .countdown-title-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
        width: 100%;
    }
    
    .countdown-title-left {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        text-align: center;
    }
    
    .countdown-title-text,
    .countdown-subtitle {
        font-size: 14px;  /* 모바일에서 더 크게 */
        letter-spacing: -0.5px;
        display: inline;
        margin: 0;
        padding: 0;
    }
    
    .countdown-title-mid {
        display: flex;
        align-items: center;
        justify-content: center;
        padding-left: 0;
    }
    
    .countdown-hourglass {
        width: 24px;  /* 모바일에서 더 크게 */
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .hourglass-icon {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }
    
    /* 모바일: 큰 숫자와 "년"을 숨김 (아래 숫자들에 포함) */
    .countdown-title-big,
    .countdown-title-right,
    .countdown-title-spacer-row {
        display: none;
    }
    
    /* 모바일: 모바일용 년 항목 표시 */
    .countdown-item-years-mobile {
        display: flex;
    }
    
    /* 모바일: 모든 숫자를 가로로 나열하고 가운데 정렬 */
    .countdown-numbers {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-top: 0;
        width: 100%;
    }
    
    .countdown-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: baseline;
        justify-content: center;
        gap: 0.35rem;
        width: auto;
        margin-bottom: 0;
    }
    
    .countdown-value {
        font-family: 'Orbitron', sans-serif;
        font-weight: 400;  /* 가장 얇은 두께 */
        font-size: 32px;  /* 모바일에서 더 크게 (기존 16.8px에서 증가) */
        letter-spacing: -1.5px;
        line-height: 1;
        text-align: center;
    }
    
    .countdown-label {
        font-size: 14px;  /* 모바일에서 더 크게 (기존 9.8px에서 증가) */
        letter-spacing: 0;
        margin-left: 0;
    }
    
    .countdown-label-vertical {
        display: flex;
        flex-direction: row;
        gap: 0;
        font-size: 14px;  /* 모바일에서 더 크게 */
        letter-spacing: 0;
        margin-left: 0;
    }
    
    .countdown-label-vertical div {
        display: inline;
    }
}
