/**
 * The Garage Blog - Scoped Stylesheet
 * 
 * Design system styles for Hero banner, Filter pills, Featured Card,
 * Grid items, View More pagination, responsive picture sources, and loading transitions.
 *
 * @package Align Child
 */

.garage-blog-hero {
    background-color: var(--color-10);
    isolation: isolate;
}

.garage-blog-hero .section-title {
    letter-spacing: -0.5px;
}

.garage-blog-hero .link-see-all {
    transition: color 0.2s ease;
    padding-bottom: 4px;
}
.garage-blog-hero .link-see-all:hover { color: var(--color-7) !important; }
.garage-blog-hero .link-see-all .arrow-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}
.garage-blog-hero .link-see-all:hover .arrow-icon { transform: translateX(4px); }

/* Category Filter Pills */
.garage-blog-hero .filter-tags-wrapper {
    position: relative;
    width: 100%;
}

.garage-blog-hero .filter-tags-row {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding-top: 2px;
    padding-bottom: 8px;
}

.garage-blog-hero .filter-tags-row::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.garage-blog-hero .btn-filter-pill {
    padding: 8px 18px;
    border: 1px solid var(--color-7);
    border-radius: var(--radius-pill);
    background-color: transparent;
    color: var(--color-7);
    font-family: var(--font-primary-1, 'Barlow', sans-serif);
    font-size: var(--fs-small);
    font-weight: var(--fw-bold);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.garage-blog-hero .btn-filter-pill:hover,
.garage-blog-hero .btn-filter-pill.active {
    background-color: var(--color-7);
    color: var(--color-6);
    border-color: var(--color-7);
}


/* Badges */
.garage-blog-hero .badge-category {
    font-family: var(--font-primary-1, 'Barlow', sans-serif);
    font-size: 11px;
    font-weight: var(--fw-bold);
    letter-spacing: 0.5px;
    padding: 4px 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-pill);
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: var(--color-6);
}

/* Action Arrow Circle */
.garage-blog-hero .btn-arrow-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.garage-blog-hero .btn-arrow-circle .arrow-img {
    width: 16px;
    height: 16px;
}

.garage-blog-hero .btn-arrow-circle:hover,
.garage-blog-hero .card-featured:hover .btn-arrow-circle,
.garage-blog-hero .card-grid-item:hover .btn-arrow-circle {
    background-color: var(--color-7);
    transform: scale(1.05);
}

