/* AI 뉴스 블로그 스타일 */

/* 좌우 광고 스타일 */
.ad-left {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.ad-right {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header p {
    margin: 0.5rem 0 0 0;
    font-size: 1.2rem;
    opacity: 0.9;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

#news-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.news-article {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.news-article:hover {
    transform: translateY(-5px);
}

.news-article img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 1.5rem;
}

.article-content h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    color: #2c3e50;
}

.article-content p {
    margin: 0 0 1rem 0;
    color: #666;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #888;
}

.read-more {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background-color: #2980b9;
}

footer {
    background-color: #34495e;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    max-width: 700px;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #333;
}

#modal-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

#modal-title {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.modal-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 0.95rem;
}

#modal-summary {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    padding: 1rem;
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

#modal-full-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

#modal-details {
    color: #555;
    line-height: 1.8;
}

@media (max-width: 768px) {
    #news-container {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 2rem;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }

    #modal-title {
        font-size: 1.4rem;
    }

    /* 모바일에서 광고 숨김 */
    .ad-left,
    .ad-right {
        display: none;
    }
}