/* modern-theme.css */
@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Noto+Sans+KR:wght@400;700&display=swap');

/* --- 1. Global Resets & Modern Defaults --- */
*, *::before, *::after {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: 'Poppins', 'Noto Sans KR', sans-serif;
    font-size: 16px;
    background-color: #f8f9fa; /* Light gray background */
    color: #212529; /* Dark gray for text */
    -webkit-text-size-adjust: none;
    overflow-x: hidden;
}
a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
h1, h2, h3, h4, h5, p {
    margin: 0;
    padding: 0;
    font-weight: normal;
}
img {
    max-width: 100%;
    height: auto;
}

/* --- 2. Header & Navigation --- */
.top-header {
    max-width: 1000px;
    margin: 0 auto;
    padding: 8px 15px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    font-size: 14px;
    color: #6c757d;
}
.quick-nav ul {
    display: flex;
    gap: 20px;
}
.quick-nav a:hover {
    color: #007bff;
}

.main-nav-wrapper {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1020;
}
.main-nav {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 15px;
}
.main-nav .logo img {
    height: 35px;
}
.main-nav .menu-list {
    display: flex;
    gap: 40px;
}
.main-nav .menu-list > li > a {
    font-size: 17px;
    font-weight: 600;
    color: #343a40;
    padding: 22px 0;
}
.main-nav .menu-list > li > a:hover {
    color: #007bff;
}

/* Submenu Styles */
.has-submenu {
    position: relative;
}
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    min-width: 180px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.has-submenu:hover .submenu {
    display: block;
}
.submenu a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 15px !important;
    color: #495057 !important;
    font-weight: normal !important;
}
.submenu a:hover {
    background-color: #f1f3f5;
    color: #007bff !important;
}

/* --- 3. Main Content Area --- */
.content-wrapper {
    padding: 20px 0;
}
.main-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
}
.intro-box {
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04);
}
.intro-box h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #0056b3;
}
.intro-box p {
    font-size: 16px;
    line-height: 1.7;
    color: #495057;
}
.intro-box time {
    display: block;
    font-weight: 600;
    margin-top: 15px;
    color: #007bff;
    font-size: 14px;
}

/* --- 4. Rank List --- */
.rank-list-container {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}
.rank-item {
    width: 50%;
    padding: 10px;
    background-color: transparent;
    cursor: default;
}
.rank-item a {
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background-color: #fff;
    overflow: hidden;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.rank-item a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
.rank-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    font-size: 18px;
    font-weight: 700;
}
.rank-header.type-1 {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: #fff;
}
.rank-header.type-2 {
    background-color: #f8f9fa;
    color: #343a40;
    border-bottom: 1px solid #e9ecef;
}
.rank-header h3 {
    font-size: inherit;
    font-weight: inherit;
}
.rank-thumbnail-wrapper {
    line-height: 0;
}
.rank-thumbnail {
    width: 100%;
    aspect-ratio: 24 / 9;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}
.rank-item a:hover .rank-thumbnail {
    opacity: 1;
}
.rank-description {
    padding: 10px 15px;
    font-size: 14px;
    line-height: 1.6;
    flex-grow: 1;
    color: #495057;
}
.rank-description ul {
    list-style-type: none;
}
.rank-description li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}
.rank-description li:last-child {
    margin-bottom: 0;
}
.rank-description strong {
    font-weight: 600;
}
.rank-description span {
    color: #6c757d;
    font-size: 13px;
}
.rank-description img {
    width: 16px;
    height: 16px;
}
.rank-footer {
    padding: 10px 15px;
    margin-top: auto;
}
.download-button {
    display: block;
    width: 100%;
    padding: 10px 0;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    border-radius: 8px;
    color: #fff;
    background-color: #fd7e14;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.rank-item a:hover .download-button {
    background-color: #e86100;
    transform: scale(1.02);
}

