@charset 'utf-8';
@import url(./font.css);
@import url(./keyframes.css); /* 클릭 애니메이션은 keyframes에서 class로 관리 */

/** root */
/* depth마다 배경 변경 */
/* 추천강의마다 썸네일 변경 */
:root {
    --body-background: url(../img/main/background1.png);
    --left-charater-background: url(../img/main/character-left-1.png);
    --right-charater-background: url(../img/main/character-right-1.png);
    --thumbnail: url(../img/main/thumbnail/1.jpg);
}

/** reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
    word-break: keep-all;
}

/** common */
html { font-size: 20px; overflow-x: hidden; }

button {
    border: 0;
    background-color: transparent;
    cursor: pointer;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 50px 0;
    background: var(--body-background);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    overflow-x: hidden;
}

.fadeOut { opacity: 0; visibility: hidden; }
.hide { display: none !important; }

/** start-popup */
/* BGM이 나오려면 버튼을 눌러야 함 */
.start-popup-container {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2;
}

.start-popup-container .start-popup-box {
    width: 50%;
    min-height: 50%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 20px;
    background-color: #faefda;
}

.start-popup-container .start-popup-box h2 {
    color: #664237;
    font-family: 'SB-aggro', sans-serif;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 20px;
}

.start-popup-container .start-popup-box .start {
    color: #664237;
    font-family: 'Human-bs';
    font-size: 1.2rem;
    font-weight: 600;
    padding: 15px 30px 15px 70px;
    border: 2px solid #664237;
    border-radius: 20px;
    background: url(../img/main/open.png) 15px center no-repeat;
    transition: .2s;
}

.start-popup-container .start-popup-box .start:hover {
    color: #fff;
    background-image: url(../img/main/open_hover.png);
    background-color: #664237;
}

/** header */
header .logo {
    max-width: 250px;
    min-width: 200px;
    width: 30%;
    position: absolute;
    top: 40px;
    right: 5px;
    object-fit: contain;
}

/** main */
main {
    width: 95%;
    font-family: 'Pretendard';
    position: relative;
}

/** 설문조사페이지 background */
main.survey-page {
    max-width: 1280px;
    background: url(../img/main/survey-background.png) top center no-repeat;
    background-size: 100% 100%;
    margin-top: 100px;
}

main.survey-page::after {
    content: "";
    display: inline-block;
    width: 100%;
    height: 60px;
    background: url(../img/main/box-shadow.png) top center / contain no-repeat;
    position: absolute;
    bottom: -30px;
    z-index: -1;
    opacity: 0.8;
}

/* 서울시복지재단 로고 */
main .logo {
    display: block;
    max-width: 360px;
    width: 70%;
    margin: auto;
}

/* 페이지 타이틀 */
/* 공공인재아카데미 텍스트 */
main .brand-title {
    max-width: 720px;
    width: 80%;
    position: absolute;
    top: -85px;
    left: 53%;
    transform: translateX(-50%);
}

/* 추천강좌 텍스트 */
main .recommand-title {
    max-width: 380px;
    width: 75%;
    position: relative;
    left: 53%;
    transform: translateX(-50%);
}

/* 설문조사 영역 */
main .survey-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 100%;
    transition: .5s;
}

main .survey-container .survey {
    display: inline-block;
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    padding-top: 12vh;
    position: relative;
}

main .survey-container .survey::before {
    content: "";
    display: inline-block;
    min-width: 150px;
    width: 15%;
    height: 50%;
    background: var(--left-charater-background);
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    bottom: -10px;
    left: -60px;
    z-index: 1;
    pointer-events: none;
    animation: TickTockRight 3s linear infinite;
}

main .survey-container .survey::after {
    content: "";
    display: inline-block;
    min-width: 150px;
    width: 15%;
    height: 50%;
    background: var(--right-charater-background);
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    position: absolute;
    bottom: -10px;
    right: -80px;
    z-index: 1;
    pointer-events: none;
    animation: TickTockLeft 3s linear infinite;
}

/** 설문조사 질문 */
main .survey-container .survey .survey-title-container {
    width: 90%;
    max-width: 1280px;
    height: 100px;
    margin: auto;
    text-align: center;
    position: relative;
}

