/* ===================================
   Local Garage Blog Widget Styles
   =================================== */

/* ===== Grid Layout ===== */
.lg-blog-grid {
    display: grid;
    gap: 24px;
}

.lg-blog-columns-1 {
    grid-template-columns: 1fr;
}

.lg-blog-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.lg-blog-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.lg-blog-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ===== Card Styles ===== */
.lg-blog-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.lg-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.lg-blog-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.lg-blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.lg-blog-card:hover .lg-blog-card-image img {
    transform: scale(1.05);
}

.lg-blog-card-content {
    padding: 20px;
}

/* ===== Category Badge ===== */
.lg-blog-category {
    display: inline-block;
    background: #3b82f6;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.3s ease, color 0.3s ease;
    margin-bottom: 12px;
}

.lg-blog-category:hover {
    background: #2563eb;
    color: #ffffff;
}

/* ===== Title ===== */
.lg-blog-title {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1e293b;
}

.lg-blog-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lg-blog-title a:hover {
    color: #3b82f6;
}

/* ===== Meta Info ===== */
.lg-blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.lg-blog-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lg-blog-meta i,
.lg-blog-meta svg {
    width: 14px;
    height: 14px;
}

/* ===== Excerpt ===== */
.lg-blog-excerpt {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

/* ===== Read More Button ===== */
.lg-blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #3b82f6;
    color: #ffffff;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lg-blog-read-more:hover {
    background: #2563eb;
    transform: translateX(4px);
}

.lg-blog-read-more i,
.lg-blog-read-more svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.lg-blog-read-more:hover i,
.lg-blog-read-more:hover svg {
    transform: translateX(4px);
}

/* ===== List Layout ===== */
.lg-blog-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lg-blog-list-item {
    display: flex;
    gap: 24px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lg-blog-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.lg-blog-list-image {
    flex: 0 0 300px;
    overflow: hidden;
}

.lg-blog-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.lg-blog-list-item:hover .lg-blog-list-image img {
    transform: scale(1.05);
}

.lg-blog-list-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== Archive Layout ===== */
.lg-blog-archive {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Category Filter */
.lg-blog-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 8px;
}

.lg-blog-filter-btn {
    background: #f1f5f9;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lg-blog-filter-btn:hover,
.lg-blog-filter-btn.active {
    background: #3b82f6;
    color: #ffffff;
}

/* Pagination */
.lg-blog-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.lg-blog-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lg-blog-pagination .page-numbers:hover,
.lg-blog-pagination .page-numbers.current {
    background: #3b82f6;
    color: #ffffff;
}

.lg-blog-pagination .page-numbers i,
.lg-blog-pagination .page-numbers svg {
    width: 16px;
    height: 16px;
}

/* ===== Single Post Layout ===== */
.lg-blog-single {
    max-width: 800px;
    margin: 0 auto;
}

.lg-blog-single-image {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
}

.lg-blog-single-image img {
    width: 100%;
    height: auto;
    display: block;
}

.lg-blog-single-header {
    margin-bottom: 32px;
    text-align: center;
}

.lg-blog-single .lg-blog-title {
    font-size: 2.5rem;
    margin: 16px 0;
}



/* Subtitle */
.lg-blog-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    font-weight: 400;
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.lg-blog-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.lg-blog-single-content {
    font-size: 17px;
    line-height: 1.8;
    color: #374151;
}

.lg-blog-single-content p {
    margin-bottom: 1.5em;
}

.lg-blog-single-content h2,
.lg-blog-single-content h3,
.lg-blog-single-content h4 {
    margin: 1.5em 0 0.75em;
    color: #1e293b;
}

.lg-blog-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
}

.lg-blog-single-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 24px;
    margin: 1.5em 0;
    font-style: italic;
    color: #64748b;
}

/* ===== Share Buttons ===== */
.lg-blog-share {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 0;
    margin-top: 32px;
    border-top: 1px solid #e2e8f0;
}

.lg-blog-share-label {
    font-weight: 600;
    color: #374151;
}

.lg-blog-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #ffffff !important;
    text-decoration: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.lg-blog-share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.lg-blog-share-btn i,
.lg-blog-share-btn svg {
    width: 18px;
    height: 18px;
}

.lg-share-facebook {
    background: #1877f2;
}

.lg-share-twitter {
    background: #1da1f2;
}

.lg-share-linkedin {
    background: #0a66c2;
}

.lg-share-email {
    background: #64748b;
}

.lg-share-copy-link {
    background: #374151;
}

.lg-share-btn.copied {
    background: #10b981 !important;
    transform: scale(1.1);
    position: relative;
}

.lg-share-btn.copied::after {
    content: "Copied!";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 8px;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
    pointer-events: none;
}

.lg-share-btn.copied::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    border: 6px solid transparent;
    border-top-color: #333;
    margin-bottom: -4px;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ===== Post Navigation ===== */
.lg-blog-navigation {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}

.lg-blog-nav-prev,
.lg-blog-nav-next {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 48%;
}

.lg-blog-nav-prev:hover,
.lg-blog-nav-next:hover {
    background: #3b82f6;
    color: #ffffff;
}

.lg-blog-nav-prev i,
.lg-blog-nav-prev svg,
.lg-blog-nav-next i,
.lg-blog-nav-next svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.lg-blog-nav-next {
    justify-content: flex-end;
    text-align: right;
    margin-left: auto;
}

.lg-blog-nav-prev span,
.lg-blog-nav-next span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== No Posts Message ===== */
.lg-blog-no-posts {
    text-align: center;
    padding: 48px 24px;
    background: #f8fafc;
    border-radius: 12px;
    color: #64748b;
    font-size: 16px;
}

