/* Showcase (Витрина) Styles - Работа России */
*, *::before, *::after {
    box-sizing: border-box;
}

body.showcase-body {
    margin: 0;
    padding: 0;
    background-color: #f5f6f8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.showcase-container,
.view-site-header .center-wrapper,
.view-site-footer .center-wrapper {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Site Header */
header.site-header,
header.view-site-header {
    position: static !important;
    height: auto !important;
    overflow: visible !important;
    box-shadow: none !important;
    background-color: transparent !important;
    padding: 22px 0 18px 0 !important;
}

header.view-site-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    margin-bottom: 20px !important;
}

footer.site-footer,
footer.view-site-footer {
    background: transparent !important;
    background-color: transparent !important;
    padding: 20px 0 36px 0 !important;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-left {
    display: flex;
    flex-direction: column;
}

.site-logo {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.logo-rabota,
.logo-urgent,
.logo-blue {
    color: #1e3a8a;
}

.logo-rossii,
.logo-news,
.logo-red {
    color: #dc2626;
}

.header-subtitle {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 5px;
    font-weight: 400;
    letter-spacing: 0.1px;
}

.header-right {
    display: flex;
    align-items: flex-start;
}

.header-disclaimer {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 400;
    margin-top: 3px;
}

/* Row 1: Top Horizontal Cards */
.top-horizontal-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}

.card-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    overflow: hidden;
}

.card-horizontal:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.card-horizontal-img {
    width: 88px;
    height: 68px;
    min-width: 88px;
    border-radius: 6px;
    overflow: hidden;
    background: #eaedf1;
    flex-shrink: 0;
}

.card-horizontal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-horizontal-title {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 0;
}

/* Row 2: Middle Section (Featured 50% + 2 Vertical Cards 25% + 25%) */
.middle-featured-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

/* Featured Large Card */
.card-featured {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card-featured:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.card-featured-img {
    width: 100%;
    height: 210px;
    overflow: hidden;
    background: #eaedf1;
}

.card-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-featured-content {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    gap: 16px;
}

.card-featured-title {
    font-size: 17.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 0;
}

.btn-more {
    display: inline-block;
    background-color: #0d6efd;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    padding: 7px 22px;
    border-radius: 4px;
    text-decoration: none;
    align-self: flex-start;
    transition: background-color 0.15s ease;
    border: none;
    cursor: pointer;
}

.card-featured:hover .btn-more {
    background-color: #0b5ed7;
}

/* Vertical Standard Cards */
.card-vertical {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    height: 100%;
}

.card-vertical:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.card-vertical-image {
    width: 100%;
    height: 155px;
    overflow: hidden;
    background: #eaedf1;
    flex-shrink: 0;
}

.card-vertical-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-vertical-content {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.card-vertical-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    margin: 0 0 16px 0;
}

.card-vertical-footer {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 400;
    margin-top: auto;
}

/* Row 3+: 4-Column Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

#autoload_grid {
    display: contents;
}

/* Infinite Scroll Loader */
.showcase-loader {
    text-align: center;
    padding: 24px 0;
    display: none;
}

.spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid rgba(13, 110, 253, 0.2);
    border-radius: 50%;
    border-top-color: #0d6efd;
    animation: spin 0.8s linear infinite;
}

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

/* Site Footer */
.site-footer {
    margin-top: 36px;
    padding: 20px 0 36px 0;
}

.footer-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 0 0 16px 0;
}

.footer-disclaimer {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .middle-featured-row {
        grid-template-columns: 1fr 1fr;
    }
    .card-featured {
        grid-column: span 2;
    }
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .showcase-container {
        padding: 0 10px;
    }

    header.site-header,
    header.view-site-header {
        position: static !important;
        height: auto !important;
        padding: 16px 10px 14px 10px !important;
        margin-bottom: 12px !important;
        box-shadow: none !important;
    }

    header.view-site-header {
        background-color: #ffffff !important;
        border-bottom: 1px solid #e5e7eb !important;
    }

    .header-inner {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    .header-left {
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    .site-logo {
        justify-content: center !important;
        font-size: 22px !important;
    }

    .header-subtitle {
        font-size: 11.5px !important;
        margin-top: 4px !important;
        text-align: center !important;
    }

    .header-right {
        display: none !important;
    }

    .top-horizontal-row {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 10px;
    }

    .card-horizontal {
        padding: 8px 10px;
        gap: 12px;
    }

    .card-horizontal-img {
        width: 78px;
        height: 60px;
        min-width: 78px;
    }

    .card-horizontal-title {
        font-size: 13px;
    }

    .middle-featured-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 10px;
    }

    .card-featured {
        grid-column: span 2;
    }

    .card-featured-img {
        height: 180px;
    }

    .card-featured-content {
        padding: 14px 14px 16px;
        gap: 12px;
    }

    .card-featured-title {
        font-size: 15px;
    }

    .btn-more {
        font-size: 13px;
        padding: 6px 18px;
    }

    .card-vertical-image {
        height: 110px;
    }

    .card-vertical-content {
        padding: 10px 10px 12px;
    }

    .card-vertical-title {
        font-size: 12.5px;
        margin-bottom: 10px;
    }

    .card-vertical-footer {
        font-size: 11px;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .site-footer {
        margin-top: 24px;
        padding: 16px 0 28px 0;
    }

    .footer-disclaimer {
        font-size: 11px;
    }
}
