/* ===================================
   ENHANCED PROJECT CARDS STYLING
   =================================== */

/* Remove default gutters and add custom spacing */
.project-boxs-area .row.g-4 {
    gap: 2rem !important;
}

/* Grid layout - 3 columns on large, 2 on medium, 1 on small */
.project-boxs-area .row > [class*="col-"] {
    flex: 0 0 calc(33.333333% - 1.333rem) !important;
    max-width: calc(33.333333% - 1.333rem) !important;
}

@media (max-width: 1199px) {
    .project-boxs-area .row > [class*="col-"] {
        flex: 0 0 calc(50% - 1rem) !important;
        max-width: calc(50% - 1rem) !important;
    }
}

@media (max-width: 768px) {
    .project-boxs-area .row > [class*="col-"] {
        flex: 0 0 calc(50% - 1rem) !important;
        max-width: calc(50% - 1rem) !important;
    }
}

@media (max-width: 576px) {
    .project-boxs-area .row > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Main project card container */
.project-card-enhanced {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.project-card-enhanced:hover {
    box-shadow: 0 12px 35px rgba(42, 65, 241, 0.15);
    transform: translateY(-8px);
}

/* Image container */
.project-card-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Overlay on hover */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(42, 65, 241, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.project-card-enhanced:hover .project-overlay {
    opacity: 1;
}

.project-card-enhanced:hover .project-card-image img {
    transform: scale(1.08) rotate(1deg);
}

/* Icon styling */
.project-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    width: 70px;
    height: 70px;
    background: #2A41F1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(42, 65, 241, 0.3);
}

.project-icon i {
    font-size: 32px;
    color: #fff;
}

.project-card-enhanced:hover .project-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Content section */
.project-card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.project-card-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.project-card-enhanced:hover .project-card-content h4 {
    color: #2A41F1;
}

/* Category badge */
.project-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #2A41F1;
    background: #E8EEFE;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Description text */
.project-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex-grow: 1;
}

/* Learn More link */
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #2A41F1;
    text-decoration: none;
    padding: 8px 0;
    transition: all 0.3s ease;
    position: relative;
    width: fit-content;
}

.project-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2A41F1;
    transition: width 0.3s ease;
}

.project-link:hover::after {
    width: 100%;
}

.project-link i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.project-link:hover i {
    transform: translateX(4px);
}

/* ===================================
   PROJECT MODAL STYLING
   =================================== */

/* Modal overlay */
.project-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.project-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal content */
.project-modal-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Close button */
.project-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #2A41F1;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.project-modal-close:hover {
    background: #1f2dd1;
    transform: rotate(90deg);
}

/* Carousel section */
.project-modal-carousel {
    position: relative;
    width: 100%;
    height: 550px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.carousel-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

.carousel-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    animation: zoomIn 0.5s ease;
    opacity: 1;
    transition: opacity 0.2s ease;
}

/* Carousel buttons */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    font-size: 24px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    z-index: 5;
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.1);
}

/* Carousel dots */
.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dots .dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.carousel-dots .dot.active {
    background: #fff;
    width: 30px;
    border-radius: 5px;
}

/* Modal info section */
.project-modal-info {
    padding: 40px;
}

.project-modal-info h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
}

.project-modal-info .project-type {
    font-size: 14px;
    font-weight: 600;
    color: #2A41F1;
    background: #E8EEFE;
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-full-description {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.project-modal-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2A41F1;
}

/* Technologies grid */
.technologies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background: #f5f7fa;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tech-item:hover {
    background: #E8EEFE;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(42, 65, 241, 0.15);
}

.tech-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 10px;
}

.tech-item p {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes cardFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card-enhanced {
    animation: cardFadeInUp 0.5s ease-out forwards;
}

.project-card-enhanced:nth-child(1) { animation-delay: 0.1s; }
.project-card-enhanced:nth-child(2) { animation-delay: 0.2s; }
.project-card-enhanced:nth-child(3) { animation-delay: 0.3s; }
.project-card-enhanced:nth-child(4) { animation-delay: 0.4s; }
.project-card-enhanced:nth-child(5) { animation-delay: 0.5s; }
.project-card-enhanced:nth-child(6) { animation-delay: 0.6s; }

/* Responsive modals */
@media (max-width: 768px) {
    .project-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .project-modal-carousel {
        height: 400px;
    }

    .project-modal-info {
        padding: 25px;
    }

    .project-modal-info h2 {
        font-size: 24px;
    }

    .project-full-description {
        font-size: 14px;
    }

    .technologies-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 15px;
    }

    .tech-item img {
        width: 40px;
        height: 40px;
    }

    .tech-item p {
        font-size: 11px;
    }

    .carousel-prev,
    .carousel-next {
        padding: 8px 12px;
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .project-modal-carousel {
        height: 250px;
    }

    .project-modal-info {
        padding: 20px;
    }

    .project-modal-info h2 {
        font-size: 20px;
    }

    .project-full-description {
        font-size: 13px;
        line-height: 1.6;
    }

    .technologies-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 12px;
    }

    .tech-item {
        padding: 10px;
    }

    .tech-item img {
        width: 35px;
        height: 35px;
    }

    .carousel-prev,
    .carousel-next {
        padding: 6px 10px;
        font-size: 16px;
    }

    .project-modal-close {
        width: 35px;
        height: 35px;
        font-size: 24px;
        top: 15px;
        right: 15px;
    }
}

/* Scrollbar styling for modal */
.project-modal-content::-webkit-scrollbar {
    width: 8px;
}

.project-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.project-modal-content::-webkit-scrollbar-thumb {
    background: #2A41F1;
    border-radius: 4px;
}

.project-modal-content::-webkit-scrollbar-thumb:hover {
    background: #1f2dd1;
}
