/* =========================================================
   제휴마케팅 동행 - 파트너 사이트 글로벌 CSS
   Original + Modern UI Overhaul + Full Mobile Responsive
   ========================================================= */

/* [1] 구글 폰트 (Noto Sans KR: 깔끔하고 현대적인 한국어 폰트) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;800&display=swap');

/* [2] CSS 변수 (전체 디자인 토큰) */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --accent: #f97316;
    --bg-white: #ffffff;
    --bg-gray: #f8fafc;
    --bg-dark: #1e293b;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Noto Sans KR', -apple-system, 'Malgun Gothic', sans-serif;
}

/* [3] 기본 리셋 & 타이포그래피 현대화 */
*, *::before, *::after { box-sizing: border-box; }
body, tr, td {
    font-size: 14px;
    color: var(--text-dark);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
body {
    margin: 0;
    padding: 0;
    background: var(--bg-gray);
    overflow-x: hidden;
    width: 100%;
}
.Border_null {
    font-size: 12px;
    color: var(--text-gray);
    font-family: var(--font-main);
    border: 0px solid;
}
div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, form, fieldset, p, button, input, select, textarea {
    margin: 0; padding: 0; box-sizing: border-box;
}
dl, ul, ol, li { list-style: none; }
img { vertical-align: bottom; max-width: 100%; height: auto; }

/* [4] 링크 현대화 */
a { font-family: var(--font-main); font-size: 13px; text-decoration: none; color: var(--text-dark); transition: var(--transition); }
a:link { text-decoration: none; color: var(--text-dark); }
a:active { text-decoration: none; color: var(--text-dark); }
a:visited { text-decoration: none; color: var(--text-dark); }
a:hover { text-decoration: none; color: var(--primary); }

/* [5] 페이지 리스트 스타일 (현대화) */
#Page_List_style {}
#Page_List_style span {
    margin: 0 2px;
    border: none;
    background: var(--primary);
    color: #ffffff;
    padding: 6px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
#Page_List_style a {
    margin: 0 2px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-dark);
    padding: 6px 12px;
    font-size: 13px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
#Page_List_style a:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* [6] 상단 메인 메뉴 현대화 */
.Main_Menu {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}
.Main_Menu ul {
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    height: 48px;
    line-height: 48px;
    width: 100%;
    max-width: 1000px;
    padding: 0 16px;
}
.Main_Menu li { flex: 1; text-align: center; }
.Main_Menu li a {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-main);
    display: block;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}
.Main_Menu li a:hover { background: rgba(255,255,255,0.15); color: #ffffff; }
.Main_Menu .On { background: rgba(0,0,0,0.2); border-radius: var(--radius-sm); }

/* [7] 서브 메뉴 현대화 */
.Sub_Menu_Box {
    display: flex;
    height: 44px;
    line-height: 44px;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
}
.Sub_Menu_Box li { flex: 1; text-align: center; }
.Sub_Menu_Box a {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    display: block;
    transition: var(--transition);
}
.Sub_Menu_Box a:hover { background: rgba(0,0,0,0.1); color: #ffffff; }
.Sub_Menu_Box .On { background: rgba(0,0,0,0.25); }

/* [8] 딥링크 영역 현대화 */
.Deep_link { width: 100%; max-width: 1000px; margin: 20px auto; padding: 0 16px; }
.Deep_link h1 { color: var(--primary-dark); padding-bottom: 20px; font-weight: 700; }
.Deep_link h2 {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 700;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 12px;
    margin-bottom: 16px;
}
.Deep_link .Ment_1 { font-size: 16px; font-weight: 600; margin-bottom: 24px; line-height: 1.6; color: var(--text-dark); }
.Deep_link .Ment_2 { line-height: 1.6; font-size: 13px; margin-bottom: 14px; color: var(--text-gray); }
.Deep_link textarea {
    width: 100%;
    height: 200px;
    border: 1px solid var(--border);
    padding: 16px;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 13px;
    resize: vertical;
    transition: var(--transition);
}
.Deep_link textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); }
.Deep_link .Ment_3 { text-align: center; padding: 20px 0; margin-top: 20px; }
.Deep_link .Ment_3 a {
    background: var(--primary);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    border-radius: var(--radius);
    padding: 14px 40px;
    display: inline-block;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}
.Deep_link .Ment_3 a:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); color: #ffffff; }
.Deep_link_Convert {
    border: 1px solid var(--border);
    padding: 16px;
    background: var(--bg-white);
    margin-top: 16px;
    border-radius: var(--radius-sm);
}

.Deep_link ul { display: flex; padding: 12px; border-bottom: 1px solid var(--border); align-items: center; }
.Deep_link li:nth-child(1) { width: 79px; }
.Deep_link li:nth-child(1) img { width: 69px; height: 34px; border-radius: 4px; }
.Deep_link li:nth-child(2) { flex: 1; padding: 0 12px; }
.Deep_link li:nth-child(2) input {
    width: 100%;
    height: 40px;
    line-height: 40px;
    border: 1px solid var(--border);
    text-indent: 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 13px;
    transition: var(--transition);
}
.Deep_link li:nth-child(2) input:focus { outline: none; border-color: var(--primary); }
.Deep_link li:nth-child(3) { width: 160px; text-align: center; }
.Deep_link li:nth-child(3) button {
    width: 140px;
    height: 40px;
    line-height: 40px;
    border: none;
    background: var(--primary);
    color: #ffffff;
    text-align: center;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-main);
}
.Deep_link li:nth-child(3) button:hover { background: var(--primary-dark); }
.Deep_link li:nth-child(3) span { position: relative; top: -1px; vertical-align: middle; }