main .survey-container .survey .survey-title-container .survey-title {
    width: 100%;
    margin: auto;
    color: #664237;
    font-size: 2rem;
    font-family: 'Human-bs', sans-serif;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: -3px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 설문조사 질문에 초록 테두리 */
main .survey-container .survey .survey-title-container .survey-title .border {
    color: #2c8b56;
    font-size: 2.2rem;
    font-family: "S-Core";
    font-weight: 800;
    letter-spacing: -5px;
    margin: 0 10px;
    text-shadow: -2px -2px #fff, 2px 2px #fff, 2px -2px #fff, -2px 2px #fff, 3px 5px 0px #2c8b56;
}
/* 설문조사 질문에 빨간 밑줄 */
main .survey-container .survey .survey-title-container .survey-title .redline {
    color: #d3521c;
    font-family: "S-Core";
    letter-spacing: -5px;
    border-bottom: 3px solid #d3521c;
}
/* 설문조사 질문에 초록 밑줄 */
main .survey-container .survey .survey-title-container .survey-title .greenline {
    color: #2c8b56;
    font-family: "S-Core";
    letter-spacing: -5px;
    border-bottom: 3px solid #2c8b56;
}

/* 설문조사 보기 container */
main .survey-container .survey .bogi-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    height: 50vh;
    padding: 80px 40px 30px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

main .survey-container .survey .bogi-container.bogi-bar {
    flex-wrap: nowrap;
    flex-direction: column;
}

/** 설문조사 보기 */
main .survey-container .survey .bogi-container li {
    display: inline-block;
    width: calc((100% / 3) - 5%);
    height: 250px;
    background-color: #faefda;
    border-radius: 25px;
    vertical-align: middle;
    position: relative;
    transition: .2s;
    flex-shrink: 0;
}

main .survey-container .survey .bogi-container li:hover {
    background-color: #29a764;
    box-shadow: 0 5px 0 #9fe0b9;
    transform: translateY(-5px);
}

/* 보기 체크박스 이미지 */
main .survey-container .survey .bogi-container li img {
    position: absolute;
    bottom: 80%;
    left: 50%;
    transform: translate(-50%, 0);
    pointer-events: none;
}

main .survey-container .survey .bogi-container li:hover img {
    content: url(../img/main/bogi-check-on.png);
}

/* 보기 */
main .survey-container .survey .bogi-container li .bogi {
    width: 100%;
    height: 100%;
    padding: 0 10px;
    padding-top: 20%;
    color: #494936;
    font-size: 1.5rem;
    font-family: 'S-Core', sans-serif;
    font-weight: 400;
    letter-spacing: -2.5px;
}

main .survey-container .survey .bogi-container li:hover .bogi {
    color: #fff;
    font-weight: 600;
}

/* 가로로 긴 보기 */
main .survey-container .survey .bogi-container.bogi-bar li {
    display: block;
    width: 90%;
    flex-shrink: 1;
}

main .survey-container .survey .bogi-container.bogi-bar li img {
    display: inline-block;
    left: 3.5vw;
    bottom: 55%;
    transform: translate(0, 40%);
}

main .survey-container .survey .bogi-container.bogi-bar li .bogi {
    display: inline-block;
    padding: 0;
    font-size: 1.5rem;
    padding: 5px 65px;
}

/** 이전 설문조사로 이동 버튼 */
main .survey-container .survey .bogi-container .return-survey {
    width: 70px;
    padding: 45px 0 10px;
    position: absolute;
    top: -10%;
    right: 20px;
    color: #494936;
    font-family: 'S-Core', sans-serif;
    font-size: 0.8rem;
    border-radius: 10px;
    background: url(../img/main/return.png) center 10px / 30px no-repeat;
    background-color: #faefda;
    text-align: center;
    transition: .2s;
}

main .survey-container .survey .bogi-container .return-survey:hover {
    color: #fff;
    background-image: url(../img/main/return-on.png);
    background-color: #29a764;
}

/** 추천강좌 영역 */
main .recommand-container {
    max-width: 1280px;
    width: 95%;
    height: 640px;
    margin: auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 100%;
    transition: .5s;
    background: url(../img/main/recommand-background.png) top center no-repeat;
    background-size: 100% 100%;
}

main .recommand-container .recommand {
    display: inline-block;
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    padding: 2.5vh 5vw;
}

main .recommand-container .recommand::before {
    content: "";
    display: inline-block;
    max-width: 250px;
    min-width: 150px;
    width: 15%;
    height: 50%;
    background: url(../img/main/recommand-character.png) center center / contain no-repeat;
    position: absolute;
    bottom: -10px;
    left: -10px;
    z-index: 1;
    pointer-events: none;
    animation: TickTockRight 3s linear infinite;
}

/** 추천강좌 제목 */
main .recommand-container .recommand .recommand-text {
    width: 90%;
    margin-bottom: 30px;
    color: #fff;
    font-family: "Human-bs";
    font-size: 1.4rem;
    position: relative;
    left: 40px;
}

main .recommand-container .recommand .recommand-text::before {
    content: "";
    display: inline-block;
    max-width: 50px;
    width: 10%;
    height: 12px;
    margin-right: 10px;
    position: absolute;
    left: -60px;
    top: 15px;
    background: url(../img/main/red-yellow-green.png) center center / contain no-repeat;
    transform: translateY(-5px);
}

/** 추천강좌 내용 */
main .recommand-container .recommand .recommand-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 40px;
}

