/**
 * Portfolio Projects Layout Styles
 */

/* Grid container setup */
.pp-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Updated from 4 columns to 3 */
    gap: 24px;
    width: 100%;
    margin: 20px 0;
    box-sizing: border-box;
}

/* Individual card architecture */
.pp-project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Keeps texts pinned cleanly at the baseline */
    aspect-ratio: 3 / 2;       /* Updated from square 1:1 to landscape 3:2 */
    background-color: #222222; /* Clean fallback background if thumbnail is missing */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-decoration: none;
    overflow: hidden;
    border-radius: 8px;        /* Clean agency touch style */
    transition: box-shadow 0.25s ease; /* Removed transform transition from parent card */
    box-sizing: border-box;
}

/* Link Icon Indicator Layout - Absolute top right positioning layer */
.pp-project-card-link-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(4px); /* Modern glassmorphism touch */
    transition: background-color 0.25s ease, transform 0.25s ease;
}

/* Base Hover Effects - Enhances shadow without translating the outer bounding box */
a.pp-project-card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

/* NEW HOVER ACTION: Translates ONLY the internal content (Title, Client, Date) upwards */
a.pp-project-card:hover .pp-project-card-content {
    transform: translateY(-6px);
}

a.pp-project-card:hover .pp-project-card-link-icon {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}

/* Deactivate interactive styling responses entirely for unlinked cards */
div.pp-project-card {
    cursor: default;
}

/* Linear-gradient protection overlay to keep whites legible over vibrant image backgrounds */
.pp-project-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
}

/* Text payload content area */
.pp-project-card-content {
    position: relative;
    z-index: 2;
    padding: 24px;
    box-sizing: border-box;
    transition: transform 0.25s ease; /* Added to slide the text content elements smoothly */
}

/* Main Heading Title */
.pp-project-title {
    color: #ffffff !important; /* Forces layout override from aggressive themes */
    margin: 0 0 4px 0 !important;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

/* Smaller Subheading Client Metadata */
.pp-project-client {
    color: #e0e0e0 !important;
    margin: 0 0 2px 0 !important;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Project Completion Date Layout Line */
.pp-project-date {
    color: #aaaaaa !important;
    margin: 0 !important;
    font-size: 0.8rem;
    font-weight: 400;
    font-style: italic;
}

/* Responsive Guardrails for cross-device viewports */
@media screen and (max-width: 1024px) {
    .pp-projects-grid {
        grid-template-columns: repeat(2, 1fr); /* Clean fall-back breakpoint step down */
        gap: 16px;
    }
}

@media screen and (max-width: 600px) {
    .pp-projects-grid {
        grid-template-columns: 1fr; /* Stack layout seamlessly on handheld viewports */
    }
}