/* Projects Hero Section */
.projects-hero {
    padding: 180px 0 100px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(
        ellipse at top right,
        rgba(168, 85, 247, 0.2) 0%,
        transparent 50%
    ),
    radial-gradient(
        circle at 60% 20%,
        rgba(147, 51, 234, 0.15) 0%,
        transparent 40%
    );
}

.projects-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        rgba(168, 85, 247, 0.15),
        transparent 70%
    );
    pointer-events: none;
}

.projects-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.projects-hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #fff 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease;
}

.projects-hero-content p {
    font-size: 1.5rem;
    color: var(--light-text);
    line-height: 1.6;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

/* Project Categories */
.project-categories {
    padding: 3rem 0 2rem;
    position: relative;
}

.categories-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.category-btn {
    padding: 0.8rem 1.5rem;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.1);
    border-radius: 8px;
    color: var(--light-text);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    white-space: nowrap;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.2);
}

/* Project Card Categories */
.project-card .project-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0;
}

.project-card .project-categories span {
    padding: 0.3rem 0.8rem;
    background: rgba(168, 85, 247, 0.15);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent-color);
    border: 1px solid rgba(168, 85, 247, 0.2);
    transition: all 0.3s ease;
}

.project-card .project-categories span:hover {
    background: rgba(168, 85, 247, 0.25);
    transform: translateY(-1px);
}

/* Project Tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.project-tags span {
    padding: 0.2rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    font-size: 0.75rem;
    color: var(--light-text);
}

/* Projects Grid */
.projects-grid {
    padding: 4rem 0;
    position: relative;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.projects-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 1rem;
}

.project-card {
    background: rgba(23, 23, 23, 0.95);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.15);
}

.project-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
}

.project-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.project-info p {
    color: var(--light-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-tags {
    margin-top: 0.5rem;
}

/* Project Stats */
.project-stats {
    padding: 4rem 0;
    background: radial-gradient(
        circle at bottom left,
        rgba(168, 85, 247, 0.1),
        transparent 70%
    );
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: rgba(23, 23, 23, 0.95);
    border-radius: 20px;
    border: 1px solid rgba(168, 85, 247, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--light-text);
    font-size: 1rem;
}

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

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

    .projects-hero-content h1 {
        font-size: 3.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid {
        width: 90%;
        padding: 2rem 0;
    }

    .projects-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }

    .project-card {
        background: rgba(23, 23, 23, 0.95);
        border: 1px solid rgba(168, 85, 247, 0.1);
        border-radius: 12px;
        width: 100%;
        margin: 0 auto;
    }

    .project-thumbnail {
        border-radius: 12px 12px 0 0;
        overflow: hidden;
    }

    .project-info {
        padding: 1rem;
    }

    .project-info h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .project-info p {
        display: none;
    }

    .project-card .project-categories {
        display: flex;
        margin: 0.5rem 0;
        gap: 0.4rem;
    }

    .project-card .project-categories span {
        padding: 0.2rem 0.6rem;
        font-size: 0.7rem;
        background: rgba(168, 85, 247, 0.1);
        border: none;
    }

    .project-tags {
        margin-top: 0.5rem;
    }

    .project-tags span {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
        background: rgba(255, 255, 255, 0.03);
    }

    .project-overlay {
        display: none;
    }

    .project-card:hover {
        transform: none;
        border-color: transparent;
        box-shadow: none;
    }

    .project-card:hover .project-thumbnail img {
        transform: none;
    }

    .categories-wrapper {
        gap: 0.8rem;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin: 0 -10%;
        padding: 0 10%;
    }

    .categories-wrapper::-webkit-scrollbar {
        display: none;
    }

    .category-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .projects-hero-content h1 {
        font-size: 3rem;
    }

    .projects-hero-content p {
        font-size: 1.2rem;
    }

    .project-card {
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    .project-card:active {
        transform: scale(0.98);
    }
}

@media (max-width: 480px) {
    .projects-grid {
        width: 100%;
        padding: 1.5rem 0;
    }

    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .project-info h3 {
        font-size: 1rem;
    }

    .project-card .project-categories span {
        padding: 0.15rem 0.5rem;
        font-size: 0.65rem;
    }
}

/* Update Project Card Styles for Videos */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    transition: all 0.3s ease;
}

/* Enhanced Video Popup Styles */
.video-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
    backdrop-filter: blur(8px);
}

.video-popup-content {
    background: var(--card-bg);
    border-radius: 15px;
    width: 100%;
    max-width: 900px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.video-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(23, 23, 23, 0.98);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.video-popup-header h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 0;
    font-weight: 600;
    background: linear-gradient(135deg, #fff 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-popup {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    color: var(--text-color);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
}

.close-popup:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.video-popup .video-container {
    position: relative;
    padding-top: 56.25%;
    width: 100%;
    background: #000;
}

.video-popup .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-popup-description {
    padding: 2rem;
    color: var(--light-text);
    line-height: 1.7;
    font-size: 1.1rem;
    background: rgba(23, 23, 23, 0.98);
    border-top: 1px solid rgba(168, 85, 247, 0.2);
}

.video-popup-description h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Prevent background scrolling when popup is open */
body.popup-open {
    overflow: hidden;
    padding-right: 17px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .video-popup {
        padding: 1rem;
    }

    .video-popup-header {
        padding: 1rem 1.5rem;
    }

    .video-popup-header h3 {
        font-size: 1.3rem;
    }

    .video-popup-description {
        padding: 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .video-popup-header {
        padding: 1rem;
    }

    .video-popup-header h3 {
        font-size: 1.1rem;
    }

    .video-popup-description {
        padding: 1rem;
    }
}

/* Project Card Video Overlay */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.watch-video-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.project-card:hover .watch-video-btn {
    transform: translateY(0);
}

.watch-video-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Modern Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.video-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal-backdrop.show {
    opacity: 1;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
}

.video-modal-content.show {
    transform: translateY(0);
    opacity: 1;
}

.video-modal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(23, 23, 23, 0.9);
    backdrop-filter: blur(5px);
}

.video-modal-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text-color);
}

.video-modal-title i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.video-modal-title span {
    font-size: 1.2rem;
    font-weight: 500;
}

.video-modal-close {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    color: var(--text-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.video-modal-body {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.video-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Prevent background scrolling */
body.modal-open {
    overflow: hidden;
    width: 100%;
    height: 100%;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .video-modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .project-categories {
        padding: 2rem 0 1.5rem;
    }

    .categories-wrapper {
        gap: 0.8rem;
    }

    .category-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .categories-wrapper {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .categories-wrapper::-webkit-scrollbar {
        display: none;
    }

    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .project-stats {
        padding: 3rem 0;
    }

    .stats-grid {
        width: 80%;
        gap: 1rem;
    }

    .stat-item {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .project-stats {
        padding: 2rem 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-item {
        padding: 1.2rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }
}
