/* Portfolio Styles */

/* Hero Section */
.portfolio-hero {
    background: linear-gradient(135deg, #1a3a1a 0%, #2d5a2d 100%);
    padding: 30px 0 20px;
    margin-top: 70px;
    text-align: center;
    color: white;
}

.portfolio-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
}

.portfolio-subtitle {
    font-size: 0.9rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Filters */
.portfolio-filters {
    background: #f8f8f8;
    padding: 30px 0;
    border-bottom: 1px solid #e0e0e0;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-btn {
    padding: 10px 25px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    font-weight: 500;
}

.filter-btn:hover {
    background: #f0f0f0;
    border-color: #2d5a2d;
}

.filter-btn.active {
    background: #2d5a2d;
    color: white;
    border-color: #2d5a2d;
}

/* Portfolio Grid */
.portfolio-section {
    padding: 40px 0;
    background: #fff;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 40px;
}

/* Project Card */
.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.project-card.featured {
    grid-column: span 2;
}

.project-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
}

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

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

.project-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(45, 90, 45, 0.95);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.project-info {
    padding: 25px;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.project-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #666;
}

.project-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.project-meta-item::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #999;
    border-radius: 50%;
}

.project-meta-item:first-child::before {
    display: none;
}

.project-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    color: #2d5a2d;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: #1a3a1a;
}

.project-link::after {
    content: '→';
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.project-link:hover::after {
    transform: translateX(5px);
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.1rem;
}

/* Load More Button */
.load-more-wrapper {
    text-align: center;
    margin-top: 40px;
}

#load-more {
    padding: 12px 40px;
    font-size: 1rem;
}

/* Project Modal */
.project-modal,
.order-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
    align-items: center;
    justify-content: center;
}

.project-modal.active,
.order-modal.active {
    display: flex;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 50px auto;
    width: 90%;
    max-width: 1200px;
    border-radius: 12px;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.order-modal-content {
    grid-template-columns: 1fr;
    max-width: 500px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #999;
    cursor: pointer;
    z-index: 1;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0;
}

.modal-close:hover {
    color: #333;
}

/* Gallery Styles */
.modal-gallery {
    position: relative;
}

.gallery-container {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-btn {
    position: absolute;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.3s ease;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.gallery-btn.prev {
    left: 15px;
}

.gallery-btn.next {
    right: 15px;
}

.gallery-counter {
    text-align: center;
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
}

.gallery-thumbnail {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnail.active {
    border-color: #2d5a2d;
}

/* Modal Info Section */
.modal-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-info h2 {
    font-size: 1.8rem;
    margin: 0;
    margin-bottom: 10px;
}

.project-badge {
    display: inline-block;
    padding: 6px 15px;
    background: #2d5a2d;
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    width: fit-content;
}

.project-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.project-meta p {
    margin: 0;
    font-size: 0.95rem;
}

.project-meta strong {
    display: block;
    color: #666;
    margin-bottom: 5px;
}

.project-description {
    margin: 10px 0;
}

.project-description p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

.project-features {
    margin-top: 15px;
}

.project-features h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
}

.project-features ul {
    margin: 0;
    padding-left: 20px;
}

.project-features li {
    margin-bottom: 8px;
    color: #555;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.modal-actions .btn {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
}

/* Order Form Styles */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    margin-bottom: 8px;
    color: #444;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2d5a2d;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* No Projects Message */
.no-projects {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-projects h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 1200px) {
    .project-card.featured {
        grid-column: span 1;
    }

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

@media (max-width: 768px) {
    .portfolio-hero {
        padding: 25px 0 20px;
    }

    .portfolio-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .portfolio-subtitle {
        font-size: 0.95rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .filter-buttons {
        padding: 0 15px;
    }

    .filter-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }

    .project-info {
        padding: 20px;
    }

    .project-title {
        font-size: 1.1rem;
    }

    .modal-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px auto;
        width: 95%;
        padding: 25px;
    }

    .order-modal-content {
        max-width: 90%;
    }

    .gallery-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .gallery-thumbnail {
        width: 60px;
        height: 60px;
    }

    .modal-info h2 {
        font-size: 1.5rem;
    }

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

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeIn 0.5s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }