/**
 * HelyDev Flip Card - Estilos del Componente
 * 
 * Tarjeta con efecto 3D flip al hacer hover
 * @package HelyDev_Core
 * @subpackage Components/Flip_Card
 */

/* ==========================================================================
   Flip Card - Contenedor Principal
   ========================================================================== */

.helydev-flip-card {
    width: 320px;
    height: 380px;
    background-color: transparent;
    perspective: 1000px;
    font-family: var(--helydev-font-family, 'Helvetica', Arial, sans-serif);
}

/* ==========================================================================
   Flip Card - Elemento Interior (El que gira)
   ========================================================================== */

.helydev-flip-card__inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

@media (hover: hover) {
    /* Efecto de giro al hacer hover (solo en dispositivos con hover) */
    /* Evitar que hover interfiera si ya está flipped por JS */
    .helydev-flip-card:not(.is-flipped):hover .helydev-flip-card__inner {
        transform: rotateY(180deg);
    }
}

/* Soporte universal para flip mediante clase JS */
/* Esto asegura que funcione siempre que JS añada la clase */
.helydev-flip-card.is-flipped .helydev-flip-card__inner {
    transform: rotateY(180deg);
}

/* ==========================================================================
   Flip Card - Caras (Frontal y Trasera)
   ========================================================================== */

.helydev-flip-card__front,
.helydev-flip-card__back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
    border-radius: 35px;
}

/* Cara trasera - inicialmente rotada */
.helydev-flip-card__back {
    transform: rotateY(180deg);
}

/* ==========================================================================
   Flip Card - Estilos Predefinidos
   ========================================================================== */

/* Estilo Azul */
.helydev-flip-card--blue .helydev-flip-card__front,
.helydev-flip-card--blue .helydev-flip-card__back {
    background-color: #0d3b61;
    color: #ffffff;
}

.helydev-flip-card--blue .helydev-flip-card__icon svg {
    stroke: #ffffff;
}

.helydev-flip-card--blue .helydev-flip-card__icon i {
    color: #ffffff;
}

.helydev-flip-card--blue .helydev-flip-card__btn {
    background-color: #f5a600;
    color: #ffffff;
}

/* Estilo Naranja */
.helydev-flip-card--orange .helydev-flip-card__front,
.helydev-flip-card--orange .helydev-flip-card__back {
    background-color: #f5a600;
    color: #ffffff;
}

.helydev-flip-card--orange .helydev-flip-card__icon svg {
    stroke: #ffffff;
}

.helydev-flip-card--orange .helydev-flip-card__icon i {
    color: #ffffff;
}

.helydev-flip-card--orange .helydev-flip-card__btn {
    background-color: #0d3b61;
    color: #ffffff;
}

/* ==========================================================================
   Flip Card - Icono
   ========================================================================== */

.helydev-flip-card__icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.helydev-flip-card__icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke-width: 2;
}

.helydev-flip-card__icon i {
    font-size: 60px;
    line-height: 1;
}

/* ==========================================================================
   Flip Card - Título
   ========================================================================== */

.helydev-flip-card__title {
    font-size: 1.4rem;
    margin: 15px 0;
    line-height: 1.2;
    font-weight: 600;
}

/* ==========================================================================
   Flip Card - Descripción
   ========================================================================== */

.helydev-flip-card__description {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 25px;
    opacity: 0.9;
}

/* ==========================================================================
   Flip Card - Botón
   ========================================================================== */

.helydev-flip-card__btn {
    text-decoration: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: filter 0.3s ease, transform 0.3s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
    text-align: center;
}

.helydev-flip-card__btn:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

/* ==========================================================================
   Flip Card - Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .helydev-flip-card {
        width: 280px;
        height: 340px;
    }

    .helydev-flip-card__front,
    .helydev-flip-card__back {
        padding: 20px;
    }

    .helydev-flip-card__title {
        font-size: 1.2rem;
    }

    .helydev-flip-card__description {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .helydev-flip-card {
        width: 100%;
        max-width: 100%;
        height: 320px;
    }
}

/* ==========================================================================
   Flip Card - Soporte para Touch (Móviles)
   ========================================================================== */