/* ===== Responsive Styles ===== */
@media (max-width: 1024px) {
    .lg-blog-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .lg-blog-columns-3,
    .lg-blog-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .lg-blog-list-item {
        flex-direction: column;
    }

    .lg-blog-list-image {
        flex: none;
        aspect-ratio: 16 / 9;
    }

    .lg-blog-single .lg-blog-title {
        font-size: 1.75rem;
    }

    .lg-blog-navigation {
        flex-direction: column;
    }

    .lg-blog-nav-prev,
    .lg-blog-nav-next {
        max-width: 100%;
    }
}

@media (max-width: 480px) {

    .lg-blog-columns-2,
    .lg-blog-columns-3,
    .lg-blog-columns-4 {
        grid-template-columns: 1fr;
    }

    .lg-blog-category-filter {
        justify-content: center;
    }

    .lg-blog-share {
        flex-wrap: wrap;
    }
}

/* ===== RTL Support ===== */
[dir="rtl"] .lg-blog-read-more {
    flex-direction: row-reverse;
}

[dir="rtl"] .lg-blog-read-more:hover {
    transform: translateX(-4px);
}

[dir="rtl"] .lg-blog-read-more:hover i,
[dir="rtl"] .lg-blog-read-more:hover svg {
    transform: translateX(-4px) rotate(180deg);
}

[dir="rtl"] .lg-blog-nav-prev {
    flex-direction: row-reverse;
}

[dir="rtl"] .lg-blog-nav-next {
    flex-direction: row-reverse;
    text-align: left;
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .lg-blog-single-content blockquote {
    border-left: none;
    border-right: 4px solid #3b82f6;
    padding-left: 0;
    padding-right: 24px;
}

/* ===== Responsive Content Alignment ===== */
/* Desktop */
.lg-align-left .lg-blog-single-header,
.lg-align-left .lg-blog-single-content,
.lg-align-left .lg-blog-title,
.lg-align-left .lg-blog-subtitle {
    text-align: left;
}

.lg-align-left .lg-blog-categories,
.lg-align-left .lg-blog-meta,
.lg-align-left .lg-blog-share {
    justify-content: flex-start;
}

.lg-align-center .lg-blog-single-header,
.lg-align-center .lg-blog-single-content,
.lg-align-center .lg-blog-title,
.lg-align-center .lg-blog-subtitle {
    text-align: center;
}

.lg-align-center .lg-blog-categories,
.lg-align-center .lg-blog-meta,
.lg-align-center .lg-blog-share {
    justify-content: center;
}

.lg-align-right .lg-blog-single-header,
.lg-align-right .lg-blog-single-content,
.lg-align-right .lg-blog-title,
.lg-align-right .lg-blog-subtitle {
    text-align: right;
}

.lg-align-right .lg-blog-categories,
.lg-align-right .lg-blog-meta,
.lg-align-right .lg-blog-share {
    justify-content: flex-end;
}

/* Tablet */
.lg-align-tablet-left .lg-blog-single-header,
.lg-align-tablet-left .lg-blog-single-content,
.lg-align-tablet-left .lg-blog-title,
.lg-align-tablet-left .lg-blog-subtitle {
    text-align: left;
}

.lg-align-tablet-left .lg-blog-categories,
.lg-align-tablet-left .lg-blog-meta,
.lg-align-tablet-left .lg-blog-share {
    justify-content: flex-start;
}

.lg-align-tablet-center .lg-blog-single-header,
.lg-align-tablet-center .lg-blog-single-content,
.lg-align-tablet-center .lg-blog-title,
.lg-align-tablet-center .lg-blog-subtitle {
    text-align: center;
}

.lg-align-tablet-center .lg-blog-categories,
.lg-align-tablet-center .lg-blog-meta,
.lg-align-tablet-center .lg-blog-share {
    justify-content: center;
}

.lg-align-tablet-right .lg-blog-single-header,
.lg-align-tablet-right .lg-blog-single-content,
.lg-align-tablet-right .lg-blog-title,
.lg-align-tablet-right .lg-blog-subtitle {
    text-align: right;
}

.lg-align-tablet-right .lg-blog-categories,
.lg-align-tablet-right .lg-blog-meta,
.lg-align-tablet-right .lg-blog-share {
    justify-content: flex-end;
}

/* Mobile */
.lg-align-mobile-left .lg-blog-single-header,
.lg-align-mobile-left .lg-blog-single-content,
.lg-align-mobile-left .lg-blog-title,
.lg-align-mobile-left .lg-blog-subtitle {
    text-align: left;
}

.lg-align-mobile-left .lg-blog-categories,
.lg-align-mobile-left .lg-blog-meta,
.lg-align-mobile-left .lg-blog-share {
    justify-content: flex-start;
}

.lg-align-mobile-center .lg-blog-single-header,
.lg-align-mobile-center .lg-blog-single-content,
.lg-align-mobile-center .lg-blog-title,
.lg-align-mobile-center .lg-blog-subtitle {
    text-align: center;
}

.lg-align-mobile-center .lg-blog-categories,
.lg-align-mobile-center .lg-blog-meta,
.lg-align-mobile-center .lg-blog-share {
    justify-content: center;
}

.lg-align-mobile-right .lg-blog-single-header,
.lg-align-mobile-right .lg-blog-single-content,
.lg-align-mobile-right .lg-blog-title,
.lg-align-mobile-right .lg-blog-subtitle {
    text-align: right;
}

.lg-align-mobile-right .lg-blog-categories,
.lg-align-mobile-right .lg-blog-meta,
.lg-align-mobile-right .lg-blog-share {
    justify-content: flex-end;
}