@font-face {
    font-family: 'CR';
    src: url('/fonts/CR.woff2') format('woff2'),
         url('/fonts/CR.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: white;
    color: black;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.logo {
    text-align: center;
    padding: 5x 0;
}

.logo h1 {
    font-family: 'CR', 'Times New Roman', serif !important;
    font-size: 3.5rem !important;
    margin-bottom: -15px !important;
    color: black !important;
    font-weight: bold !important;
}

.logo p {
    opacity: 0.7;
    margin-bottom: 0;
    color: black;
    font-size: 1.2rem;
    font-style: italic;
}

.maple-leaf-icon {
    width: 0.7em;  /* Smaller than 0.8em */
    height: 0.7em;
    vertical-align: 2px;  /* Keep the same height position */
    margin: 0 4px;
    display: inline-block;
}

/* Navigation */
nav {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    position: relative; /* Default position */
}

nav.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}

/* Add body class when nav is fixed */
body.nav-fixed {
    padding-top: 70px; /* Adjust this value to match your nav height */
}

/* Main Layout - Add consistent top spacing */
main {
    padding: 40px 0;
    min-height: calc(100vh - 200px); /* Prevent content jumping */
}

/* IMPORTANT FIX: Add spacing between nav and content */
.content-layout {
    display: grid;
    grid-template-columns: 2fr 300px;
    gap: 30px;
    align-items: start;
    margin-top: 20px; /* This adds the missing space at the top */
}

/* Alternative solution: Always add top spacing */
.content-wrapper {
    margin-top: 20px; /* Consistent spacing from navigation */
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    justify-content: center;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background 0.3s;
    font-weight: 500;
}

nav a:hover {
    background: rgba(255,255,255,0.1);
}

/* Main Layout - Articles on left/center, ads on right */
main {
    padding: 40px 0;
}

.content-layout {
    display: grid;
    grid-template-columns: 2fr 300px;
    gap: 30px;
    align-items: start;
}

/* Main Content - Now takes up more space */
.main-content {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-header {
    margin-bottom: 30px;
    border-bottom: 3px solid #dc2626;
    padding-bottom: 15px;
}

.section-header h2 {
    color: #333;
    font-size: 1.8rem;
}

/* Articles List */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Reduced from 25px to 10px for minimal spacing */
}

.article-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    border: 1px solid #eee; /* Keep subtle border */
    border-radius: 8px;
    transition: all 0.3s;
    background: #fafafa;
}

.article-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Remove the red border from featured articles */
.article-item.featured {
    border: 1px solid #eee; /* Changed from red border to same as regular articles */
    background: #fff;
    /* Optional: Add a subtle indicator for featured articles instead */
    position: relative;
}

.article-image {
    flex-shrink: 0;
    width: 200px;
    height: 130px;
    overflow: hidden;
    border-radius: 6px;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-item:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.85rem;
}

.category {
    background: #dc2626;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.date, .views {
    color: #666;
}

.article-content h3 {
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-content h3 a {
    color: #333;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
}

.article-content h3 a:hover {
    color: #dc2626;
}

.summary {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    flex: 1;
}

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

.author {
    color: #888;
}

.read-more {
    color: #dc2626;
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

/* Right Sidebar - Ads only */
.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sidebar-section h3 {
    color: #dc2626;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 2px solid #dc2626;
    padding-bottom: 8px;
    text-align: center;
}

/* Ad Sections */
.ad-section {
    text-align: center;
}

.ad-banner {
    margin-top: 15px;
}

.ad-placeholder {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    padding: 40px 20px;
    border-radius: 6px;
    color: #888;
}

.ad-placeholder p {
    font-weight: bold;
    margin-bottom: 5px;
}

/* Real Estate Ads Section at Bottom */
.real-estate-ads {
    margin-top: 50px;
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.real-estate-ads h2 {
    color: #dc2626;
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 3px solid #dc2626;
    padding-bottom: 15px;
}

.real-estate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.real-estate-ad {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    background: #fafafa;
}

.real-estate-ad:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.real-estate-image {
    width: 100%;
    height: 180px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-weight: bold;
}

.real-estate-content {
    padding: 20px;
}

.real-estate-content h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.real-estate-content p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.real-estate-price {
    color: #dc2626;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

/* Korean Business Ads */
.korean-business-ad {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
    margin-bottom: 20px;
}

.korean-business-ad:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.business-image {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.business-content {
    padding: 15px;
}

.business-name {
    color: #dc2626;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 5px;
}

.business-type {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.business-description {
    color: #555;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.business-contact {
    font-size: 0.8rem;
    color: #888;
}

.business-phone {
    color: #dc2626;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .right-sidebar {
        order: -1;
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .article-item {
        flex-direction: column;
    }
    
    .article-image {
        width: 100%;
        height: 200px;
    }
    
    .real-estate-grid {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    nav a {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}