/* ./css/cases.css (새 팔레트 적용) */

/* Cases 섹션 스타일 */
.cases-section {
    padding: 60px 20px;
    background-color: var(--quinary-color);
    color: var(--text-color);
    text-align: center;
}

.cases-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 40px;
}

/* 그리드 레이아웃 설정 */
.timeline {
    display: grid;
    gap: 20px;
    justify-content: center;
    width: 100%;
}

/* 반응형으로 열 개수 조정 */
@media (min-width: 1440px) {
    .timeline {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (min-width: 1024px) and (max-width: 1439px) {
    .timeline {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .timeline {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 767px) {
    .timeline {
        grid-template-columns: repeat(2, 1fr);
    }
    /* 모바일에서 첫 4개만 보이도록 숨기기 */
    .timeline-item.hidden {
        display: none;
    }
}

/* 각 프로젝트 박스 스타일 */
.timeline-item {
    background-color: var(--tertiary-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 100%;
}
.timeline-item:hover {
    transform: scale(1.05);
}

/* 프로젝트 이미지 스타일 (16:9 비율 유지) */
.timeline-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* 프로젝트 제목 스타일 */
.project-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-color);
    padding: 10px 0;
    background-color: var(--quinary-color);
    text-align: center;
}

/* 모달 스타일 */
.modal2 {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 13, 14, 0.9); /* var(--senary-color) at 0.9 */
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content2 {
    display: flex;
    position: relative;
    width: 90%;
    aspect-ratio: 16 / 9;
    background-color: var(--quinary-color);
    border-radius: 8px;
    overflow: hidden;
}
.modal-content2 iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-close2 {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}
.modal-close2:hover {
    color: var(--secondary-color);
}

/* 펼치기/접기 이중 가로선 스타일 */
.toggle-button {
    display: none;
    width: 100%;
    padding: 10px 0;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    background-color: transparent;
    color: var(--text-color);
    cursor: pointer;
    position: relative;
    margin: 20px 0;
}
.toggle-button::before,
.toggle-button::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    transition: transform 0.3s ease;
}
.toggle-button::before {
    top: 0;
}
.toggle-button::after {
    bottom: 0;
}
.toggle-button:hover {
    color: var(--text-color);
    background-color: var(--primary-color);
}
.toggle-button:hover::before {
    transform: translateY(-3px);
}
.toggle-button:hover::after {
    transform: translateY(3px);
}
@media (max-width: 767px) {
    .toggle-button {
        display: block;
    }
}