/* ========================================
   main_v.php 전용 스타일시트
   메인 페이지에서만 사용되는 스타일 정의
======================================== */

/* ========================================
   1. 메인 레이아웃 기본 구조
======================================== */

#bodyWrap{
    /* 퀴즈영역 가상클래스 영역 넘침 방지 */
    overflow-x: hidden !important;
}

.main_wrap_02 {
    margin-top: 49px;
    margin-bottom: 60px;
    height: calc(100vh - 49px - 60px);
  background-color: var(--back_main);
  position: relative;
}

/* 배경 그라데이션 원 */
.con1::after {
  content: '';
  background: linear-gradient(135deg, #504BFF 0%, #7E36FF 100%);
  position: fixed;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1 / 1;
  height: auto;
  bottom: 0;
  left: 0;
  border-radius: 50%;
  z-index: -1;
  transform: translate(50%, 50%);
}

/* 메인 비주얼 래퍼 */
.main_wrap_02 .m_visual_wrap {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* ========================================
   2. 로고 섹션
======================================== */
.main_wrap_02 .m_visual_wrap .biglogo {
    display: block;
    width: 100%;
    height: auto;
    min-height: 6vh;
    padding: 1rem 0;
    text-align: center;
    flex-shrink: 0;
}

.main_wrap_02 .m_visual_wrap .biglogo img {
    display: inline-block;
    width: 153px;
    height: auto;
    max-width: 80%;
}

/* ========================================
   3. 배너 섹션
======================================== */
/* 메인 배너 컨테이너 */
#banner_02 {
    width: 100%;
    position: relative;
}

#banner_02 .bx-wrapper {
    max-width: none;
    border-radius: 0 0 60px 0;
    overflow: hidden;
}

/* 배너 슬라이더 */
.banners_02 {
    width: 100%;
    position: relative;
}

.banners_02 .img {
    width: 100%;
    height: auto;
    padding-bottom: 60%; /* 5:3 비율 고정 */
    position: relative;
    overflow: hidden;
    aspect-ratio: 5 / 3;
}

/* 최신 브라우저에서 aspect-ratio 지원시 padding-bottom 무효화 */
@supports (aspect-ratio: 5 / 3) {
    .banners_02 .img {
        height: auto;
        padding-bottom: 0;
    }
}

.banners_02 .img a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* ========================================
   4. 오늘의 퀴즈 섹션
======================================== */
.main_wrap_02 .content-wrap {
    display: flex;
    height: 100%;
    flex-direction: column;
}
.main_wrap_02 .today_quiz {
    background: linear-gradient(135deg, #504BFF 0%, #7E36FF 100%);
    margin: 1rem;
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    height: clamp(120px, 15vh, 145px);
}

/* 퀴즈 배경 애니메이션 */
.main_wrap_02 .today_quiz::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="30" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
}