main .recommand-container .recommand .tag-container {
    min-height: 100px;
    padding: 20px 40px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 20px;
}

main .recommand-container .recommand .tag-container .tag {
    display: inline-block;
    color: #2f659d;
    font-size: 2rem;
    font-family: 'One-Mobile-Pop', sans-serif;
    font-weight: 500;
    letter-spacing: -3px;
    text-align: center;
}

main .recommand-container .recommand .tag-container .tag.hash::before {
    content: "# ";
}

main .recommand-container .recommand .tag-container .tag .add-text {
    display: block;
    color: #75b3d9;
    font-size: 2.4rem;
}

/* 추천강좌 영상 썸네일 */
main .recommand-container .recommand .thumbnail {
    display: block;
    max-width: 540px;
    width: 100%;
    height: 270px;
    margin: auto;
    font-family: 'SB-Aggro', sans-serif;
    font-size: 2rem;
    border: 1px solid #dedede;
    border-radius: 20px;
    background: var(--thumbnail) center center / cover no-repeat;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-indent: -10000px;
}

main .recommand-container .recommand .thumbnail.short {
    width: 25%;
}

main .recommand-container .recommand .thumbnail p {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: url(../img/main/open.svg) center center / 15% no-repeat;
    opacity: 0;
    transition: .3s;
}

main .recommand-container .recommand .thumbnail:hover p {
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 1;
}

/** 추천강좌 이동/다시하기 버튼 */
main .recommand-container .recommand .btn-container {
    display: flex;
    justify-content: center;
    gap: 10px 20px;
    flex-wrap: wrap;
}

main .recommand-container .recommand .btn-container li {
    display: inline-block;
    position: relative;
    width: calc((100% / 4) - 20px);
}

main .recommand-container .recommand .btn-container li button {
    width: 100%;
    height: 75px;
    color: #75584f;
    font-family: 'Human-bs', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    transition: .2s;
    background: url(../img/main/gray-btn.png) center center / 100% 100% no-repeat;
}
/* 클립 아이콘 */
main .recommand-container .recommand .btn-container li button::before {
    content: "";
    display: inline-block;
    width: 29px;
    height: 35px;
    position: absolute;
    left: 10px;
    top: -10px;
    background: url(../img/main/clip.png) center center / contain no-repeat;
}

main .recommand-container .recommand .btn-container li button:hover {    
    background-image: url(../img/main/yellow-btn.png);
}

/* 강의 맛보기 영상이 안나온 일정은 강의 맛보기 버튼 숨기기 */
main .recommand-container .recommand .btn-container li:has(button.open-guide[data-movie="0"]) {
    display: none;
}

main .recommand-container .recommand .btn-container li:has(button.go-page[data-move="0"]) {
    display: none;
}

/** 팝업 */
main .popup-container {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.35);
    transition: .3s;
    z-index: 1;
}

