/**
 * MiningHere - Additional Components
 */

/* =============================================
   POSTS / BLOG
============================================= */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.post-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.post-card:hover {
    border-color: var(--brand-orange);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.post-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 24px;
}

.entry-title {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.entry-title a {
    color: var(--text-primary);
}

.entry-title a:hover {
    color: var(--brand-orange);
}

.entry-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.entry-excerpt p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-orange);
}

.read-more:hover {
    gap: 10px;
}

/* =============================================
   PAGE STYLES
============================================= */
.page-header {
    text-align: center;
    margin-bottom: 48px;
}

.page-content .entry-content {
    max-width: 720px;
    margin: 0 auto;
}

.page-content .entry-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.page-content .entry-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.page-content .entry-content a {
    color: var(--brand-orange);
}

.page-content .entry-content a:hover {
    text-decoration: underline;
}

/* =============================================
   PAGINATION
============================================= */
.pagination,
.nav-links {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 48px;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    color: var(--text-white);
}

/* =============================================
   SEARCH FORM
============================================= */
.search-form {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
}

.search-field {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 1rem;
    color: var(--text-primary);
}

.search-field:focus {
    outline: none;
    border-color: var(--brand-orange);
}

.search-submit {
    padding: 12px 20px;
    background: var(--brand-orange);
    border: 1px solid var(--brand-orange);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-white);
    font-weight: 600;
    cursor: pointer;
}

.search-submit:hover {
    background: var(--brand-orange-hover);
}

/* =============================================
   ALERTS
============================================= */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9375rem;
}

.alert-success {
    background: var(--brand-green-light);
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-warning {
    background: var(--brand-orange-light);
    color: #92400E;
    border: 1px solid #FDE68A;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-info {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

/* =============================================
   BADGES
============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-success {
    background: var(--brand-green-light);
    color: var(--brand-green);
}

.badge-warning {
    background: var(--brand-orange-light);
    color: var(--brand-orange);
}

/* =============================================
   TABLES
============================================= */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

td {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

tr:hover td {
    background: var(--bg-secondary);
}

/* =============================================
   FORMS
============================================= */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--brand-orange);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    margin-top: 4px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* =============================================
   LOADING
============================================= */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-light);
    border-top-color: var(--brand-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* =============================================
   NO RESULTS
============================================= */
.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results h2 {
    margin-bottom: 12px;
}

.no-results p {
    margin-bottom: 24px;
}

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
}