/* ==========================================================================
   Floating Image Effect - CSS Component
   Prefijo: flt- (floating)
   ========================================================================== */

/* Container principal */
.flt-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.flt-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #00ff88;
}

.flt-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

.flt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 20px;
}

/* Card base */
.flt-card {
    background: radial-gradient(56.7% 100% at 50% 100%, 
        rgba(0, 168, 73, 0.6) 0%, 
        rgba(0, 166, 72, 0.58) 0%,    
        rgba(0, 113, 49, 0.2) 71.5653%, 
        rgba(0, 0, 0, 0) 100%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 25px;
    padding: 15px 24px 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 200px;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-align: center;
    overflow: visible; /* Permitir overflow para imagen flotante */
}

.flt-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(0, 255, 136, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Línea superior animada */
.flt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%,
        #00ff88 20%, 
        #33ff99 50%,
        #00ff88 80%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

/* Contenedor de icono normal */
.flt-card-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, 
        rgba(0, 255, 136, 0.1) 0%, 
        rgba(0, 255, 136, 0.05) 100%
    );
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    position: relative;
    flex-shrink: 0;
    margin-bottom: 20px;
    box-shadow: 
        0 8px 25px rgba(0, 255, 136, 0.15),
        inset 0 2px 0 rgba(255, 255, 255, 0.1);
}

.flt-card:hover .flt-card-icon {
    transform: scale(1.05);
    border-color: #00ff88;
    background: linear-gradient(135deg, 
        rgba(0, 255, 136, 0.2) 0%, 
        rgba(0, 255, 136, 0.1) 100%
    );
    box-shadow: 
        0 12px 35px rgba(0, 255, 136, 0.25),
        inset 0 2px 0 rgba(255, 255, 255, 0.15);
}

/* EFECTO FLOTANTE - Prefijo: flt-floating- */
.flt-card-floating {
    /* Card especial para efecto flotante */
    position: relative;
    z-index: 1;
    overflow: visible !important;
}

/* Imagen flotante directa - SIN CÍRCULO */
.flt-floating-img {
    width: 230px; /* IMAGEN FLOTANTE DIRECTA */
    height: 230px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex-shrink: 0;
    margin-top: -100px; /* FLOTACIÓN: Sobresale del contenedor */
    margin-bottom: 5px;
    z-index: 2;
    object-fit: contain;
    filter: none !important; /* Sin filtros para PNG */
 
}

.flt-card-floating:hover .flt-floating-img {
    transform: scale(1.1) translateY(-12px); /* Efecto hover en imagen */
    box-shadow: 
        0 35px 70px rgba(0, 255, 136, 0.4),
        0 20px 40px rgba(0, 0, 0, 0.6);
}

/* Imágenes dentro de los iconos normales */
.flt-card-icon img {
    width: 60px;
    height: 60px;
    transition: all 0.4s ease;
    object-fit: contain;
}

/* Efecto hover en imágenes normales */
.flt-card:hover .flt-card-icon img {
    transform: scale(1.1);
}

/* Filtros para SVG vs PNG */
.flt-card-icon img[src$=".svg"] {
    filter: brightness(0) saturate(100%) invert(72%) sepia(89%) saturate(1200%) hue-rotate(109deg) brightness(97%) contrast(107%);
}

.flt-card:hover .flt-card-icon img[src$=".svg"] {
    filter: brightness(0) saturate(100%) invert(72%) sepia(89%) saturate(1400%) hue-rotate(109deg) brightness(105%) contrast(110%);
}

/* PNG sin filtros */
.flt-card-icon img[src$=".png"],
.flt-card-icon img[src*=".png"],
.flt-floating-img[src$=".png"],
.flt-floating-img[src*=".png"] {
    filter: none !important;
}

/* Contenido de texto */
.flt-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* Empuja el contenido hacia abajo */
    text-align: center;
    width: 100%;
    flex-grow: 1; /* Ocupa todo el espacio disponible */
    margin-top: auto; /* Empuja el contenido hacia el final */
}

.flt-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    transition: all 0.3s ease;
    line-height: 1.3;
}

.flt-card:hover .flt-card-title {
    color: #33ff99;
}

/* Ajustes para card flotante */
.flt-card-floating .flt-card-content {
    margin-top: auto; /* Empuja el contenido hacia abajo */
    padding-top: 20px; /* Más espacio entre imagen y texto */
    padding-bottom: 10px; /* Espacio en la parte inferior */
}

/* Indicador visual (opcional) */
.flt-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #00ff88;
    color: #000;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    z-index: 3;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.flt-card-floating .flt-badge {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet */
@media (max-width: 768px) {
    .flt-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 10px;
    }
    
    .flt-card {
        min-height: 180px;
    }
    
    .flt-card-icon {
        width: 100px;
        height: 100px;
    }
    
    .flt-floating-img {
        width: 180px; /* Imagen flotante más pequeña en tablet */
        height: 180px;
        margin-top: -80px;
    }
    
    .flt-card-icon img {
        width: 50px;
        height: 50px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .flt-title {
        font-size: 2rem;
    }
    
    .flt-floating-img {
        width: 150px; /* Imagen flotante más pequeña en móvil */
        height: 150px;
        margin-top: -60px; /* Menos flotación en pantallas pequeñas */
    }
    
    .flt-card {
        padding: 10px 20px 20px;
        min-height: 160px;
    }
    
    .flt-card-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 15px;
    }
    
    .flt-card-icon img {
        width: 40px;
        height: 40px;
    }
    
    .flt-card-title {
        font-size: 14px;
    }
}

/* ==========================================================================
   VARIANTES DE TAMAÑO (opcional)
   ========================================================================== */

/* Imagen flotante pequeña */
.flt-floating-img-sm {
    width: 150px !important;
    height: 150px !important;
    margin-top: -70px !important;
}

/* Imagen flotante mediana */
.flt-floating-img-md {
    width: 200px !important;
    height: 200px !important;
    margin-top: -85px !important;
}

/* Imagen flotante grande */
.flt-floating-img-lg {
    width: 280px !important;
    height: 280px !important;
    margin-top: -120px !important;
}

/* ==========================================================================
   TEMAS DE COLOR (opcional)
   ========================================================================== */

/* Tema azul */
.flt-theme-blue .flt-card {
    border-color: rgba(0, 136, 255, 0.3);
}

.flt-theme-blue .flt-card-icon {
    border-color: rgba(0, 136, 255, 0.3);
    background: linear-gradient(135deg, 
        rgba(0, 136, 255, 0.1) 0%, 
        rgba(0, 136, 255, 0.05) 100%
    );
}

/* Tema púrpura */
.flt-theme-purple .flt-card {
    border-color: rgba(139, 92, 246, 0.3);
}

.flt-theme-purple .flt-card-icon {
    border-color: rgba(139, 92, 246, 0.3);
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(139, 92, 246, 0.05) 100%
    );
}

/* Tema naranja */
.flt-theme-orange .flt-card {
    border-color: rgba(255, 165, 0, 0.3);
}

.flt-theme-orange .flt-card-icon {
    border-color: rgba(255, 165, 0, 0.3);
    background: linear-gradient(135deg, 
        rgba(255, 165, 0, 0.1) 0%, 
        rgba(255, 165, 0, 0.05) 100%
    );
}

.flt-theme-orange .flt-badge {
    background: linear-gradient(45deg, #ff9500, #ffb84d);
    color: white;
}
