/* Projects Page Styles */

/* Filter System */
.projects-filters {
    margin-bottom: 60px;
}

.filter-section {
    margin-bottom: 30px;
}

.filter-label {
    font-family: var(--buildex-primary-font);
    font-size: 14px;
    font-weight: 600;
    color: var(--buildex-secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
}

.filter-tabs {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 12px 28px;
    border: 2px solid rgba(255, 168, 38, 0.2);
    background: transparent;
    color: var(--buildex-secondary-color);
    font-family: var(--buildex-primary-font);
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--buildex-primary-color);
    transition: left 0.3s ease;
    z-index: -1;
}

.filter-tab:hover {
    border-color: var(--buildex-primary-color);
    color: var(--buildex-dark);
    transform: translateY(-2px);
}

.filter-tab:hover::before {
    left: 0;
}

.filter-tab.active {
    background: var(--buildex-primary-color);
    border-color: var(--buildex-primary-color);
    color: var(--buildex-dark);
}

.filter-tab.active::before {
    left: 0;
}

/* Project Count */
.projects-count {
    text-align: center;
    margin-bottom: 40px;
    font-family: var(--buildex-secondary-font);
    font-size: 18px;
    color: var(--buildex-secondary-color);
}

.projects-count span {
    color: var(--buildex-primary-color);
    font-weight: 600;
}

/* Project Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* Project Card */
.project-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.project-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.project-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.4), transparent);
    padding: 30px 20px;
    transition: padding 0.3s ease;
}

.project-card:hover .project-card-overlay {
    padding: 40px 20px;
}

.project-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.project-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-status {
    background: var(--buildex-primary-color);
    color: var(--buildex-dark);
}

.badge-status.completed {
    background: #10b981;
    color: white;
}

.badge-status.ongoing {
    background: #f59e0b;
    color: white;
}

.badge-status.future {
    background: #3b82f6;
    color: white;
}

.badge-category {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-category.residential {
    border-color: rgba(16, 185, 129, 0.4);
}

.badge-category.commercial {
    border-color: rgba(59, 130, 246, 0.4);
}

.badge-category.industrial {
    border-color: rgba(245, 158, 11, 0.4);
}

.project-card-title {
    font-family: var(--buildex-primary-font);
    font-size: 22px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.project-card-location {
    font-family: var(--buildex-secondary-font);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-card-timeline {
    font-family: var(--buildex-secondary-font);
    font-size: 12px;
    color: rgba(255, 168, 38, 0.9);
    font-weight: 600;
}

/* Project Modal */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.project-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.project-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--buildex-primary-color);
    color: var(--buildex-dark);
    transform: rotate(90deg);
}

.project-modal-gallery {
    position: relative;
    height: 580px;
    /* Increased height for better visibility */
    background: #000;
    /* Black background to make images pop */
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensure the whole image is visible */
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav:hover {
    background: var(--buildex-primary-color);
    color: var(--buildex-dark);
}

.gallery-nav.prev {
    left: 20px;
}

.gallery-nav.next {
    right: 20px;
}

.gallery-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.gallery-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-indicator.active {
    background: var(--buildex-primary-color);
    width: 30px;
    border-radius: 5px;
}

.project-modal-body {
    padding: 50px;
}

.modal-header {
    margin-bottom: 30px;
}

.modal-title {
    font-family: var(--buildex-primary-font);
    font-size: 36px;
    font-weight: 700;
    color: var(--buildex-dark);
    margin-bottom: 15px;
}

.modal-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.modal-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    color: var(--buildex-secondary-color);
    font-family: var(--buildex-secondary-font);
}

.modal-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-meta-item svg {
    width: 18px;
    height: 18px;
    stroke: var(--buildex-primary-color);
}

.modal-description {
    font-family: var(--buildex-secondary-font);
    font-size: 16px;
    line-height: 1.8;
    color: var(--buildex-secondary-color);
    margin-bottom: 35px;
}

.modal-section {
    margin-bottom: 35px;
}

.modal-section-title {
    font-family: var(--buildex-primary-font);
    font-size: 22px;
    font-weight: 600;
    color: var(--buildex-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--buildex-primary-color);
}

.features-grid,
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.feature-item,
.amenity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-family: var(--buildex-secondary-font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--buildex-secondary-color);
}

.feature-item::before {
    content: '✓';
    color: var(--buildex-primary-color);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.amenity-item {
    background: rgba(255, 168, 38, 0.08);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 3px solid var(--buildex-primary-color);
}

.amenity-item::before {
    content: '•';
    color: var(--buildex-primary-color);
    font-weight: 700;
    font-size: 20px;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.spec-item {
    background: #f9fafb;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--buildex-primary-color);
}

.spec-label {
    font-family: var(--buildex-secondary-font);
    font-size: 13px;
    color: rgba(26, 29, 46, 0.6);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.spec-value {
    font-family: var(--buildex-primary-font);
    font-size: 18px;
    font-weight: 600;
    color: var(--buildex-dark);
}

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

@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-modal-body {
        padding: 30px;
    }

    .features-grid,
    .amenities-grid,
    .specs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .filter-tabs {
        gap: 10px;
    }

    .filter-tab {
        padding: 10px 20px;
        font-size: 14px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-card {
        aspect-ratio: 4/3;
    }

    .project-modal-gallery {
        height: 300px;
    }

    .modal-title {
        font-size: 28px;
    }

    .modal-meta {
        grid-template-columns: 1fr;
    }
}