/* Projects Table Section */
.works-section {
    padding: 6rem 2rem;
    background-color: #fff;
    position: relative;
}

.works-container {
    max-width: 1200px;
    margin: 0 auto;
}

.works-header {
    text-align: center;
    margin-bottom: 3rem;
}

.works-header h2 {
    font-size: 3rem;
    color: var(--secondary-black);
    margin-bottom: 1rem;
}

.works-header p {
    color: #666;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Download Button */
.download-btn-wrapper {
    margin-bottom: 2rem;
    text-align: center;
}

.download-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background-color: var(--secondary-black);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.download-pdf-btn:hover {
    background-color: var(--primary-red);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(225, 6, 0, 0.2);
}

/* Tabs */
.works-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    background: var(--light-gray);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50px;
    padding: 0.5rem;
    border: 1px solid #eee;
}

.works-tab-btn {
    background: none;
    border: none;
    padding: 0.8rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-radius: 40px;
    transition: all 0.3s ease;
}

.works-tab-btn.active {
    background: white;
    color: var(--primary-red);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Table Styling */
.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px; /* Forces horizontal scroll on small mobile */
}

.projects-table th {
    background-color: var(--secondary-black);
    color: white;
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Sticky Header */
.projects-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
}

.projects-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid #eee;
    color: #444;
    font-size: 0.95rem;
    vertical-align: middle;
}

.projects-table tbody tr:hover {
    background-color: #fafafa;
}

.projects-table tbody tr:last-child td {
    border-bottom: none;
}

.text-left { text-align: left; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.text-red { color: var(--primary-red); }

/* Status Badges */
.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-ongoing {
    background-color: rgba(225, 6, 0, 0.1);
    color: var(--primary-red);
    border: 1px solid rgba(225, 6, 0, 0.2);
}

.status-completed {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Summary Footer in Table */
.table-footer {
    background-color: var(--light-gray);
    padding: 1.5rem;
    text-align: right;
    border-top: 2px solid #eee;
    font-size: 1.1rem;
    border-radius: 0 0 15px 15px;
}

.total-label {
    font-weight: 600;
    color: #666;
    margin-right: 1rem;
}

.total-amount {
    font-size: 1.4rem;
    color: var(--primary-red);
    font-weight: 800;
}

/* Tab Content Animation */
.works-tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.works-tab-content.active {
    opacity: 1;
}

/* Default show first tab */
#ongoing-projects {
    display: block;
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .works-header h2 {
        font-size: 2rem;
    }
    .works-tab-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}