/**
 * Project Landing Page Styles
 * Template: Công Trình Tiêu Biểu UV247
 */

:root {
    --primary-gradient: linear-gradient(135deg, #ff6b35 0%, #fc9837 100%);
    --primary-color: #ff6b35;
    --secondary-color: #fc9837;
    --accent-color: #ee1f28;
}

.uv247-portfolio {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f8fafc;
}

/* Hero Section */
.portfolio-hero {
    background: var(--primary-gradient);
    color: white;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.portfolio-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg width="100" height="100" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="100" height="100" fill="none"/%3E%3Ccircle cx="50" cy="50" r="40" stroke="rgba(255,255,255,0.1)" stroke-width="1" fill="none"/%3E%3C/svg%3E');
    opacity: 0.3;
}

.portfolio-hero h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.portfolio-hero p {
    font-size: 18px;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Services Overview */
.services-overview {
    background: white;
    padding: 40px 20px;
    margin: -30px auto 40px;
    max-width: 1100px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
}

.services-overview-title {
    text-align: center;
    margin-bottom: 30px;
}

.services-overview-title h2 {
    font-size: 28px;
    color: #1e293b;
    margin-bottom: 10px;
}

.services-overview-title p {
    color: #64748b;
    font-size: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    text-align: center;
    padding: 25px 15px;
    border-radius: 10px;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.15);
    background: white;
}

.service-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
    color: white;
}

.service-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
}

.service-card p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* Filter Section */
.filter-section {
    max-width: 1100px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #475569;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Projects Container */
.projects-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-content {
    padding: 20px;
}

.project-category {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.project-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1e293b;
}

.project-description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.service-tag {
    padding: 4px 8px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 4px;
    font-size: 11px;
}

.project-meta {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    color: #64748b;
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.view-details-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.view-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Project Modal */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    overflow-y: auto;
    padding: 30px 20px;
}

.project-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 1000px;
    width: 100%;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    margin: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    border: none;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.modal-project-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.modal-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-info-item strong {
    color: #475569;
    font-size: 13px;
}

.modal-info-item span {
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

.modal-body {
    padding: 30px;
}

.modal-section {
    margin-bottom: 30px;
}

.modal-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section p {
    font-size: 15px;
    line-height: 1.7;
    color: #64748b;
}

.modal-services {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-service-tag {
    padding: 8px 16px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.modal-gallery {
    margin-top: 20px;
}

.modal-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.modal-gallery-item {
    position: relative;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.modal-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.modal-gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: white;
    font-size: 30px;
}

/* Gallery Lightbox */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.active {
    display: flex;
}

.gallery-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.gallery-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.15s ease;
}

.gallery-lightbox-close {
    position: absolute;
    top: 15px;
    right: 30px;
    font-size: 36px;
    color: white;
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    border: none;
}

.gallery-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    user-select: none;
    border: none;
}

.gallery-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gallery-lightbox-prev {
    left: 30px;
}

.gallery-lightbox-next {
    right: 30px;
}

.gallery-lightbox-counter {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
}

/* Stats Section - Improved */
.stats-section {
    background: var(--primary-gradient);
    color: white;
    padding: 50px 20px;
    margin: 40px 0;
}

.stats-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item h4 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-item p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* CTA Section - Improved */
.cta-section {
    max-width: 900px;
    margin: 40px auto 60px;
    padding: 50px 40px;
    background: white;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.cta-section h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: #1e293b;
}

.cta-section p {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.cta-btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

/* Responsive */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-hero {
        padding: 50px 20px;
    }

    .portfolio-hero h1 {
        font-size: 32px;
    }

    .portfolio-hero p {
        font-size: 16px;
    }

    .services-overview {
        padding: 30px 15px;
        margin: -20px 15px 30px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .filter-section {
        margin-bottom: 20px;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .projects-container {
        padding: 0 15px 40px;
    }

    .stats-section {
        padding: 40px 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-item h4 {
        font-size: 28px;
    }

    .stat-item p {
        font-size: 12px;
    }

    .cta-section {
        margin: 30px 15px 40px;
        padding: 40px 20px;
    }

    .cta-section h2 {
        font-size: 24px;
    }

    .cta-section p {
        font-size: 14px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-btn {
        width: 100%;
    }

    .modal-content {
        margin: 15px;
        max-width: 100%;
    }

    .modal-header,
    .modal-body {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .modal-gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    .gallery-lightbox-prev {
        left: 10px;
    }

    .gallery-lightbox-next {
        right: 10px;
    }
}
