/* Modal Personalizado */
.modal-content {
    border-radius: 10px;
    border: none;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.modal-header-custom {
    background: linear-gradient(135deg, #1a365d 0%, #214167 100%);
    border-radius: 10px 10px 0 0;
    padding: 12px 28px;
    position: relative;
    overflow: hidden;
}

.modal-title-custom {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 550;
    text-align: center;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-close-custom {
    position: absolute;
    top: 8px;
    right: 14px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-close-custom:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Grid de Cards Hexagonal */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    padding: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Cards de Trabajos - Estilo con Imagen */
.work-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 280px;
}

.work-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2c3e50, #34495e);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.work-card:hover::before {
    transform: scaleX(1);
}

.work-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.work-card:nth-child(odd) {
    animation: slideInLeft 0.6s ease forwards;
}

.work-card:nth-child(even) {
    animation: slideInRight 0.6s ease forwards;
}

.work-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    transition: transform 0.3s ease;
}

.work-card:hover .work-image {
    transform: scale(1.05);
}

.work-content {
    padding: 10px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.work-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
    margin: 0;
}

/* Animaciones */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.work-card {
    animation-fill-mode: both;
}

.work-card:nth-child(1) {
    animation-delay: 0.1s;
}

.work-card:nth-child(2) {
    animation-delay: 0.2s;
}

.work-card:nth-child(3) {
    animation-delay: 0.3s;
}

.work-card:nth-child(4) {
    animation-delay: 0.4s;
}

.work-card:nth-child(5) {
    animation-delay: 0.5s;
}

.work-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Responsive */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px 15px;
        gap: 20px;
    }

    .service-card {
        max-width: 100%;
    }

    .modal-title-custom {
        font-size: 1rem;
    }

    .work-card {
        height: 220px;
    }

    .work-image {
        height: 150px;
    }

    .work-content {
        padding: 5px 10px;
    }

    .work-description {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .btn-close-custom {
        width: 24px;
        height: 24px;
        font-size: 0.85rem;
        top: 6px;
        right: 10px;
    }

    .services-grid {
        padding: 15px 10px;
        gap: 15px;
    }

    .work-card {
        height: 200px;
    }

    .work-image {
        height: 140px;
    }

    .modal-title-custom {
        font-size: 0.9rem;
    }
}