/* Additional Responsive Utilities */

/* Widget Styles */
.widget {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: calc(var(--spacing-unit) * 1.5);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.widget h3 {
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    font-size: 1.25rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.recent-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts li {
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    padding-bottom: calc(var(--spacing-unit) * 1.5);
    border-bottom: 1px solid var(--border-color);
}

.recent-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-link {
    display: flex;
    gap: calc(var(--spacing-unit) * 1);
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s;
}

.recent-link:hover {
    transform: translateX(4px);
}

.recent-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bg-light);
}

.recent-info {
    flex: 1;
    min-width: 0;
}

.recent-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-meta {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Print Styles */
@media print {
    .site-nav,
    .site-footer,
    .sidebar {
        display: none;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .post-content {
        max-width: 100%;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-light: #000000;
    }
    
    .post-card,
    .widget {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Error States */
.error-message {
    color: #dc2626;
    background: #fef2f2;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: var(--spacing-unit);
    border-left: 4px solid #dc2626;
}

.success-message {
    color: #059669;
    background: #f0fdf4;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: var(--spacing-unit);
    border-left: 4px solid #059669;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-unit); }
.mt-2 { margin-top: calc(var(--spacing-unit) * 2); }
.mt-3 { margin-top: calc(var(--spacing-unit) * 3); }

.mb-1 { margin-bottom: var(--spacing-unit); }
.mb-2 { margin-bottom: calc(var(--spacing-unit) * 2); }
.mb-3 { margin-bottom: calc(var(--spacing-unit) * 3); }

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

