/* 기존 index.html의 모든 CSS를 home.css로 이동 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 15px;
    
}

/* 헤더 스타일 */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
}
.logo a {
    text-decoration: none;   /* 밑줄 제거 */
    color: inherit;          /* 텍스트 색상 상속 */
    display: flex;           /* 아이콘과 텍스트 정렬용 */
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    font-size: 1.8rem;
}
.logo i {
    margin-top: 0.4rem;
    margin-right: 0.1rem;
    color: var(--secondary-color);
}
.logo span {
    font-size: inherit;      /* 텍스트 크기 상속 */
}

.header-search {
    flex-grow: 1;
    margin: 0 2rem;
}

.search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    flex-grow: 1;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.user-menu {
    display: flex;
    align-items: center;
}

.user-menu a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    font-size: 0.9rem;
}

.user-menu a:hover {
    color: var(--secondary-color);
}

.nav-main {
    background-color: var(--dark-color);
    border-radius: 4px;
}

.nav-list {
    display: flex;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    color: white;
    padding: 1rem 1.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: var(--secondary-color);
}

.nav-item:hover .submenu {
    display: block;
}

.submenu {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 4px;
}

.submenu a {
    color: var(--dark-color);
    padding: 0.8rem 1rem;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.submenu a:hover {
    background-color: var(--light-color);
}

/* 메인 콘텐츠 스타일 */
.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    justify-content: center;
    margin-top: 15px !important;
    margin-left: auto;
    margin-right: auto;
}

.main-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.banner-carousel {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s;
}

.banner-slide.active {
    opacity: 1;
}

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1.5rem;
}

.banner-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.banner-desc {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.banner-link {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
}

.section {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.section-title h2 {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.more-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.news-list {
    list-style: none;
}

.news-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.news-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.news-title a {
    color: var(--dark-color);
    text-decoration: none;
}

.news-title a:hover {
    color: var(--secondary-color);
}

.news-meta {
    display: flex;
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 0.5rem;
}

.news-source, .news-date {
    margin-right: 1rem;
}

.news-summary {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background-color: var(--light-color);
    color: var(--dark-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
}

.tag:hover {
    background-color: var(--secondary-color);
    color: white;
}

.board-list {
    list-style: none;
}

.board-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.board-item:last-child {
    border-bottom: none;
}

.board-title {
    flex-grow: 1;
    font-size: 1rem;
}

.board-title a {
    color: var(--dark-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.board-title a:hover {
    color: var(--secondary-color);
}

.board-category {
    background-color: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

.board-meta {
    display: flex;
    font-size: 0.8rem;
    color: #777;
}

.board-date, .board-views, .board-comments {
    margin-left: 1rem;
}

/* 사이드바 스타일 */
.main-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.login-box {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.login-form {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.login-button {
    width: 100%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.7rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-button:hover {
    background-color: #2980b9;
}

.login-links {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.login-links a {
    color: #777;
    text-decoration: none;
}

.login-links a:hover {
    color: var(--secondary-color);
}

.ad-box {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.ad-label {
    display: block;
    font-size: 0.7rem;
    color: #777;
    margin-bottom: 0.5rem;
}

.ad-content {
    width: 100%;
    height: 150px;
    background-color: #eee;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

.ad-content img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}

.quick-links {
    list-style: none;
}

.quick-links li {
    margin-bottom: 0.5rem;
}

.quick-links a {
    display: flex;
    align-items: center;
    padding: 0.7rem;
    background-color: white;
    border-radius: 4px;
    color: var(--dark-color);
    text-decoration: none;
    transition: background-color 0.3s;
}

.quick-links a:hover {
    background-color: var(--light-color);
}

.quick-links i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.newsletter-box {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.newsletter-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
}

.newsletter-input {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 0.9rem;
}

.newsletter-button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* 푸터 스타일 */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #3a536b;
    text-align: center;
    font-size: 0.8rem;
    color: #bbb;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* 반응형 스타일 */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    .banner-carousel {
        height: 250px;
    }
    .banner-title {
        font-size: 1.5rem;
    }
}
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 1rem;
    }
    .header-search {
        width: 100%;
        margin: 0;
    }
    .nav-list {
        flex-direction: column;
    }
    .submenu {
        position: static;
        box-shadow: none;
        background-color: rgba(0,0,0,0.1);
    }
    .submenu a {
        color: white;
    }
    .banner-carousel {
        height: 200px;
    }
}
