body {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #1a1a1a;
    font-family: Arial, sans-serif;
}

.container {
    display: flex;
    gap: 3rem;
    flex-direction: row;
    padding: 2rem;
    max-width: 1200px;
    width: 100%;
}

.card {
    flex: 0 0 calc(50% - 1.5rem);
    max-width: calc(50% - 1.5rem);
    border-radius: 16px;
    display: flex;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 16/9;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 35px rgba(0,0,0,0.3);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, transparent 50%, rgba(0,0,0,0.8) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    z-index: 2;
    border-radius: 15px;
    overflow: hidden;
}

.card:hover::before {
    opacity: 1;
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.4, 1);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

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

.card:hover .social-icons {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 1200px) {
    .container {
        padding: 1rem 1.5rem;
        max-width: 1000px;
        margin: 0 auto;
    }
    
    .card {
        flex: 0 0 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
        aspect-ratio: 16/9;
        margin: 0 0 1rem 0;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 0.5rem 0.75rem;
        gap: 0.8rem;
        margin: 0 auto;
        align-items: center;
        max-width: 500px;
    }

    .card {
        flex: 0 0 100%;
        max-width: 90%;
        width: 90%;
        margin: 0 auto 0.8rem auto;
        aspect-ratio: 16/9;
        border-radius: 10px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.2);
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.social-icons {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10; /* Increased z-index */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    pointer-events: auto; /* Ensure clicks are registered */
}

.card:hover .social-icons {
    opacity: 1;
    transform: translateY(0);
}

.social-icon {
    color: white;
    font-size: 24px;
    text-decoration: none;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    z-index: 11; /* Higher than parent */
    pointer-events: auto; /* Ensure clicks are registered */
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.3);
}

.social-icon.instagram:hover {
    color: #E1306C;
}

.social-icon.whatsapp:hover {
    color: #25D366;
}

.card-arrow {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 24px;
    z-index: 3;
    opacity: 0.7;
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card:hover .card-arrow {
    opacity: 1;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}