main .popup-container .popup-wrap {
    max-width: 1280px;
    max-height: 720px;
    width: 95%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

main .popup-container .popup-wrap .video1 {
    width: 100%;
}

main .popup-container .popup-wrap .video1.short {
    height: 85vh;
}

main .popup-container .popup-wrap .guide-wrap {
    width: 100%;
    max-height: 80vh;
    padding-top: 50px;
    background: url(../img/main/guide-background.png) center center / cover no-repeat;
    transition: .3s;
    overflow-y: auto;
    text-align: center;
}
/* 팝업 스크롤 */
main .popup-container .popup-wrap .guide-wrap::-webkit-scrollbar {
    width: 10px;
}

main .popup-container .popup-wrap .guide-wrap::-webkit-scrollbar-thumb {
    background-color: #245ca2;
    border-radius: 10px;
    background-clip: padding-box;
    border: 2px solid transparent;
}

main .popup-container .popup-wrap .guide-wrap::-webkit-scrollbar-track {
    background-color: transparent;
}

/** 가이드 상단 */
main .popup-container .popup-wrap .guide-wrap .guide-logo {
    max-width: 300px;
    width: 80%;
}

main .popup-container .popup-wrap .guide-wrap .guide-title {
    max-width: 604px;
    width: 70%;
}

/** 강좌일정표 table */
/* 추가정보가 있을 경우(돌봄매니저 기초) */
main .popup-container .popup-wrap .guide-wrap .add-guide {
    margin: 20px 0;
}

main .popup-container .popup-wrap .guide-wrap .add-guide li {
    color: #664237;
    font-family: 'Pretendard';
    font-size: 1.2rem;
    font-weight: 600;
}

main .popup-container .popup-wrap .guide-wrap .add-guide li:not(:last-of-type) {
    margin-bottom: 5px;
}

/* table 요소 간의 간격 없애기 */
main .popup-container .popup-wrap .guide-wrap .table-wrap {
    width: 95%;
    margin: 30px auto;
    overflow: auto;
    padding-bottom: 10px;
}
/* 시간표 table 스크롤 */
main .popup-container .popup-wrap .guide-wrap .table-wrap::-webkit-scrollbar {
    height: 10px;
}

main .popup-container .popup-wrap .guide-wrap .table-wrap::-webkit-scrollbar-thumb {
    background-color: #f96a41;
    border-radius: 10px;
    background-clip: padding-box;
    border: 2px solid transparent;
}

main .popup-container .popup-wrap .guide-wrap .table-wrap::-webkit-scrollbar-track {
    background-color: transparent;
}

main .popup-container .popup-wrap .guide-wrap table {
    max-width: 840px;
    width: 95%;
    min-height: 200px;
    margin: auto;
    border-collapse: collapse;
    border-spacing: 0;
    border-radius: 10px;
    border: 1px solid #fff8ef;
    box-shadow: 5px 5px 10px rgba(194, 164, 107, 0.27);
    overflow: hidden;
}

main .popup-container .popup-wrap .guide-wrap table .table-head th,
main .popup-container .popup-wrap .guide-wrap table .table-body td {
    font-family: 'Pretendard', sans-serif;
    border: 1px solid rgba(249, 106, 65, 0.5);
    letter-spacing: -1px;
}

main .popup-container .popup-wrap .guide-wrap table .table-head th {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 400;
    padding: 5px;
    background-color: #f96a41;
}

main .popup-container .popup-wrap .guide-wrap table .table-body td {
    font-size: 1.2rem;
    font-weight: 400;
    padding: 10px;
    background-color: #fff8ef;
}

main .popup-container .popup-wrap .guide-wrap table .table-body td:first-child {
    background-color: #f2d488;
}

/** 가이드 하단 */
main .popup-container .popup-wrap .guide-wrap p {
    padding: 30px 0;
    background: url(../img/main/guide-bottom.png) no-repeat;
    position: relative;
}

main .popup-container .popup-wrap .guide-wrap p img {
    max-width: 960px;
    width: 90%;
}

/* 닫기 버튼 */
main .popup-container .popup-wrap .popup-close {
    width: 80px;
    height: 40px;
    color: #fff;
    font-size: 0.8rem;
    font-family: 'Pretendard';
    font-weight: 500;
    position: absolute;
    right: 0;
    top: -50px;
    background-color: transparent;
    border: 2px solid #fff;
    border-radius: 10px;
    transition: .2s;
}

main .popup-container .popup-wrap .popup-close:hover {
    background-color: #f96a41;
    border: 2px solid #f96a41;
}

/** 팝업 영상제어 버튼모음 */
main .popup-container .popup-wrap .video-btn-box {
    position: absolute;
    left: 0;
    top: -50px;
    text-align: left;
    overflow: hidden;
    transition: .3s;
}

main .popup-container .popup-wrap .video-btn-box button {
    transition: .3s;
}

main .popup-container .popup-wrap .video-btn-box {
    display: inline-block;
    overflow: hidden;
}

main .popup-container .popup-wrap .video-btn-box .slide-box {
    width: 40px;
    display: inline-flex;
    gap: 5px;
    flex-wrap: nowrap;
    overflow: hidden;
}

main .popup-container .popup-wrap .video-btn-box .slide-box .movie-play {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: url(../img/main/play.png) center center / contain no-repeat;
    text-indent: -10000px;
}

main .popup-container .popup-wrap .video-btn-box .slide-box .movie-play:hover {
    background-image: url(../img/main/play_hover.png);
}

main .popup-container .popup-wrap .video-btn-box .slide-box .movie-pause {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: url(../img/main/pause.png) center center / contain no-repeat;
    text-indent: -10000px;
}

main .popup-container .popup-wrap .video-btn-box .slide-box .movie-pause:hover {
    background-image: url(../img/main/pause_hover.png);
}

main .popup-container .popup-wrap .video-btn-box .slide-box button.slide {
    transform: translateX(-45px);
}

main .popup-container .popup-wrap .video-btn-box .movie-skip {
    width: 50px;
    height: 40px;
    color: #fff;
    font-family: 'S-Core', sans-serif;
    font-size: 1rem;
    vertical-align: middle;
}

main .popup-container .popup-wrap .video-btn-box .movie-skip:hover {
    color: #353535;
}

/** large pc  */
@media screen and (min-width: 1025px) {
    main .recommand-container .recommand .btn-container li {
        max-width: 280px;
    }
}

/** small pc */
@media screen and (max-width: 1024px) {
    html { font-size: 18px; }

    .start-popup-container .start-popup-box {
        width: 80%;
    }

    main .survey-container .survey::before {
        top: 100px;
    }

    main .survey-container .survey::after {
        bottom: -50px;
    }

    main .recommand-container .recommand::before {
        bottom: 300px;
    }

    main .recommand-container .recommand .recommand-text::before {
        top: 10px;
    }

    main .recommand-container .recommand .recommand-main {
        margin-bottom: 20px;
    }

    main .recommand-container .recommand .tag-container {
        padding: 20px 0;
    }

    main .recommand-container .recommand .btn-container {
        justify-content: flex-start;
    }

    main .recommand-container .recommand .btn-container li {
        width: calc((100% / 2) - 10px);
    }
}

/** table */
@media screen and (max-width: 768px) {
    html { font-size: 16px; }

    main.survey-page {
        background: rgba(242, 212, 136, 0.8);
        border-radius: 20px;
    }

    main .survey-container .survey::before,
    main .survey-container .survey::after {
        display: none;
    }

    main .survey-container .survey .bogi-container {
        flex-wrap: nowrap;
        flex-direction: column;
    }
    
    main .survey-container .survey .bogi-container li {
        display: block;
        width: 95%;
        max-height: 100px;
        flex-shrink: 1;
    }

    main .survey-container .survey .bogi-container li img,
    main .survey-container .survey .bogi-container.bogi-bar li img {
        display: inline-block;
        left: 3.5vw;
        bottom: 55%;
        transform: translate(0, 40%) scale(0.7);
    }

    main .survey-container .survey .bogi-container li .bogi {
        display: inline-block;
        padding: 0;
        font-size: 1.5rem;
        padding: 10px 70px;
    }

    main .recommand-container {
        height: auto;
        background: rgba(123, 185, 223, 0.7);
        border-radius: 20px;
    }

    main .recommand-container .recommand::before {
        display: none;
    }

    main .recommand-container .recommand .thumbnail.short {
        width: 40%;
    }

    main .recommand-container .recommand .recommand-text {
        margin-bottom: 0;
    }
}

/** mobile */
@media screen and (max-width: 560px) {

    html { font-size: 14px; }

    .start-popup-container .start-popup-box .start {
        background-size: 35px 35px;
    }

    main .survey-container .survey {
        padding-top: 6vh;
    }
    
    main .survey-container .survey .bogi-container {
        gap: 10px;
        padding: 30px 0;
    }

    main .survey-container .survey .bogi-container .return-survey {
        transform: scale(0.8);
        top: 100%;
        right: 0;
    }

    main .recommand-container .recommand {
        padding: 20px;
    }
    
    main .recommand-container .recommand .recommand-text {
        left: 50px;
    }

    main .recommand-container .recommand .tag-container {
        padding: 10px 0;
    }

    main .recommand-container .recommand .recommand-text::before {
        left: -50px;
    }

    main .recommand-container .recommand .thumbnail {
        height: 200px;
    }

    main .recommand-container .recommand .thumbnail.short {
        width: 70%;
    }

    main .recommand-container .recommand .btn-container li button::before {
        width: 20px;
        height: 25px;
    }

    main.recommand-page{
        top: 20px;
    }

    main .recommand-title {
        width: 50%;
    }
}