/* Projects Carousel Styles */

.projects-carousel-wrapper {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    max-width: 1200px; /* Limitar ancho máximo igual que el carrusel */
    width: 100%;
    padding: 20px;
}

.projects-carousel {
    width: 100%;
    max-width: 1200px; /* Limitar ancho máximo */
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    border-radius: 15px;
}

.projects-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: fit-content;
    align-items: stretch;
    transform: translateX(0px); /* Posición inicial explícita */
}

.project-carousel-item {
    flex: 0 0 auto;
    width: 380px; /* Ancho fijo para mejor control */
    margin-right: 20px;
    position: relative;
    margin-top: 20px;
    margin-bottom: 20px;
}

@media (max-width: 1199px) {
    .project-carousel-item {
        width: 350px; /* Ancho ligeramente menor en tablet */
    }
}

@media (max-width: 799px) {
    .project-carousel-item {
        width: 300px; /* Ancho menor en móvil */
    }
}

/* Modern Project Card Styles */
.modern-project-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 550px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

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

.project-image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
    background: #f8f9fa;
}

.project-slider {
    position: relative;
    height: 100%;
}

.project-slide {
    display: none;
    height: 100%;
}

.project-slide.active {
    display: block;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-image-container:hover .slider-controls {
    opacity: 1;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.slider-btn:hover {
    background: #fff;
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-image-container:hover .project-overlay {
    opacity: 1;
}

.project-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #fff;
    color: #007bff;
    transform: scale(1.1);
}

.project-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-header {
    margin-bottom: 15px;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
    line-height: 1.3;
}

.project-category {
    color: #007bff;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-meta {
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: #666;
}

.meta-item i {
    width: 16px;
    margin-right: 8px;
    color: #007bff;
}

.meta-label {
    font-weight: 500;
    margin-right: 5px;
}

.project-description {
    flex: 1;
    color: #555;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

.project-footer {
    margin-top: auto;
}

.btn-details {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

/* Carousel Navigation */
.carousel-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: calc(100% - 40px);
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 1000;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    font-size: 1.1rem;
    position: relative;
}

.nav-btn:hover {
    background: #fff;
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    color: #007bff;
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

.nav-btn.prev-nav {
    left: 0;
}

.nav-btn.next-nav {
    right: 0;
}

/* Estados deshabilitados */
.nav-btn:disabled,
.nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 123, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #007bff;
    transform: scale(1.2);
}

.indicator:hover {
    background: #007bff;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .project-carousel-item {
        width: 350px;
        margin-right: 20px;
    }
}

@media (max-width: 992px) {
    .project-carousel-item {
        width: 320px;
        margin-right: 20px;
    }
    
    .modern-project-card {
        height: 520px;
    }
}

@media (max-width: 768px) {
    .projects-carousel-wrapper {
        padding: 0 15px;
    }
    
    .project-carousel-item {
        width: 280px;
        margin-right: 15px;
    }
    
    .modern-project-card {
        height: 500px;
    }
    
    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .carousel-navigation {
        padding: 0 5px;
    }
}

@media (max-width: 576px) {
    .projects-carousel-wrapper {
        padding: 0 10px;
    }
    
    .project-carousel-item {
        width: 260px;
        margin-right: 10px;
    }
    
    .modern-project-card {
        height: 480px;
    }
    
    .project-content {
        padding: 15px;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .carousel-navigation {
        padding: 0;
    }
}