/* ========================================
   WORK SECTION
======================================== */
.work-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%);
}

.work-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 60px;
    position: relative;
}

.work-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--color-green);
    border-radius: 2px;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.work-card {
    background: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.work-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.work-image-container {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.work-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.work-card:hover .work-image {
    transform: scale(1.1);
}

.work-content {
    padding: 30px;
}

.work-card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 12px;
}

.work-card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-green), var(--color-blue));
    border-radius: 2px;
    transition: width 0.3s ease;
}

.work-card:hover .work-card-title::after {
    width: 60px;
}

.work-card-description {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* Efecto de overlay en hover */
.work-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(88, 155, 210, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-card:hover .work-image-container::after {
    opacity: 1;
}

/* Iconos decorativos para cada tarjeta */
.work-card:nth-child(1) .work-card-title::before {
    content: '✓';
    position: absolute;
    left: -35px;
    top: 0;
    color: var(--color-green);
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-card:nth-child(2) .work-card-title::before {
    content: '⚡';
    position: absolute;
    left: -35px;
    top: 0;
    color: var(--color-blue);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-card:nth-child(3) .work-card-title::before {
    content: '📈';
    position: absolute;
    left: -35px;
    top: 0;
    color: var(--color-green);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-card:hover .work-card-title::before {
    opacity: 1;
}

/* Animaciones individuales */
.work-card:nth-child(1) {
    animation: slideInLeft 0.6s ease 0.2s both;
}

.work-card:nth-child(2) {
    animation: slideInUp 0.6s ease 0.4s both;
}

.work-card:nth-child(3) {
    animation: slideInRight 0.6s ease 0.6s both;
}

/* ========================================
   RESPONSIVE WORK SECTION
======================================== */
@media (max-width: 1024px) {
    .work-grid {
        gap: 30px;
    }
    
    .work-image-container {
        height: 220px;
    }
    
    .work-content {
        padding: 25px;
    }
    
    .work-card-title {
        font-size: 20px;
    }
    
    .work-card-description {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .work-section {
        padding: 60px 0;
    }
    
    .work-title {
        font-size: 32px;
        margin-bottom: 50px;
    }
    
    .work-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .work-image-container {
        height: 250px;
    }
    
    .work-content {
        padding: 30px;
    }
    
    .work-card-title {
        font-size: 21px;
        margin-bottom: 15px;
    }
    
    .work-card-description {
        font-size: 15px;
        line-height: 1.6;
    }
    
    /* Ocultar iconos decorativos en móvil */
    .work-card .work-card-title::before {
        display: none;
    }
}

@media (max-width: 600px) {
    .work-section {
        padding: 50px 0;
    }
    
    .work-title {
        font-size: 28px;
        margin-bottom: 40px;
    }
    
    .work-grid {
        gap: 25px;
    }
    
    .work-image-container {
        height: 220px;
    }
    
    .work-content {
        padding: 25px;
    }
    
    .work-card-title {
        font-size: 20px;
    }
    
    .work-card-description {
        font-size: 14px;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .work-section {
        padding: 40px 0;
    }
    
    .work-title {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .work-grid {
        gap: 20px;
    }
    
    .work-image-container {
        height: 200px;
    }
    
    .work-content {
        padding: 20px;
    }
    
    .work-card-title {
        font-size: 18px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    
    .work-card-description {
        font-size: 13px;
        line-height: 1.5;
    }
}

@media (max-width: 360px) {
    .work-image-container {
        height: 180px;
    }
    
    .work-content {
        padding: 18px;
    }
    
    .work-card-title {
        font-size: 17px;
    }
    
    .work-card-description {
        font-size: 12px;
    }
}

/* Animaciones personalizadas */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Efecto de borde en hover - VERSIÓN CORREGIDA */
.work-card {
    position: relative;
    background: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.work-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--color-green), var(--color-blue));
    border-radius: 22px; /* 20px + 2px del borde */
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-card:hover::before {
    opacity: 1;
}

.work-card::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--color-white);
    border-radius: 18px; /* 20px - 2px para compensar */
    z-index: -1;
}