/* CarruselProyectos.css - Sky Brand Theme with Background Image */

.projects-carousel-section {
    padding: 140px 0 100px 0;
    perspective: 2000px;
    background-color: #f4f9ff;
    /* Distinct light blue panel */
    background-image: radial-gradient(circle at 50% 50%, rgba(0, 102, 204, 0.03) 0%, transparent 70%);
    overflow: hidden;
    position: relative;
    border-top: 1px solid rgba(0, 102, 204, 0.08);
    border-bottom: 1px solid rgba(0, 102, 204, 0.08);
}

/* Subtle Branding Glow - Center */
.projects-carousel-section::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(0, 102, 204, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.carousel-header {
    text-align: center;
    margin-bottom: 80px;
    /* Increased margin for better separation */
    position: relative;
    z-index: 2;
}

.carousel-title {
    font-size: 3.5rem;
    color: #003366;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 10px;
}

.carousel-title span {
    color: #0066cc;
}

.carousel-subtitle {
    font-size: 1.1rem;
    color: rgba(0, 51, 102, 0.7);
    font-weight: 500;
}

.projects-carousel {
    position: relative;
    width: 100%;
    height: 520px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

/* Premium Navigation - Brand Blue Rounded */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: white;
    border: 2px solid #0066cc;
    cursor: pointer;
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #0066cc;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.15);
}

.carousel-nav-btn:hover {
    background: #0066cc;
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 12px 30px rgba(0, 102, 204, 0.3);
}

.carousel-nav-btn.prev {
    left: 8%;
}

.carousel-nav-btn.next {
    right: 8%;
}

.projects-container {
    position: relative;
    width: 320px;
    height: 450px;
    transform-style: preserve-3d;
}

.project-card {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 50%;
    top: 50%;
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.1);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.85);
    border: 1px solid rgba(0, 102, 204, 0.1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

/* Card Content Overlay - Premium Glass */
.project-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem;
    background: linear-gradient(to top,
            rgba(0, 51, 102, 0.95) 0%,
            rgba(0, 51, 102, 0.7) 60%,
            transparent 100%);
    color: white;
    transform: translate3d(0, 20px, 0);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1),
        opacity 0.5s ease;
    pointer-events: none;
}

.project-card.active .project-card-content {
    transform: translateY(0);
    opacity: 1;
}

.project-card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.project-card-content p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1.2rem;
    font-weight: 400;
}

.btn-view-gallery {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00b8d4;
    transition: all 0.3s ease;
}

.project-card:hover .btn-view-gallery {
    gap: 12px;
}

/* 3D States Refined */
.project-card.active {
    transform: translate(-50%, -50%) scale(1);
    z-index: 20;
    opacity: 1;
    pointer-events: auto;
    filter: none;
    box-shadow: 0 30px 80px rgba(0, 51, 102, 0.25);
}

@keyframes floatingActive {

    0%,
    100% {
        transform: translate3d(0, 0, 160px) scale3d(1.15, 1.15, 1);
    }

    50% {
        transform: translate3d(0, -10px, 160px) scale3d(1.15, 1.15, 1);
    }
}

.project-card.prev {
    transform: translate(-160%, -50%) scale(0.85);
    z-index: 10;
    opacity: 0.6;
    filter: blur(2px) brightness(0.85);
    pointer-events: auto;
    cursor: pointer;
}

.project-card.next {
    transform: translate(60%, -50%) scale(0.85);
    z-index: 10;
    opacity: 0.6;
    filter: blur(2px) brightness(0.85);
    pointer-events: auto;
    cursor: pointer;
}

.project-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    transform: translate3d(0, 0, 0);
}

.project-card.active:hover .project-card-img {
    transform: scale(1.05);
}

/* Responsive Adaptability */

/* Laptop / Small Desktop (max 1200px) */
@media (max-width: 1200px) {
    .carousel-nav-btn.prev {
        left: 2%;
    }

    .carousel-nav-btn.next {
        right: 2%;
    }

    /* Reduce spacing slightly for laptops */
    .project-card.prev {
        transform: translate(-140%, -50%) scale(0.8);
    }

    .project-card.next {
        transform: translate(40%, -50%) scale(0.8);
    }
}

/* Tablet / Portrait (max 992px) */
@media (max-width: 992px) {
    .projects-carousel {
        height: 480px;
    }

    .projects-container {
        width: 300px;
        height: 420px;
    }

    /* Compacter layout for tablets */
    .project-card.prev {
        transform: translate(-115%, -50%) scale(0.75);
        opacity: 0.5;
    }

    .project-card.next {
        transform: translate(15%, -50%) scale(0.75);
        opacity: 0.5;
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    .projects-carousel-section {
        padding: 120px 0 60px 0;
    }

    .carousel-title {
        font-size: 2.2rem;
    }

    .projects-carousel {
        height: 450px;
    }

    .projects-container {
        width: 280px;
        height: 400px;
    }

    .project-card.active {
        transform: translate(-50%, -50%) scale(1);
    }

    /* Hide side cards on mobile for clean focus */
    .project-card.prev,
    .project-card.next {
        opacity: 0;
        pointer-events: none;
    }

    .project-card-content {
        padding: 1.5rem 1rem;
    }

    .project-card-content h3 {
        font-size: 1.2rem;
    }
}