﻿/* =========================================================
   /css/style.css
   사용자 페이지 공통 반응형 CSS
   뉴스 포털형 레이아웃
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Arial, sans-serif;
    background: #ffffff;
    color: #111827;
    font-size: 16px;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.site-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================================
   Header
   ========================================================= */

.site-topbar {
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    font-size: 13px;
    color: #4b5563;
}

.site-topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.site-topbar-left,
.site-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.site-topbar a {
    color: #4b5563;
    font-weight: 700;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.site-header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 20px 20px;
    display: grid;
    grid-template-columns: 220px 1fr 120px;
    align-items: center;
    gap: 22px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.site-logo img {
    max-height: 52px;
    width: auto;
}

.site-logo-text {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: #111827;
}

.site-search {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.site-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.site-search-input {
    width: 100%;
    height: 46px;
    padding: 0 52px 0 17px;
    border: 2px solid #111827;
    border-radius: 999px;
    font-size: 15px;
    outline: none;
}

.site-search-button {
    position: absolute;
    right: 6px;
    top: 5px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
}

.site-menu-button {
    justify-self: end;
    width: 44px;
    height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}

.site-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    background: #111827;
    position: relative;
}

.site-menu-button span::before,
.site-menu-button span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: #111827;
}

.site-menu-button span::before {
    top: -7px;
}

.site-menu-button span::after {
    top: 7px;
}

.site-gnb {
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #111827;
    background: #ffffff;
}

.site-gnb-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-gnb-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.site-gnb-list::-webkit-scrollbar {
    display: none;
}

.site-gnb-list li {
    flex: 0 0 auto;
}

.site-gnb-list a {
    display: block;
    padding: 15px 15px;
    font-size: 16px;
    font-weight: 900;
    color: #111827;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.site-gnb-list a:hover {
    color: #2563eb;
}

.mobile-nav {
    display: none;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.mobile-nav.open {
    display: block;
}

.mobile-nav-inner {
    padding: 14px 20px 18px;
}

.mobile-nav-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-nav-grid a {
    display: block;
    padding: 12px 13px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
}

/* =========================================================
   Main
   ========================================================= */

.main-wrap {
    padding: 26px 0 50px;
}

.main-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.95fr 320px;
    gap: 26px;
    align-items: start;
}

.main-headline {
    border-bottom: 2px solid #111827;
    padding-bottom: 18px;
}

.headline-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    background: #e5e7eb;
    overflow: hidden;
    margin-bottom: 16px;
}

.headline-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-thumb {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1f2937, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.news-category {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 8px;
}

.headline-title {
    margin: 0;
    font-size: 31px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: -0.06em;
    color: #111827;
}

.headline-summary {
    margin: 11px 0 0;
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
}

.news-meta {
    margin-top: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    color: #6b7280;
    font-size: 13px;
}

.main-list {
    display: grid;
    gap: 14px;
}

.news-list-card {
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.news-list-thumb {
    width: 116px;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    background: #e5e7eb;
    overflow: hidden;
}

.news-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-list-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.42;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #111827;
}

.news-list-title:hover {
    color: #2563eb;
}

.news-list-summary {
    margin: 7px 0 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.sidebar-box {
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    overflow: hidden;
    margin-bottom: 18px;
}

.sidebar-head {
    padding: 15px 17px;
    border-bottom: 1px solid #e5e7eb;
    background: #111827;
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.ranking-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-list li {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 10px;
    padding: 13px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.ranking-list li:last-child {
    border-bottom: 0;
}

.rank-num {
    font-size: 18px;
    font-weight: 900;
    color: #2563eb;
    line-height: 1.35;
}

.rank-title {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
    color: #111827;
}

.rank-title:hover {
    color: #2563eb;
}

.notice-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.notice-list li {
    padding: 13px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.notice-list li:last-child {
    border-bottom: 0;
}

.notice-list a {
    font-size: 14px;
    font-weight: 800;
    color: #111827;
}

/* =========================================================
   Sections
   ========================================================= */

.section-block {
    margin-top: 42px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 2px solid #111827;
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.section-title {
    margin: 0;
    font-size: 23px;
    line-height: 1.25;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.section-more {
    color: #2563eb;
    font-size: 14px;
    font-weight: 900;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.news-card {
    min-width: 0;
}

.news-card-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    background: #e5e7eb;
    overflow: hidden;
    margin-bottom: 12px;
}

.news-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #111827;
}

.news-card-title:hover {
    color: #2563eb;
}

.news-card-meta {
    margin-top: 8px;
    color: #6b7280;
    font-size: 13px;
}

.latest-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
}

.text-news-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.text-news-list li {
    border-bottom: 1px solid #e5e7eb;
}

.text-news-list a {
    display: block;
    padding: 13px 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.45;
    color: #111827;
}

.text-news-list a:hover {
    color: #2563eb;
}

/* =========================================================
   Banner
   ========================================================= */

.banner-zone {
    margin: 28px 0;
}

.banner-box {
    min-height: 90px;
    border-radius: 18px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-weight: 800;
    overflow: hidden;
}

.banner-box img {
    width: 100%;
    height: auto;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
    border-top: 1px solid #e5e7eb;
    background: #111827;
    color: #d1d5db;
    margin-top: 50px;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 34px 20px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.footer-links a {
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
}

.footer-main {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
}

.footer-logo img {
    max-height: 48px;
    width: auto;
}

.footer-logo-text {
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.04em;
}

.footer-info {
    font-size: 13px;
    line-height: 1.75;
    color: #d1d5db;
}

.footer-info p {
    margin: 0 0 5px;
}

.footer-copy {
    margin-top: 16px;
    color: #9ca3af;
    font-size: 13px;
}

/* =========================================================
   Empty
   ========================================================= */

.empty-news {
    padding: 30px 20px;
    border: 1px dashed #d1d5db;
    border-radius: 16px;
    text-align: center;
    color: #6b7280;
    font-weight: 800;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
    .main-grid {
        grid-template-columns: 1fr 1fr;
    }

    .main-sidebar {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }

    .section-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .site-header-inner {
        grid-template-columns: 1fr 54px;
        gap: 14px;
        padding: 18px 20px;
    }

    .site-search {
        grid-column: 1 / -1;
        order: 3;
        max-width: none;
    }

    .site-menu-button {
        display: inline-flex;
    }

    .site-gnb {
        display: none;
    }

    .main-grid {
        grid-template-columns: 1fr;
    }

    .main-sidebar {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .headline-title {
        font-size: 27px;
    }

    .section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .latest-wrap {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .site-container {
        padding: 0 16px;
    }

    .site-topbar-inner {
        display: block;
        padding: 9px 16px;
    }

    .site-topbar-right {
        margin-top: 6px;
    }

    .site-header-inner {
        padding: 16px;
    }

    .site-logo img {
        max-height: 42px;
    }

    .site-logo-text {
        font-size: 24px;
    }

    .main-wrap {
        padding-top: 20px;
    }

    .headline-title {
        font-size: 24px;
    }

    .news-list-card {
        grid-template-columns: 94px 1fr;
        gap: 12px;
    }

    .news-list-thumb {
        width: 94px;
    }

    .news-list-title {
        font-size: 16px;
    }

    .section-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 21px;
    }
}