/* ========================================
   projects.css - Projects archive + single project page
   ======================================== */

/* ========================================
   PAGE HEADER (archive)
   ======================================== */
.projects-header {
    width: 100%;
    background: #53575C;
    padding: 4.5rem 3rem 3.5rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.projects-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(132, 31, 50, 0.22), transparent 70%);
    pointer-events: none;
}

.projects-header-inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.projects-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: #9D9FA2;
    margin-bottom: 0.9rem;
}

.projects-title {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: 0.02em;
    line-height: 1;
}

.projects-title-line {
    width: 60px;
    height: 3px;
    background: #841F32;
    margin: 1.5rem auto;
}

.projects-subtitle {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   PROJECTS LIST SECTION
   ======================================== */
.projects-list-section {
    width: 100%;
    background: #f5f5f5;
    padding: 5rem 3rem 5rem 3rem;
}

/* ---- Projects grid — uniform cards ---- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
}

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

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.12);
    border-color: #841F32;
}

/* ---- Image with fixed aspect ratio ---- */
.project-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
    flex-shrink: 0;
}

.project-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.06);
}

/* ---- Card body ---- */
.project-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.6rem 1.6rem 1.5rem 1.6rem;
    background: #FFFFFF;
}

.project-card-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #53575C;
    line-height: 1.35;
    margin-bottom: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.97rem;
}

.project-card-body p {
    font-size: 0.9rem;
    line-height: 1.65;
    color: #9D9FA2;
    margin-bottom: 1.4rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #841F32;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    margin-top: auto;
    transition: gap 0.25s ease, color 0.2s ease;
}

.project-link:hover {
    gap: 0.85rem;
    color: #53575C;
}

.project-link i {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.project-card-link:hover .project-link i {
    transform: translateX(4px);
}

.project-card-link:hover h3 {
    color: #841F32;
}

.project-card-link h3 {
    transition: color 0.2s ease;
}

/* ---- No projects fallback ---- */
.no-projects {
    grid-column: 1 / -1;
    text-align: center;
    color: #9D9FA2;
    font-size: 1rem;
    padding: 4rem 0;
}

/* ---- Pagination ---- */
.projects-pagination {
    display: flex;
    justify-content: center;
    margin-top: 4rem;
}

.projects-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.8rem;
    margin: 0 0.25rem;
    border-radius: 60px;
    background: #FFFFFF;
    border: 1px solid #9D9FA2;
    color: #53575C;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.projects-pagination .page-numbers:hover,
.projects-pagination .page-numbers.current {
    background: #841F32;
    border-color: #841F32;
    color: #FFFFFF;
}

/* ========================================
   CTA STRIP
   ======================================== */
.projects-cta {
    width: 100%;
    background: #53575C;
    padding: 4.5rem 3rem;
    position: relative;
    overflow: hidden;
}

.projects-cta::before {
    content: '';
    position: absolute;
    top: 0;
    right: 10%;
    width: 400px;
    height: 100%;
    background: radial-gradient(circle, rgba(132, 31, 50, 0.25), transparent 70%);
    pointer-events: none;
}

.projects-cta-inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.projects-cta-inner h2 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.projects-cta-inner p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 500px;
}

.projects-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: #841F32;
    color: #FFFFFF;
    padding: 1rem 2.4rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.4px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 12px 28px -10px rgba(132, 31, 50, 0.5);
}

.projects-cta-btn i {
    font-size: 0.8rem;
    transition: transform 0.25s ease;
}

.projects-cta-btn:hover {
    background: #FFFFFF;
    color: #841F32;
    transform: translateY(-2px);
}

.projects-cta-btn:hover i {
    transform: translateX(4px);
}

/* ========================================
   SINGLE PROJECT PAGE
   ======================================== */
.single-project {
    width: 100%;
    background: #f5f5f5;
}

