/*
 * Plugin Name: Project Showcase
 * Description: Styles for the Project Showcase shortcode grid and single template.
 */

:root {
    --ps-primary: #EA2F14;
    --ps-bg-dark: #080808;
    --ps-bg-card: rgba(25, 25, 25, 0.6);
    --ps-border: rgba(255, 255, 255, 0.08);
    --ps-text: rgba(255, 255, 255, 0.8);
    --ps-heading: #ffffff;
    --ps-font: 'Inter', system-ui, sans-serif;
}

/* ==========================================================================
   SHORTCODE GRID STYLES
   ========================================================================== */
.ps-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    font-family: var(--ps-font);
    padding: 2rem 0;
}

.ps-card {
    background: var(--ps-bg-card);
    border: 1px solid var(--ps-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ps-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(234, 47, 20, 0.1);
    border-color: rgba(234, 47, 20, 0.3);
}

.ps-card-link-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.ps-card-image {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--ps-border);
}

.ps-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ps-card-meta {
    margin-bottom: 0.5rem;
}

.ps-card-date {
    font-size: 0.85rem;
    color: var(--ps-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ps-card-title {
    color: var(--ps-heading);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.ps-card-excerpt {
    color: var(--ps-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.ps-card-readmore {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ps-primary);
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.ps-card:hover .ps-card-readmore {
    transform: translateX(5px);
}

@media (max-width: 900px) {
    .ps-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .ps-grid-container {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SINGLE PROJECT STYLES
   ========================================================================== */
.ps-single-wrapper {
    background-color: var(--ps-bg-dark);
    color: var(--ps-text);
    font-family: var(--ps-font);
}

/* Banner */
.ps-single-banner {
    padding: 10rem 2rem 6rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--ps-border);
    overflow: hidden;
}

.ps-gradient-banner {
    background: radial-gradient(circle at 50% 100%, rgba(234, 47, 20, 0.15) 0%, var(--ps-bg-dark) 60%);
}

.ps-gradient-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.35) 2px, transparent 2px);
    background-size: 24px 24px;
    opacity: 0.1;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
    z-index: 1;
}

.ps-banner-inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.ps-banner-title {
    color: var(--ps-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 1rem 0;
}

.ps-banner-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Layout Container */
.ps-single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: 70% 30%; /* 70/30 split */
    gap: 4rem;
}

/* Left Column */
.ps-featured-image-wrapper {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--ps-border);
}

.ps-featured-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.ps-content-meta {
    margin-bottom: 2rem;
}

.ps-date-pill {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(234, 47, 20, 0.1);
    color: var(--ps-primary);
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(234, 47, 20, 0.2);
}

.ps-content-title {
    color: var(--ps-heading);
    font-size: 2.5rem;
    font-weight: 800;
    margin: 1rem 0 2rem;
    line-height: 1.2;
}

.ps-post-content h2, 
.ps-post-content h3 {
    color: var(--ps-heading);
    margin: 2rem 0 1rem;
}

.ps-post-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* Right Sidebar */
.ps-sidebar-widget {
    background: var(--ps-bg-card);
    border: 1px solid var(--ps-border);
    border-radius: 12px;
    padding: 2rem;
    position: sticky;
    top: 100px;
}

.ps-widget-title {
    color: var(--ps-heading);
    font-size: 1.25rem;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--ps-border);
}

.ps-latest-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ps-latest-item {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.ps-latest-item:hover {
    transform: translateX(5px);
}

.ps-lat-thumb {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    background-color: #222;
}

.ps-lat-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ps-lat-title {
    color: var(--ps-heading);
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.ps-lat-date {
    color: var(--ps-primary);
    font-size: 0.8rem;
    font-weight: 600;
}

@media (max-width: 900px) {
    .ps-single-container {
        grid-template-columns: 1fr; /* Stack on tablet/mobile */
        gap: 3rem;
        padding: 2rem 1.5rem;
    }
    
    .ps-sidebar-widget {
        position: static;
    }

    .ps-single-banner {
        padding: 6rem 1.5rem 3rem;
    }
    
    .ps-content-title {
        font-size: 2rem;
    }
    
    .ps-featured-image {
        height: 250px;
    }
}
