﻿/**
 * 메인(index.html) 전용 — common.css 이후 로드
 */

/* -------------------------------------------------------------------------
   공통 타이포 / 링크
   ------------------------------------------------------------------------- */
   h2.sec-tit {
    display: flex;
    justify-content: space-between;
    padding: 40px 0 32px;
    font-family: 'mbcnew-bold', sans-serif;
    font-size: 22px;
    line-height: 32px;
}

/* -------------------------------------------------------------------------
   여론M — 지역 탭 (.region-tabs)
   ------------------------------------------------------------------------- */
.wrap-poll .sec-tit {
    padding-bottom: 24px
}

.region-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.region-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    min-height: 32px;
    border-radius: 8px;
    background: #f8f9fa;
    color: #495057;
    font-family: 'mbcnew-medium', sans-serif;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -0.4px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

    .region-tab:hover:not([data-disabled="true"]):not(.active) {
        border-color: #adb5bd;
        background: #e9ecef;
    }

    .region-tab.active {
        border-color: #12275B;
        background: #12275B;
        color: #fff;
    }

    .region-tab[data-disabled="true"] {
        color: #ADB5BD;
        cursor: not-allowed;
    }

/* 차트 패널 show/hide + fade 트랜지션 */
.region-charts {
    position: relative;
    min-height:480px;
}

.region-chart-wrap {
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

    .region-chart-wrap.active {
        display: block;
        opacity: 1;
    }


/* -------------------------------------------------------------------------
   여론M — Highcharts 툴팁 (graph.html 인라인 스타일 이전)
   ------------------------------------------------------------------------- */
.hth {
    text-align: center;
    padding: 4px 8px;
    font-weight: bold;
    border-radius: 4px;
    transform: translate(0px, 4px);
    min-width: 60px;
}

.ht {
    text-align: right;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid red;
    font-size: 14px;
    padding: 4px 8px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    text-align: center;
}

.highcharts-tooltip .highcharts-label span {
    padding: 4px;
}

.tooltip-container-rg {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    min-height: 80px;
    align-content: end;
}

    .tooltip-container-rg .ht {
        margin: 4px;
        border-radius: 4px;
        background-color: rgba(255, 255, 255, 0.4);
    }

    .tooltip-container-rg .hth {
        transform: none;
        padding: 0;
        color: rgba(82, 22, 250, 0.8);
        background-color: transparent;
        margin-right: 8px;
    }

.tooltip-img {
    width: 20px !important;
    height: 20px !important;
}

/* -------------------------------------------------------------------------
   여론M — 차트 영역 공통
   ------------------------------------------------------------------------- */
.wrap-poll .poll-matchup-tit {
    margin: 0 0 24px;
    color: #495057;
    text-align: center;
    font-family: 'mbcnew-bold';
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: 32px;
    letter-spacing: -0.6px;
}

.wrapper a:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------------------
   썸네일 호버 스케일 (선거뉴스 VOD 리스트)
   ------------------------------------------------------------------------- */
.img img {
    width: 100%;
    transform-origin: center center;
    transition: transform 0.3s ease;
}

a:hover .img img {
    transform: scale(1.05);
}

/* -------------------------------------------------------------------------
   최신 선거뉴스 — .wrap-news
   ------------------------------------------------------------------------- */
.wrap-news {
    margin-top: 8px;
}
    .wrap-news .news-list{min-height:460px}
    .wrap-news .news-list ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px 40px;
        list-style: none;
        padding: 0;
        margin-top: 0;
    }

    .wrap-news .news-list li a {
        display: flex;
        gap: 24px;
        align-items: flex-start;
        text-decoration: none;
    }

    .wrap-news .news-list li .img {
        position: relative;
        flex-shrink: 0;
        width: 248px;
        height: 140px;
        border-radius: 12px;
        overflow: hidden;
        background: lightgray 50% / cover no-repeat;
    }

        .wrap-news .news-list li .img img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transform-origin: center center;
            transition: transform 0.3s ease;
        }

    a:hover .wrap-news .news-list li .img img,
    .wrap-news .news-list li a:hover .img img {
        transform: scale(1.05);
    }

    .wrap-news .news-list li .txt {
        display: flex;
        flex-direction: column;
        height: 140px;
    }

    .wrap-news .news-list li .title {
        color: #495057;
        font-family: 'mbcnew-medium', sans-serif;
        font-size: 18px;
        font-weight: 500;
        line-height: 28px;
        letter-spacing: -0.45px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .wrap-news .news-list li a:hover .title {
        text-decoration: underline !important
    }

    .wrap-news .news-list li .date {
        margin-top: auto;
        color: #646D76;
        font-family: 'mbcnew-light', sans-serif;
        font-size: 14px;
        line-height: 20px;
        letter-spacing: -0.35px;
    }

/* -------------------------------------------------------------------------
   선거뉴스 모아보기 — .wrap-vod
   ------------------------------------------------------------------------- */
.wrap-vod .wrapper {
    margin-top: 60px;
    border-top: 1px solid #dee2e6
}

.wrap-vod .vod-list ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 28px;
    overflow: hidden;
}

