/* 태라 소식 게시판 스킨 */

.taera-news-wrap {
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background-color: #FDFBF7;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}

/* 히어로 섹션 */
.news-hero {
    position: relative;
    background: linear-gradient(135deg, #1B2A4A 0%, #2C3E6B 50%, #3D5A80 100%);
    padding: 180px 24px 100px;
    margin-top: -100px;
    text-align: center;
    overflow: hidden;
}

.news-hero-deco {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.news-hero-deco.deco-1 {
    width: 400px;
    height: 400px;
    background: #B76E79;
    top: -150px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.news-hero-deco.deco-2 {
    width: 300px;
    height: 300px;
    background: #E0BFB8;
    bottom: -100px;
    left: -80px;
    animation: float 6s ease-in-out infinite reverse;
}

.news-hero-deco.deco-3 {
    width: 150px;
    height: 150px;
    background: #fff;
    top: 30%;
    left: 15%;
    animation: float 5s ease-in-out infinite;
}

.news-hero-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.news-hero-content {
    position: relative;
    z-index: 10;
}

.news-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 100px;
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.news-hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px 0;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.news-hero-desc {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.8);
    margin: 0 0 28px 0;
    line-height: 1.6;
}

.news-hero-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.news-hero-tags span {
    padding: 8px 16px;
    background: rgba(183, 110, 121, 0.3);
    border: 1px solid rgba(183, 110, 121, 0.4);
    border-radius: 8px;
    color: #E0BFB8;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 미니 히어로 (view, write 페이지용) */
.news-hero.news-hero-mini {
    padding: 140px 24px 60px;
}

.news-hero.news-hero-mini .news-hero-title {
    font-size: 2.2rem;
    margin-bottom: 0;
}

/* 컨테이너 */
.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* 카테고리 필터 */
.news-category {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 32px;
}

.news-cat-btn {
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 100px;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.news-cat-btn:hover {
    border-color: #B76E79;
    color: #B76E79;
}

.news-cat-btn.active {
    background: #1B2A4A;
    border-color: #1B2A4A;
    color: #fff;
}

/* 글쓰기 버튼 */
.news-write-btn-wrap {
    text-align: right;
    margin-bottom: 24px;
}

.news-write-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #B76E79;
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.news-write-btn:hover {
    background: #a25d67;
    transform: translateY(-2px);
}

/* 뉴스 그리드 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 24px;
}

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

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

/* 뉴스 카드 */
.news-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.news-card.is-notice {
    border: 2px solid #B76E79;
}

.news-card-img {
    position: relative;
    aspect-ratio: 16/10;
    background: #f5f5f5;
    overflow: hidden;
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.news-card:hover .news-card-img img {
    transform: scale(1.05);
}

.news-card-img.no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f8f8 0%, #eee 100%);
    color: #ccc;
}

.news-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.news-badge.notice {
    background: #B76E79;
    color: #fff;
}

.news-badge.new {
    background: #1B2A4A;
    color: #fff;
}

.news-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-cat {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
    width: fit-content;
}

.news-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1B2A4A;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-preview {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.6;
    margin: 0 0 auto 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.85rem;
    color: #999;
}

/* 카드 래퍼 (외부링크 + 편집 아이콘) */
.news-card-wrap { position: relative; }
.news-card-ext {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(27, 42, 74, 0.8);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    color: #fff;
    pointer-events: none;
}
.news-card-edit {
    position: absolute;
    top: 12px;
    right: 48px;
    width: 28px;
    height: 28px;
    background: rgba(183, 110, 121, 0.9);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    color: #fff;
    text-decoration: none;
}
.news-card-edit:hover {
    background: #B76E79;
}

/* 빈 상태 */
.news-empty {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.news-empty svg {
    color: #ddd;
    margin-bottom: 16px;
}

.news-empty p {
    font-size: 1.1rem;
    margin: 0;
}

/* 페이지네이션 */
.news-pagination {
    margin-top: 48px;
    text-align: center;
}

.news-pagination .pg_wrap {
    display: inline-flex;
    gap: 6px;
}

.news-pagination .pg_page,
.news-pagination .pg_current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s;
}

.news-pagination .pg_page {
    background: #fff;
    color: #666;
    border: 1px solid #e5e5e5;
}

.news-pagination .pg_page:hover {
    background: #f5f5f5;
}

.news-pagination .pg_current {
    background: #1B2A4A;
    color: #fff;
    border: 1px solid #1B2A4A;
}

/* 검색 */
.news-search {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.news-search form {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 500px;
}

.news-search-select {
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    font-size: 0.95rem;
    background: #fff;
    color: #333;
}

.news-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    font-size: 0.95rem;
}

.news-search-input:focus {
    outline: none;
    border-color: #B76E79;
}

.news-search-btn {
    padding: 12px 16px;
    background: #1B2A4A;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.news-search-btn:hover {
    background: #2C3E6B;
}

/* ===== VIEW 페이지 ===== */
.news-view-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.news-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.news-back-btn:hover {
    color: #B76E79;
}

.news-article {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.news-article-header {
    padding: 40px 40px 32px;
    border-bottom: 1px solid #f0f0f0;
}

.news-article-cat {
    display: inline-block;
    padding: 6px 14px;
    background: #f0f0f0;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 16px;
}

.news-article-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1B2A4A;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.news-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: #888;
}

.news-article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-article-content {
    padding: 40px;
}

.news-article-images {
    margin-bottom: 32px;
}

.news-article-img {
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
}

.news-article-img img {
    width: 100%;
    height: auto;
}

.news-article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.news-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.news-article-files,
.news-article-links {
    padding: 24px 40px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.news-article-files h4,
.news-article-links h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #1B2A4A;
    margin: 0 0 12px 0;
}

.news-article-files ul,
.news-article-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-article-files li,
.news-article-links li {
    margin-bottom: 8px;
}

.news-article-files a,
.news-article-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.news-article-files a:hover,
.news-article-links a:hover {
    color: #B76E79;
}

.file-size {
    color: #999;
    font-size: 0.85rem;
}

/* 관리 버튼 */
.news-article-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.news-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.news-btn-list {
    background: #f5f5f5;
    color: #666;
}

.news-btn-list:hover {
    background: #eee;
}

.news-btn-edit {
    background: #1B2A4A;
    color: #fff;
}

.news-btn-edit:hover {
    background: #2C3E6B;
}

.news-btn-delete {
    background: #fee;
    color: #c00;
}

.news-btn-delete:hover {
    background: #fdd;
}

/* 이전/다음 글 */
.news-article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 40px;
}

.news-nav-item {
    padding: 20px 24px;
    background: #fff;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.news-nav-item:hover:not(.disabled) {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.news-nav-item.disabled {
    opacity: 0.5;
}

.news-nav-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
}

.news-nav-item.next .news-nav-label {
    justify-content: flex-end;
}

.news-nav-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #1B2A4A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-nav-item.next {
    text-align: right;
}

/* ===== WRITE 페이지 ===== */
.news-write-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.news-write-header {
    text-align: center;
    margin-bottom: 40px;
}

.news-write-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #1B2A4A;
    margin: 0 0 8px 0;
}

.news-write-header p {
    color: #888;
    margin: 0;
}

.news-write-form {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.news-form-group {
    margin-bottom: 24px;
}

.news-form-group label {
    display: block;
    font-weight: 600;
    color: #1B2A4A;
    margin-bottom: 8px;
}

.news-form-group .required {
    color: #B76E79;
}

.news-form-group .file-hint {
    font-weight: 400;
    font-size: 0.85rem;
    color: #999;
}

.news-form-input,
.news-form-select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.news-form-input:focus,
.news-form-select:focus {
    outline: none;
    border-color: #B76E79;
}

.news-form-editor {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
}

.news-form-editor textarea {
    width: 100%;
    min-height: 300px;
    padding: 16px;
    border: none;
    font-size: 1rem;
    resize: vertical;
}

.news-form-file {
    width: 100%;
    padding: 14px;
    border: 2px dashed #e5e5e5;
    border-radius: 12px;
    background: #fafafa;
}

.news-file-existing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 10px 14px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 0.9rem;
}

.news-file-existing label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #c00;
    font-weight: 500;
    cursor: pointer;
}

