/* =============================================
   공감각 디자인 스튜디오 - 뉴스레터 페이지 스타일
   Arctic Blue & Luxury Gold Theme
   ============================================= */

/* ===== Featured Posts Section ===== */
.featured-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.featured-post-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-card);
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--navy-200);
    text-decoration: none;
    display: block;
}

.featured-post-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border-color: var(--arctic-300);
}

.featured-post-card:nth-child(even):hover {
    border-color: var(--gold-300);
}

.featured-post-image {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--arctic-50) 0%, var(--gold-50) 100%);
    position: relative;
    overflow: hidden;
}

.featured-post-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(245, 158, 11, 0.08) 0%, transparent 50%);
    z-index: 0;
}

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
    position: relative;
    z-index: 1;
}

.featured-post-card:hover .featured-post-image img {
    transform: scale(1.08);
}

.featured-post-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: linear-gradient(135deg, var(--arctic-50) 0%, var(--gold-50) 100%);
    position: relative;
}

.featured-post-placeholder i {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
    background: var(--gradient-arctic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.featured-post-body {
    padding: var(--space-lg);
}

.featured-post-date {
    font-size: 0.85rem;
    color: var(--primary);
    margin-bottom: var(--space-xs);
    font-weight: 600;
}

.featured-post-card:nth-child(even) .featured-post-date {
    color: var(--secondary);
}

.featured-post-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.featured-post-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.featured-post-card:first-child {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.featured-post-card:first-child .featured-post-image {
    aspect-ratio: 16/12;
}

.featured-post-card:first-child .featured-post-title {
    font-size: 1.4rem;
}

/* ===== Posts Section (게시판) ===== */
.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.posts-header h2 {
    margin: 0;
}

.posts-search {
    flex-shrink: 0;
}

.search-input-wrap {
    position: relative;
    width: 300px;
}

.search-input-wrap i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
}

.search-input-wrap .form-input {
    padding-left: 48px;
    border-color: var(--navy-200);
}

.search-input-wrap .form-input:focus {
    border-color: var(--primary);
}

/* Posts Table */
.posts-table-wrap {
    overflow: hidden;
    margin-bottom: var(--space-xl);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--navy-200);
}

.posts-table {
    width: 100%;
    border-collapse: collapse;
}

.posts-table th,
.posts-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--navy-100);
}

.posts-table th {
    background: linear-gradient(135deg, var(--arctic-50) 0%, var(--gold-50) 100%);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.posts-table td {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.posts-table tbody tr {
    cursor: pointer;
    transition: background var(--transition-fast);
}

.posts-table tbody tr:hover {
    background: var(--arctic-50);
}

.col-num {
    width: 80px;
    text-align: center !important;
}

.col-title {
    min-width: 200px;
}

.col-date {
    width: 120px;
    text-align: center !important;
}

.col-views {
    width: 80px;
    text-align: center !important;
}

.post-title-cell {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.post-title-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-weight: 500;
}

.post-title-text:hover {
    color: var(--primary);
}

.post-new-badge {
    padding: 4px 10px;
    background: var(--gradient-arctic);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Posts Empty & Loading */
.posts-empty,
.posts-loading {
    padding: var(--space-3xl);
    text-align: center;
    color: var(--text-muted);
}

.posts-empty i {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    background: var(--gradient-arctic);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);
    color: var(--text-muted);
    grid-column: 1 / -1;
}

.spinner {
    width: 56px;
    height: 56px;
    border: 3px solid var(--arctic-100);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--space-lg);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 2px solid var(--navy-200);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination-btn:hover {
    background: var(--arctic-50);
    color: var(--primary);
    border-color: var(--arctic-300);
}

.pagination-btn.active {
    background: var(--gradient-arctic);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-arctic);
}

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

.pagination-ellipsis {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

/* ===== Post Modal ===== */
.post-modal {
    max-width: 850px;
    background: var(--bg-card);
}

.post-modal .modal-header {
    padding: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom-color: var(--navy-200);
}

.post-modal-date {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: var(--space-sm);
    display: block;
    font-weight: 600;
}

.post-modal .modal-header h2 {
    font-size: 2rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.post-modal .modal-body {
    padding: 0 var(--space-xl) var(--space-xl);
}

.post-modal-content {
    color: var(--text-secondary);
    line-height: 1.9;
    font-size: 1.05rem;
}

.post-modal-content p {
    margin-bottom: var(--space-lg);
}

.post-modal-content img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
}

.post-modal-content h3 {
    color: var(--text-primary);
    margin: var(--space-xl) 0 var(--space-md);
}

.post-modal-content ul,
.post-modal-content ol {
    margin-left: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.post-modal-content li {
    margin-bottom: var(--space-sm);
}

/* ===== Subscribe Section ===== */
.subscribe-section {
    background: linear-gradient(180deg, var(--arctic-50) 0%, var(--bg-primary) 100%);
    position: relative;
}

.subscribe-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--arctic-300), transparent);
}

.subscribe-box {
    padding: var(--space-3xl);
    text-align: center;
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--navy-200);
    position: relative;
    overflow: hidden;
}

.subscribe-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
}

.subscribe-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto var(--space-xl);
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-gold);
}

.subscribe-box h2 {
    margin-bottom: var(--space-md);
    font-size: 2rem;
}

.subscribe-box > p {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    font-size: 1.1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.subscribe-form {
    max-width: 520px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.subscribe-form .form-input {
    border-color: var(--navy-200);
}

.subscribe-form .form-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.subscribe-form .btn-primary {
    background: var(--gradient-gold);
    color: var(--text-primary);
    box-shadow: var(--shadow-gold);
}

.subscribe-form .btn-primary:hover {
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.35);
}

.btn-full {
    width: 100%;
}

.subscribe-note {
    margin-top: var(--space-lg);
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
}

.subscribe-note i {
    color: var(--secondary);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .featured-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-post-card:first-child {
        grid-column: 1 / -1;
        grid-row: auto;
    }
    
    .featured-post-card:first-child .featured-post-image {
        aspect-ratio: 16/8;
    }
}

@media (max-width: 768px) {
    .featured-posts-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .posts-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-input-wrap {
        width: 100%;
    }
    
    /* Mobile Table */
    .posts-table thead {
        display: none;
    }
    
    .posts-table tbody tr {
        display: block;
        padding: var(--space-md);
        border-bottom: 1px solid var(--navy-100);
    }
    
    .posts-table td {
        display: block;
        padding: 4px 0;
        border: none;
    }
    
    .col-num {
        display: none !important;
    }
    
    .col-title {
        font-weight: 600;
        font-size: 1.05rem;
    }
    
    .col-date,
    .col-views {
        display: inline-block !important;
        width: auto !important;
        font-size: 0.85rem;
        color: var(--text-muted);
    }
    
    .col-date::after {
        content: ' · ';
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .subscribe-box {
        padding: var(--space-2xl);
    }
}

@media (max-width: 480px) {
    .pagination-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}
