/* News Page Styles */

/* Navigation Logo */
.nav-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Navigation Social Icons */
.nav-social {
    display: flex;
    gap: 15px;
}

.nav-social a {
    color: var(--text-dark);
    font-size: 1.2rem;
    /* transition: color 0.3s; (애니메이션 제거됨) */
}

.nav-social a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero-news {
    background: var(--white);
    padding: 120px 0 60px;
    text-align: center;
}

.hero-news .hero-content h1 {
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.hero-news .hero-content p {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--text-light);
}

/* News Section */
.news-section {
    padding: 60px 0 80px;
    background: var(--white);
}

/* Admin Controls */
.admin-controls {
    text-align: right;
    margin-bottom: 30px;
}

.btn-write {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    /* transition: all 0.3s; (애니메이션 제거됨) */
    box-shadow: 0 4px 15px rgba(92, 143, 220, 0.3);
}

.btn-write:hover {
    background: #4a7ac4;
    /* transform: translateY(-2px); (애니메이션 제거됨) */
    box-shadow: 0 6px 20px rgba(92, 143, 220, 0.4);
}

/* News Grid - Same as Home Page Feed */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* News Card - Same as Home Page Feed Card */
.news-card {
    position: relative;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    /* transition: all 0.3s ease; (애니메이션 제거됨) */
    cursor: pointer;
    height: 400px;
}

.news-card:hover {
    /* transform: translateY(-10px); (애니메이션 제거됨) */
    box-shadow: var(--shadow-hover);
}

/* Image fills entire card */
.news-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 400px; /* 고정 높이 */
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 400px; /* 고정 높이 */
    min-width: 100%; /* 최소 너비 고정 */
    min-height: 400px; /* 최소 높이 고정 */
    max-width: 100%; /* 최대 너비 고정 */
    max-height: 400px; /* 최대 높이 고정 */
    object-fit: cover;
    object-position: center; /* 이미지 중앙 고정 */
    transform: translateZ(0) scale(1); /* GPU 가속 + 스케일 고정 */
    backface-visibility: hidden; /* 렌더링 안정화 */
    will-change: auto; /* 불필요한 최적화 제거 */
    pointer-events: none; /* 이미지 인터랙션 차단 */
    /* transition: transform 0.5s ease; (애니메이션 제거됨) */
}

.news-card:hover .news-card-image img {
    /* transform: scale(1.1); (애니메이션 제거됨) */
}

/* Dark gradient overlay for better text readability */
.news-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.3) 0%, 
        rgba(0, 0, 0, 0.5) 70%, 
        rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

/* Category badge at top-left - Same as Home */
.news-card-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 3;
}

.news-card-category {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 400;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Date removed from separate badge, now in meta */

/* Content at bottom with white text - Same as Home */
.news-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 2;
    color: white;
}

.news-card-title {
    font-size: 1.6rem;
    font-weight: 400;
    color: white;
    margin-bottom: 12px;
    line-height: 1.3;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-excerpt {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    margin-bottom: 15px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

.news-card-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-card-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-card-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 1.1rem;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Skeleton Loading UI */
.skeleton-card {
    position: relative;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 400px;
    /* animation: skeleton-pulse 1.5s ease-in-out infinite; (애니메이션 제거됨) */
}

.skeleton-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    /* animation: skeleton-shimmer 1.5s ease-in-out infinite; (애니메이션 제거됨) */
}

.skeleton-content {
    padding: 20px;
}

.skeleton-category {
    width: 80px;
    height: 24px;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    border-radius: 12px;
    margin-bottom: 15px;
    /* animation: skeleton-shimmer 1.5s ease-in-out infinite; (애니메이션 제거됨) */
}

.skeleton-title {
    width: 100%;
    height: 28px;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    border-radius: 6px;
    margin-bottom: 12px;
    /* animation: skeleton-shimmer 1.5s ease-in-out infinite; (애니메이션 제거됨) */
}

.skeleton-text {
    width: 90%;
    height: 18px;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    margin-bottom: 10px;
    /* animation: skeleton-shimmer 1.5s ease-in-out infinite; (애니메이션 제거됨) */
}

.skeleton-text:last-child {
    width: 70%;
}

.skeleton-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.skeleton-date,
.skeleton-views {
    width: 80px;
    height: 18px;
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    /* animation: skeleton-shimmer 1.5s ease-in-out infinite; (애니메이션 제거됨) */
}

/* @keyframes skeleton-shimmer (애니메이션 제거됨) */

/* @keyframes skeleton-pulse (애니메이션 제거됨) */

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1rem;
    color: var(--text-light);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    margin-bottom: 50px;
}

.pagination button {
    padding: 10px 16px;
    border: 1px solid #ddd;
    background: var(--white);
    color: var(--text-dark);
    border-radius: 8px;
    cursor: pointer;
    /* transition: all 0.3s; (애니메이션 제거됨) */
    font-size: 0.95rem;
    font-weight: 400;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination .page-info {
    padding: 10px 20px;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Search Bar at Bottom Center */
.search-bar-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.search-input {
    width: 100%;
    max-width: 500px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 300;
    border: 1px solid #ddd;
    border-radius: 25px;
    /* transition: all 0.3s; (애니메이션 제거됨) */
    font-family: 'Noto Sans KR', sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(92, 143, 220, 0.1);
}

.search-input::placeholder {
    color: #aaa;
}

.btn-search {
    padding: 12px 25px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    /* transition: all 0.3s; (애니메이션 제거됨) */
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-search:hover {
    background: #4a7ac4;
    /* transform: translateY(-2px); (애니메이션 제거됨) */
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        gap: 15px;
    }
    
    .nav-logo {
        height: 40px;
        margin-right: 10px;
    }
    
    .hero-news {
        padding: 100px 0 40px;
    }
    
    .hero-news .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-news .hero-content p {
        font-size: 1rem;
    }
    
    .admin-controls {
        text-align: center;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-card {
        height: 350px;
    }
    
    .news-card-image,
    .news-card-image img {
        height: 350px; /* 반응형 고정 높이 */
        min-height: 350px;
        max-height: 350px;
    }

    .news-card-title {
        font-size: 1.3rem;
    }
    
    .news-card-excerpt {
        font-size: 0.9rem;
    }
    
    .search-bar-bottom {
        flex-direction: column;
    }
    
    .search-input {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-news {
        padding: 80px 0 30px;
    }

    .hero-news .hero-content h1 {
        font-size: 1.8rem;
    }

    .news-section {
        padding: 40px 0 60px;
    }
    
    .news-card {
        height: 320px;
    }
    
    .news-card-image,
    .news-card-image img {
        height: 320px; /* 모바일 고정 높이 */
        min-height: 320px;
        max-height: 320px;
    }
    
    .search-input {
        font-size: 0.95rem;
        padding: 10px 16px;
    }
    
    .btn-search {
        padding: 10px 20px;
        font-size: 0.95rem;
        width: 100%;
        justify-content: center;
    }

    .news-card {
        height: 320px;
    }
    
    .news-card-content {
        padding: 20px;
    }
    
    .news-card-title {
        font-size: 1.2rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pagination button {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* Footer - style.css 사용 */