/* --- 5. Latest Posts & SEO Article --- */
.post-section {
    padding: 40px 0;
}
.latest-posts-grid {
    display: flex;
    width: 100%;
    margin-bottom: 30px;
    gap: 20px;
}
.latest-list {
    flex: 1;
    background: #fff;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
}
.latest-list h2, .latest-gallery h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    display: inline-block;
}
.latest-gallery {
     background: #fff;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
}
.latest-gallery ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0 -5px;
}
.latest-gallery li {
    width: 16.666%;
    padding: 5px;
}
.latest-gallery li a {
    display: block;
    text-align: center;
    border-radius: 8px;
    overflow:hidden;
    border: 1px solid #dee2e6;
    transition: box-shadow 0.3s ease;
}
.latest-gallery li a:hover {
     box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.latest-gallery .lt_img img {
    width: 100%;
    height: auto;
    border: none;
    border-radius: 0;
}
.latest-gallery .lt_tit {
    padding: 10px 5px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: #f8f9fa;
}

.seo-article {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    margin-top: 30px;
}
.seo-article summary {
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 20px;
}
.seo-article h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 25px 0 10px;
    color: #0056b3;
}
.seo-article p {
    line-height: 1.8;
    margin-bottom: 15px;
    color: #495057;
}

/* --- 6. Author & Footer --- */
.author-profile {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    margin-top: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}
.author-profile h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}
.author-profile img {
    border-radius: 50%;
    margin-bottom: 10px;
    border: 4px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#footer {
    clear: both;
    padding: 30px 15px;
    width: 100%;
    font-size: 14px;
    text-align: center;
    color: #6c757d;
    background-color: #343a40; /* Dark footer */
    margin-top: 30px;
}
.footer-menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}
.footer-menu a {
    color: #adb5bd;
}
.footer-menu a:hover {
    color: #ffffff;
}
.footer-info-text {
    color: #6c757d;
}
.footer-info-text a {
    color: #89b2ff;
}

/* --- 7. Responsive Media Queries --- */
@media (max-width: 992px) {
    .rank-item {
        width: 100%;
    }
    .latest-posts-grid {
        flex-direction: column;
    }
}
@media (max-width: 768px) {
    .latest-gallery li {
        width: 33.333%;
    }
    .main-nav {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }
    .main-nav .menu-list {
        margin-top: 15px;
        gap: 20px;
    }
    .main-nav .menu-list > li > a {
        padding: 10px;
    }
    .submenu {
        transform: translateX(0);
        left: 0;
        right: 0;
        min-width: auto;
    }
}
@media (max-width: 480px) {
    body { 
        font-size: 14px;
    } 
    .main-content { padding: 15px; }
    .latest-gallery li {
        width: 50%;
    }
    .main-nav {
        align-items: flex-start;
        padding-left: 15px;
        padding-right: 15px;
    }
    .main-nav .menu-list {
        gap: 15px;
    }
    .main-nav .menu-list > li > a {
        font-size: 15px;
        padding: 10px 5px;
    }
    .intro-box {
        padding: 20px 15px;
    }
    .intro-box h1 {
        font-size: 20px;
    }
    .intro-box p {
        font-size: 14px;
    }
    .seo-article {
        display: none;
    }
}

/* --- 8. Sub-Page & Board Styles --- */
.sub-page-title h2 {
    font-size: 28px;
    font-weight: 700;
    color: #343a40;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #007bff;
}

/* Board List Styles */
#bo_list table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
#bo_list th, #bo_list td {
    padding: 12px 8px;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
}
#bo_list thead th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    border-top: 2px solid #6c757d;
    border-bottom-width: 2px;
}
#bo_list .td_subject a:hover {
    color: #007bff;
    text-decoration: underline;
}
#bo_list .notice {
    background-color: #f1f3f5;
    font-weight: 600;
}

/* Board View Styles */
#bo_v #bo_v_title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
}
#bo_v #bo_v_info {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}
#bo_v #bo_v_atc {
    padding: 20px 0;
    line-height: 1.8;
    min-height: 150px;
}

/* Form & Button Styles */
.btn, input[type="submit"], input[type="button"] {
    display: inline-block;
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    border: 1px solid transparent;
}
.btn_submit, .btn_confirm {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}
.btn_submit:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}
.btn_cancel, .btn_normal {
    background-color: #6c757d;
    color: #fff;
    border-color: #6c757d;
}
.btn_cancel:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Content (co_id) Styles */
#container {
    line-height: 1.8;
}
#container h1, #container h2, #container h3 {
    margin: 20px 0 10px;
    font-weight: 700;
    color: #343a40;
}