.wrap-vod .vod-list li {
    max-width: 302px;
    overflow: hidden;
}

    .wrap-vod .vod-list li .img {
        position: relative;
        display: block;
        width: 100%;
        height: 170px;
        overflow: hidden;
        border-radius: 16px;
    }

        .wrap-vod .vod-list li .img img {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            width: 100%;
            margin: auto;
        }

    .wrap-vod .vod-list li .txt {
        padding: 16px 0 32px;
    }

    .wrap-vod .vod-list li .title {
        overflow: hidden;
        color: #495057;
        font-family: 'mbcnew-light', sans-serif;
        font-size: 18px;
        font-weight: 300;
        line-height: 28px;
        letter-spacing: -0.45px;
    }

/* -------------------------------------------------------------------------
   선거정보 — .wrap-info
   ------------------------------------------------------------------------- */
.wrap-info .wrapper {
    position: relative;
    border-top: 1px solid #dee2e6;
}

.wrap-info .info-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 0 0;
}

    .wrap-info .info-head .sec-tit {
        padding: 0;
    }

.info-more {
    font-family: 'mbcnew-medium', sans-serif;
    font-size: 16px;
    line-height: 24px;
    color: #646d76;
    letter-spacing: -0.4px;
    vertical-align: middle;
}

    .info-more:hover {
        text-decoration: none !important;
    }

    .info-more .ico_arrow {
        display: inline-block;
        width: 10px;
        height: 24px;
        vertical-align: -7px;
        background: url(../images/ico_arrow.svg) no-repeat center center;
    }

.wrap-info .tit {
    margin: 24px 0 32px;
    text-align: center;
    font-family: 'mbcnew-light', sans-serif;
    font-size: 21px;
}

    .wrap-info .tit span {
        font-family: 'mbcnew-bold', sans-serif;
    }

.wrap-info .info-card-list {
    display: flex;
    align-items: stretch;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0 0 100px;
    gap: 24px;
    list-style: none;
}

    .wrap-info .info-card-list > li {
        flex: 1 1 0;
        min-width: 0;
        max-width: 302px;
    }

.wrap-info .info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 24px 16px 32px;
    border: 1px solid #dee2e6;
    border-radius: 16px;
    background: #fff;
}

.wrap-info .info-card__ico {
    display: block;
    margin-bottom: 12px;
}

    .wrap-info .info-card__ico img {
        display: block;
        max-width: 100%;
        height: auto;
        margin: 0 auto;
    }

.wrap-info .info-card__tit {
    display: block;
    margin: 0;
    font-weight: normal;
    font-family: 'mbcnew-bold', sans-serif;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    color: #495057;
}

.wrap-info .info-card__desc {
    margin: 0;
    font-family: 'mbcnew-light', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    color: #666;
}
