/* cards.css - VERSIÓN MODIFICADA PARA EVITAR CONFLICTOS */

/* Eliminar estilos globales que afectan otras secciones */
.cards-fichas-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cards-fichas-container h1 {
    text-align: center;
    margin-bottom: 10px;
    color: #0B0A3E;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-size: 2.2rem;
}

.cards-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 5px;
    color: #B8C5D0;
    line-height: 1.5;
    font-size: 1rem;
}

.metallic-section {
    padding: 20px 0;
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    margin: 0;
    animation: metallicGlow 8s ease-in-out infinite;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.metallic-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #B87333, transparent);
    animation: shimmer 3s infinite;
}

@keyframes metallicGlow {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow: 0 0 30px rgba(184, 115, 51, 0.2);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 50px rgba(184, 115, 51, 0.4);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.cards-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-around;
    width: 100%;
    flex-wrap: wrap;
    padding: 0 20px;
}

/* Especificar que estas columnas son solo para cards */
.cards-column {
    flex: 1;
    max-width: 250px;
    margin: 0 10px;
    min-width: 220px;
}

.card {
    perspective: 1000px;
    height: 280px;
    margin-bottom: 20px;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-8px);
    animation: bounce 0.5s ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(-8px); }
    50% { transform: translateY(-12px); }
}

.inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-style: preserve-3d;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.card:hover .inner {
    transform: rotateY(180deg);
}

.card .inner:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    border-radius: 15px;
    transition: all 0.5s ease;
}

.front {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    animation: fadeIn 1s ease-out;
    color: #333;
    border: 1px solid rgba(184, 115, 51, 0.2);
}

.back {
    background: linear-gradient(135deg, #064A8B 0%, #75BDE0 100%);
    transform: rotateY(180deg);
    animation: fadeInBack 1s ease-out;
    color: white;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.back::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px) rotateY(10deg); }
    to { opacity: 1; transform: translateY(0) rotateY(0); }
}

@keyframes fadeInBack {
    from { opacity: 0; transform: rotateY(180deg) translateY(20px); }
    to { opacity: 1; transform: rotateY(180deg) translateY(0); }
}

/* Especificar que estos h2 son solo para cards */
.card h2 {
    margin: 0 0 12px;
    font-size: 1.4rem;
    color: #110E45;
    text-align: center;
    font-weight: 700;
}

.card:hover h2 {
    color: #18AAE3;
}

.precision-icon {
    width: 70px;
    height: 70px;
    margin: 12px 0;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(184, 115, 51, 0.3);
    padding: 12px;
    background: rgba(184, 115, 51, 0.1);
    transition: all 0.3s ease;
}

.card:hover .precision-icon {
    transform: scale(1.1);
    background: rgba(184, 115, 51, 0.2);
}

/* Especificar que estos p son solo para cards */
.card p {
    margin: 0;
    text-align: center;
    color: #555;
    line-height: 1.4;
    font-size: 0.95rem;
}

.back p {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

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

@media (max-width: 1100px) {
    .cards-column {
        max-width: 45%;
        margin: 0 10px 20px;
    }
}

@media (max-width: 768px) {
    .cards-container {
        flex-direction: column;
        align-items: center;
        padding: 0 15px;
    }

    .cards-column {
        max-width: 100%;
        width: 100%;
        margin: 0 0 20px;
        display: flex;
        justify-content: center;
    }

    .card {
        width: 100%;
        max-width: 320px;
        height: 260px;
    }

    .cards-fichas-container {
        padding: 10px 15px 0;
    }

    .cards-fichas-container h1 {
        font-size: 1.8rem;
        margin-bottom: 8px;
    }

    .cards-description {
        margin-bottom: 3px;
        font-size: 0.9rem;
    }

    .metallic-section {
        padding: 15px 0;
    }
}

@media (max-width: 480px) {
    .card {
        height: 240px;
    }

    .precision-icon {
        width: 60px;
        height: 60px;
    }

    .card h2 {
        font-size: 1.3rem;
    }

    .card p {
        font-size: 0.9rem;
    }
}