/* ===== News & Board Page Styles ===== */

/* News List */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.news-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all 0.3s var(--transition-base);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    border-color: transparent;
}

.news-card-cover {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    position: relative;
}

.news-card-cover.company { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.news-card-cover.product { background: linear-gradient(135deg, #fffbeb, #fef3c7); }
.news-card-cover.industry { background: linear-gradient(135deg, #f0fdfa, #ccfbf1); }

.news-card-body {
    padding: 1.5rem;
}

.news-card-body .news-category {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.news-category.company { background: #dcfce7; color: #166534; }
.news-category.product { background: #fef3c7; color: #92400e; }
.news-category.industry { background: #ccfbf1; color: #115e59; }

.news-card-body h4 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-body p {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.news-card-body .news-date {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

@media (max-width: 1024px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .news-grid { grid-template-columns: 1fr; }
}

/* News Detail */
.news-detail-wrap {
    max-width: 800px;
    margin: 0 auto;
}

.news-detail-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.news-detail-header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-detail-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.news-detail-meta span {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.news-detail-content {
    font-size: 1.05rem;
    line-height: 2;
}

.news-detail-content p {
    margin-bottom: 1.25rem;
    color: var(--color-text);
}

.news-detail-content ul {
    margin: 1rem 0 1.25rem 1.5rem;
}

.news-detail-content ul li {
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

/* Board */
.board-list {
    max-width: 800px;
    margin: 0 auto;
}

.board-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border);
    transition: all 0.3s;
}

.board-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.board-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.board-item-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.board-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.board-item-author .name {
    font-weight: 600;
    font-size: 0.95rem;
}

.board-item-author .date {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.board-item-content {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.board-reply {
    background: #f8faf8;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 0.75rem;
    border-left: 3px solid var(--color-primary);
}

.board-reply .reply-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.3rem;
}

.board-reply p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

/* Board Form */
.board-form-section {
    max-width: 800px;
    margin: 0 auto 3rem;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--color-border);
}

.board-form-section h3 {
    margin-bottom: 1.5rem;
}

/* ===== Guestbook Page ===== */
.guestbook-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.guestbook-form-wrapper h2,
.guestbook-list-wrapper h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.form-desc {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.guestbook-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.guestbook-form .form-group {
    margin-bottom: 1rem;
}

.guestbook-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.guestbook-form input,
.guestbook-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.guestbook-form .btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
}

.form-msg {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.form-msg.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.form-msg.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Message List (Guestbook) */
.guestbook-list-wrapper .message-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

.message-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.message-body {
    flex: 1;
}

.message-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.message-top .message-name {
    font-weight: 600;
    color: var(--color-text);
}

.message-top .message-time {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.message-text {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.6;
}

.message-reply {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f0fdf4;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--color-primary);
    border-left: 3px solid var(--color-primary);
}

.message-reply strong {
    display: block;
    margin-bottom: 0.25rem;
}

.empty, .loading {
    text-align: center;
    color: var(--color-text-secondary);
    padding: 2rem;
}

/* News Filter */
.news-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: 100px;
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.filter-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.news-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-size: 0.75rem;
    background: #f0fdf4;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.news-date {
    color: var(--color-text-secondary);
}

.news-link {
    color: var(--color-primary);
    font-weight: 500;
}

/* News Detail */
.news-detail {
    max-width: 800px;
    margin: 0 auto;
}

.news-summary {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    padding: 1.5rem;
    background: #f0fdf4;
    border-radius: 12px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--color-primary);
}

.news-body {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
}

.news-back {
    margin-top: 3rem;
    text-align: center;
}

.btn-outline {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

.page-hero.small {
    padding: 4rem 0 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .guestbook-layout {
        grid-template-columns: 1fr;
    }
    
    .guestbook-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
}