/* [9] 테이블 현대화 (라운드 코너, 줄무늬, 호버 효과) */
table[width="1000"], table[width="980"] { width: 100% !important; max-width: 1000px; margin: 0 auto; }
td { padding: 4px; }

/* [10] input/select/textarea 현대화 */
input[type="text"], input[type="password"], input[type="email"], input[type="tel"], select, textarea {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-family: var(--font-main);
    font-size: 13px;
    transition: var(--transition);
    background: var(--bg-white);
}
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="tel"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
input[type="submit"], input[type="button"], button:not(.Deep_link li button) {
    border: none;
    background: var(--primary);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
input[type="submit"]:hover, input[type="button"]:hover, button:not(.Deep_link li button):hover {
    background: var(--primary-dark);
}

/* =========================================================
   [11] FULL Mobile Responsive - 768px 이하
   ========================================================= */
@media (max-width: 768px) {
    /* 전체 컨테이너: 고정 너비 무력화 */
    body {
        width: 100% !important;
        overflow-x: hidden;
        font-size: 14px;
    }
    table, div, form, iframe {
        width: 100% !important;
        max-width: 100% !important;
    }
    table[width], table[cellpadding] {
        width: 100% !important;
    }
    td, th {
        word-break: break-word;
        display: block;
        width: 100% !important;
        padding: 4px 8px;
    }
    tr { display: block; width: 100% !important; }
    img { max-width: 100% !important; height: auto !important; }

    /* 메인 메뉴 → 햄버거 스타일(간소화) */
    .Main_Menu {
        position: sticky;
        top: 0;
        z-index: 999;
    }
    .Main_Menu ul {
        width: 100% !important;
        flex-wrap: wrap;
        height: auto !important;
        line-height: 42px;
        padding: 0 4px;
    }
    .Main_Menu li {
        flex: 1 1 calc(33.333% - 4px);
        height: 42px;
    }
    .Main_Menu li a {
        font-size: 13px;
        padding: 0 4px;
        white-space: nowrap;
    }

    /* 서브 메뉴 모바일 */
    .Sub_Menu_Box {
        flex-wrap: wrap;
        height: auto !important;
        line-height: 38px;
        border-radius: 0;
    }
    .Sub_Menu_Box li {
        flex: 1 1 50%;
        height: 38px;
    }
    .Sub_Menu_Box a { font-size: 13px; }

    /* 딥링크 영역 모바일 */
    .Deep_link { padding: 0 12px; }
    .Deep_link ul { flex-direction: column; gap: 8px; padding: 12px 0; }
    .Deep_link li { width: 100% !important; text-align: left; }
    .Deep_link li:nth-child(1) { display: none; }
    .Deep_link li:nth-child(2) { padding: 0; }
    .Deep_link li:nth-child(2) input { height: 44px; font-size: 14px; }
    .Deep_link li:nth-child(3) { width: 100% !important; }
    .Deep_link li:nth-child(3) button { width: 100%; height: 44px; font-size: 15px; margin-top: 6px; }
    .Deep_link textarea { height: 150px; }
    .Deep_link .Ment_3 a { padding: 14px 24px; font-size: 15px; width: 100%; display: block; }

    /* 사이드바(좌측 메뉴) 모바일 숨김 → 콘텐츠 풀넓이 */
    td[width="180"], td[width="170"], td[width="160"] {
        display: none !important;
    }

    /* 헤더 상단 로고/유저정보 바 모바일 */
    td[align="right"] { text-align: left !important; }

    /* 인풋 필드들 터치 영역 확보 */
    input[type="text"], input[type="password"], input[type="email"], input[type="tel"], select {
        width: 100% !important;
        height: 44px;
        font-size: 15px;
        padding: 10px 14px;
    }
    textarea {
        width: 100% !important;
        font-size: 14px;
        padding: 12px;
        min-height: 100px;
    }
    input[type="submit"], input[type="button"], button {
        width: 100% !important;
        height: 48px;
        font-size: 16px;
        font-weight: 700;
    }

    /* 스크롤 가능한 테이블 래퍼 */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* PC 전용 요소 숨기기 */
    .pc_only { display: none !important; }

    /* 페이지 리스트 모바일 */
    #Page_List_style { text-align: center; padding: 16px 0; }
    #Page_List_style span, #Page_List_style a {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* =========================================================
   [12] 태블릿 (769px ~ 1024px)
   ========================================================= */
@media (min-width: 769px) and (max-width: 1024px) {
    table[width="1000"], table[width="980"] { width: 100% !important; }
    .Main_Menu ul { width: 100% !important; padding: 0 16px; }
    td[width="180"] { width: 140px !important; }
}
