/* ========== CARDS/TARJETAS GENERALES ========== */
/* CSS reutilizable para tarjetas con borde animado */

/* Grid de cards */
.cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tarjeta base */
.card {
    position: relative;
    width: 280px;
    min-height: 380px;
    padding: 40px 25px;
    border-radius: 40px;
    text-align: center;
    transition: transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card:hover {
    transform: translateY(-10px);
}

/* Colores de cards */
.card--rosa {
    background-color: #FF9AA2;
}

.card--turquesa {
    background-color: #4DBCC8;
}

.card--amarillo {
    background-color: #FFD460;
}

.card--verde {
    background-color: #A2D785;
}

.card--morado {
    background-color: #B590E6;
}

/* Contenido de card */
.card__contenido {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

/* Icono de card */
.card__icono {
    font-size: 4rem;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.2);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Título de card */
.card h3 {
    font-family: var(--font-titulo);
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #FFFFFF;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
}

/* Texto de card */
.card p {
    font-family: var(--font-cuerpo);
    font-size: 1.1rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

.card strong {
    color: #FFFFFF;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(255, 255, 255, 0.5);
}

/* ========== BORDE ANIMADO SVG ========== */
.card__borde {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    pointer-events: none;
    z-index: 1;
}

.card__borde svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.card__borde rect {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 2;
    stroke-dasharray: 12, 12;
    stroke-linecap: round;
    rx: 30px;
    ry: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Animación del borde en hover */
@keyframes dash-animation {
    to {
        stroke-dashoffset: -200;
    }
}

.card:hover .card__borde rect {
    animation: dash-animation 6s linear infinite;
    opacity: 1;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .cards-grid {
        gap: 20px;
    }
    
    .card {
        width: 100%;
        max-width: 320px;
        min-height: auto;
        padding: 25px 20px 30px;
    }
    
    .card__icono {
        font-size: 3rem;
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
    }
    
    .card h3 {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }
    
    .card p {
        font-size: 0.95rem;
    }
}
