:root {
  --primary: #dd5828;
  --dark: #333;
  --light: #f4f4f4;
  --border: #ddd;
  --white: #ffffff;
}

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

body {
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: #f9f9f9;
}

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

/* Header */
.main-header {
  background: var(--white);
  border-bottom: 2px solid var(--primary);
  padding: 30px 0;
  text-align: center;
}

#site-title a {
  text-decoration: none;
  color: var(--primary);
  font-size: 1.8rem;
  font-weight: bold;
}

/* Hero Section */
.hero {
  padding: 40px 0;
  text-align: center;
  background: #fff;
  margin-bottom: 20px;
}

.hero h2 { font-size: 1.5rem; color: #555; }

/* Posts Grid (3x3) */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin: 40px 0 60px;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.post-card:hover { 
  transform: translateY(-8px); 
  box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
}

.post-thumb {
  width: 100%;
  height: 200px;
  background: #eee;
  object-fit: cover;
  border-bottom: 1px solid #f0f0f0;
}

.post-card h3 {
  padding: 15px;
  font-size: 1.1rem;
  line-height: 1.4;
  height: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Detail View Content */
.post-detail-container {
    background: white;
    padding: 50px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.post-detail-header { margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.post-detail-header h1 { font-size: 2rem; color: #222; margin-bottom: 10px; }
.post-meta { color: #888; font-size: 0.9rem; }

.post-content { font-size: 1.1rem; line-height: 1.8; color: #444; }
.post-content p { margin-bottom: 20px; }
.post-content h2 { margin: 30px 0 15px; color: var(--primary); }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 20px 0; }

/* Partner Section */
.partner-section { background: #fff; padding: 60px 0; border-top: 1px solid var(--border); text-align: center; }
.partner-section h3 { margin-bottom: 30px; font-size: 1.4rem; }
.partner-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.partner-link {
  padding: 12px 24px; border: 1px solid var(--primary);
  color: var(--primary); text-decoration: none; font-weight: bold; border-radius: 50px; font-size: 0.9rem;
  transition: all 0.3s;
}
.partner-link:hover { background: var(--primary); color: white; }

/* Footer */
.main-footer { text-align: center; padding: 50px 0; border-top: 1px solid var(--border); color: #888; background: #fff; }
.footer-bottom { margin-top: 15px; display: flex; justify-content: center; gap: 20px; }
.btn-link { background: none; border: none; color: #888; text-decoration: underline; cursor: pointer; font-size: 0.85rem; }

/* Modal */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); }
.modal-content { background: white; margin: 10% auto; padding: 0; width: 90%; max-width: 600px; border-radius: 12px; overflow: hidden; }
.modal-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: #fdfdfd; }
.modal-body { padding: 30px; max-height: 400px; overflow-y: auto; }
.close { cursor: pointer; font-size: 1.5rem; color: #999; }

@media (max-width: 768px) {
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .post-detail-container { padding: 25px; }
}
@media (max-width: 480px) {
  .posts-grid { grid-template-columns: 1fr; }
}