.news-form-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.news-form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.news-form-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #f0f0f0;
}

.news-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.news-btn-cancel:hover {
    background: #eee;
}

.news-btn-submit {
    background: #B76E79;
    color: #fff;
    padding: 14px 40px;
}

.news-btn-submit:hover {
    background: #a25d67;
}

/* 반응형 */
@media (max-width: 768px) {
    .news-hero {
        padding: 100px 20px 80px;
    }

    .news-hero.news-hero-mini {
        padding: 100px 20px 40px;
    }

    .news-hero.news-hero-mini .news-hero-title {
        font-size: 1.6rem;
    }

    .news-hero-badge {
        font-size: 0.75rem;
        padding: 8px 16px;
    }

    .news-hero-title {
        font-size: 2rem;
    }

    .news-hero-desc {
        font-size: 1rem;
    }

    .news-hero-tags span {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .news-hero-deco.deco-1 {
        width: 250px;
        height: 250px;
    }

    .news-hero-deco.deco-2 {
        width: 200px;
        height: 200px;
    }

    .news-hero-deco.deco-3 {
        display: none;
    }

    .news-article-header {
        padding: 24px;
    }

    .news-article-title {
        font-size: 1.4rem;
    }

    .news-article-content {
        padding: 24px;
    }

    .news-article-files,
    .news-article-links {
        padding: 20px 24px;
    }

    .news-article-nav {
        grid-template-columns: 1fr;
    }

    .news-write-form {
        padding: 24px;
    }

    .news-form-actions {
        flex-direction: column;
    }

    .news-btn {
        justify-content: center;
    }
}
