/* Card Action System - Bottom Overlay for Project Cards */

/* Base card structure adjustments */
.project-card,
.project-showcase-card {
    position: relative;
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    overflow: hidden;
    transition: transform 0.3s ease;
}

/* Card body wrapper for content */
.card-body {
    position: relative;
    padding-bottom: 72px; /* Reserve space for action area */
    min-height: 200px;
    z-index: 1;
}

/* Card image layer */
.card-image,
.project-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    will-change: transform, opacity;
}

.card-image img,
.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Bottom action area */
.card-action {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 20px;
    transition: transform 0.3s ease;
    z-index: 2;
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(4px)) {
    .card-action {
        background: rgba(0, 0, 0, 0.85);
    }
}

/* Action button */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #931A1D;
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: transform 200ms ease, background-color 200ms ease;
    border: none;
    cursor: pointer;
    outline: none;
}

/* Button label (hidden on mobile) */
.action-btn .btn-label {
    display: none;
    margin-left: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
}

/* Focus styles */
.action-btn:focus-visible {
    outline: 2px solid #931A1D;
    outline-offset: 2px;
}

/* Hover effects - only on main container */
.project-showcase-card:hover {
    transform: translateY(-4px);
}

.project-showcase-card:hover .card-action {
    transform: translateY(-2px);
}

.project-showcase-card:hover .action-btn {
    transform: scale(1.03);
    background: #931A1D;
}

.action-btn:hover {
    transform: scale(1.03);
    background: #931A1D;
    color: #ffffff;
}

/* Tablet breakpoint (992px and below) */
@media (max-width: 992px) {
    .card-body {
        padding-bottom: 64px;
    }
    
    .card-action {
        height: 64px;
    }
}

/* Mobile breakpoint (768px and below) */
@media (max-width: 768px) {
    .card-body {
        padding-bottom: 56px;
    }
    
    .card-action {
        height: 56px;
        padding: 0 16px;
    }
    
    .action-btn {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }
    
    .action-btn .btn-label {
        display: none;
    }
}

/* Desktop label visibility (1200px and above) */
@media (min-width: 1200px) {
    .action-btn {
        width: auto;
        padding: 0 20px 0 16px;
        border-radius: 28px;
    }
    
    .action-btn .btn-label {
        display: inline;
    }
}

/* Ensure proper stacking context */
.project-image {
    position: relative;
    z-index: 0;
}

.project-content {
    position: relative;
    z-index: 1;
}

.project-overlay {
    position: relative;
    z-index: 1;
}

/* Hide original button when action system is active */
.project-showcase-card.has-action .project-content .btn {
    display: none;
}