:root {
    --primary-color: #ff6600;
    --dark-color: #222222;
    --light-color: #ffffff;
    --gray-color: #f4f4f4;
    --text-color: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: var(--dark-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 95px;
    width: 140px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--light-color);
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 14px;
    padding: 10px 0;
    position: relative;
    transition: 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary-color);
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background: var(--primary-color);
    bottom: 0;
    left: 0;
    transition: 0.3s;
}

nav ul li a:hover:after, nav ul li a.active:after {
    width: 100%;
}

/* Page Title */
.page-title {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 40px 0;
    text-align: center;
}

.page-title h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.page-title h1:after {
    content: '';
    position: absolute;
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Projects Filter */
.projects-filter {
    padding: 30px 0;
    background-color: var(--light-color);
    border-bottom: 1px solid #eee;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-button {
    padding: 8px 20px;
    background: var(--gray-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}

.filter-button:hover, .filter-button.active {
    background: var(--primary-color);
    color: var(--light-color);
}

/* Projects Grid */
.projects-section {
    padding: 60px 0;
    background-color: var(--light-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    position: relative;
    height: auto;
    display: flex;
    flex-direction: column;
    background: var(--light-color);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.project-description {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.95rem;
    flex-grow: 1;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto;
}

.project-date {
    display: flex;
    align-items: center;
}

.project-date span {
    margin-right: 5px;
}

.project-link {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}

.project-link:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.pagination-button {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 5px;
    border-radius: 5px;
    background: var(--gray-color);
    border: none;
    color: var(--text-color);
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.pagination-button:hover, .pagination-button.active {
    background: var(--primary-color);
    color: var(--light-color);
}

.pagination-button.prev, .pagination-button.next {
    width: auto;
    padding: 0 15px;
}

/* Call to Action */
.cta-section {
    padding: 60px 0;
    background-color: var(--dark-color);
    color: var(--light-color);
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--light-color);
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 600;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #e65c00;
    transform: translateY(-3px);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content p {
    margin: 10px 0;
}

.social-links {
    margin: 20px 0;
}

.social-links a {
    color: var(--light-color);
    margin: 0 10px;
    font-size: 18px;
    transition: 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Project Detail Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--light-color);
    margin: 50px auto;
    max-width: 900px;
    width: 90%;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    background: var(--primary-color);
    color: var(--light-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
}

.modal-body {
    padding: 30px;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.gallery-main {
    grid-column: span 2;
    height: 400px;
}

.gallery-item {
    height: 200px;
    overflow: hidden;
    border-radius: 5px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.modal-description {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.project-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 1.1rem;
}

/* Scroll to top button */
.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: var(--light-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    text-decoration: none;
    transition: 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 100;
}

.scroll-top:hover {
    opacity: 1 !important;
    transform: translateY(-5px);
}

.loading {
    text-align: center;
    padding: 50px 0;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message, .no-projects {
    text-align: center;
    padding: 50px;
    background: #fff3f3;
    border-radius: 10px;
    color: #d33;
}

.no-projects {
    background: #f3f3f3;
    color: #666;
}

/* Responsive */
@media screen and (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .modal-gallery {
        grid-template-columns: 1fr;
    }
    
    .gallery-main {
        grid-column: span 1;
    }
    
    .project-details {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 10px 10px;
    }
    
    .page-title h1 {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-button {
        width: 80%;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
}