/**
 * WCRS Project Card Widget Styles
 *
 * Horizontal project card for Elementor Loop Grid.
 * Layout: visual section (left) + content section (right).
 *
 * Uses stretched-link pattern: single <a> on title with ::after covering
 * entire card for WCAG 2.4.4 compliance (one link per destination).
 */

/* Card wrapper - horizontal flexbox */
.wcrs-project-card {
    display: flex;
    flex-direction: row;
    width: 100%;
    overflow: hidden;
    height: 100%;
    position: relative;
    cursor: pointer;
}

/* Visual section (lewa) */
.wcrs-project-card-visual {
    position: relative;
    min-height: 200px;
    background: linear-gradient(135deg, #e0e0e0 0%, #ff8c42 50%, #ff6b6b 100%);
}

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

/* Content section (prawa) */
.wcrs-project-card-content {
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Title link — stretched-link pattern, reset Elementor kit global <a> styles */
.wcrs-project-card-title-link {
    all: unset !important;
    text-decoration: none !important;
    color: inherit !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    cursor: pointer;
}

.wcrs-project-card-title-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.wcrs-project-card:hover .wcrs-project-card-title-link {
    opacity: 0.8;
}

/* Title */
.wcrs-project-card-title {
    margin: 0;
    padding: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

/* Excerpt */
.wcrs-project-card-excerpt {
    margin: 0;
    padding: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Button (visual only, not interactive — <span>) */
.wcrs-project-card-button {
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    align-self: flex-start;
    border: none;
    cursor: pointer;
}

.wcrs-project-card:hover .wcrs-project-card-button {
    opacity: 0.9;
    transform: translateY(-2px);
}

.wcrs-project-card-button-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transition: transform 0.25s ease;
}

.wcrs-project-card:hover .wcrs-project-card-button-icon {
    transform: translateX(4px);
}

/* Responsive - Mobile */
@media (max-width: 767px) {
    .wcrs-project-card {
        flex-direction: column;
    }

    .wcrs-project-card-visual {
        flex: 0 0 auto;
        width: 100%;
        min-height: 200px;
        border-radius: 16px 16px 0 0 !important;
    }

    .wcrs-project-card-content {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* Accessibility - focus state on stretched link */
.wcrs-project-card-title-link:focus-visible {
    outline: none;
}

.wcrs-project-card:has(.wcrs-project-card-title-link:focus-visible) {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
