/* =========================================
   PROJECTS PAGE STYLES
   ========================================= */

/* Project Card Overrides */
.project-card {
    padding: 0 !important;
    /* Remove default card padding to let image fill edge-to-edge */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-img-container {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-blue);
    background: rgba(10, 35, 66, 0.1);
    /* Navy rgba */
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
    align-self: flex-start;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--neutral-dark);
}

.project-desc {
    font-size: 0.95rem;
    color: var(--text-body);
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
    flex-grow: 1;
    /* Pushes footer to bottom */
}

.project-footer {
    padding-top: 16px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.text-link {
    font-weight: 600;
    color: var(--primary-blue);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.2s ease;
}

.text-link:hover {
    gap: 12px;
    color: var(--primary-dark);
}

/* Filter Button Adjustments */
.filter-btn {
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 500;
}

/* Ensure visibility on hover */
.filter-btn.btn-outline:hover {
    background-color: var(--primary-blue) !important;
    color: white !important;
    border-color: var(--primary-blue) !important;
}

/* Ensure active button is visible */
.filter-btn.active {
    background: #0A2342;
    /* Navy */
    color: white !important;
    border-color: transparent !important;
}

/* Responsive Grid Adjustments for Projects */
@media (max-width: 1200px) {
    #projects-grid.grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    #projects-grid.grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    #projects-grid.grid-4 {
        grid-template-columns: 1fr;
    }

    .project-img-container {
        height: 200px;
    }
}

/* =========================================
   PROJECT DETAILS PAGE STYLES
   ========================================= */

.project-detail-hero {
    height: 70vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    position: relative;
    display: flex;
    align-items: flex-end;
    padding-bottom: 6rem;
    color: white;
}


.project-detail-hero h1 {
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    font-weight: 800;
    color: #ffffff !important;
}

.project-detail-hero .badge {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.project-detail-hero::before {
    content: '';
    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.6) 50%, rgba(0, 0, 0, 0.4) 100%);
}

.project-hero-content {
    position: relative;
    z-index: 2;
    max-width: 1000px;
}

.project-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.95);
}

.content-wrapper {
    background: white;
    border-radius: var(--radius-xl);
    padding: 4rem;
    margin-top: -4rem;
    /* Overlap hero */
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow-xl);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.content-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--neutral-gray);
}

.content-body p {
    margin-bottom: 1.5rem;
}

.back-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 2rem;
    transition: transform 0.2s ease;
}

.back-nav:hover {
    transform: translateX(-5px);
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 2rem;
        margin-top: 0;
        /* Remove overlap on mobile for cleaner layout */
    }

    .project-detail-hero {
        height: 50vh;
        min-height: 400px;
    }

    .project-meta-grid {
        gap: 1.5rem;
    }
}