/* Responsive Picture Wrappers */
.garage-blog-hero .card-featured picture,
.garage-blog-hero .card-grid-item picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.garage-blog-hero .card-featured picture img,
.garage-blog-hero .card-grid-item picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Featured Card */
.garage-blog-hero .card-featured {
    width: 100%;
    height: 460px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.garage-blog-hero .card-featured .featured-img,
.garage-blog-hero .card-grid-item .grid-card-img {
    transition: transform 0.4s ease;
}

.garage-blog-hero .card-featured:hover .featured-img,
.garage-blog-hero .card-grid-item:hover .grid-card-img {
    transform: scale(1.03);
}

.garage-blog-hero .card-featured .badge-featured {
    padding: 8px 24px;
    border-radius: 0 0 8px 0;
    font-family: var(--font-primary-1, 'Barlow', sans-serif);
    font-size: 12px;
    font-weight: var(--fw-bold);
    letter-spacing: 0.5px;
    z-index: var(--z-content);
}

.garage-blog-hero .card-featured .card-overlay,
.garage-blog-hero .card-grid-item .card-overlay {
    z-index: var(--z-content);
    background: linear-gradient(180deg, rgba(8, 8, 8, 0) 0%, rgba(8, 8, 8, 0.88) 100%);
}

.garage-blog-hero .card-featured .card-overlay {
    padding: 28px 32px;
}

.garage-blog-hero .card-featured .card-title {
    font-size: 28px;
    line-height: 1.15;
}

.garage-blog-hero .card-featured .card-excerpt {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14.5px;
    max-width: 800px;
}

/* Grid Cards */
.garage-blog-hero .blog-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.garage-blog-hero .card-grid-item {
    width: 100%;
    height: 380px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.garage-blog-hero .card-grid-item .card-overlay {
    padding: 24px;
}

.garage-blog-hero .card-grid-item .card-title {
    font-size: 22px;
    line-height: 1.15;
}

.garage-blog-hero .card-grid-item .card-excerpt {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13.5px;
}

.garage-blog-hero .card-grid-item .btn-arrow-circle {
    width: 42px;
    height: 42px;
}

.garage-blog-hero .card-grid-item .btn-arrow-circle .arrow-img {
    width: 14px;
    height: 14px;
}

/* Pagination & View More Button */
.garage-blog-hero .blog-pagination-wrapper {
    position: relative;
}

.garage-blog-hero .btn-blog-view-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 36px;
    background-color: transparent;
    border: 1px solid var(--color-7);
    border-radius: var(--radius-pill);
    color: var(--color-7);
    font-family: var(--font-primary-1, 'Barlow', sans-serif);
    font-size: var(--fs-button, 13px);
    font-weight: var(--fw-bold, 700);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.garage-blog-hero .btn-blog-view-more:hover {
    background-color: var(--color-7);
    color: var(--color-6);
    transform: translateY(-1px);
}

.garage-blog-hero .btn-blog-view-more:active {
    transform: translateY(1px);
}

.garage-blog-hero .btn-blog-view-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.garage-blog-hero .btn-spinner {
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: garageBlogSpin 0.6s linear infinite;
    display: inline-block;
}

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

/* Transitions & Dynamic Container */
.garage-blog-dynamic-container {
    transition: opacity 0.25s ease;
}

.garage-blog-dynamic-container.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

@keyframes garageBlogFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.garage-blog-dynamic-container .card-featured,
.garage-blog-dynamic-container .card-grid-item {
    animation: garageBlogFadeIn 0.3s ease forwards;
}

/* Empty State */
.garage-blog-hero .blog-empty-state {
    padding: 60px 20px;
}

/* Responsive Media Queries */
@media (max-width: 991.98px) {
    .garage-blog-hero .card-featured {
        height: 380px;
    }
    .garage-blog-hero .card-grid-item {
        height: 350px;
    }
    .garage-blog-hero .card-featured .card-overlay {
        padding: 24px 20px;
    }
    .garage-blog-hero .filter-tags-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 8px;
        width: 36px;
        background: linear-gradient(90deg, rgba(255, 251, 245, 0) 0%, rgba(255, 251, 245, 0.95) 100%);
        pointer-events: none;
        z-index: var(--z-content);
    }
    .garage-blog-hero .filter-tags-row {
        padding-right: 32px;
    }
}

@media (max-width: 767.98px) {
    /* Header on Mobile */
    .garage-blog-hero .blog-header {
        margin-bottom: 16px !important;
    }
    .garage-blog-hero .section-title {
        font-size: 20px !important;
        line-height: 1.15 !important;
        letter-spacing: -0.3px !important;
    }
    .garage-blog-hero .link-see-all {
        font-size: 11px !important;
        font-weight: 500 !important;
        margin-bottom: 2px !important;
    }
    .garage-blog-hero .link-see-all .arrow-icon {
        width: 10px !important;
        height: 10px !important;
        margin-left: 4px !important;
    }

    /* Filter Pills: 2-Column Grid on Mobile */
    .garage-blog-hero .filter-tags-wrapper {
        margin-bottom: 20px !important;
    }
    .garage-blog-hero .filter-tags-wrapper::after {
        display: none !important;
    }
    .garage-blog-hero .filter-tags-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding-right: 0 !important;
        padding-bottom: 0 !important;
        overflow: visible !important;
    }
    .garage-blog-hero .btn-filter-pill {
        width: 100% !important;
        height: 34px !important;
        padding: 6px 8px !important;
        font-size: clamp(10px, 2.7vw, 11px) !important;
        font-weight: 700 !important;
        letter-spacing: 0.3px !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        border: 1px solid var(--color-7) !important;
        border-radius: var(--radius-pill) !important;
        color: var(--color-7) !important;
        background-color: transparent !important;
        box-sizing: border-box !important;
    }
    .garage-blog-hero .btn-filter-pill.active {
        background-color: var(--color-7) !important;
        color: var(--color-6) !important;
        border-color: var(--color-7) !important;
    }

    /* Cards Layout & Dimensions on Mobile */
    .garage-blog-hero .card-featured {
        height: 480px !important;
        border-radius: 16px !important;
        margin-bottom: 16px !important;
    }
    .garage-blog-hero .card-featured .badge-featured {
        padding: 6px 16px !important;
        font-size: 11px !important;
        border-radius: 0 0 8px 0 !important;
    }
    .garage-blog-hero .blog-cards-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .garage-blog-hero .card-grid-item {
        height: 480px !important;
        border-radius: 16px !important;
    }

    /* Card Overlay: Vertical Stack at Bottom-Left */
    .garage-blog-hero .card-featured .card-overlay,
    .garage-blog-hero .card-grid-item .card-overlay {
        position: absolute !important;
        inset: 0 !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 75% !important;
        padding: 20px 16px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        align-items: flex-start !important;
        gap: 0 !important;
        background: linear-gradient(180deg, rgba(8, 8, 8, 0) 0%, rgba(8, 8, 8, 0.45) 40%, rgba(8, 8, 8, 0.92) 100%) !important;
    }
    .garage-blog-hero .card-overlay .info-col {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .garage-blog-hero .badge-category {
        font-size: 10.5px !important;
        padding: 3px 10px !important;
        margin-bottom: 8px !important;
        letter-spacing: 0.5px !important;
        border-radius: var(--radius-pill) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        background-color: rgba(0, 0, 0, 0.45) !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        color: #ffffff !important;
        display: inline-block !important;
    }
    .garage-blog-hero .card-featured .card-title,
    .garage-blog-hero .card-grid-item .card-title {
        font-size: clamp(16px, 4.5vw, 18px) !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;
        letter-spacing: 0 !important;
        text-transform: uppercase !important;
        margin-bottom: 6px !important;
    }
    .garage-blog-hero .card-featured .card-title a,
    .garage-blog-hero .card-grid-item .card-title a { color: #ffffff !important; }
    .garage-blog-hero .card-featured .card-excerpt,
    .garage-blog-hero .card-grid-item .card-excerpt {
        font-size: 12px !important;
        line-height: 1.4 !important;
        color: rgba(255, 255, 255, 0.85) !important;
        margin-bottom: 12px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    .garage-blog-hero .btn-arrow-circle {
        width: 38px !important;
        height: 38px !important;
        border-radius: 50% !important;
        background-color: rgba(255, 255, 255, 0.2) !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        align-self: flex-start !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 2px !important;
    }
    .garage-blog-hero .btn-arrow-circle .arrow-img { width: 14px !important; height: 14px !important; }

    /* View More Button on Mobile */
    .garage-blog-hero .blog-pagination-wrapper { margin-top: 24px !important; text-align: center !important; }
    .garage-blog-hero .btn-blog-view-more { padding: 10px 32px !important; font-size: 12px !important; }
}
