/* Blog Page Custom Styles */

/* Override main.css overlay system - make blog articles visible and remove overlay styling */
.blog-page #main article {
    opacity: 1 !important;
    transform: translateY(0) !important;
    background-color: transparent !important;
    /* Remove semi-transparent overlay background */
    padding: 0 !important;
    /* Remove overlay padding */
    width: 100% !important;
    /* Use full width instead of fixed 40rem */
    max-width: 100% !important;
}

/* Layout Variables */
:root {
    --blog-primary: #c5a059;
    /* Gold/Bronze for law firm aesthetic */
    --blog-primary-hover: #b08d4b;
    --blog-bg: #1a1d23;
    --blog-card-bg: #232730;
    --blog-text: #f1f5f9;
    --blog-text-muted: #94a3b8;
    --blog-border: rgba(197, 160, 89, 0.2);
    /* Subtle gold border */
}

/* Main Layout Grid */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    margin-top: 3rem;
    align-items: start;
}

@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        display: none;
        /* Hide sidebar on mobile for now, or move to bottom */
    }
}

/* Blog Hero Section */
.blog-hero {
    text-align: center;
    padding: 4rem 1rem;
    background: linear-gradient(to bottom, rgba(197, 160, 89, 0.05), transparent);
    border-radius: 1rem;
    margin-bottom: 3rem;
    border: 1px solid var(--blog-border);
}

.hero-eyebrow {
    color: var(--blog-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #cbd5e1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--blog-text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Search Section */
.hero-search-card {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-wrapper {
    position: relative;
    background: var(--blog-card-bg);
    border-radius: 50px;
    border: 1px solid var(--blog-border);
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    border-color: var(--blog-primary);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
}

.blog-search-input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3.5rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    border-radius: 50px;
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--blog-text-muted);
}

/* Blog Post Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Blog Card */
.blog-post-card {
    background: var(--blog-card-bg);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--blog-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(197, 160, 89, 0.4);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(197, 160, 89, 0.1);
    color: var(--blog-primary);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    align-self: flex-start;
    border: 1px solid rgba(197, 160, 89, 0.2);
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: var(--blog-primary);
}

.post-description {
    color: var(--blog-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--blog-text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--blog-border);
}

.card-footer {
    margin-top: auto;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.2s;
}

.read-more-btn:hover {
    gap: 0.8rem;
    color: var(--blog-primary);
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 2rem;
    display: block;
    /* Override main.css display: none */
}

.sidebar-card {
    background: var(--blog-card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--blog-border);
}

.sidebar-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sidebar-card-header i {
    font-size: 1.5rem;
    color: var(--blog-primary);
}

.sidebar-eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--blog-text-muted);
    letter-spacing: 1px;
}

.sidebar-card h3 {
    font-size: 1.1rem;
    margin: 0;
}

.sidebar-category-list {
    list-style: none;
    padding: 0;
}

.sidebar-category-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    color: var(--blog-text-muted);
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.sidebar-category-link:hover,
.sidebar-category-link.active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidebar-category-link i {
    color: var(--blog-primary);
    opacity: 0.7;
}

/* Pagination */
.pagination {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    gap: 0.5rem;
}

.pagination-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--blog-card-bg);
    color: #fff;
    border: 1px solid var(--blog-border);
    transition: all 0.2s;
}

.pagination-link:hover,
.pagination-link.primary {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
}

/* Empty State */
.blog-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--blog-card-bg);
    border-radius: 1rem;
    border: 1px solid var(--blog-border);
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--blog-text-muted);
    margin-bottom: 1.5rem;
}

/* Search Functionality */
.is-hidden {
    display: none !important;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blog-card-bg);
    border: 1px solid var(--blog-border);
    border-radius: 0 0 1rem 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 100;
    margin-top: 0.5rem;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.search-results.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-results-title {
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 0.9rem;
    color: var(--blog-text-muted);
    border-bottom: 1px solid var(--blog-border);
    background: rgba(0, 0, 0, 0.2);
}

.search-result-item {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--blog-text);
    text-decoration: none;
    border-bottom: 1px solid var(--blog-border);
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(197, 160, 89, 0.1);
    color: var(--blog-primary);
}

.result-item-title {
    display: block;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.result-item-meta {
    font-size: 0.8rem;
    color: var(--blog-text-muted);
}

.search-result-empty {
    padding: 2rem;
    text-align: center;
    color: var(--blog-text-muted);
}