/* ===========================================
   PROJECTS PAGE STYLES
   =========================================== */

/* --- Projects Hero --- */
.projects-hero {
    padding: 10rem 5% 4rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
}

.projects-hero h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.projects-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.projects-hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    max-width: 500px;
    margin: 0 auto;
}

.hero-stat {
    text-align: center;
}

.hero-stat-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--accent);
    display: block;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* --- Filter Bar --- */
.projects-filter {
    padding: 1.5rem 5%;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 70px;
    z-index: 100;
}

.filter-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.filter-select {
    padding: 0.6rem 2.5rem 0.6rem 1.2rem;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 50px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A4A6A' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    transition: var(--transition-fast);
}

.filter-select:focus {
    border-color: var(--accent);
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.filter-results {
    text-align: center;
    padding-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-light);
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Listing Grid --- */
.projects-listing {
    padding: 4rem 5%;
    background: var(--bg-primary);
    min-height: 400px;
}

.projects-listing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.project-listing-card {
    display: block;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition-normal);
    text-decoration: none;
    color: inherit;
}

.project-listing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.project-listing-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.project-listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.project-listing-status {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.3rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 50px;
}

.project-listing-status--ongoing {
    background: rgba(45, 138, 78, 0.9);
    color: var(--white);
}

.project-listing-status--completed {
    background: rgba(45, 90, 138, 0.9);
    color: var(--white);
}

.project-listing-info {
    padding: 1.5rem;
}

.project-listing-location {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: block;
}

.project-listing-name {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: var(--transition-fast);
}

.project-listing-card:hover .project-listing-name {
    color: var(--accent);
}

.project-listing-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* --- Empty State --- */
.projects-empty {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.projects-empty p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ===========================================
   DETAIL PAGE STYLES
   =========================================== */

/* Breadcrumb */
.breadcrumb {
    padding: 6rem 5% 1rem;
    background: var(--bg-primary);
}

.breadcrumb-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    font-size: 0.85rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb span[aria-hidden] {
    margin: 0 0.5rem;
}

/* Detail Hero */
.project-detail-hero {
    position: relative;
    width: 100%;
    max-height: 70vh;
    overflow: hidden;
}

.project-detail-hero-image {
    width: 100%;
    height: 70vh;
}

.project-detail-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-detail-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4rem 5%;
    background: linear-gradient(to top, rgba(26, 26, 46, 0.9), transparent);
}

.project-detail-hero-overlay h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 300;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.project-detail-status {
    display: inline-block;
    padding: 0.3rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 50px;
    margin-bottom: 1rem;
}

.project-detail-location {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Info Bar */
.project-info-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 2rem 5%;
}

.project-info-bar-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.info-item {
    text-align: center;
}

.info-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.info-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Detail Content */
.project-detail-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 5%;
}

.project-detail-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.project-detail-description p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 2rem;
}

/* Service Tags */
.project-detail-services {
    margin-top: 2rem;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.service-tag {
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    color: var(--accent);
    background: rgba(45, 90, 138, 0.1);
    border-radius: 50px;
    transition: var(--transition-fast);
}

.service-tag:hover {
    background: var(--accent);
    color: var(--white);
}

/* Gallery Grid */
.project-gallery {
    padding: 0 5% 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.project-gallery h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}

.gallery-item {
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: var(--transition-fast);
}

.gallery-item:hover::after {
    background: rgba(0, 0, 0, 0.15);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-image {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    transition: var(--transition-fast);
    opacity: 0.7;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 2.5rem;
}

.lightbox-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
}

.lightbox-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Project Navigation (prev/next) */
.project-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--border);
    max-width: 1400px;
    margin: 0 auto;
}

.project-nav-link {
    display: block;
    padding: 3rem 5%;
    transition: var(--transition-normal);
    text-decoration: none;
}

.project-nav-link:hover {
    background: var(--bg-secondary);
}

.project-nav-prev {
    text-align: left;
}

.project-nav-next {
    text-align: right;
    border-left: 1px solid var(--border);
}

.project-nav-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.5rem;
}

.project-nav-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    transition: var(--transition-fast);
    display: block;
}

.project-nav-link:hover .project-nav-name {
    color: var(--accent);
}

/* CTA Section */
.project-cta {
    padding: 5rem 5%;
    background: var(--bg-dark);
    text-align: center;
}

.project-cta h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    color: var(--white);
    margin-bottom: 1rem;
}

.project-cta p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

.project-cta .btn-primary {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--accent);
    color: var(--white);
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: var(--transition-normal);
}

.project-cta .btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

/* View All Button (for index.html) */
.view-all-btn {
    text-align: center;
    margin-top: 3rem;
}

.view-all-btn .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: var(--transition-normal);
    text-decoration: none;
}

.view-all-btn .btn-secondary:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
}

.view-all-btn .btn-icon {
    width: 18px;
    height: 18px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .projects-listing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-info-bar-inner {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .projects-listing-grid {
        grid-template-columns: 1fr;
    }

    .filter-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .filter-group {
        justify-content: center;
    }

    .projects-filter {
        position: static;
    }

    .project-info-bar-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-detail-hero-image {
        height: 50vh;
    }

    .project-detail-hero-overlay {
        padding: 2rem 5%;
    }

    .project-navigation {
        grid-template-columns: 1fr;
    }

    .project-nav-next {
        border-left: none;
        border-top: 1px solid var(--border);
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .projects-hero-stats {
        gap: 1.5rem;
    }

    .hero-stat-num {
        font-size: 2rem;
    }
}