/* 퀴즈 래퍼 */
.main_wrap_02 .today_quiz .quiz_wrap {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

/* 퀴즈 헤더 */
.main_wrap_02 .today_quiz .quiz_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* 퀴즈 제목 */
.main_wrap_02 .today_quiz .quiz_title {
    color: var(--font_main);
    font-size: 1.3rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.main_wrap_02 .today_quiz .quiz_title::before {
    content: '✨';
    font-size: 1.2rem;
}

/* 퀴즈 인디케이터 */
.main_wrap_02 .today_quiz .quiz_dots {
    top: 0;
    right: 0px;
    left: auto;
    translate: -50% 150%;
    width: fit-content;
    height: fit-content;
    position: absolute;
    color: var(--font_main);
    font-size: 1.2rem;
    opacity: 0.8;
}

/* 퀴즈 내용 */
.main_wrap_02 .today_quiz .quiz_content {
    padding-bottom: 0;
    text-align: left;
    width: 100%;
    color: var(--font_main);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    /* 두 줄 말줄임 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 퀴즈 버튼 */
.main_wrap_02 .today_quiz .quiz_btn {
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.3);
    color: var(--font_main);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.main_wrap_02 .today_quiz .quiz_btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 퀴즈 스와이퍼 */
.quiz_swiper {
    width: 65%;
    height: auto;
    margin: auto 0;
}

.quiz_dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.quiz_dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz_dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

.quiz_content {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 10px;
}

/* ========================================
   5. 메인 버튼 섹션
======================================== */
.main_wrap_02 .con1 {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* 메인 버튼 그리드 */
.main_wrap_02 .con1 .main_buttons {
    display: grid
;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin: 0 auto;
    border-radius: 60px;
    overflow: hidden;
    height: auto;
    width: 100%;
    aspect-ratio: 17 / 14;
    max-height: 400px;
    max-width: min(90vw, 470px);
    margin-bottom: 60px;
}

/* 개별 버튼 아이템 */
.main_wrap_02 .con1 .main_buttons .btn_item {
    height: 100%;
    max-height: 200px;
    background: var(--font_main);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.main_wrap_02 .con1 .main_buttons .btn_item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* 버튼 아이콘 공통 스타일 */
.main_wrap_02 .con1 .main_buttons .btn_item .icon {
    aspect-ratio: 1 / 1;
    width: clamp(65px, 13vw, 85px);
    height: auto;
    margin-bottom: 0.4rem;
    background: linear-gradient(135deg, #504BFF 0%, #7E36FF 100%);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
}

/* 버튼 제목 */
.main_wrap_02 .con1 .main_buttons .btn_item .title {
    white-space: nowrap;
    color: var(--black_main);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
}

/* 개별 버튼 아이콘 이미지 */
.main_wrap_02 .con1 .main_buttons .btn_learning .icon {
    -webkit-mask-image: url(../image/common/learning.svg);
    mask-image: url(../image/common/learning.svg);
}

.main_wrap_02 .con1 .main_buttons .btn_tests .icon {
    -webkit-mask-image: url(../image/common/tests.svg);
    mask-image: url(../image/common/tests.svg);
}

.main_wrap_02 .con1 .main_buttons .btn_event .icon {
    -webkit-mask-image: url(../image/common/event.svg);
    mask-image: url(../image/common/event.svg);
}

.main_wrap_02 .con1 .main_buttons .btn_wordbook .icon {
    -webkit-mask-image: url(../image/common/wordbook.svg);
    mask-image: url(../image/common/wordbook.svg);
}

.main_wrap_02 .con1 .main_buttons .btn_login .icon {
    -webkit-mask-image: url(../image/common/login.svg);
    mask-image: url(../image/common/login.svg);
}

.main_wrap_02 .con1 .main_buttons .btn_join .icon {
    -webkit-mask-image: url(../image/common/join.svg);
    mask-image: url(../image/common/join.svg);
}

/* ========================================
   6. 하단 버튼 섹션
======================================== */
.main_wrap_02 .bottom_buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--back_header);
    display: flex;
    gap: 1rem;
    justify-content: center;
    border-top: 1px solid var(--bord_sub);
    border-radius: 30px 30px 0 0px;
    z-index: 10;
    max-width: 800px;
}

/* 하단 버튼 아이템 */
.main_wrap_02 .bottom_buttons .bottom_btn {
    color: var(--font_main);
    border: none;
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.main_wrap_02 .bottom_buttons .bottom_btn:hover {
    background: var(--main_color);
}

/* 하단 버튼 아이콘 */
.main_wrap_02 .bottom_buttons .bottom_btn .icon {
    background-color: var(--font_main);
    aspect-ratio: 1 / 1;
    width: 33px;
    height: auto;
    background-size: 75% 75%;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 5px;
}

.main_wrap_02 .bottom_buttons .btn_exam .icon {
    background-image: url(../image/common/exam.svg);
}

.main_wrap_02 .bottom_buttons .btn_find .icon {
    background-image: url(../image/common/find.svg);
}

/* ========================================
   7. 팝업 섹션
======================================== */
.main_popup {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    background-color: var(--main_color2);
    z-index: 9999;
    overflow: hidden;
}

.main_popup .banner {
    width: 100%;
    height: 100%;
}

.main_popup .close_01 {
    display: block;
    position: absolute;
    right: 0px;
    top: 0px;
    width: 58px;
    height: 50px;
    margin-left: -55px;
    background: url(../image/main/btn_close2.svg) no-repeat;
    background-size: contain;
}

/* 추가 팝업 */
.main_popup001 {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    background-color: var(--main_color2);
    z-index: 9999;
    overflow: hidden;
}

.main_popup001 .banner {
    width: 100%;
    height: 100%;
}

.main_popup001 .close_01 {
    display: block;
    position: absolute;
    right: 0px;
    top: 0px;
    width: 58px;
    height: 50px;
    margin-left: -55px;
    background: url(../image/main/btn_close2.svg) no-repeat;
    background-size: contain;
}

/* ========================================
   8. 반응형 스타일
======================================== */

/* 데스크톱 환경 */
@media (min-width: 801px) {
    .main_wrap_02 .bottom_buttons {
        width: calc(100% - 300px);
        max-width: 800px;
    }
}

/* 작은 화면 최적화 */
@media (max-height: 740px) {

    .main_wrap_02 .con1 .main_buttons {
        aspect-ratio: 15 / 12;
    }
    
    .main_wrap_02 .today_quiz {
        margin: 0.5rem;
        padding: 0.8rem;
    }
}


/* 모바일 최적화 */
@media (max-width: 360px) {
    .main_wrap_02 .con1 .main_buttons {
        border-radius: 40px;
    }
    
    .main_wrap_02 .con1 .main_buttons .btn_item .title {
        font-size: 0.9rem;
    }
    
    .main_wrap_02 .today_quiz {
        padding: 0.8rem;
    }
    
    .main_wrap_02 .bottom_buttons {
        gap: 0.8rem;
    }

} 