/* ---- Hero header ---- */
.sp-hero {
    width: 100%;
    background: #53575C;
    padding: 5rem 3rem 3.5rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sp-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(132, 31, 50, 0.22), transparent 70%);
    pointer-events: none;
}

.sp-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.sp-hero-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 4px;
    color: #9D9FA2;
    margin-bottom: 0.9rem;
}

.sp-hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.sp-hero-category {
    display: inline-block;
    background: #841F32;
    color: #FFFFFF;
    padding: 0.4rem 1.2rem;
    border-radius: 60px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ---- Featured image ---- */
.sp-hero-image {
    width: 100%;
    max-width: 1200px;
    margin: -40px auto 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 3;
}

.sp-featured-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.3);
}

/* ---- Content + sidebar ---- */
.sp-content-section {
    width: 100%;
    padding: 4rem 2rem 5rem 2rem;
}

.sp-content-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 4rem;
    align-items: flex-start;
}

.sp-content {
    font-size: 1rem;
    line-height: 1.85;
    color: #53575C;
}

.sp-content p { margin-bottom: 1.3rem; }

.sp-content h2,
.sp-content h3 {
    color: #53575C;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    letter-spacing: -0.01em;
}

.sp-content h2 { font-size: 1.6rem; }
.sp-content h3 { font-size: 1.3rem; }

.sp-content ul,
.sp-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.sp-content li { margin-bottom: 0.6rem; }

.sp-content a {
    color: #841F32;
    text-decoration: underline;
}

.sp-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* ---- Sidebar ---- */
.sp-sidebar {
    background: #FFFFFF;
    border-radius: 8px;
    padding: 2rem 1.8rem;
    border: 1px solid #e5e7eb;
    position: sticky;
    top: 2rem;
}

.sp-sidebar h3 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #841F32;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #841F32;
}

.sp-details {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.sp-details li {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.sp-details li:last-child { border-bottom: none; }

.sp-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #9D9FA2;
}

.sp-value {
    font-size: 0.92rem;
    color: #53575C;
    font-weight: 500;
}

.sp-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #841F32;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.2s ease;
}

.sp-back-btn:hover { gap: 0.9rem; }

/* ---- Related projects ---- */
.sp-related-section {
    width: 100%;
    background: #FFFFFF;
    padding: 5rem 2rem;
}

.sp-related-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.sp-related-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #53575C;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
}

.sp-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.sp-related-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sp-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 32px -12px rgba(0, 0, 0, 0.1);
}

.sp-related-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.sp-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.sp-related-card:hover .sp-related-img img {
    transform: scale(1.05);
}

.sp-related-body {
    padding: 1.3rem 1.4rem 1.5rem 1.4rem;
}

.sp-related-body h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #53575C;
    line-height: 1.35;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1000px) {
    .sp-content-inner {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .sp-sidebar {
        position: static;
    }

    .sp-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .projects-list-section {
        padding: 4rem 1.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 700px) {
    .projects-cta {
        padding: 3.5rem 1.5rem;
    }

    .projects-cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .projects-cta-btn {
        width: 100%;
        justify-content: center;
    }

    .sp-hero {
        padding: 4rem 1.5rem 3rem 1.5rem;
    }

    .sp-hero-image {
        padding: 0 1rem;
        margin-top: -30px;
    }

    .sp-content-section {
        padding: 3rem 1.2rem 4rem 1.2rem;
    }
}

@media (max-width: 600px) {
    .projects-header {
        padding: 3.5rem 1.5rem 2.8rem 1.5rem;
    }

    .projects-title {
        font-size: 2.2rem;
    }

    .projects-list-section {
        padding: 3rem 1.2rem 4rem 1.2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card-body {
        padding: 1.3rem 1.3rem 1.2rem 1.3rem;
    }

    .project-card-body h3 {
        font-size: 1rem;
        min-height: 2.7rem;
    }

    .project-image {
        aspect-ratio: 16 / 10;
    }

    .sp-related-grid {
        grid-template-columns: 1fr;
    }
}